|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sage.orion.sdata.servlet.accpac.Resource
public class Resource
The Resource class wraps the resource definition files and exposes their content in a usable fashion, including defaulting, checking validity etc. This class is tied to the JiBX binding file viewResourceBinding.xml. It should not be changed without studying the ramifications in the binding file.
See the binding file for documentation on the structure.
Constructor Summary | |
---|---|
Resource()
|
Method Summary | |
---|---|
void |
addChildResource(Resource resource)
Adds the given resource as a child resource. |
Resource |
getChildResource(java.lang.String name)
get the child Resource with the given name. |
java.util.List<Resource> |
getChildResources()
Gets all the child resources. |
java.util.Collection<java.lang.String> |
getConfigurationErrors()
gets a list of the configuration errors that occurred during parsing the configuration file |
int |
getDefiningIndex()
gets the defining index for the view |
java.lang.String |
getDescription()
Gets the resource's description. |
java.lang.String |
getDescriptorField()
gets the name of the field that describes a record |
java.lang.String |
getFieldIDOfName(java.lang.String name)
Gets the accpac view field name (viewID) for the given sdata field name. |
java.lang.String |
getKind()
returns the resource kind name of the resource. |
java.lang.String |
getName()
Gets the resource's name. |
OptionalFieldsView |
getOptionalFields()
gets the optional fields view of the resource, or null if there is none |
Resource |
getParentResource()
Gets the resource's parent resource. |
java.lang.String |
getPluralName()
Gets the plural name of the resource. |
java.util.Collection<ReferencedResource> |
getReferencedResources()
returns the ReferencedResource of this object |
ReferencedResource |
getRelatedResource(java.lang.String property)
gets the related resource corresponding to the resource property name |
java.lang.String |
getRenamedField(java.lang.String viewFieldID)
Gets the renamed field for the given view field ID for the resource. |
java.lang.String |
getReportName()
Gets the report name value. |
java.lang.String |
getServiceMapFile()
Gets the service map file or null if there is no service map file. |
java.lang.String |
getType()
Gets the type of the resource. |
java.util.List<ResourceViewField> |
getViewFieldsList(com.sage.accpac.sm.view.IView view)
Returns the list of view fields that are specified for this resource. |
java.lang.String |
getViewID()
Gets the resource's viewID. |
java.util.List<ResourceVirtualField> |
getVirtualFieldsList()
Gets a List of the virtual fields for the resource. |
boolean |
hasChildren()
|
boolean |
hasNonOptionalFieldWithName(java.lang.String sdataName,
com.sage.accpac.sm.view.IViewFields fields)
checks whether the resource already has a non-optional item with the given SData name (i.e. |
boolean |
hasParent()
|
boolean |
isList()
returns whether or not the resource is a list resource. |
boolean |
lookupUsesKey(java.lang.String viewFieldID)
returns whether or not the given field is used as a key field for a foreign reference involved in a lookup |
void |
setName(java.lang.String name)
Sets the name of the resource. |
void |
setPluralName(java.lang.String pluralName)
Sets the plural name of the resource. |
void |
setServiceMapFile(java.lang.String serviceMapFile)
|
boolean |
supportsRecordNumbers()
Returns whether or not the resource supports record numbers. |
boolean |
usesKeyedPaging()
returns whether or not the resource uses keyed paging. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Resource()
Method Detail |
---|
public java.util.Collection<java.lang.String> getConfigurationErrors()
getConfigurationErrors
in interface JiBXConfigurationResource
public int getDefiningIndex()
public OptionalFieldsView getOptionalFields()
public java.lang.String getReportName()
public void addChildResource(Resource resource)
resource
- the resource to addpublic java.util.List<ResourceVirtualField> getVirtualFieldsList()
public java.lang.String getType()
public java.lang.String getDescription()
public java.lang.String getViewID()
public java.lang.String getName()
public java.lang.String getPluralName()
public java.lang.String getRenamedField(java.lang.String viewFieldID)
viewFieldID
- the ID of the field.
public java.lang.String getFieldIDOfName(java.lang.String name)
name
- the external SData name for the field
public java.util.List<Resource> getChildResources()
public boolean hasChildren()
true
if the Resource has children.public void setPluralName(java.lang.String pluralName)
pluralName
- the plural name of the resourcepublic Resource getParentResource()
public boolean hasParent()
true
if the resource has a parent.public void setName(java.lang.String name)
Also default the pluralName & type properties if they are currently null or empty.
name
- the name of the resourcepublic Resource getChildResource(java.lang.String name)
name
- name of the resource
public java.util.Collection<ReferencedResource> getReferencedResources()
ReferencedResource
of this object
public ReferencedResource getRelatedResource(java.lang.String property)
property
- the property name whose related resource we are seeking
ReferencedResource
which relates to this propertypublic java.lang.String getServiceMapFile()
public void setServiceMapFile(java.lang.String serviceMapFile)
serviceMapFile
- the serviceMapFile to setpublic boolean usesKeyedPaging()
public java.lang.String getKind()
For the top resource of the resource tree the resource name and the resource kind name should be the same. However for a sub-resource the resource name reflects the name of the property that refers to it in the parent while the kind name is the name that it appears as at the top level of the schema
public boolean isList()
public java.util.List<ResourceViewField> getViewFieldsList(com.sage.accpac.sm.view.IView view)
This list includes only view fields, not virtual fields.
view
- the View that relates to the resource
public boolean lookupUsesKey(java.lang.String viewFieldID)
viewFieldID
- the view field ID of the field in this resource that might be
part of a reference
public boolean hasNonOptionalFieldWithName(java.lang.String sdataName, com.sage.accpac.sm.view.IViewFields fields)
sdataName
- the SData name to be checkedfields
- the IViewFields
containing the actual fields of the view
true
if the resource has a non-optional/custom field
or child resource etc, which is exposed from this resource with
the given name.public boolean supportsRecordNumbers()
public java.lang.String getDescriptorField()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |