Package com.ptc.core.adapter.server.impl
Class AbstractWebject
java.lang.Object
com.ptc.core.adapter.server.impl.AbstractWebject
- All Implemented Interfaces:
com.infoengine.object.factory.AdapterWebject,com.ptc.core.adapter.server.impl.TypeAwareWebjectDelegate,Externalizable,Serializable
- Direct Known Subclasses:
AbstractLinkShipPartsWebject,ActionWebject,ObjectWebject
public abstract class AbstractWebject
extends Object
implements com.infoengine.object.factory.AdapterWebject, com.ptc.core.adapter.server.impl.TypeAwareWebjectDelegate, Externalizable
The base class for Windchill Adapter webjects. This abstract class contains only the most
basic and widely shared functionality used by all Windchill Adapter webjects. Subclasses of this class,
like ObjectWebject and ActionWebject, encapsulate functionality more specific to a certain type of
adapter webject. Windchill Adapter webjects should extend the appropriate subclass of AbstractWebject
to gain the type of functionality required.
Supported API: true
Extendable: true
Supported API: true
Extendable: true
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.apache.logging.log4j.Loggerwt.adapter.verbose logger
Supported API: trueprotected static final org.apache.logging.log4j.Loggerwt.adapter.attribute logger (
Supported API: trueprotected String[]Contains a list of the values provided by the user for the webject's "ATTRIBUTE" param.protected AttributeContainerSpecThe com.ptc.core.meta.container.common.AttributeContainerSpec to use for commands executed by a webject delegate.protected AttributeContainerSetProvides the criteria for finding containers specified by the webject's "CONTAINER_REF" param.protected WTContainerRef[]Contains a list of wt.inf.container.WTContainerRef objects as specified by the user in the webject's "CONTAINER_REF" param.protected String[]Contains a list of the values provided by the user for the webject's "DESCRIPTOR" param.protected booleanIndicates whether the attribute values in the output group's type instances should be formatted for the end user.protected StringThe class name of objects in the output group as indicated by the webject's "TYPE" param.protected StringThe name of the output group as indicated by the webject's "GROUP_OUT" param.protected booleanIndicates whether to include args in command filters.protected booleanIndicates whether to include constraints in command filters.protected booleanIndicates whether to include descriptors in command filters.protected LocaleIndicates the locale of the webject.protected StringThe intended next operation to be performed on the webject's result type instance(s).protected String[]Contains a list of the values provided by the user for the webject's "OBJECT_REF" param.Contains a list of reference attributes provided by the user with the webject's "ATTRIBUTE" param.protected StringThe delimiter for reference attributes specified in the webject's "ATTRIBUTE" param.protected booleanIndicates whether or not access control exceptions thrown while expanding reference attributes should be propagated.protected StringThe delimiter for reference attributes returned for expanded references in the webject's output group .protected StringThe target type of the webject delegate's operation as indicated by the webject's "TYPE" param.protected static final org.apache.logging.log4j.Loggerwt.adapter.trace.timing logger
Supported API: trueList of Classes (java types) to remain unformatted if formatAttributes is true.protected com.infoengine.object.factory.WebjectThe current webject object.protected static final org.apache.logging.log4j.Loggerwt.adapter.webject logger
Supported API: trueprotected StringThe where clause of the webject delegate's operation as indicated by the webject's "WHERE" param. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFilteredTypeInstance(com.infoengine.object.factory.Group group, TypeInstance typeInstance, String[] attributes) Adds the type instance to the group.com.infoengine.object.factory.ElementaddTypeInstance(com.infoengine.object.factory.Group group, TypeInstance typeInstance) Adds the type instance to the group.executeCommand(Command command) Executes the given command and returns a new command containing the result.protected AttributeContainerSetSubclasses may choose to over-ride if they want to support additional query criteria beyond that constructed from the where clause.getAttributeContainerSet(String whereclause, TypeIdentifier typeId) Returns the AttributeContainerSet for the attributes specified in the where clause.protected AttributeIdentifiergetAttributeIdentifier(TypeInstance typeInstance, AttributeTypeIdentifier attrTypeId, Object value) Returns an attribute identifier for the provided context.String[]getAttributes(com.infoengine.object.factory.Webject webject) Returns a list of logical attribute names specified with the webject's "ATTRIBUTE" param.static AttributeTranslatorgetAttributeTranslator(AttributeTypeIdentifier attrTypeId) Returns an attribute translator for the given attribute type identifier.static AttributeTranslatorgetAttributeTranslator(Class targetClass) Returns an attribute translator for the given target class.getAttributeTypeIdentifier(String attribute, TypeIdentifier typeId) Returns the AttributeTypeIdentifier for the given attribute and TypeIdentifier.getAttributeTypeIdentifiers(String[] attributes, TypeIdentifier typeId) Returns an array of AttributeTypeIdentifiers for a given TypeIdentifier.protected BasicResultSpecSubclasses may choose to over-ride if they want to support special result processing of query results.protected AttributeContainerSetReturns search criteria built for the container reference(s) used by the webject.protected WTContainerRef[]getContainers(com.infoengine.object.factory.Task task, String[] containerRefParams) Returns a set of container references that will be used by the webject.String[]getDefaultAttributes(TypeIdentifier typeIdentifier) Given a type identifier, returns a list of logical attribute names which have been configured as default.getFilter(TypeIdentifier typeId, String[] attributes) Given the value(s) of the webject's attribute parameter, return a command filter.getFilter(TypeInstance instance, String[] attributes) Given the value(s) of the webject's attribute parameter, return a command filter.Gets the name of the Windchill adapter's local domain.protected Locale
Supported API: trueReturns the local GUID for the Windchill adapter.getOBID(TypeInstance ti) Returns the obid for the given TypeInstance.protected intSee doc for getPageMode().protected PageModeSubclasses may choose to over-ride if they want to support paging of queries.protected intSee doc for getPageMode().protected intSubclasses may choose to over-ride if they want to support a query limit.protected TypeInstancegetRemoteObject(String ufid, String objectType, String objectId) Returns a type instance representing an object located in a remote repository.getResultContainer(AttributeContainerSet acs, TypeIdentifier typeId) This method does a container-aware query for type instances using the given type identifier and search criteria.protected SortSpecSubclasses may choose to over-ride if they want to support sorting of query results.Convenience method that returns a Vector of target type instances specified by the user via the webject's TYPE/WHERE and/or OBJECT_REF params.getTypeIdentifier(String classname) Returns the type identifier for the given class or type name.getTypeInstance(String obid) Returns a TypeInstance for the given obid.getTypeInstance(String obid, String[] attributes) Returns a TypeInstance for the given obid.getTypeInstance(Persistable persistable, String[] attributes) Returns the type instance corresponding to the given persistable object.getTypeInstances(String[] obids, String[] attributes) Returns an array of TypeInstances for the given list of obids.getTypeInstances(String className, String whereclause, String[] attributes) This container-aware method returns a Vector of TypeInstances for the given type and search condition(s) in the where clause.protected voidinputObjectRefsFromGroup(com.infoengine.object.factory.Group inputGroup) Processes a Group placing any Ufids from within that group in the objectRefs vector.abstract com.infoengine.object.factory.Taskinvoke(com.infoengine.object.factory.Task task) Webject delegate subclasses implement this method to perform work.protected boolean
Supported API: truebooleanisLocalDomain(String domain) Determines if the given domain is equivalent to the Windchill adapter's local domain.protected voidSubclasses may choose to over-ride if they wish to gain access to a command following execution to extract info from it.voidpreset(com.infoengine.object.factory.Task task) This convenience method is intended to be called in the invoke() method to convert a standard set of webject param values into the various search structures (SearchInfo, SearchCriteriaInfo, SearchPagingInfo, SearchSortInfo).protected TypeInstancerefreshTypeInstance(TypeIdentifier tid, String[] attributes) Gets a refreshed type instance for the type.protected TypeInstancerefreshTypeInstance(TypeInstanceIdentifier typeInstanceID, String[] attributes) Gets a refreshed type instance for the type instance ID.protected voidsetFormatAttributes(boolean fa)
Supported API: trueprotected void
Supported API: trueprotected voidsetRequestedAttributeNames(TypeIdentifier typeId, Map atts2Ids) Creates a request time mapping of simple attribute name to list of AttributeTypeIdentifiers for a specific TypeIdentifier.
-
Field Details
-
adapterLogger
protected static final org.apache.logging.log4j.Logger adapterLoggerwt.adapter.verbose logger
Supported API: true -
attributeLogger
protected static final org.apache.logging.log4j.Logger attributeLoggerwt.adapter.attribute logger (
Supported API: true -
webjectLogger
protected static final org.apache.logging.log4j.Logger webjectLoggerwt.adapter.webject logger
Supported API: true -
traceLogger
protected static final org.apache.logging.log4j.Logger traceLoggerwt.adapter.trace.timing logger
Supported API: true -
locale
Indicates the locale of the webject. Formatted attribute values will use this locale. See the Windchill Adapter Guide for information on how webjects determine the locale.
Supported API: true -
attributeParams
Contains a list of the values provided by the user for the webject's "ATTRIBUTE" param. Empty if no values were provided.
Supported API: true -
groupOutClass
The class name of objects in the output group as indicated by the webject's "TYPE" param. By default, "wt.fc.WTObject".
Supported API: true -
groupOutName
The name of the output group as indicated by the webject's "GROUP_OUT" param. By default, webjectName + "-Output".
Supported API: true -
objectRefs
Contains a list of the values provided by the user for the webject's "OBJECT_REF" param. Empty if no values were provided.
Supported API: true -
targetType
The target type of the webject delegate's operation as indicated by the webject's "TYPE" param. By default, "wt.fc.WTObject".
Supported API: true -
whereClause
The where clause of the webject delegate's operation as indicated by the webject's "WHERE" param. The value is null if no "WHERE" param was specified.
Supported API: true -
nextOp
The intended next operation to be performed on the webject's result type instance(s). By default, the next operation is com.ptc.core.meta.common.OperationIdentifierConstants.VIEW.
Supported API: true -
descriptorParams
Contains a list of the values provided by the user for the webject's "DESCRIPTOR" param. Empty if no values were provided.
Supported API: true -
formatAttributes
protected boolean formatAttributesIndicates whether the attribute values in the output group's type instances should be formatted for the end user. If so, then formatting is done according to locale.
Supported API: true -
unformatted
List of Classes (java types) to remain unformatted if formatAttributes is true.
Supported API: true -
includeConstraints
protected boolean includeConstraintsIndicates whether to include constraints in command filters.
Supported API: true -
includeDescriptors
protected boolean includeDescriptorsIndicates whether to include descriptors in command filters.
Supported API: true -
includeArgs
protected boolean includeArgsIndicates whether to include args in command filters.
Supported API: true -
referenceAttributes
Contains a list of reference attributes provided by the user with the webject's "ATTRIBUTE" param. Empty if no references were provided.
Supported API: true -
referenceDelimiter
The delimiter for reference attributes specified in the webject's "ATTRIBUTE" param. Default is "^".
Supported API: true -
referenceExceptions
protected boolean referenceExceptionsIndicates whether or not access control exceptions thrown while expanding reference attributes should be propagated. If specified as false, exceptions are not propagated and null values are returned instead. Default is "true".
Supported API: true -
referenceOutputDelimiter
The delimiter for reference attributes returned for expanded references in the webject's output group . Default is "^".
Supported API: true -
commandFilter
The com.ptc.core.meta.container.common.AttributeContainerSpec to use for commands executed by a webject delegate. The default behavior is for webject delegates to call a getFilter(...) method to build an appropriate filter for a command.
Supported API: true -
containerRefs
Contains a list of wt.inf.container.WTContainerRef objects as specified by the user in the webject's "CONTAINER_REF" param. Empty if no values were provided.
Supported API: true -
containerQueryCriteria
Provides the criteria for finding containers specified by the webject's "CONTAINER_REF" param. This can be added to other AttributeContainerSpecs.
Supported API: true -
webject
protected com.infoengine.object.factory.Webject webjectThe current webject object. Initialized by preset.
Supported API: true
-
-
Method Details
-
invoke
public abstract com.infoengine.object.factory.Task invoke(com.infoengine.object.factory.Task task) throws WTException Webject delegate subclasses implement this method to perform work. The Task argument contains the Windchill adapter webject requested by the user. The Task return value contains the output group(s), if any, resulting from a webject delegate's operation. Most other methods in this class are called from within the invoke() method.
Supported API: true- Specified by:
invokein interfacecom.ptc.core.adapter.server.impl.TypeAwareWebjectDelegate- Parameters:
task- This argument is the Info*Engine task executed by the user. The task embeds a Windchill adapter webject, any input group(s) specified by the user, and context groups (such as the @SERVER group).- Returns:
- Task
- Throws:
WTException
-
preset
This convenience method is intended to be called in the invoke() method to convert a standard set of webject param values into the various search structures (SearchInfo, SearchCriteriaInfo, SearchPagingInfo, SearchSortInfo). All initialization of these structures should happen in this method.
Supported API: true- Parameters:
task- The Info*Engine task executed by the user. This is usually the same Task received by the invoke() method.- Throws:
WTException
-
addFilteredTypeInstance
public void addFilteredTypeInstance(com.infoengine.object.factory.Group group, TypeInstance typeInstance, String[] attributes) throws WTException Adds the type instance to the group. The type instances in the output group contain the attributes specified in the attributes argument. Additionally, OBID and CLASS attributes are added to the type instance, and attribute values are formatted for the end user according to locale if necessary. If necessary, reference attributes will be expanded.
Supported API: true- Parameters:
group- The group to which the type instance will be addedtypeInstance- The type instance which will be added to the group.attributes- Specifies the attributes to include for the type instance.- Throws:
WTException
-
addTypeInstance
public com.infoengine.object.factory.Element addTypeInstance(com.infoengine.object.factory.Group group, TypeInstance typeInstance) throws WTException Adds the type instance to the group. OBID and CLASS attributes will be added to the type instance, and attribute values are formatted for the end user according to locale if necessary. Reference attributes are expanded if necessary. Webject delegates will usually use this method to add command results to an output group.
Supported API: true- Parameters:
group- The group to which the type instance will be added.typeInstance- The type instance to add to the group.- Returns:
- The Info*Engine Element just added to group.
- Throws:
WTException
-
executeCommand
Executes the given command and returns a new command containing the result. The command should already have the command source and filters set as necessary for execution.
Supported API: true- Parameters:
command- The command to execute.- Returns:
- Command
- Throws:
WTException
-
getTypeInstances
public Vector getTypeInstances(String className, String whereclause, String[] attributes) throws WTException This container-aware method returns a Vector of TypeInstances for the given type and search condition(s) in the where clause.
Supported API: true- Parameters:
className- Usually the value of the webject parameter "TYPE", e.g. "WCTYPE|wt.part.WTPart".whereclause- The search criteria, usually the value(s) of the webject parameter "WHERE".attributes- [] The attributes to include in the result type instances, usually the value(s) of the webject parameter "ATTRIBUTE".- Returns:
- Vector
- Throws:
WTException
-
getAttributeTypeIdentifier
public AttributeTypeIdentifier getAttributeTypeIdentifier(String attribute, TypeIdentifier typeId) throws WTException Returns the AttributeTypeIdentifier for the given attribute and TypeIdentifier.
Supported API: true- Parameters:
attribute- The logical form of an attribute name.typeId- The TypeIdentifier for a type.- Returns:
- AttributeTypeIdentifier
- Throws:
WTException
-
getAttributeTypeIdentifiers
public AttributeTypeIdentifier[] getAttributeTypeIdentifiers(String[] attributes, TypeIdentifier typeId) throws WTException Returns an array of AttributeTypeIdentifiers for a given TypeIdentifier. If the attributes argument is null or empty, all attribute type identifiers for the type Identifier are returned.
Supported API: true- Parameters:
attributes- List of logical attribute names valid for the type identifier, usually the value(s) of the webject's "ATTRIBUTE" param.typeId- The type identifier for which to return attribute type identifiers.- Returns:
- AttributeTypeIdentifier []
- Throws:
WTException
-
getLocalDomain
Gets the name of the Windchill adapter's local domain.
Supported API: true- Returns:
- String
- Throws:
WTException
-
isLocalDomain
Determines if the given domain is equivalent to the Windchill adapter's local domain.
Supported API: true- Parameters:
domain- The domain to compare to the local domain.- Returns:
- boolean
- Throws:
WTException
-
getLocalGuid
Returns the local GUID for the Windchill adapter.
Supported API: true- Returns:
- String
- Throws:
WTException
-
getResultContainer
public ResultContainer getResultContainer(AttributeContainerSet acs, TypeIdentifier typeId) throws WTException This method does a container-aware query for type instances using the given type identifier and search criteria.
Supported API: true- Parameters:
acs- The search criteria, usually obtained by resolving the where clause (see getAttributeContainerSet method).typeId- Indicates the type of objects for which to search.- Returns:
- ResultContainer
- Throws:
WTException
-
getTypeIdentifier
Returns the type identifier for the given class or type name.
Supported API: true- Parameters:
classname- The type or class name for which to get a type identifier, e.g. "WCTYPE|wt.part.WTPart".- Returns:
- TypeIdentifier
- Throws:
WTException
-
getTypeInstance
Returns a TypeInstance for the given obid. If the obid specifies a nonlocal domain, a task is dispatched to the remote system to retrieve the type instance. Likewise, if the obid specifies a wt.federation.LightweightProxy, the remote object is returned.
All attributes for the type instance are returned (unless the Windchill adapter has been configured to return a default set of attributes for the target object type).
Supported API: true- Parameters:
obid- The local or remote identifier.- Returns:
- TypeInstance
- Throws:
WTException
-
getOBID
Returns the obid for the given TypeInstance. The obid is the concatenation of the type instance's persistence identifier + the local guid + the local domain.
Supported API: true- Parameters:
ti- The TypeInstance for which the obid is obtained.- Returns:
- String
- Throws:
WTException
-
getAttributes
Returns a list of logical attribute names specified with the webject's "ATTRIBUTE" param. Returns an empty list if the "ATTRIBUTE" param contains no values. If using preset then should simply use the attributeParams instance variable value instead.
Supported API: true- Parameters:
webject-- Returns:
- String[]
-
getTypeInstances
Returns an array of TypeInstances for the given list of obids. If a particular obid specifies a nonlocal domain, a task is dispatched to the remote system to retrieve the type instance. If a particular obid specifies a wt.federation.LightweightProxy, the remote object is retrieved. The result type instance will contain the specified attributes.
Supported API: true- Parameters:
obids- The local or remote identifiers.attributes- Contains a list of logical attribute names to include in the result type instance, usually the value of the webject parameter "ATTRIBUTE". If null or empty, then all attributes valid for the type instance are returned (unless the Windchill adapter has been configured to return a default set of attributes for the target object type).- Returns:
- TypeInstance[]
- Throws:
WTException
-
getTypeInstance
Returns a TypeInstance for the given obid. If the obid specifies a nonlocal domain, a task is dispatched to the remote system to retrieve the type instance. If the obid specifies a wt.federation.LightweightProxy, the remote object is retrieved. The result type instance will contain the specified attributes.
Supported API: true- Parameters:
obid- The local or remote identifier.attributes- Contains a list of logical attribute names to include in the result type instance, usually the value of the webject parameter "ATTRIBUTE". If null or empty, then all attributes valid for the type instance are returned (unless the Windchill adapter has been configured to return a default set of attributes for the target object type).- Returns:
- TypeInstance
- Throws:
WTException
-
getTypeInstance
public TypeInstance getTypeInstance(Persistable persistable, String[] attributes) throws WTException Returns the type instance corresponding to the given persistable object. The specified attributes are included in the type instance.
Supported API: true- Parameters:
persistable- The persistable object for which to return a type instance.attributes- A list of logical attribute names to include in the type instance, usually the value(s) specified for the webject's "ATTRIBUTE" param. If null or empty, then all attributes valid for the type instance are returned (unless the Windchill adapter has been configured to return a default set of attributes for the target object type).- Returns:
- TypeInstance
- Throws:
WTException
-
getFilter
public AttributeContainerSpec getFilter(TypeInstance instance, String[] attributes) throws WTException Given the value(s) of the webject's attribute parameter, return a command filter. If no values were specified for "ATTRIBUTE", then if the Windchill adapter has been configured to use a set of default attributes applying to the type instance, those attributes are included in the filter. If no default attributes have been configured, then all attributes valid for the type instance are included in the filter. The command filter will indicate the next operation and whether to include descriptors, constraints, and args as specified by the webject's params.
Supported API: true- Parameters:
instance- The type instance for which to return a filter.attributes- The attributes to include in the filter, usually the value(s) of the webject's "ATTRIBUTE" param.- Returns:
- AttributeContainerSpec
- Throws:
WTException
-
getDefaultAttributes
Given a type identifier, returns a list of logical attribute names which have been configured as default.
Supported API: true- Parameters:
typeIdentifier-- Returns:
- String []
- Throws:
WTException
-
getFilter
public AttributeContainerSpec getFilter(TypeIdentifier typeId, String[] attributes) throws WTException Given the value(s) of the webject's attribute parameter, return a command filter. If no values were specified for "ATTRIBUTE", then if the Windchill adapter has been configured to use a set of default attributes applying to the type identifier, those attributes are included in the filter. If no default attributes have been configured, then all attributes valid for the type identifier are included in the filter.
Supported API: true- Parameters:
typeId- The type identifier for which to return a filter.attributes- The attributes to include in the filter, usually the value(s) of the webject's "ATTRIBUTE" param.- Returns:
- AttributeContainerSpec
- Throws:
WTException
-
getTargetTypeInstances
Convenience method that returns a Vector of target type instances specified by the user via the webject's TYPE/WHERE and/or OBJECT_REF params. If no TYPE/WHERE or OBJECT_REF params have been specified, an exception is thrown. Webject delegates which accept a GROUP_IN must process that in addition to calling this method in order to obtain all target type instances.
Supported API: true- Returns:
- Vector
- Throws:
WTException
-
getAttributeTranslator
public static AttributeTranslator getAttributeTranslator(AttributeTypeIdentifier attrTypeId) throws WTException Returns an attribute translator for the given attribute type identifier. Used when formatting attribute values.
Supported API: true- Parameters:
attrTypeId- The attribute type ID of the attribute value to be translated.- Returns:
- AttributeTranslator
- Throws:
WTException
-
getAttributeTranslator
Returns an attribute translator for the given target class. Used when formatting attribute values.
Supported API: true- Parameters:
targetClass- The class of the attribute value to be translated.- Returns:
- AttributeTranslator
- Throws:
WTException
-
getAttributeContainerSet
public AttributeContainerSet getAttributeContainerSet(String whereclause, TypeIdentifier typeId) throws WTException Returns the AttributeContainerSet for the attributes specified in the where clause.
Supported API: true- Parameters:
whereclause- Usually the value(s) of the webject parameter "WHERE".typeId- The TypeIdentifier for which whereclause is valid, usually the TypeIdentifier for the "TYPE" parameter of the webject.- Returns:
- AttributeContainerSet
- Throws:
WTException
-
getAttributeIdentifier
protected AttributeIdentifier getAttributeIdentifier(TypeInstance typeInstance, AttributeTypeIdentifier attrTypeId, Object value) throws WTException Returns an attribute identifier for the provided context. The output of this method is intended to be eventually sent to the
setAttributeValue(TypeInstance, AttributeTypeIdentifier, AttributeIdentifier, Object) method.
Supported API: true- Parameters:
typeInstance- The type instance providing context for the attribute identifier.attrTypeId- The type of the attribute identifier.value- Used to determine what kind of attribute identifier to return.- Returns:
- AttributeIdentifier
- Throws:
WTException
-
getContainers
protected WTContainerRef[] getContainers(com.infoengine.object.factory.Task task, String[] containerRefParams) throws WTException Returns a set of container references that will be used by the webject. See the Windchill Adapter Guide for information on how the container(s) are determined.
Supported API: true- Parameters:
task- The task containing the context indicating the containers to use.containerRefParams- The contents of the webject's "CONTAINER_REF" params- Returns:
- WTContainerRef[]
- Throws:
WTException
-
getContainerQueryCriteria
Returns search criteria built for the container reference(s) used by the webject.
Supported API: true- Returns:
- AttributeContainerSet
- Throws:
WTException
-
getRemoteObject
protected TypeInstance getRemoteObject(String ufid, String objectType, String objectId) throws WTException Returns a type instance representing an object located in a remote repository.
Supported API: true- Parameters:
ufid- The ufid pointing to the remote objectobjectType- The type of the remote object. If null, the type of the remote object is guessed by parsing the ufid.objectId- The remote repository's local ID for the object. If null, the object ID is guessed by parsing the ufid.- Returns:
- TypeInstance
- Throws:
WTException
-
isFormatAttributes
protected boolean isFormatAttributes()
Supported API: true -
setFormatAttributes
protected void setFormatAttributes(boolean fa)
Supported API: true -
refreshTypeInstance
protected TypeInstance refreshTypeInstance(TypeInstanceIdentifier typeInstanceID, String[] attributes) throws WTException Gets a refreshed type instance for the type instance ID.
Supported API: true- Parameters:
typeInstanceID- The instance to refresh.attributes- Logical form of the attributes to include in the command filter.- Returns:
- TypeInstance
- Throws:
WTException
-
refreshTypeInstance
protected TypeInstance refreshTypeInstance(TypeIdentifier tid, String[] attributes) throws WTException Gets a refreshed type instance for the type.
Supported API: true- Parameters:
tid- The type for which to create a type instance.attributes- Logical form of the attributes to include in the command filter.- Returns:
- TypeInstance
- Throws:
WTException
-
setRequestedAttributeNames
Creates a request time mapping of simple attribute name to list of AttributeTypeIdentifiers for a specific TypeIdentifier. The method can accept on input an array of AttributeTypeIdentifiers in support of multi-type search. The implementation will decide if the attribute name is appropriate for the type in question and if so store the an array of AttributeTypeIdentifiers for that name to be used during response processing. In general this method is used only internal to AbstractWebject and should not be called but there are times when it may be desireable to remove the list of attributes cached for a given TypeIdentifier if programatically changing the list of attributes to fetch for a type. In that case supply null for the atts2Ids parameter which will remove the list of previously cached attributes for a given TypeIdentifier.
Supported API: true- Parameters:
typeId- The associated TypeIdentifier.atts2Ids- Map of short attribute names to AttributeTypeIdentifier(s). Keys must be String attribute names. Values may be; null (attribute will be skipped), a single AttributeTypeIdentifier, an array of AttributeTypeIdentifiers. Any other type of value will cause the attribute to be skipped and ignored.- Throws:
WTException
-
getLocale
Supported API: true -
setLocale
Supported API: true -
inputObjectRefsFromGroup
protected void inputObjectRefsFromGroup(com.infoengine.object.factory.Group inputGroup) Processes a Group placing any Ufids from within that group in the objectRefs vector. This can be used to simplify logic in webject implementations when a GROUP_IN is being used as little more than a list of OBJECT_REF parameter values. Then only the objectRefs array needs to be examined.
Supported API: true- Parameters:
inputGroup- The input group (may be null).
-
getQueryLimit
protected int getQueryLimit()Subclasses may choose to over-ride if they want to support a query limit. If this method is over-ridden then the getPageMode method must also be over-ridden and a PageMode other than PageMode.NONE returned. If paging is enabled and a positive query limit is returned an exception will occur if the limit is exceeded. Returning a number <= 0 means there is no limit.
Supported API: true- Returns:
- The maximum number of objects the results should include.
- See Also:
-
getPageMode
Subclasses may choose to over-ride if they want to support paging of queries. If this method is over-ridden then getPageCount and getPageOffset must also be over-ridden and the subclass is responsible for validating the dependancies between the values it returns.
Supported API: true- Returns:
- PageMode The PageMode to use when invoking a query.
- See Also:
-
getPageCount
protected int getPageCount()See doc for getPageMode().
Supported API: true- Returns:
- The page size.
- See Also:
-
getPageOffset
protected int getPageOffset()See doc for getPageMode().
Supported API: true- Returns:
- The page offset.
- See Also:
-
getBasicResultSpec
Subclasses may choose to over-ride if they want to support special result processing of query results. This callback is invoked while fetching the result container. The default implementation returns null.
Supported API: true- Returns:
- BasicResultSpec
- Throws:
WTException
-
getAdditionalAttributeContainerSet
protected AttributeContainerSet getAdditionalAttributeContainerSet(TypeIdentifier typeId) throws WTException Subclasses may choose to over-ride if they want to support additional query criteria beyond that constructed from the where clause. This callback is invoked from getAttributeContainerSet. The default implementation returns null.
Supported API: true- Returns:
- AttributeContainerSet
- Throws:
WTException
-
getSortSpec
Subclasses may choose to over-ride if they want to support sorting of query results. This call back is invoked while fetching the result container. The default implementation returns null.
Supported API: true- Returns:
- SortSpec
- Throws:
WTException
-
postExecute
Subclasses may choose to over-ride if they wish to gain access to a command following execution to extract info from it. This call back is invoked while fetching the result container and can be used when fetching TypeInstances via getTypeInstance methods where subclasses aren't exposed to the underlying RepositoryCommand. The default implementation does nothing.
Supported API: true- Parameters:
cmd- The RepositoryCommand after invocation.- Throws:
WTException
-