public class LibraryObjectDefinition extends Object implements Serializable, Cloneable
The main idea behind the use of Definition classes is to afford
extensibility to the way objects are created, without having
to subclass LibrarySession (on which all create methods
are invoked). In order to create a new instance of any object,
you first construct a LibraryObjectDefinition object (or one
of its subclasses), set all of the desired attributes, and then
invoke the appropriate method on LibrarySession (e.g.
createDocument
, createFolder
, etc.)
to actually create the object.
Most of the methods that exist on LibraryObjectDefinition
do not rely on knowledge of a LibrarySession; hence
they generally execute very quickly. Some of the attributes
can be set either by name or by object (e.g. setting the
ClassObject). In the case when the by-name variant
is used, the lookup is not performed until the create method
is invoked on LibrarySession, or unless the lookup is
explicitly requested, for example by calling resolveClassObject
.
resolveClassObject
requires a LibrarySession parameter, as
a connected session is needed to perform the lookup.
As stated before, this class is generally not instantiated directly, as many subclasses are currently defined to create instances of the most common CM SDK classes. Still, this class implements two categories of settings that are generally used by all subclasses of LibraryObjectDefinition:
"FOLDER"
by default). The caller can specify any valid subclass of the
type of instance they are creating; for example, when using
A FolderDefinition, a caller could specify a ClassObject
of "WORKFLOWFOLDER"
.
setFOO
methods to add the setting as
an attribute name/value pair.
Modifier and Type | Class and Description |
---|---|
static interface |
LibraryObjectDefinition.EnumToIntegerCode
A EnumToIntegerCode is used for performing looking up integer codes
for an enum,
|
static interface |
LibraryObjectDefinition.LookupByName
A LookupByName is used for performing LibraryObject lookup
operations using a lambda expression.
|
Modifier and Type | Field and Description |
---|---|
protected HashMap |
m_Attributes |
protected String |
m_ClassObjectName |
protected AttributeValue |
m_ClassObjectValue |
protected HashMap |
m_ContentSpecifications |
protected HashMap |
m_DefinitionLists |
protected HashMap |
m_Definitions |
protected LibraryObjectDefinition |
m_EnclosedDefinition |
protected Long |
m_Id |
protected HashMap |
m_Options |
protected boolean |
m_ReadOnly |
protected HashMap |
m_ReferenceAttributes |
protected LibrarySessionInterface |
m_Session |
protected HashMap |
m_SystemOptions |
Constructor and Description |
---|
LibraryObjectDefinition(LibrarySessionInterface session)
Construct a definition.
|
LibraryObjectDefinition(LibrarySessionInterface session,
String className)
Construct a definition, explicitly capturing the
session and setting the initial classobject.
|
Modifier and Type | Method and Description |
---|---|
void |
addDefinition(String name,
LibraryObjectDefinition value)
Add a definition to a definition list, which is identified by the specified name.
|
void |
addDefinitions(String name,
LibraryObjectDefinition[] values)
Add definitions to a definition list, which is identified by the specified name.
|
void |
addProperty(String key,
AttributeValue value)
Add a property definition to the definition.
|
void |
addPropertyDefinition(AttributeValueTable propTable)
Adds a new PropertyDefinition for a Property
specified in a table.
|
void |
addPropertyDefinition(PropertyDefinition pDef)
Add a property definition to the definition.
|
void |
addPropertyDefinitions(List<AttributeValueTable> propsList)
Adds a set of new PropertyDefinitions via a table list.
|
void |
addPropertyDefinitions(PropertyDefinition[] pDefs)
Adds property definitions to the definition.
|
void |
addSimplePropertyDefinition(String attrName,
AttributeValueTable propTable)
Adds a new SimplePropertyDefinition for a SimpleProperty
specified in a table, for the specified attribute.
|
void |
addSimplePropertyDefinition(String attrName,
SimplePropertyDefinition def)
Adds a new SimplePropertyDefinition for the specified attribute.
|
void |
addSimplePropertyDefinitions(String attrName,
List<AttributeValueTable> propsList)
Adds a set of new SimplePropertyDefinitions via a table list,
for the specified attribute.
|
void |
addSimplePropertyDefinitions(String attrName,
SimplePropertyDefinition[] defs)
Adds a set of new SimplePropertyDefinitions for the specified attribute.
|
void |
applyEnumSetting(AttributeValueTable avt,
LibraryObjectDefinition.EnumToIntegerCode func,
String key)
Applies an enum setting for the specified key.
|
void |
applyEnumSetting(AttributeValueTable avt,
LibraryObjectDefinition.EnumToIntegerCode func,
String key,
String attrName)
Applies an enum setting for the specified key.
|
void |
applyMapSetting(AttributeValueTable avt,
String key)
Applies a setting for a map attribute from the specified table,
using the specified table key.
|
void |
applyMapSetting(AttributeValueTable avt,
String key,
String attrName)
Applies a setting for a map attribute from the specified table,
using the specified table key and Attribute name.
|
void |
applyObjectArraySetting(AttributeValueTable avt,
String className,
LibraryObjectDefinition.LookupByName func,
String key)
Applies a LibraryObject array setting for the specified key.
|
void |
applyObjectArraySetting(AttributeValueTable avt,
String className,
LibraryObjectDefinition.LookupByName func,
String key,
String attrName)
Applies a LibraryObject array setting for the specified key.
|
void |
applyObjectSetting(AttributeValueTable avt,
String className,
LibraryObjectDefinition.LookupByName func,
String key)
Applies a LibraryObject setting for the specified key.
|
void |
applyObjectSetting(AttributeValueTable avt,
String className,
LibraryObjectDefinition.LookupByName func,
String key,
String attrName)
Applies a LibraryObject setting for the specified key.
|
void |
applySetting(AttributeValueTable avt,
String key)
Applies a settings from the specified table,
using the specified table key.
|
void |
applySetting(AttributeValueTable avt,
String key,
String attrName)
Applies a settings from the specified table,
using the specified table key and Attribute name.
|
void |
applySettings(AttributeValueTable avt)
Applies settings from the specified table.
|
protected void |
captureSession(LibraryObject[] objs)
Capture the session setting from a set of LibraryObjects, if the
session has not yet be specified in this instance.
|
protected void |
captureSession(LibraryObjectInterface obj)
Capture the session setting from a LibraryObject, if the
session has not yet be specified in this instance.
|
protected void |
captureSession(LibrarySessionInterface session)
Capture the session setting from a LibarySession specified in some
other operation, and hold it if our current session is null.
|
LibraryObjectDefinition |
clone(LibrarySessionInterface session)
Returns a clone of this LibraryObjectDefinition.
|
static LibraryObjectDefinition |
constructInstance(LibrarySession session,
AttributeValueTable avt,
String defClassName)
Dynamically construct an instance from a table that contains the
desired class.
|
static LibraryObjectDefinition |
constructInstance(LibrarySessionInterface session,
Long classId)
Dynamically construct an instance from a fully qualified class
name and a session instance
|
static LibraryObjectDefinition |
constructInstance(LibrarySessionInterface session,
String defClassName)
Dynamically construct an instance from a fully qualified class
name and a session instance
|
void |
copyInto(LibraryObjectDefinition lodef)
Copy the contents of the target Definition into the specified
Definition.
|
LibraryObject[] |
deriveObjectArraySetting(AttributeValueTable avt,
String className,
LibraryObjectDefinition.LookupByName func,
String key)
Derives a LibraryObject[] setting for the specified key.
|
LibraryObject |
deriveObjectSetting(AttributeValueTable avt,
String className,
LibraryObjectDefinition.LookupByName func,
String key)
Derives a LibraryObject setting for the specified key.
|
AttributeValue |
getAttribute(String name)
Return an AttributeValue object
that holds the value of the requested attribute.
|
AttributeValue |
getAttribute(String name,
boolean policyMode)
Return an AttributeValue object
that holds the value of the requested attribute.
|
AttributeValue[] |
getAttributes()
Return array of Attribute values that were set for this
new instance.
|
AttributeValue[] |
getAttributes(boolean policyMode)
Return array of Attribute values that were set for this
new instance.
|
AttributeValue[] |
getAttributesSorted()
Return array of Attribute values sorted by the Attribute
name used for each, so that a predictable ordering occurs.
|
Long |
getClassId()
Return the Class Id, null if not persistent
|
ClassObject |
getClassObject()
Return the ClassObject for the new instance.
|
AttributeValue |
getClassObjectValue()
Return the ClassObject value for the new instance, as an AttributeValue.
|
ContentStreamSerializer |
getContentSpecification(String name)
Return a Content specification
|
String[] |
getContentSpecificationKeys()
Return array of Content specification keys
|
AttributeValue |
getCopiedObjectValue()
Get the Copied object value option.
|
LibraryObjectDefinition |
getDefinition(String name)
Return a definition value.
|
static String |
getDefinitionClassName(LibrarySessionInterface session,
Long classId)
Return the class name that would be used to construct
a definition instance for the specified class ID.
|
String[] |
getDefinitionKeys()
Return array of Definition keys
|
String[] |
getDefinitionListKeys()
Return array of Definition List keys
|
LibraryObjectDefinition[] |
getDefinitions(String name)
Return a set of definitions for a definition list, identified by the specified name.
|
Long |
getId()
return the Id, null if not yet specified
|
LibrarySession |
getLibrarySession()
Get the bean-side session associated with this instance.
|
String |
getName()
Get the Name set on this definition.
|
Object |
getOption(String name)
Return an option value.
|
protected AttributeValue |
getOptionAsAttributeValue(String name) |
String[] |
getOptionKeys()
Return array of option keys
|
protected boolean |
getPolicyMode()
Return indication as to whether or not the session context
is in "policy mode"
|
PropertyDefinition[] |
getPropertyDefinitions()
Gets a list of property definitions that were added to the
definition.
|
ReferenceAttributeValue |
getReferenceAttribute(String name)
Return a reference attribute value.
|
ReferenceAttributeValue[] |
getReferenceAttributes()
Return array of reference attributes.
|
S_LibraryObjectDefinition |
getServerDefinition()
Return server-side definition from
a bean definition.
|
LibrarySessionInterface |
getSession()
Get the session used in constructing this instance.
|
SimplePropertyDefinition[] |
getSimplePropertyDefinitions(String attrName)
Gets all the SimplePropertyDefinition SimpleProperties for this instance.
|
protected S_LibrarySession |
getSLibrarySession()
Get the server-side session used in constructing this instance.
|
protected String |
getStringAttribute(String name)
Return String value of an
attribute value set with setAttribute.
|
Object |
getSystemOption(String name)
Return a system option value.
|
protected AttributeValue |
getSystemOptionAsAttributeValue(String name) |
protected Boolean |
getSystemOptionAsBoolean(String name) |
String[] |
getSystemOptionKeys()
Return array of system option keys
|
LibraryObjectDefinition |
getWriteableInstance()
Returns a a non-readonly instance.
|
boolean |
isReadOnly()
Returns indication as to whether the current instance cannot be changed.
|
void |
prepareForDefinitionObject(LibrarySession sess)
Perform any changes to the definition prior to storing
it into a DefinitionObject.
|
void |
processSimplePropertiesForCreate(LibraryObject lo,
String attrName)
Process SimplePropertyDefinitions specified for an attribute during create.
|
void |
processSimplePropertiesForUpdate(LibraryObject lo,
String attrName)
Process SimplePropertyDefinitions specified for an attribute during update.
|
void |
removeAttribute(String name)
Removes an attribute setting for the
new instance.
|
void |
removeContentSpecification(String name)
Removes a ContentSpecification setting for the
new instance.
|
void |
removeDefinition(String name)
Removes a Definition setting for the
new instance.
|
void |
removeDefinitions(String name)
Add definitions to a definition list, which is identified by the specified name.
|
void |
removeOption(String name)
Removes an option setting for the
new instance.
|
void |
removePropertyDefinitions()
Removes all property definitions from this instance.
|
void |
removeReferenceAttribute(String name)
Removes a reference attribute setting for the
new instance.
|
void |
removeSimplePropertyDefinitions(String attrName)
Removes all SimplePropertyDefinitions from this instance,
for the specified attribute.
|
void |
removeSystemOption(String name)
Removes a system option setting for the
new instance.
|
void |
reset()
Clear all updates made to this instance, except for session and
ClassObject value settings.
|
protected void |
resolve(LibrarySession sess)
Resolve any settings that
are object attributes set by Name.
|
void |
setAttribute(AttributeValue value)
Set an attribute for the new instance.
|
void |
setAttribute(AttributeValue value,
boolean policyMode)
Set an attribute for the new instance.
|
void |
setAttribute(String name,
AttributeValue value)
Set an attribute for the new instance.
|
void |
setAttributeByUpperCaseName(String attrkey,
AttributeValue value)
Set an attribute for the new instance.
|
void |
setAttributeByUpperCaseName(String attrkey,
AttributeValue value,
boolean policyMode)
Set an attribute for the new instance.
|
void |
setAttributePolicyMode(String attrkey,
boolean mode)
Change the policy mode of an existing Attribute setting.
|
void |
setAttributes(AttributeValue[] values)
Set a number of attributes for the new instance.
|
void |
setClassId(Long classid)
set the ClassObject value by Id
|
void |
setClassname(String className)
Set the ClassObject for the new instance, by using the
class' name.
|
void |
setClassObject(ClassObject clss)
Set the ClassObject for the new instance.
|
void |
setClassObjectValue(AttributeValue av)
Set the ClassObject for the new instance.
|
void |
setContentSpecification(String name,
ContentStreamSerializer value)
Set a Content specification option for the new instance, identified by a name
which distinguishes it from other Content specification options.
|
void |
setCopiedObjectValue(AttributeValue obj)
Set the copied object value option.
|
void |
setDefinition(String name,
LibraryObjectDefinition value)
Set a Definition option for the new instance, identified by a name
which distinguishes it from other definition options.
|
void |
setDefinitions(String name,
LibraryObjectDefinition[] values)
Set the definitions of a definition list, which is identified by the specified name.
|
void |
setId(Long id)
set the object Id
|
void |
setName(String name)
Set the Name of the new instance.
|
void |
setOption(String name,
Object value)
Set an option for the new instance.
|
void |
setReadOnly(boolean readonly)
Sets indication as to whether the current instance cannot be changed.
|
void |
setReferenceAttribute(ReferenceAttributeValue value)
Set a reference attribute for the new instance.
|
void |
setReferenceAttribute(String name,
ReferenceAttributeValue value)
Set a reference attribute
for the new instance.
|
void |
setSession(LibrarySessionInterface session)
Set or reset the session used in constructing this instance.
|
void |
setSimplePropertyDefinitions(String attrName,
SimplePropertyDefinition[] defs)
Replaces the set of new SimplePropertyDefinitions,
for the specified attribute.
|
void |
setSystemOption(String name,
Object value)
Set a system option for the new instance.
|
protected void |
unresolve(LibrarySession sess)
Unresolve any settings from a resolved instance.
|
protected LibrarySessionInterface |
verifySession()
Throws if a session has not been specified.
|
protected AttributeValue m_ClassObjectValue
protected String m_ClassObjectName
protected HashMap m_Attributes
protected HashMap m_ReferenceAttributes
protected HashMap m_SystemOptions
protected HashMap m_Options
protected HashMap m_Definitions
protected HashMap m_DefinitionLists
protected HashMap m_ContentSpecifications
protected LibraryObjectDefinition m_EnclosedDefinition
protected boolean m_ReadOnly
protected Long m_Id
protected transient LibrarySessionInterface m_Session
public LibraryObjectDefinition(LibrarySessionInterface session) throws IfsException
session
- the sessionIfsException
- if the operation failspublic LibraryObjectDefinition(LibrarySessionInterface session, String className) throws IfsException
session
- the current sessionclassName
- the initial class nameIfsException
- if the operation failspublic boolean isReadOnly()
setMutable
method.public void setReadOnly(boolean readonly) throws IfsException
readonly
- indication of whether the instance should become readonlyIfsException
- if operation fails.public LibraryObjectDefinition getWriteableInstance() throws IfsException
IfsException
public LibraryObjectDefinition clone(LibrarySessionInterface session) throws IfsException
session
- the session contextIfsException
- if operation fails.public void reset() throws IfsException
IfsException
- if operation fails.public void copyInto(LibraryObjectDefinition lodef) throws IfsException
lodef
- The definition which gets set with the
information contained in the target definitionIfsException
- if the operation failspublic LibrarySessionInterface getSession()
IfsException
- if operation fails.public LibrarySession getLibrarySession() throws IfsException
IfsException
- if operation fails.protected S_LibrarySession getSLibrarySession() throws IfsException
IfsException
- if operation fails.public void setSession(LibrarySessionInterface session) throws IfsException
session
- the new session contextIfsException
- if operation fails.public Long getId() throws IfsException
IfsException
- if the operation failspublic void setId(Long id) throws IfsException
id
- the IdIfsException
- if the operation failspublic String getName() throws IfsException
IfsException
- if operation fails.public void setName(String name) throws IfsException
name
- The name to be used for the new instance.IfsException
- if operation fails.protected boolean getPolicyMode() throws IfsException
IfsException
- if operation fails.public S_LibraryObjectDefinition getServerDefinition() throws IfsException
IfsException
- if operation fails.public void setAttribute(String name, AttributeValue value) throws IfsException
LibraryDefinitions are also used for update, free, and other repository operations as a way to specify options to the operation.
To set an attribute to the null value (e.g., for
the purpose of updating an object), you need to pass in an
AttributeValue instance with its value set to null
(see AttributeValue.newNullAttributeValue
); note that this is not
the same as passing null for the AttributeValue parameter. The latter
removes the attribute from the internal list of specified values (i.e.
behaves as if the attribute was never set in this definition).
name
- The attribute namevalue
- The attribute value.IfsException
- if operation fails.public void setAttributeByUpperCaseName(String attrkey, AttributeValue value) throws IfsException
attrkey
- name The attribute namevalue
- The attribute value.IfsException
- if operation fails.public void setAttributeByUpperCaseName(String attrkey, AttributeValue value, boolean policyMode) throws IfsException
The caller ensures that the key specified is forced to uppercase. Each invocation of this method results in another attribute setting being added to an internal list. The policy mode is set explicitly.
attrkey
- The attribute namevalue
- The attribute valuepolicyMode
- The policy modeIfsException
- if operation fails.public void setAttribute(AttributeValue value) throws IfsException
value
- The attribute value.IfsException
- if operation fails.public void setAttribute(AttributeValue value, boolean policyMode) throws IfsException
value
- The attribute valuepolicyMode
- The policy mode.IfsException
- if operation fails.public void setAttributes(AttributeValue[] values) throws IfsException
values
- The attribute values.IfsException
- if operation fails.public void setAttributePolicyMode(String attrkey, boolean mode) throws IfsException
Has no effect if the specified attribute has not be specified on the target definition.
attrkey
- The attribute namemode
- The policy mode for the setting value.IfsException
- if operation fails.public AttributeValue getAttribute(String name) throws IfsException
name
- the name of the AttributeValue to be returnedIfsException
- if operation fails.public AttributeValue getAttribute(String name, boolean policyMode) throws IfsException
name
- the name of the AttributeValue to be returnedpolicyMode
- the desired policy modeIfsException
- if operation fails.public AttributeValue[] getAttributes() throws IfsException
IfsException
- if operation fails.public AttributeValue[] getAttributesSorted() throws IfsException
IfsException
- if operation fails.public AttributeValue[] getAttributes(boolean policyMode) throws IfsException
policyMode
- the desired policy modeIfsException
- if operation fails.protected String getStringAttribute(String name)
name
- the name of the Attributepublic void removeAttribute(String name) throws IfsException
name
- The name of the Attribute to be removed.IfsException
- if operation fails.public void setReferenceAttribute(String name, ReferenceAttributeValue value) throws IfsException
name
- The reference attribute name namevalue
- The reference attribute value.IfsException
- if operation fails.public void setReferenceAttribute(ReferenceAttributeValue value) throws IfsException
value
- The reference attribute value.IfsException
- if operation fails.public ReferenceAttributeValue getReferenceAttribute(String name)
name
- the name of the reference attributepublic ReferenceAttributeValue[] getReferenceAttributes() throws IfsException
IfsException
- if operation fails.public void removeReferenceAttribute(String name) throws IfsException
name
- The name of the reference attribute to be removed.IfsException
- if operation fails.public void setSystemOption(String name, Object value) throws IfsException
name
- The option namevalue
- The option value.IfsException
- if operation fails.public Object getSystemOption(String name) throws IfsException
name
- the name of the optionIfsException
- if operation fails.public String[] getSystemOptionKeys() throws IfsException
IfsException
- if operation fails.public void removeSystemOption(String name) throws IfsException
name
- The name of the system option to be removed.IfsException
- if operation fails.protected Boolean getSystemOptionAsBoolean(String name) throws IfsException
IfsException
protected AttributeValue getSystemOptionAsAttributeValue(String name) throws IfsException
IfsException
public void setOption(String name, Object value) throws IfsException
name
- The option namevalue
- The option value.IfsException
- if operation fails.public Object getOption(String name) throws IfsException
name
- the name of the optionIfsException
- if operation fails.public String[] getOptionKeys() throws IfsException
IfsException
- if operation fails.public void removeOption(String name) throws IfsException
name
- The name of the option to be removed.IfsException
- if operation fails.protected AttributeValue getOptionAsAttributeValue(String name) throws IfsException
IfsException
public AttributeValue getCopiedObjectValue() throws IfsException
IfsException
- if the operation failspublic void setCopiedObjectValue(AttributeValue obj) throws IfsException
obj
- The copied object valueIfsException
- if the operation failspublic void setDefinition(String name, LibraryObjectDefinition value) throws IfsException
name
- The option namevalue
- The DefinitionIfsException
- if operation fails.public LibraryObjectDefinition getDefinition(String name) throws IfsException
name
- the name of the DefinitionIfsException
- if operation fails.public String[] getDefinitionKeys() throws IfsException
IfsException
- if operation fails.public void removeDefinition(String name) throws IfsException
name
- The name of the Definition to be removed.IfsException
- if operation fails.public void addDefinition(String name, LibraryObjectDefinition value) throws IfsException
name
- The definition list namevalue
- The DefinitionIfsException
- if operation fails.public void addDefinitions(String name, LibraryObjectDefinition[] values) throws IfsException
name
- The definition list namevalues
- The Definitions to add to the listIfsException
- if operation fails.public void removeDefinitions(String name) throws IfsException
name
- The definition list nameIfsException
- if operation fails.public void setDefinitions(String name, LibraryObjectDefinition[] values) throws IfsException
name
- The definition list namevalues
- The Definitions that will become the new listIfsException
- if operation fails.public LibraryObjectDefinition[] getDefinitions(String name) throws IfsException
name
- the name of the Definition listIfsException
- if operation fails.public String[] getDefinitionListKeys() throws IfsException
IfsException
- if operation fails.public void applySettings(AttributeValueTable avt) throws IfsException
avt
- the table containing the settingsIfsException
- if the operation failspublic void applySetting(AttributeValueTable avt, String key) throws IfsException
The Attribute name is the same as the key.
avt
- the table containing the settingskey
- the key and Attribute nameIfsException
- if the operation failspublic void applySetting(AttributeValueTable avt, String key, String attrName) throws IfsException
avt
- the table containing the settingskey
- the keyattrName
- the Attribute nameIfsException
- if the operation failspublic void applyMapSetting(AttributeValueTable avt, String key) throws IfsException
The Attribute name is the same as the key.
avt
- the table containing the settingskey
- the key and Attribute nameIfsException
- if the operation failspublic void applyMapSetting(AttributeValueTable avt, String key, String attrName) throws IfsException
avt
- the table containing the settingskey
- the keyattrName
- the Attribute nameIfsException
- if the operation failspublic void applyEnumSetting(AttributeValueTable avt, LibraryObjectDefinition.EnumToIntegerCode func, String key) throws IfsException
The Attribute name is the same as the key for this variant.
avt
- the AttributeValueTablefunc
- the lookup function to usekey
- the key within the AttributeValueTableIfsException
- if the operation fails.public void applyEnumSetting(AttributeValueTable avt, LibraryObjectDefinition.EnumToIntegerCode func, String key, String attrName) throws IfsException
avt
- the AttributeValueTablefunc
- the lookup function to usekey
- the key within the AttributeValueTableattrName
- the Attribute nameIfsException
- if the operation fails.public void applyObjectSetting(AttributeValueTable avt, String className, LibraryObjectDefinition.LookupByName func, String key) throws IfsException
The Attribute name is the same as the key.
avt
- the AttributeValueTableclassName
- the class name of the object settingfunc
- the optional lookup function to usekey
- the key within the AttributeValueTable
and the Attribute nameIfsException
- if the operation fails.public void applyObjectSetting(AttributeValueTable avt, String className, LibraryObjectDefinition.LookupByName func, String key, String attrName) throws IfsException
avt
- the AttributeValueTableclassName
- the class name of the object settingfunc
- the optional lookup function to usekey
- the key within the AttributeValueTableattrName
- the Attribute nameIfsException
- if the operation fails.public void applyObjectArraySetting(AttributeValueTable avt, String className, LibraryObjectDefinition.LookupByName func, String key) throws IfsException
The Attribute name is the same as the key.
avt
- the AttributeValueTableclassName
- the class name of the object settingfunc
- the optional lookup function to usekey
- the key within the AttributeValueTable
and the Attribute nameIfsException
- if the operation fails.public void applyObjectArraySetting(AttributeValueTable avt, String className, LibraryObjectDefinition.LookupByName func, String key, String attrName) throws IfsException
avt
- the AttributeValueTableclassName
- the class name of the object settingfunc
- the optional lookup function to usekey
- the key within the AttributeValueTableattrName
- the Attribute nameIfsException
- if the operation fails.public LibraryObject deriveObjectSetting(AttributeValueTable avt, String className, LibraryObjectDefinition.LookupByName func, String key) throws IfsException
avt
- the AttributeValueTableclassName
- the class name of the object settingfunc
- the optional lookup function to usekey
- the key within the AttributeValueTableIfsException
- if the operation fails.public LibraryObject[] deriveObjectArraySetting(AttributeValueTable avt, String className, LibraryObjectDefinition.LookupByName func, String key) throws IfsException
avt
- the AttributeValueTableclassName
- the class name of the object settingfunc
- the optional lookup function to usekey
- the key within the AttributeValueTableIfsException
- if the operation fails.public void addProperty(String key, AttributeValue value) throws IfsException
Delegates to addPropertyDefinition.
key
- the property's keyvalue
- the property valueIfsException
- if the operation failspublic void addPropertyDefinition(PropertyDefinition pDef) throws IfsException
The property definition is added in such a way that results in the properties being added/replaced during create and update operations.
pDef
- property definitionIfsException
- if the operation failspublic void addPropertyDefinitions(PropertyDefinition[] pDefs) throws IfsException
The property definitions are added in such a way that results in the properties being added/replaced during create and update operations.
pDefs
- property definitionsIfsException
- if the operation failspublic void addPropertyDefinition(AttributeValueTable propTable) throws IfsException
propTable
- the Property table, which specifies key and valueIfsException
- if the operation failspublic void addPropertyDefinitions(List<AttributeValueTable> propsList) throws IfsException
propsList
- the Properties table listIfsException
- if the operation failspublic PropertyDefinition[] getPropertyDefinitions() throws IfsException
If addPropertyDefinition(s) method was not called on the current defintion prior to calling this method, then null will be returned.
IfsException
- if the operation failspublic void removePropertyDefinitions() throws IfsException
IfsException
public void addSimplePropertyDefinition(String attrName, SimplePropertyDefinition def) throws IfsException
attrName
- the attribute that holds an array of SimplePropertydef
- the definition for the SimplePropertyIfsException
- if the operation failspublic void addSimplePropertyDefinitions(String attrName, SimplePropertyDefinition[] defs) throws IfsException
attrName
- the attribute that holds an array of SimplePropertydefs
- the definitions for the SimplePropertiesIfsException
- if the operation failspublic void addSimplePropertyDefinition(String attrName, AttributeValueTable propTable) throws IfsException
attrName
- the attribute that holds an array of SimplePropertypropTable
- the SimpleProperty tableIfsException
- if the operation failspublic void addSimplePropertyDefinitions(String attrName, List<AttributeValueTable> propsList) throws IfsException
attrName
- the attribute that holds an array of SimplePropertypropsList
- the SimpleProperties table listIfsException
- if the operation failspublic void setSimplePropertyDefinitions(String attrName, SimplePropertyDefinition[] defs) throws IfsException
attrName
- the attribute that holds an array of SimplePropertydefs
- the definitions for the SimplePropertiesIfsException
- if the operation failspublic void removeSimplePropertyDefinitions(String attrName) throws IfsException
attrName
- the attribute that holds an array of SimplePropertyIfsException
- if the operation failspublic SimplePropertyDefinition[] getSimplePropertyDefinitions(String attrName) throws IfsException
attrName
- the attribute that holds an array of SimplePropertyIfsException
- if the operation failspublic void processSimplePropertiesForCreate(LibraryObject lo, String attrName) throws IfsException
lo
- the object being createdattrName
- the attribute that holds an array of SimplePropertyIfsException
- if the operation failspublic void processSimplePropertiesForUpdate(LibraryObject lo, String attrName) throws IfsException
lo
- the object being updatedattrName
- the attribute that holds an array of SimplePropertyIfsException
- if the operation failspublic void setContentSpecification(String name, ContentStreamSerializer value) throws IfsException
name
- The option namevalue
- The Content specificationIfsException
- if operation fails.public ContentStreamSerializer getContentSpecification(String name) throws IfsException
name
- the name of the Content specificationIfsException
- if operation fails.public String[] getContentSpecificationKeys() throws IfsException
IfsException
- if operation fails.public void removeContentSpecification(String name) throws IfsException
name
- The name of the ContentSpecification to be removed.IfsException
- if operation fails.public void setClassObjectValue(AttributeValue av) throws IfsException
av
- the AttributeValue that represents the
desired LibraryObject ClassIfsException
- if operation fails.public void setClassObject(ClassObject clss) throws IfsException
clss
- the desired LibraryObject ClassIfsException
- if operation fails.public void setClassId(Long classid) throws IfsException
classid
- the Class IdIfsException
- if the operation failspublic void setClassname(String className) throws IfsException
LibrarySession.createFOO()
method, or until
resolveClassObject() is invoked.className
- the desired ClassObject NameIfsException
- if operation fails.public ClassObject getClassObject() throws IfsException
IfsException
- if operation fails.public AttributeValue getClassObjectValue() throws IfsException
IfsException
- if operation fails.public Long getClassId()
protected void resolve(LibrarySession sess) throws IfsException
sess
- The current session (needed to resolve the named attributes)IfsException
- if operation fails.protected void unresolve(LibrarySession sess) throws IfsException
sess
- The current sessionIfsException
- if operation fails.public void prepareForDefinitionObject(LibrarySession sess) throws IfsException
sess
- The current session contextIfsException
- if operation fails.protected LibrarySessionInterface verifySession() throws IfsException
IfsExceptionm
- if no session is specifiedIfsException
protected void captureSession(LibrarySessionInterface session) throws IfsException
session
- a sessionIfsException
- if no session is specifiedprotected void captureSession(LibraryObjectInterface obj) throws IfsException
obj
- a LibraryObjectIfsException
- if no session is specifiedprotected void captureSession(LibraryObject[] objs) throws IfsException
objs
- an array of LibraryObjectIfsException
- if no session is specifiedpublic static LibraryObjectDefinition constructInstance(LibrarySession session, AttributeValueTable avt, String defClassName) throws IfsException
session
- the session contextavt
- the table describing the definitiondefClassName
- the default class name, if not specified in the tableIfsException
- if no session is specifiedpublic static LibraryObjectDefinition constructInstance(LibrarySessionInterface session, Long classId) throws IfsException
session
- the session contextclassId
- the ID of the ClassObject for which the
definition is desiredIfsException
- if no session is specifiedpublic static LibraryObjectDefinition constructInstance(LibrarySessionInterface session, String defClassName) throws IfsException
session
- the session contextdefClassName
- the fully qualified class name of the
LibraryObjectDefinition instance to constructIfsException
- if no session is specifiedpublic static String getDefinitionClassName(LibrarySessionInterface session, Long classId) throws IfsException
session
- the session contextclassId
- the ID of the ClassObject for which the
definition is desiredIfsException
- if no session is specifiedCopyright © 2023. All rights reserved.