com.sage.orion.sdata.servlet.accpac
Class ServiceHelper

java.lang.Object
  extended by com.sage.orion.sdata.servlet.accpac.ServiceHelper

public final class ServiceHelper
extends java.lang.Object


Method Summary
static java.util.List<ServiceField> getServiceFields(com.sage.accpac.sm.view.IView view, boolean readOnly, boolean calculated)
          Get a list of service fields from a view.
static void setFieldsValue(SDataView view, SDataResourceElement payload, boolean verify)
          Set the value of the view fields using input payload
static ServiceField viewFieldToServiceField(com.sage.accpac.sm.view.IViewField viewField)
          Translate a view field into a service field
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getServiceFields

public static java.util.List<ServiceField> getServiceFields(com.sage.accpac.sm.view.IView view,
                                                            boolean readOnly,
                                                            boolean calculated)
Get a list of service fields from a view. All the view fields (except for those disabled , and optionally calculated and readOnly) of the view will be added to the list of service fields

Parameters:
view - the SDataView
readOnly - whether or not to include readOnly fields in the list of service fields
calculated - whether or not to include calculated fields in the list of service fields
Returns:
a list of service fields. Note that the value for each field is set to corresponding viewField's value.

setFieldsValue

public static void setFieldsValue(SDataView view,
                                  SDataResourceElement payload,
                                  boolean verify)
Set the value of the view fields using input payload

Parameters:
view - the SDataView
payload - the input payload
verify - specifies whether the values should be verified at this stage

viewFieldToServiceField

public static ServiceField viewFieldToServiceField(com.sage.accpac.sm.view.IViewField viewField)
Translate a view field into a service field

Parameters:
viewField - the view field to be translated
Returns:
a service field
Throws:
java.lang.NullPointerException - if the view field to be translated is disabled


Copyright © 2011 Sage Software, Inc. All rights reserved.