public abstract class LibraryObject extends Object implements IfsEventHandler, LibraryObjectInterface, Comparable, LooselyBoundedCacheable
Modifier and Type | Field and Description |
---|---|
static String |
DOMAIN_UNIQUENAME_DEFAULT_DELIMITER
Default String used in derived unique name values
|
protected Long |
m_ClassId
The object Class ID.
|
protected Long |
m_Id
The object ID.
|
protected LibrarySession |
m_Session
The session context for the object.
|
static String |
NAME_ATTRIBUTE
Name of the attribute for the common name of an object.
|
static String |
PROPERTYBUNDLE_ATTRIBUTE
Name of the attribute referencing the PropertyBundle for the object.
|
Modifier | Constructor and Description |
---|---|
protected |
LibraryObject(LibrarySession session,
Long id,
Long classId,
S_LibraryObjectData data)
Constructs an IFS object - standard variant.
|
Modifier and Type | Method and Description |
---|---|
void |
added(Object id)
Called when an instance is added to the cache.
|
void |
addSimpleProperty(String attrName,
String key,
AttributeValue value)
Adds a property (SimpleProperty) for this object, and the specified attribute.
|
void |
addSimpleProperty(String attrName,
String key,
AttributeValue value,
boolean updateLastModInfo)
Adds a property (SimpleProperty) for this object, and the specified attribute.
|
protected void |
applyProperties(LibraryObjectDefinition def)
Applies any properties that might be present in the specified definition.
|
protected void |
auditCreated(LibraryObjectDefinition lodef)
Creates audit events for the create operation.
|
protected void |
auditUpdated(LibraryObjectDefinition lodef)
Creates audit events for the update operation.
|
boolean |
canPurge()
Gets whether the item can be purged from the
the BoundedCache.
|
protected void |
checkIfPropertyBundleSupported()
Checks if PROPERTYBUNDLE is a valid attribute for this instance.
|
void |
checkRequiredAttributeSet(LibraryObjectDefinition def,
String attrName,
boolean forUpdate)
Verify that a required attribute is set properly in
the specified LibraryObjectDefinition.
|
void |
clearCopyContext()
Remove the context of a copy operation for the target object.
|
void |
clearFreeContext()
Remove the context of a free operation for the target object.
|
void |
clearUpdateContext()
Remove the context of an update operation for the target object.
|
int |
compareTo(Object o)
Compares two LibraryObjects.
|
static Long[] |
constructIdArray(LibraryObject[] objs)
Construct an array of object IDs from an array of LibraryObjects.
|
protected static Long[] |
constructIdArray(Vector vector)
Construct an array of object IDs from a Vector of S_LibraryObjectData
objects.
|
protected static LibraryObject |
constructLibraryObject(LibrarySession sess,
S_LibraryObjectData data) |
protected static Vector |
constructLibraryObjectVector(LibrarySession sess,
Vector vector)
Return LibraryObject Vector from a Vector of LibraryObject.
|
protected PropertyBundle |
createDedicatedPropertyBundle()
Creates a PropertyBundle for exclusive use by this instance.
|
LibraryObject |
createInstance(AttributeValueTable avt)
Create a new LibraryObject from the specified AttributeValueTable.
|
static String |
deriveDomainUniqueName(LibrarySession session,
AttributeValue avName,
AttributeValue avDomain,
String delim)
Derive a "Domain based unique name", which is a composite of an object
which acts as an Domain for scoping purposes, and the object name.
|
void |
dispose()
Dispose this instance, by nulling the Id and Class Id.
|
boolean |
equals(LibraryObject item)
Compares whether two LibraryObjects are the same
IFS object.
|
boolean |
equals(Object item) |
void |
free()
Permanently deletes this object.
|
void |
free(LibraryObjectDefinition def)
Permanently removes this object from the repository, with options.
|
static void |
freeAll(LibraryObject[] objs)
Permanently deletes the objects in the specified array.
|
Object |
get(String attr_name)
Returns an AttributeValue object
that holds the value of the requested attribute.
|
AttributeValue |
getAttribute(String attr_name)
Returns an AttributeValue object
that holds the value of the requested attribute.
|
AttributeValue |
getAttributeByUpperCaseName(String attr_name)
Returns the attribute value for the specified attribute.
|
AttributeValue[] |
getAttributes(String[] attrNames)
Returns an array of AttributeValue objects
that holds the values of the requested attributes.
|
AttributeValue[] |
getAttributesByUpperCaseNames(String[] attrNames)
Returns an array of AttributeValue objects
that holds the values of the requested attributes.
|
Folder |
getAuditDomainContext()
Gets the Domain context for auditing.
|
Folder |
getAuditEventFolderContext()
Gets the folder context to used for events posted on this event.
|
Long |
getClassId()
Return this object's Class Id.
|
String |
getClassname()
Returns the name of this object's class.
|
String |
getClassName()
Returns the name of this object's class.
|
ClassObject |
getClassObject()
Returns this object's class.
|
String |
getCommonName()
Returns the common Name of this object, or null of this
object does not have a NAME attribute.
|
static String |
getCommonNameAndClass(LibraryObject obj)
Return the common name and class of the specified object.
|
LibraryObjectDefinition |
getCopyContext()
Get the context of a copy operation, if a copy is in progress for the
target object.
|
LibraryObjectDefinition |
getCreateContext()
Get the context of a create operation, if a create is in progress for the
target object.
|
protected S_LibraryObjectData |
getData()
Gets the S_LibraryObjectData for this LibraryObject.
|
LibraryObjectDefinition |
getDefinition()
Creates a LibraryObjectDefinition which represents this object.
|
LibraryObjectDefinition |
getDefinitionForSimplePropertyUpdates(boolean updateLastModInfo)
Gets the LibraryObjectDefinition to use for adding or removing
SimpleProperties to/from the target object.
|
Vector |
getEffectivePolicyListElements(String operation)
Gets the set of policies, as PolicyListElements, applied to this
LibraryObject, either explicitly (through either its PolicyLists)
or implicitly (through the ClassPolicyLists
of its classobject hierarchy) for the specified operation.
|
AttributeValue |
getEventualAttributeByUpperCaseName(String attrName,
LibraryObjectDefinition def)
Gets the attribute value for the specified attribute from either
the target object or from the specified definition.
|
LibraryObjectDefinition |
getFreeContext()
Get the context of a free operation, if a free is in progress for the
target object.
|
Long |
getId()
Returns this object's ID (as a Long).
|
String |
getLabel()
Returns the Label for this object, based on the object's name.
|
String |
getName()
Returns the Name of this object, or null of this
object does not have a NAME attribute.
|
ObjectReferenceAttributeValue |
getObjectReferenceAttribute(String attrname)
Gets the value of a ObjectReference attribute.
|
protected OperationActionSpecification |
getOperationActionSpecificationContext(AuditEvent event,
Folder context)
Gets the OperationActionSpecification context (if any) for the
event that is about to be posted.
|
PropertyBundle |
getPropertyBundle()
Returns this object's PropertyBundle.
|
AttributeValue |
getPropertyValue(String key)
Returns a property from the PropertyBundle associated with this instance.
|
PublicObject |
getPublicObjectAttribute(String attrName,
Long classId)
Gets a PublicObject type attribute from the target object.
|
String |
getResourceString(String key)
Gets the resource string for the specified key.
|
String |
getResourceString(String key,
Object[] params)
Gets the resource string for the specified key, and substitutes the
specified parameters into that resource string.
|
SchemaObject |
getSchemaObjectAttribute(String attrName,
Long classId)
Gets a SchemaObject type attribute from the target object.
|
LibrarySession |
getSession()
Returns the LibrarySession in which
this object was instantiated.
|
LibrarySessionInterface |
getSessionInterface()
Gets the LibrarySessionInterface for this LibraryObject.
|
S_LibraryObjectDataSharedStateFactory |
getSharedStateFactory()
Returns a factory that can be used by bean-side callers
to get shared state from a S_LibraryObjectData instance.
|
SimpleObject |
getSimpleObjectAttribute(String attrName,
Long classId)
Gets a SimpleObject type attribute from the target object.
|
SimpleProperty[] |
getSimpleProperties(String attrName)
Gets the SimpleProperty objects for this object,
for the specified attribute.
|
SimpleProperty |
getSimpleProperty(String attrName,
String propName)
Gets the SimpleProperty for the property name specified,
for the specified attribute.
|
AttributeValue |
getSimplePropertyValue(String attrName,
String propName)
Gets the SimpleProperty value for the property name specified,
for the specified attribute.
|
String |
getStringIdentifier()
Returns this object's String ID.
|
SystemObject |
getSystemObjectAttribute(String attrName,
Long classId)
Gets a SystemObject type attribute from the target object.
|
TraceLogger |
getTraceLogger()
Returns the trace logger of this object's session.
|
LibraryObjectDefinition |
getUpdateContext()
Get the context of an update operation, if an update is in progress for the
target object.
|
protected void |
handleAdminModeChange()
Handles an intra-session admin mode change event.
|
void |
handleEvent(IfsEvent event)
Handles the specified event.
|
protected void |
handleFree(LibraryObjectDefinition def)
Handle the low-level repository free
|
protected void |
handleUpdate(LibraryObjectDefinition def)
Handle the low-level repository update
|
int |
hashCode()
Returns a hashcode value for the LibraryObject.
|
boolean |
hasNameAttribute()
Returns true if this object is an instance of a class
that has a NAME attribute, and false otherwise.
|
boolean |
hasPropertyBundleAttribute()
Returns true if this object is an instance of a class
that has a PROPERTYBUNDLE attribute, and false otherwise.
|
void |
invalidateState()
Invalidates any information cached for this object.
|
Object |
invokeOperation(OperationContext op)
Invokes a policy-driven operation.
|
Object |
invokeOperation(String operationName,
LibraryObjectDefinition def)
Invokes a policy-driven operation.
|
Serializable |
invokeServerMethod(String methodName,
Serializable payload)
Invokes a custom server-side method.
|
protected boolean |
isConnected()
Indicates the connection state.
|
protected boolean |
isCoreEventPostingEnabled()
Checks if CORE audit event posting is enabled.
|
boolean |
isInstanceOf(ClassObject clss)
Determine if this is an instance of
the specified ClassObject.
|
boolean |
isPersistent()
Indicates whether the object is still persistent in the repository.
|
boolean |
isTraced(int channel,
int level)
Gets whether tracing is enabled for the specified channel and level.
|
protected boolean |
isValidEventType(AuditEvent event)
Checks to see if the event type in the process of being posted on the
target LibraryObject is consistent with the target.
|
void |
lockRows()
Obtain a low-level database lock on the rows of the tables
used to represent this instnace.
|
String |
lookupInstanceLabel()
Lookup the InstanceLabel for this object, and return null
if no value is defined.
|
protected void |
performPostCreateExtensions(LibraryObjectDefinition def,
ClassObject co)
Perform standard operations for postCreate, for a specific ClassObject
in the target object's class hierarchy.
|
protected void |
performPostFreeExtensions(LibraryObjectDefinition def)
Perform standard operations for postFree.
|
protected void |
performPostUpdateExtensions(LibraryObjectDefinition def,
ClassObject co)
Perform standard operations for postUpdate, for a specific ClassObject
in the target object's class hierarchy.
|
protected void |
performPreCreateExtensions(LibraryObjectDefinition def)
Perform standard operations for preCreate.
|
protected void |
performPreFreeExtensions(LibraryObjectDefinition def,
ClassObject co)
Perform standard operations for PreFree, for a specific ClassObject
in the target object's class hierarchy.
|
protected void |
performPreUpdateExtensions(LibraryObjectDefinition def,
ClassObject co)
Perform standard operations for PreUpdate, for a specific ClassObject
in the target object's class hierarchy.
|
protected void |
postCreate(LibraryObjectDefinition def)
Extensibility point to perform actions after the
creation of a object.
|
void |
postEvent(int eventType,
int eventStatus)
Posts an event of the specified type and status.
|
void |
postEvent(int eventType,
int eventSubtype,
int eventStatus,
long longPayload)
Posts an event of the specified type, subtype, and status.
|
protected void |
postFree(LibraryObjectDefinition def)
Extensibility point to perform actions after the
permanent deletion ("Free") of a object.
|
protected void |
postUpdate(LibraryObjectDefinition def)
Extensibility point to perform actions after the update of a object.
|
protected void |
preCreate(LibraryObjectDefinition def)
Extensibility point to perform actions prior to the
creation of a object.
|
protected void |
preFree(LibraryObjectDefinition def)
Extensibility point to perform actions prior to the
permanent deletion ("free") of a object.
|
protected void |
prePostAuditEvent(AuditEvent event,
int mode)
Extensibility point for creation of a new audit event.
|
protected void |
preUpdate(LibraryObjectDefinition def)
Extensibility point to perform actions prior to the update of a object.
|
void |
putProperty(AttributeValue av)
Adds a Property to this object's PropertyBundle.
|
void |
putProperty(String name,
AttributeValue av)
Adds a Property to this object's PropertyBundle.
|
void |
removeAllProperties()
Removes all Properties from this object's PropertyBundle, leaving
an empty PropertyBundle.
|
void |
removeAllSimpleProperties(String attrName)
Removes all properties (SimpleProperty) for this object, and the specified attribute.
|
void |
removeAllSimpleProperties(String attrName,
boolean updateLastModInfo)
Removes all properties (SimpleProperty) for this object, and the specified attribute.
|
void |
removed(Object id)
Called when an instance is removed to the cache.
|
void |
removeProperty(String name)
Removes a Property from this object's PropertyBundle.
|
void |
removeSimpleProperty(String attrName,
String key)
Removes a property (SimpleProperty) for this object, and the specified attribute.
|
void |
removeSimpleProperty(String attrName,
String key,
boolean updateLastModInfo)
Removes a property (SimpleProperty) for this object, and the specified attribute.
|
RandomAccessContentInterface |
renderAsRandomAccessContent(String rendererType,
String rendererName,
boolean writeable,
Hashtable options)
Deprecated.
CM SDK 10gR2: random access rendering is no longer supported
|
Reader |
renderAsReader(String rendererType,
String rendererName,
Hashtable options)
Renders this LibraryObject as a Reader.
|
InputStream |
renderAsStream(String rendererType,
String rendererName,
Hashtable options)
Renders this LibraryObject as an InputStream.
|
void |
setAttribute(AttributeValue attr_value)
Set this object's attribute to the
specified value.
|
void |
setAttribute(String attr_name,
AttributeValue attr_value)
Set this object's attribute to the
specified value.
|
void |
setAttributes(AttributeValue[] attrValues)
Set this object's attributes to the
specified values.
|
void |
setAttributes(String[] attrNames,
AttributeValue[] values)
Set the values for a list of Attributes
in the database.
|
void |
setCopyContext(LibraryObjectDefinition def)
Set the context of a copy operation for the target object.
|
void |
setFreeContext(LibraryObjectDefinition def)
Set the context of a free operation for the target object.
|
protected void |
setId(Long id)
Sets this object's ID (as a Long).
|
void |
setName(String name)
Set the Name of this object.
|
void |
setPropertyBundle(PropertyBundle bundle)
Sets this object's PropertyBundle.
|
void |
setPropertyValue(String key,
AttributeValue value)
Sets a property on the PropertyBundle associated with this instance.
|
void |
setUpdateContext(LibraryObjectDefinition def)
Set the context of an update operation for the target object.
|
String |
toString()
Returns the Name of this object, or null of the
object does not have a NAME attribute.
|
void |
trace(int channel,
int level,
String payload)
Issues a trace request to the trace logger.
|
protected boolean |
trustHandleCreate()
Indicate whether low-level create should be trusted,
and run with access checks disabled.
|
protected boolean |
trustHandleCreateAsAdmin()
Indicate whether low-level create should be trusted,
and run with access checks disabled and in admin mode.
|
protected boolean |
trustHandleFree()
Indicate whether low-level free should be trusted,
and run with access checks disabled.
|
protected boolean |
trustHandleFreeAsAdmin()
Indicate whether low-level free should be trusted,
and run with access checks disabled and in admin mode.
|
protected boolean |
trustHandleUpdate()
Indicate whether low-level update should be trusted,
and run with access checks disabled.
|
protected boolean |
trustHandleUpdateAsAdmin()
Indicate whether low-level update should be trusted in admin mode,
and run with access checks disabled.
|
void |
update(LibraryObjectDefinition def)
Updates this object from the attributes and options set in
the specified LibraryObjectDefinition.
|
protected LibraryObjectDefinition |
updateAndExposeDefinition(LibraryObjectDefinition def)
Updates this object from the attributes and options set in
the specified LibraryObjectDefinition, returning the definition
that was used server-side.
|
protected void |
validatePropertyValues(PropertyDefinition[] propDefs)
Validates Properties specified during create or update operations.
|
protected static LibraryObject |
vectorLibraryObjectElement(Vector vector,
int index) |
protected static LibraryObject[] |
vectorToLibraryObjectArray(Vector vector) |
protected void |
verifyAdministrationMode()
Verifies the administration mode for the session.
|
protected LibrarySession |
verifyConnected()
Returns the current LibrarySession if
the session is connected; otherwise raise
a "not connected" exception.
|
void |
verifyPersistent()
Verifies that the target object represents an object that is still
persistent in the repository.
|
void |
verifySystemUserAccess(LibrarySession session)
Verifies that the specified session hasnot discovered the target object
illegally.
|
protected void |
verifyTargetObject()
Verifies that the target object represents an object that is still
persistent in the repository.
|
public static final String DOMAIN_UNIQUENAME_DEFAULT_DELIMITER
public static final String NAME_ATTRIBUTE
public static final String PROPERTYBUNDLE_ATTRIBUTE
protected LibrarySession m_Session
protected Long m_Id
protected Long m_ClassId
protected LibraryObject(LibrarySession session, Long id, Long classId, S_LibraryObjectData data) throws IfsException
session
- the sessionid
- the idclassId
- the class iddata
- the object's dataIfsException
- if the operation failsprotected void setId(Long id)
id
- the ID for this objectprotected S_LibraryObjectData getData() throws IfsException
IfsException
public String getName() throws IfsException
IfsException
- if operation fails.public boolean hasNameAttribute() throws IfsException
IfsException
- if operation fails.public boolean hasPropertyBundleAttribute() throws IfsException
IfsException
- if operation fails.public String getCommonName() throws IfsException
The common name can differ from the value returned from
getName
for classes whose name is made unique by combining
it with other attributes.
IfsException
- if operation fails.public static String deriveDomainUniqueName(LibrarySession session, AttributeValue avName, AttributeValue avDomain, String delim) throws IfsException
The form of the composite is [id][delim][name].
The name is forced to uppercase.
For example, for a Domain object with ID 1234 and an object name of "MyAdhocGroup", the derived unique name would be "1234-MYADHOCGROUP".
If either of the specified attribute values are null or contain null values, the returned string is null.
avName
- attribute value for the nameavDomain
- attribute value for the domaindelim
- the delimiter that separates the domain from the nameIfsException
- if the operation failspublic void setPropertyBundle(PropertyBundle bundle) throws IfsException
bundle
- the Properties setting.IfsException
- if the operation failspublic PropertyBundle getPropertyBundle() throws IfsException
IfsException
- if the operation failspublic void putProperty(AttributeValue av) throws IfsException
av
- the name/value of the property to addIfsException
- if the operation failspublic void putProperty(String name, AttributeValue av) throws IfsException
name
- the name of the new propertyav
- the value of the new propertyIfsException
- if the operation failspublic void removeProperty(String name) throws IfsException
name
- the name of the property to removeIfsException
- if the operation failspublic void removeAllProperties() throws IfsException
IfsException
- if the operation failspublic AttributeValue getPropertyValue(String key) throws IfsException
key
- the property's keyIfsException
- if the operation failspublic void setPropertyValue(String key, AttributeValue value) throws IfsException
key
- the property's keyvalue
- the property valueIfsException
- if the operation failsprotected PropertyBundle createDedicatedPropertyBundle() throws IfsException
IfsException
- if the operation failsprotected void applyProperties(LibraryObjectDefinition def) throws IfsException
This is called from both postCreate() and postUpdate().
def
- The definition used in create or update operationIfsException
- if the operation failsprotected void validatePropertyValues(PropertyDefinition[] propDefs) throws IfsException
propDefs
- The Property definitionsIfsException
- protected void checkIfPropertyBundleSupported() throws IfsException
IfsException
- if the object does not support PROPERTYBUNDLEpublic SimpleProperty[] getSimpleProperties(String attrName) throws IfsException
attrName
- the attribute that holds an array of SimplePropertyIfsException
- if the operation failspublic SimpleProperty getSimpleProperty(String attrName, String propName) throws IfsException
attrName
- the attribute that holds an array of SimplePropertypropName
- the property nameIfsException
- if the operation failspublic AttributeValue getSimplePropertyValue(String attrName, String propName) throws IfsException
attrName
- the attribute that holds an array of SimplePropertypropName
- the property nameIfsException
- if the operation failspublic void addSimpleProperty(String attrName, String key, AttributeValue value) throws IfsException
This variant will perform the update without modifying the lastModify info of the target object (only relevant if the target is a PublicObject).
attrName
- the attribute that holds an array of SimplePropertykey
- the property's keyvalue
- the property's valueIfsException
- if the operation failspublic void addSimpleProperty(String attrName, String key, AttributeValue value, boolean updateLastModInfo) throws IfsException
attrName
- the attribute that holds an array of SimplePropertykey
- the property's keyvalue
- the property's valueupdateLastModInfo
- whether to update the LastModify info
of the target objectIfsException
- if the operation failspublic void removeSimpleProperty(String attrName, String key) throws IfsException
This variant will perform the update without modifying the lastModify info of the target object (only relevant if the target is a PublicObject).
attrName
- the attribute that holds an array of SimplePropertykey
- the property's keyIfsException
- if the operation failspublic void removeSimpleProperty(String attrName, String key, boolean updateLastModInfo) throws IfsException
attrName
- the attribute that holds an array of SimplePropertykey
- the property's keyupdateLastModInfo
- whether to update the LastModify info
of the target objectIfsException
- if the operation failspublic void removeAllSimpleProperties(String attrName) throws IfsException
This variant will perform the update without modifying the lastModify info of the target object (only relevant if the target is a PublicObject).
attrName
- the attribute that holds an array of SimplePropertyIfsException
- if the operation failspublic void removeAllSimpleProperties(String attrName, boolean updateLastModInfo) throws IfsException
attrName
- the attribute that holds an array of SimplePropertyupdateLastModInfo
- whether to update the LastModify info
of the target objectIfsException
- if the operation failspublic LibraryObjectDefinition getDefinitionForSimplePropertyUpdates(boolean updateLastModInfo) throws IfsException
updateLastModInfo
- whether to update the LastModify info
of the target objectIfsException
- if the operation failspublic String getLabel() throws IfsException
IfsException
- if operation fails.public String lookupInstanceLabel() throws IfsException
IfsException
- if operation fails.public static String getCommonNameAndClass(LibraryObject obj) throws IfsException
obj
- the object (which can be null)IfsException
- if operation fails.public String toString()
public void setName(String name) throws IfsException
name
- the name of this object.IfsException
- if operation fails.public final AttributeValue getAttribute(String attr_name) throws IfsException
attr_name
- the name of the AttributeIfsException
- if operation fails.public final AttributeValue getAttributeByUpperCaseName(String attr_name) throws IfsException
toUpperCase
on the attribute name.getAttributeByUpperCaseName
in interface LibraryObjectInterface
attr_name
- the attribute name; must be all upper caseIfsException
- if the operation failspublic AttributeValue getEventualAttributeByUpperCaseName(String attrName, LibraryObjectDefinition def) throws IfsException
If the target object does not yet exist in the database (for example, during preCreate()), this will return the setting in the definition for this attribute, or null if this attribute is not set. If the target object does already exist, it will return the value set in the definition if specified, or the value on the existing object if not specified. This method also avoids the cost of forcing the specified attribute name to upper case by assuming that the caller is specifying an upper cased attribute name.
attrName
- the attribute name; must be all upper casedef
- the definitionIfsException
- if the operation failspublic ObjectReferenceAttributeValue getObjectReferenceAttribute(String attrname) throws IfsException
attrname
- the attribute nameIfsException
- if the operation failspublic Object get(String attr_name) throws IfsException, NoSuchMethodException
This is basically a cover to getAttribute(), that returns the actual data object associated with the requested AttributeValue.
attr_name
- the name of the AttributeIfsException
- if operation fails.NoSuchMethodException
- if the passed attribute cannot be found.public AttributeValue[] getAttributes(String[] attrNames) throws IfsException
attrNames
- the names of the AttributesIfsException
- if operation fails.public AttributeValue[] getAttributesByUpperCaseNames(String[] attrNames) throws IfsException
attrNames
- the names of the Attributes; must be all upper caseIfsException
- if operation fails.public SystemObject getSystemObjectAttribute(String attrName, Long classId) throws IfsException
attrName
- the Attribute name (must be all uppercase).classId
- the class Id for the attribute (may be null).IfsException
- if operation fails.public SimpleObject getSimpleObjectAttribute(String attrName, Long classId) throws IfsException
attrName
- the Attribute name (must be all uppercase).classId
- the class Id for the attribute (may be null).IfsException
- if operation fails.public SchemaObject getSchemaObjectAttribute(String attrName, Long classId) throws IfsException
attrName
- the Attribute name (must be all uppercase).classId
- the class Id for the attribute (may be null).IfsException
- if operation fails.public PublicObject getPublicObjectAttribute(String attrName, Long classId) throws IfsException
attrName
- the Attribute name (must be all uppercase).classId
- the class Id for the attribute (may be null).IfsException
- if operation fails.public void setAttribute(String attr_name, AttributeValue attr_value) throws IfsException
attr_name
- the name of the Attributeattr_value
- the desired value of the AttributeIfsException
- if operation fails.public void setAttribute(AttributeValue attr_value) throws IfsException
attr_value
- the desired name & value of the AttributeIfsException
- if operation fails.public void setAttributes(String[] attrNames, AttributeValue[] values) throws IfsException
attrNames
- the names of the Attributesvalues
- the desired values of the AttributesIfsException
- if operation fails.public void setAttributes(AttributeValue[] attrValues) throws IfsException
attrValues
- the desired name & values of the AttributesIfsException
- if operation fails.public void update(LibraryObjectDefinition def) throws IfsException
def
- the LibraryObjectDefinition describing the desired updates.IfsException
- if operation fails.protected LibraryObjectDefinition updateAndExposeDefinition(LibraryObjectDefinition def) throws IfsException
def
- the LibraryObjectDefinition describing the desired updates.IfsException
- if operation fails.protected void handleUpdate(LibraryObjectDefinition def) throws IfsException
def
- the LibraryObjectDefinition describing the desired updates.IfsException
- if operation fails.protected boolean trustHandleUpdate()
protected boolean trustHandleUpdateAsAdmin()
public void checkRequiredAttributeSet(LibraryObjectDefinition def, String attrName, boolean forUpdate) throws IfsException
Works for both create and update operations, which needs to be specified properly as an argument to this method. For create operations, the specified attribute must be specified and have a non-null value. For update operations, the specified attribute either need to be unspecified, or be specified with a non-null value.
Throws 30012 if specified improperly.
def
- the definition to be used in a create or
update operation; cannot be nullattrName
- the attribute name; cannot be nullforUpdate
- whether the operation is an update operationIfsException
- 30012 if the required attribute is not set properlypublic void lockRows() throws IfsException
This will use "select ... for update" to obtain row locks for each row used to identify this instance. To be effective, this method should be called within a bean-side transaction; otherwise the locks will be released when the method completes. The locks will be released when the outer most bean-side transaction commits or aborts.
IfsException
- if operation fails.public Serializable invokeServerMethod(String methodName, Serializable payload) throws IfsException
methodName
- the method name.payload
- the method argumentIfsException
- if operation fails.public Vector getEffectivePolicyListElements(String operation) throws IfsException
The PolicyListElements are returned in SORTSEQUENCE order. If more than one PolicyListElement has a particular SORTSEQUENCE value, a PolicyListElement introduced by the object's PolicyLists precedes a PolicyListElement introduced by a ClassPolicyList. If more than one PolicyListElement is introduced by a ClassPolicyList for a particular SORTSEQUENCE value, a PolicyListElement introduced by a classobject precedes the PolicyListElements introduced by the superclasses of that classobject. If more than one PolicyListElement is introduced by a object-level PolicyList for a particular SORTSEQUENCE value, the array ordering of the PolicyList objects in the PolicyLists attribute is used to determine precedence.
operation
- the operation of interest, or null for
all operationsIfsException
- if the operation failspublic Object invokeOperation(String operationName, LibraryObjectDefinition def) throws IfsException
The entire operation specification must currently be specified via a LibraryObjectDefinition.
operationName
- the operation namedef
- the operation specificationIfsException
- if operation fails.public Object invokeOperation(OperationContext op) throws IfsException
The entire operation specification must currently be specified.
op
- the operation specificationIfsException
- if operation fails.public InputStream renderAsStream(String rendererType, String rendererName, Hashtable options) throws IfsException
The rendererType and rendererName together determine which Renderer implementation is to be used as follows:
If rendererName is not null, the Policy named rendererName for the operation specified by rendererType is obtained. The fully-qualified classname of the Renderer is contained in the IMPLEMENTATION attribute of that Policy.
If rendererName is null, the default Policy for this LibraryObject for the operation specified by rendererType is obtained. The fully- qualified classname of the Renderer is contained in the IMPLEMENTATION attribute of that Policy.
The values in the options Hashtable must be serializable.
rendererType
- the type of the desired RendererrendererName
- the name of the desired Rendereroptions
- any Renderer-specific optionsIfsException
- (IFS-30110) if the operation failspublic Reader renderAsReader(String rendererType, String rendererName, Hashtable options) throws IfsException
The rendererType and rendererName together determine which Renderer implementation is to be used as follows:
If rendererName is not null, the Policy named rendererName for the operation specified by rendererType is obtained. The fully-qualified classname of the Renderer is contained in the IMPLEMENTATION attribute of that Policy.
If rendererName is null, the default Policy for this LibraryObject for the operation specified by rendererType is obtained. The fully- qualified classname of the Renderer is contained in the IMPLEMENTATION attribute of that Policy.
The values in the options Hashtable must be serializable.
rendererType
- the type of the desired RendererrendererName
- the name of the desired Rendereroptions
- any Renderer-specific optionsIfsException
- (IFS-30110) if the operation failspublic RandomAccessContentInterface renderAsRandomAccessContent(String rendererType, String rendererName, boolean writeable, Hashtable options) throws IfsException
The rendererType and rendererName together determine which Renderer implementation is to be used as follows:
If rendererName is not null, the Policy named rendererName for the operation specified by rendererType is obtained. The fully-qualified classname of the Renderer is contained in the IMPLEMENTATION attribute of that Policy.
If rendererName is null, the default Policy for this LibraryObject for the operation specified by rendererType is obtained. The fully- qualified classname of the Renderer is contained in the IMPLEMENTATION attribute of that Policy.
The values in the options Hashtable must be serializable.
rendererType
- the type of the desired RendererrendererName
- the name of the desired Rendererwriteable
- ignored; the returned RACI always non-writeableoptions
- any Renderer-specific optionsIfsException
- (IFS-30110) if the operation failspublic LibrarySession getSession() throws IfsException
IfsException
public LibrarySessionInterface getSessionInterface() throws IfsException
getSessionInterface
in interface LibraryObjectInterface
IfsException
- if the operation failspublic boolean equals(LibraryObject item) throws IfsException
IfsException
- if operation fails.public int hashCode()
public void dispose() throws IfsException
This method is public as it is invoked from BoundedLibraryObjectCache in the oracle.ifs.server.cache pacakge.
IfsException
- if operation fails.public String getClassname() throws IfsException
IfsException
- if operation fails.public String getClassName() throws IfsException
IfsException
- if operation fails.public ClassObject getClassObject() throws IfsException
IfsException
- if operation fails.public static void freeAll(LibraryObject[] objs) throws IfsException
objs
- the objects to freeIfsException
- if operation fails.public void free() throws IfsException
IfsException
- if operation fails.public void free(LibraryObjectDefinition def) throws IfsException
def
- Context for the free operation. If null,
a default definition is used.IfsException
- if operation fails.public LibraryObject createInstance(AttributeValueTable avt) throws IfsException
avt
- the object definition, as a AttributeValueTableIfsException
- if operation fails.protected void preCreate(LibraryObjectDefinition def) throws IfsException
This method is typically overridden by subclasses that
add attribute settings to the definition prior to the object
being created, and/or create other objects that the target object
depends on. At this point, the target object does not exist in
the database, and therefore certain operations performed on the target
will fail (such as getAttribute
).
Subclasses are expected to invoke super.preCreate
.
def
- object definition that will be used to create the objectIfsException
- if operation fails.protected void postCreate(LibraryObjectDefinition def) throws IfsException
This method is typically overridden by subclasses that
perform operations after an object is created.
Subclasses are expected to invoke super.postCreate
.
def
- object definition that was used to create the objectIfsException
- if operation fails.protected boolean trustHandleCreate()
protected boolean trustHandleCreateAsAdmin()
protected void preFree(LibraryObjectDefinition def) throws IfsException
This method is typically overridden by subclasses that
perform other operations prior to the target object
being freed in order to all delete or modify objects related
to the target object.
Subclasses are expected to invoke super.preFree
.
def
- object definition used to hold options related to the free
operationIfsException
- if operation fails.protected void handleFree(LibraryObjectDefinition def) throws IfsException
def
- the LibraryObjectDefinition describing the desired updates.IfsException
- if operation fails.protected boolean trustHandleFree()
protected boolean trustHandleFreeAsAdmin()
protected void postFree(LibraryObjectDefinition def) throws IfsException
This method is typically overridden by subclasses that
perform operations after an object is freed. At this point, the
target object no longer exists in the database, and therefore certain
operations performed on the target will fail
(such as getAttribute
).
Subclasses are expected to invoke super.postFree
.
def
- object definition used to hold options related to the free
operationIfsException
- if operation fails.protected void preUpdate(LibraryObjectDefinition def) throws IfsException
This method is typically overridden by subclasses that
perform other operations prior to the target object
being updated, in order to modify objects related
to the target object.
Subclasses are expected to invoke super.preUpdate
.
def
- object definition used to define how the target object
will be updatedIfsException
- if operation fails.protected void postUpdate(LibraryObjectDefinition def) throws IfsException
This method is typically overridden by subclasses that
perform other operations after the target object has
being updated, in order to modify objects related
to the target object.
Subclasses are expected to invoke super.postUpdate
.
def
- object definition used to define how the target object
was updatedIfsException
- if operation fails.protected void performPreCreateExtensions(LibraryObjectDefinition def) throws IfsException
This is called externally (from preCreate), and currently has no implementation.
def
- object definition that was used to create the objectIfsException
- if operation fails.protected void performPostCreateExtensions(LibraryObjectDefinition def, ClassObject co) throws IfsException
This is called externally (from postCreate) beginning at the bottom of the Class hierarchy. This method delegates to the super class prior to processing, so that the entire class hierarchy is processed top-down.
def
- object definition that was used to create the objectco
- which ClassObject is to be processedIfsException
- if operation fails.protected void performPreUpdateExtensions(LibraryObjectDefinition def, ClassObject co) throws IfsException
This is called externally (from preUpdate) beginning at the bottom of the Class hierarchy. This method delegates to the super class prior to processing, so that the entire class hierarchy is processed top-down.
def
- object definition that was used to update the objectco
- which ClassObject is to be processedIfsException
- if operation fails.protected void performPostUpdateExtensions(LibraryObjectDefinition def, ClassObject co) throws IfsException
This is called externally (from postUpdate) beginning at the bottom of the Class hierarchy. This method delegates to the super class prior to processing, so that the entire class hierarchy is processed top-down.
def
- object definition that was used to update the objectco
- which ClassObject is to be processedIfsException
- if operation fails.protected void performPreFreeExtensions(LibraryObjectDefinition def, ClassObject co) throws IfsException
This is called externally (from preFree) beginning at the bottom of the Class hierarchy. This method delegates to the super class prior to processing, so that the entire class hierarchy is processed top-down.
def
- object definition that was used to free the objectco
- which ClassObject is to be processedIfsException
- if operation fails.protected void performPostFreeExtensions(LibraryObjectDefinition def) throws IfsException
This is called externally (from postFree), and currently has no implementation.
def
- object definition that was used to free the objectIfsException
- if operation fails.public final LibraryObjectDefinition getCreateContext() throws IfsException
Will return true only when called during postCreate() of the target object.
IfsException
- if the operation failspublic final void setFreeContext(LibraryObjectDefinition def) throws IfsException
def
- the free operation contextIfsException
- if the operation failspublic final LibraryObjectDefinition getFreeContext() throws IfsException
IfsException
- if the operation failspublic final void clearFreeContext() throws IfsException
IfsException
- if the operation failspublic final void setUpdateContext(LibraryObjectDefinition def) throws IfsException
def
- the update operation contextIfsException
- if the operation failspublic final LibraryObjectDefinition getUpdateContext() throws IfsException
IfsException
- if the operation failspublic final void clearUpdateContext() throws IfsException
IfsException
- if the operation failspublic final void setCopyContext(LibraryObjectDefinition def) throws IfsException
def
- the copy operation contextIfsException
- if the operation failspublic final LibraryObjectDefinition getCopyContext() throws IfsException
IfsException
- if the operation failspublic final void clearCopyContext() throws IfsException
IfsException
- if the operation failspublic Folder getAuditDomainContext() throws IfsException
IfsException
- if the operation failspublic Folder getAuditEventFolderContext() throws IfsException
IfsException
- if the operation failsprotected OperationActionSpecification getOperationActionSpecificationContext(AuditEvent event, Folder context) throws IfsException
event
- the eventcontext
- the folder contextIfsException
- if the operation failsprotected void prePostAuditEvent(AuditEvent event, int mode) throws IfsException
event
- the event to postmode
- the success/fail mode for the postIfsException
- if the operation failsprotected boolean isCoreEventPostingEnabled()
protected boolean isValidEventType(AuditEvent event) throws IfsException
event
- the event being posted on this objectIfsException
- if the operation failsprotected void auditUpdated(LibraryObjectDefinition lodef) throws IfsException
lodef
- The update definitionIfsException
- if the operation fails.protected void auditCreated(LibraryObjectDefinition lodef) throws IfsException
Does not typically create the CREATED event, but instead creates any other events related to the create.
lodef
- The create definitionIfsException
- if the operation fails.public void verifySystemUserAccess(LibrarySession session) throws IfsException
session
- the session contextIfsException
- if operation fails.public boolean canPurge() throws IfsException
The caller of this method indicates a desire to purge the object. The implementation should treat this as a purge request, but can return false if the item should not be purged.
canPurge
in interface LooselyBoundedCacheable
IfsException
- if operation fails.public void added(Object id)
added
in interface LooselyBoundedCacheable
id
- the id used for this entry in the cachepublic void removed(Object id)
removed
in interface LooselyBoundedCacheable
id
- the id used for this entry in the cachepublic String getStringIdentifier()
public Long getId() throws IfsException
getId
in interface LibraryObjectInterface
IfsException
- if operation fails.public Long getClassId() throws IfsException
getClassId
in interface LibraryObjectInterface
IfsException
- if the operation failspublic LibraryObjectDefinition getDefinition() throws IfsException
IfsException
- if operation fails.public boolean isInstanceOf(ClassObject clss) throws IfsException
IfsException
- if operation fails.protected boolean isConnected() throws IfsException
IfsException
- if operation fails.protected void verifyAdministrationMode() throws IfsException
IfsException
- (AccessDeniedException) if not adminenabledprotected LibrarySession verifyConnected() throws IfsException
IfsException
- (ConnectionException) if not connectedprotected void verifyTargetObject() throws IfsException
Throws IFS-30013 if the object no longer reflects a persistent object.
IfsException
- if target object is not persistentpublic void verifyPersistent() throws IfsException
Throws IFS-30013 if the object no longer reflects a persistent object.
IfsException
- if target object is not persistentpublic boolean isPersistent()
public String getResourceString(String key) throws IfsException
The method looks-up the key in each extended resource bundle. If no extended resource bundle contains the key, the default resource bundle (LibraryResources) is used.
key
- the resource bundle keyIfsException
- IFS-12001 if the operation failspublic String getResourceString(String key, Object[] params) throws IfsException
The method looks up the key using getResourceString(key)
.
Next, java.text.MessageFormat
is used to substitute the
parameters specified by params
into the key's value. If
a string element of params
is delimited by brackets, i.e.
"{param}
", then that element is replaced with the
value returned by getResourceString("param")
before
being passed to MessageFormat
.
key
- the resource bundle keyparams
- an array of Objects to be substituted into
the resource bundle message using using
java.text.MessageFormat
IfsException
- IFS-12006 if the operation failspublic final boolean isTraced(int channel, int level) throws IfsException
isTraced
in interface Traceable
channel
- the channel numberlevel
- the levelIfsException
- (IFS-11201) if the channel is invalidpublic final void trace(int channel, int level, String payload)
public final TraceLogger getTraceLogger() throws IfsException
getTraceLogger
in interface Traceable
IfsException
- if the operation failspublic final void postEvent(int eventType, int eventStatus) throws IfsException
eventType
- the event type; must be one of the event type
constants enumerated in IfsEventeventStatus
- the event status; must be one of the event status
constants enumerated in IfsEventIfsException
- if the operation failspublic final void postEvent(int eventType, int eventSubtype, int eventStatus, long longPayload) throws IfsException
eventType
- the event type; must be one of the event type
constants enumerated in IfsEventeventSubtype
- the event subtype; the meaningful values are
eventType
varianteventStatus
- the event status; must be one of the event status
constants enumerated in IfsEventlongPayload
- the long payload; the meaningful values are
eventType
variantIfsException
- if the operation failspublic void invalidateState() throws IfsException
This clears the committed data from the server-side shared data cache, and places a "dirty" entry on the current uncommitted data frame.
IfsException
- if operation fails.public void handleEvent(IfsEvent event) throws IfsException
handleEvent
in interface IfsEventHandler
event
- the eventIfsException
- if the operation failsprotected void handleAdminModeChange() throws IfsException
IfsException
- if the operation failspublic S_LibraryObjectDataSharedStateFactory getSharedStateFactory()
protected static Vector constructLibraryObjectVector(LibrarySession sess, Vector vector) throws IfsException
IfsException
- if the operation failsprotected static LibraryObject constructLibraryObject(LibrarySession sess, S_LibraryObjectData data) throws IfsException
IfsException
protected static LibraryObject[] vectorToLibraryObjectArray(Vector vector)
protected static LibraryObject vectorLibraryObjectElement(Vector vector, int index) throws IndexOutOfBoundsException
IndexOutOfBoundsException
public static Long[] constructIdArray(LibraryObject[] objs) throws IfsException
objs
- the array of objectsIfsException
- if operation fails.protected static Long[] constructIdArray(Vector vector) throws IfsException
vector
- the vector of S_LibraryObjectDataIfsException
- if operation fails.public int compareTo(Object o)
compareTo
in interface Comparable
o
- the second LibraryObject to compare withCopyright © 2023. All rights reserved.