public abstract class S_LibraryObject extends Object implements IfsEventHandler, LibraryObjectInterface, LooselyBoundedCacheable
Modifier and Type | Class and Description |
---|---|
class |
S_LibraryObject.MapInfo
A MapInfo holds information about a Map used as an AttributeValue,
to facilitate operations for insert and update of the map entries.
|
Modifier | Constructor and Description |
---|---|
protected |
S_LibraryObject(S_LibrarySession session)
Construct a S_LibraryObject object that does not
yet exist inthe database.
|
protected |
S_LibraryObject(S_LibrarySession session,
Long classId)
This constructor is called during object creation (i.e.,
this Library Object does not
yet exist in the database).
|
protected |
S_LibraryObject(S_LibrarySession session,
S_LibraryObjectData data)
Constructs a S_LibraryObject object.
|
Modifier and Type | Method and Description |
---|---|
void |
added(Object id)
Called when an instance is added to the cache.
|
protected void |
applyValueDefault(S_LibraryObjectDefinition def)
Sets default values for any attributes which have a ValueDefault
and for which no value is specified in the definition.
|
protected void |
associatedPostFree(OperationState opState,
S_LibraryObjectDefinition def)
An extensibility point, subclasses override to
have postFree extensibility after extendedPostFree
and manipulate associated objects
|
protected void |
associatedPostInsert(OperationState opState,
S_LibraryObjectDefinition def)
an extensibility point, subclasses override to
have postinsert extensibility after extendedPostInsert
and manipulate associated objects
|
protected void |
associatedPreInsert(OperationState opState,
S_LibraryObjectDefinition def)
an extensibility point, subclasses override to
have preinsert extensibility after extendedPreInsert
and manipulate associated objects
|
boolean |
canPurge()
Gets whether the item can be purged from the
the BoundedCache.
|
protected void |
cascadeCopy(OperationState opState,
S_LibraryObjectDefinition def,
S_LibraryObject clone)
Cascade operations to be performed before copying
an object.
|
protected void |
cascadeFree(OperationState opState,
S_LibraryObjectDefinition def)
cascade operations to be performed before freeing
an object.
|
protected void |
cascadeUpdate(OperationState opState,
S_LibraryObjectDefinition def)
Cascade operations to be performed before updating
an object.
|
protected void |
checkRequiredForInsert(S_LibraryObjectDefinition def)
Checks whether all required attributes of the object being created
have been set in the specified definition.
|
protected void |
checkSettable(S_LibraryObjectDefinition def)
Checks to ensure the attributes in the specfied
definition are user settable.
|
protected static void |
clearArrayTypeAttributeValues(S_Attribute attribute,
S_LibrarySession session)
This variant is used by S_ClassObject.removeAttribute.
|
protected static void |
clearMapTypeAttributeValues(S_Attribute attribute,
S_LibrarySession session)
This variant is used by S_ClassObject.removeAttribute.
|
protected void |
clonePublicObjectAttribute(OperationState opState,
S_LibraryObjectDefinition sdef,
String attrname)
Copies an attribute in a definition.
|
protected static Long[] |
constructIdArray(S_LibraryObject[] objs)
Construct an array of object IDs from an array of S_LibraryObjects.
|
protected static Long[] |
constructIdArray(Vector vector)
Construct an array of object IDs from a Vector of S_LibraryObjectData
objects.
|
S_LibraryObject |
copy(OperationState opState)
Make a copy of the target object.
|
S_LibraryObject |
copy(OperationState opState,
S_LibraryObjectDefinition def)
Make a copy of the target object.
|
protected static void |
copyVectorToLibraryObjectArray(S_LibrarySession sess,
Vector vector,
S_LibraryObject[] objs)
Fill the specified S_LibraryObject array with S_LibraryObjects
constructed from a corresponding set of S_LibraryObjectData obejcts.
|
S_PolicyPropertyBundle |
createDefaultPolicyPropertyBundle()
Deprecated.
CM SDK 10gR2: see release notes for changes to Policy framework
|
S_PropertyBundle |
createDefaultPropertyBundle()
Creates a PropertyBundle for a SystemObject or SchemaObject,
using a default name.
|
S_PropertyBundle |
createDefaultPropertyBundle(String name)
Creates a PropertyBundle for a SystemObject or SchemaObject,
using the name specified.
|
protected S_LibraryObjectData |
createInstance(OperationState opState,
S_LibraryObjectDefinition def)
Create a new instance.
|
protected void |
deleteRows()
Delete the row from each table for this instance.
|
protected void |
deriveDefinition(S_LibraryObjectDefinition def)
Add to the S_LibraryObjectDefinition for this class.
|
protected String |
deriveOwnerUniqueName(AttributeValue avName,
AttributeValue avOwner)
Derives a "owner based unique name", which is a composite of an object
which acts as an owner for scoping purposes, and the object name.
|
protected String |
deriveOwnerUniqueName(AttributeValue avName,
AttributeValue avOwner,
String delim)
Derives a "owner based unique name", which is a composite of an object
which acts as an owner for scoping purposes, and the object name.
|
protected void |
deriveUppercasedAttribute(S_LibraryObjectDefinition def,
String attrname,
String derivedAttrame)
Derives a system-set attribute from a base attribute, if this base
attribute is defined in the specified definition.
|
protected S_ClassDomain |
determineClassDomain(S_AttributeData attributeData,
S_LibraryObjectDefinition def)
Return the ClassDomain that is in force for the specified
Attribute data.
|
protected S_Policy |
determinePolicy(String operationName)
Deprecated.
CM SDK 10gR2: see release notes for changes to Policy framework
|
protected S_Policy |
determinePolicy(String operationName,
S_LibraryObjectDefinition def)
Deprecated.
CM SDK 10gR2: see release notes for changes to Policy framework
|
protected S_ValueDefault |
determineValueDefault(S_AttributeData attributeData,
S_LibraryObjectDefinition def)
return the ValueDefault that is in force for the specified
Attribute data.
|
protected S_ValueDomain |
determineValueDomain(AttributeValue av,
S_ClassObjectData classData,
S_LibraryObjectDefinition def)
Return the ValueDomain that is in force for the specified
AttributeValue.
|
void |
dispose()
Disposes this instance, by nulling the Id and Class Id.
|
Serializable |
DYNInvalidateState(Serializable payload)
Invalidates any information cached for this object.
|
Serializable |
DYNLockRows(Serializable payload)
Lock the rows from each table for this instance.
|
boolean |
equals(Object item) |
boolean |
equals(S_LibraryObject item)
Compares whether two LibraryObjects are the same
IFS object.
|
void |
executePolicyOperation(String opName,
OperationState opState,
S_LibraryObjectDefinition def)
Execute Policy operation.
|
protected void |
extendedPostFree(OperationState opState,
S_LibraryObjectDefinition def)
Operations to be performed after freeing
an object.
|
protected void |
extendedPostInsert(OperationState opState,
S_LibraryObjectDefinition sdef)
Operations to be performed after creating
an object.
|
protected void |
extendedPostUpdate(OperationState opState,
S_LibraryObjectDefinition def)
Extended operations to be performed after updating an object.
|
protected void |
extendedPreCopy(OperationState opState,
S_LibraryObjectDefinition sdef)
Operations to be performed before creating
a copy of an object.
|
protected void |
extendedPreFree(OperationState opState,
S_LibraryObjectDefinition def)
Operations to be performed before freeing
an object.
|
protected void |
extendedPreInsert(OperationState opState,
S_LibraryObjectDefinition sdef)
Extensibility point to perform actions prior to the
creation of a new CM SDK object.
|
protected void |
extendedPreUpdate(OperationState opState,
S_LibraryObjectDefinition def)
Operations to be performed before updating
an object.
|
protected static S_Policy |
findPolicyFromPropertyBundleAv(S_LibrarySession sess,
AttributeValue av,
String operationName)
Deprecated.
CM SDK 10gR2: see release notes for changes to Policy framework
|
protected void |
free(OperationState opState)
Permanently delete an object.
|
void |
free(OperationState opState,
S_LibraryObjectDefinition def)
Permanently delete an object.
|
AttributeValue |
getAttribute(String attr_name)
Return an AttributeValue object
that holds the value of the requested attribute.
|
AttributeValue |
getAttributeByUpperCaseName(String attr_name)
Gets the attribute value for the specified attribute.
|
String |
getAuditCertificateName()
Gets the name to use in an audit certificate.
|
Long |
getAuditDomainContext()
Gets the domain context to use for auditing.
|
S_Folder |
getAuditEventFolderContext()
Gets the folder context for the target of an Audit Event.
|
protected S_ClassObjectData |
getClassData()
Gets the object's class's Data object.
|
Long |
getClassId()
Gets the object's class ID (a long).
|
String |
getClassName()
Gets the object's class's name.
|
S_ClassObject |
getClassObject()
Gets the object's ClassObject.
|
protected ContentStorageManager |
getContentStorageManager()
Gets the Content storage manager to use for this instance.
|
protected S_LibraryObjectData |
getData()
Returns the data representation of the object
|
protected S_LibraryObjectDefinition |
getDefinition()
Construct a S_LibraryObjectDefinition object
that represents the target object.
|
protected Vector |
getEffectivePolicyActionContexts(String operation)
Gets the set of policies, as PolicyActionContexts, applied to this
LibraryObject, either explicitly (through its PolicyLists) or
implicitly (through the ClassPolicyLists
of its classobject hierarchy) for the specified operation.
|
Vector |
getEffectivePolicyListElements(String operation)
Gets the set of policies, as PolicyListElements, applied to this
LibraryObject, either explicitly (through its PolicyLists)
or implicitly (through the ClassPolicyLists
of its classobject hierarchy) for the specified operation.
|
protected AttributeValue |
getEventualAttributeByUpperCaseName(String attrname,
S_LibraryObjectDefinition def)
Gets the attribute value for the specified attribute from either
the target object or from the specified definition.
|
Long |
getId()
Gets the object's numeric ID (a long).
|
protected LibraryConnection |
getLibraryConnection()
Return the database connection.
|
String |
getName()
Returns the Name of this object, or null of this
object does not have a NAME attribute.
|
protected ObjectReferenceAttributeValue |
getObjectReferenceAttribute(String attrname)
Gets the value of a ObjectReference attribute.
|
S_PropertyBundle |
getPropertyBundle()
Gets the S_PropertyBundle for this object.
|
AttributeValue |
getPropertyValue(String key)
Returns a property from the S_PropertyBundle associated with this instance.
|
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.
|
protected S_LibraryService |
getService()
getService() - return the S_LibraryService which created
the S_LibrarySession from which this object was created.
|
S_LibrarySession |
getSession()
Returns the current S_LibrarySession.
|
LibrarySessionInterface |
getSessionInterface()
Gets the LibrarySessionInterface for this S_LibraryObject.
|
TraceLogger |
getTraceLogger()
Gets the trace logger of this object's session.
|
protected void |
handleCascade(OperationState opState,
S_LibraryObject source,
int cascadeType,
S_LibraryObjectDefinition sdef,
Object customArg)
Handle a cascaded operation initiated by
(usually) another object.
|
void |
handleEvent(IfsEvent event)
Handles the specified event.
|
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.
|
protected void |
insertReferenceAttributes(S_LibraryObjectDefinition def)
Resolve any Reference attributes into content and
content references during object creation.
|
protected void |
insertRow(AttributeValue[] avs,
S_ClassObjectData clssdata)
Insert a row representing the specified values for the specified class.
|
protected void |
insertRows(S_LibraryObjectDefinition def)
Update the rows from each table for this instance.
|
void |
invalidateState()
Invalidates any information cached for this object.
|
Object |
invokeOperation(OperationContext opContext)
Invoke an operation.
|
protected Object |
invokePolicyMethod(String methodName,
Object[] args,
String[] argClassPaths)
Deprecated.
CM SDK 10gR2: see release notes for changes to Policy framework
|
boolean |
isAuditCertificateSecured()
Gets whether an audit certificate for the target object should be secured,
meabing it should be restricted to administrators.
|
protected boolean |
isBroadcastCreateEventEnabled()
Returns indication as to whether create events should be posted.
|
boolean |
isInstanceOf(S_ClassObject clss)
Determine if this is an instance of
the specified S_ClassObject.
|
boolean |
isPersistent()
Indicates whether the object is still persistent in the repository.
|
protected void |
issueCascade(S_LibraryObject target,
OperationState opState,
S_LibraryObject source,
int cascadeType,
S_LibraryObjectDefinition sdef,
Object customArg)
Issue a cascaded operation request to another
object.
|
boolean |
isTraced(int channel,
int level)
Gets whether tracing is enabled for the specified channel and level.
|
protected void |
lockRows()
Lock the rows from each table for this instance.
|
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(OperationState opState,
S_LibraryObjectDefinition def)
Operations to be performed after freeing
an object.
|
protected void |
postInsert(OperationState opState,
S_LibraryObjectDefinition def)
operations to be performed after inserting
a new object.
|
protected void |
postUpdate(OperationState opState,
S_LibraryObjectDefinition def)
Operations to be performed after updating an object.
|
protected void |
preFree(OperationState opState,
S_LibraryObjectDefinition def)
Operations to be performed before freeing an object.
|
protected void |
preInsert(OperationState opState,
S_LibraryObjectDefinition def)
Prepare operation for create instance.
|
protected void |
preUpdate(OperationState opState,
S_LibraryObjectDefinition def)
perform pre-update operations on an object.
|
void |
privilegedUpdate(LibraryObjectDefinition lodef)
Perform an update in a privileged state.
|
void |
removed(Object id)
Called when an instance is removed to the cache.
|
Reader |
renderAsReader(String rendererType,
String rendererName,
Hashtable options)
Deprecated.
iFS 9.0.3 see release notes for more information
|
InputStream |
renderAsStream(String rendererType,
String rendererName,
Hashtable options)
Deprecated.
iFS 9.0.3 see release notes for more information
|
void |
setAttribute(AttributeValue attr_value)
Set the object's attribute to the specified value.
|
void |
setAttribute(String attr_name,
AttributeValue attr_value)
Set the object's attribute to the specified value.
|
protected void |
setAttributes(S_LibraryObjectDefinition def)
Set the object's attributes to the
specified values.
|
String |
toString()
If this is an instance of a class that has a name attribute,
return getName(); else, return super.toString().
|
void |
trace(int channel,
int level,
String payload)
Issues a trace request to the trace logger.
|
void |
update(OperationState opState,
S_LibraryObjectDefinition def)
update an object in the context of an Operation.
|
protected void |
updateRows(S_LibraryObjectDefinition def)
Update the rows from each table for this instance.
|
protected void |
validateStringArray(String[] values,
int maxLength,
String attrName)
Validates the String arrays used for array values or map keys/values.
|
protected void |
verifyCanCreate(S_LibraryObjectDefinition def)
Verifies that the instance can be created.
|
protected void |
verifyCanFree()
Verifies that the instance can be freed.
|
protected void |
verifyCanGetContent(S_ContentObject co)
Verifies that the user has getContent permission on this
object
|
protected void |
verifyCanSetContent()
Verifies that the user has setContent permission on this
object
|
protected void |
verifyCanSetPolicy()
Verifies that Policies can be updated on the instance.
|
protected void |
verifyCanUpdate()
Verifies that the instance can be updated.
|
void |
verifyPersistent()
Verifies that the target object represents an object that is still
persistent in the repository.
|
protected void |
verifyWriteableTransactionInProgress()
verify that we're in a Writeable transaction.
|
public static final int CASCADE_OP_UNDEFINED
public static final int CASCADE_OP_FREE_PUBLICOBJECT_TO_CATEGORY
public static final int CASCADE_OP_FREE_PUBLICOBJECT_TO_LEFT_RELATIONSHIP
public static final int CASCADE_OP_FREE_PUBLICOBJECT_TO_RIGHT_RELATIONSHIP
public static final int CASCADE_OP_FREE_RELATIONSHIP_TO_LEFT_PUBLICOBJECT
public static final int CASCADE_OP_FREE_RELATIONSHIP_TO_RIGHT_PUBLICOBJECT
public static final int CASCADE_OP_FREE_CATEGORY_TO_PUBLICOBJECT
public static final int CASCADE_OP_FREE_VERSIONSERIES_TO_VERSIONDESCRIPTION
public static final int CASCADE_OP_DELETE_VERSIONSERIES_TO_VERSIONDESCRIPTION
public static final int CASCADE_OP_UNDELETE_VERSIONSERIES_TO_VERSIONDESCRIPTION
public static final int CASCADE_OP_FREE_VERSIONDESCRIPTION_TO_VERSIONSERIES
public static final int CASCADE_OP_DELETE_VERSIONDESCRIPTION_TO_VERSIONSERIES
public static final int CASCADE_OP_UNDELETE_VERSIONDESCRIPTION_TO_VERSIONSERIES
public static final int CASCADE_OP_FREE_VERSIONDESCRIPTION_TO_PUBLICOBJECT
public static final int CASCADE_OP_DELETE_VERSIONDESCRIPTION_TO_PUBLICOBJECT
public static final int CASCADE_OP_UNDELETE_VERSIONDESCRIPTION_TO_PUBLICOBJECT
public static final int CASCADE_OP_FREE_PUBLICOBJECT_TO_VERSIONDESCRIPTION
public static final int CASCADE_OP_DELETE_PUBLICOBJECT_TO_VERSIONDESCRIPTION
public static final int CASCADE_OP_UNDELETE_PUBLICOBJECT_TO_VERSIONDESCRIPTION
public static final int CASCADE_OP_FREE_FAMILY_TO_VERSIONSERIES
public static final int CASCADE_OP_DELETE_FAMILY_TO_VERSIONSERIES
public static final int CASCADE_OP_UNDELETE_FAMILY_TO_VERSIONSERIES
public static final int CASCADE_OP_FREE_VERSIONSERIES_TO_FAMILY
public static final int CASCADE_OP_DELETE_VERSIONSERIES_TO_FAMILY
public static final int CASCADE_OP_UNDELETE_VERSIONSERIES_TO_FAMILY
public static final int CASCADE_OP_DELETE_PUBLICOBJECT_TO_LEFT_RELATIONSHIP
public static final int CASCADE_OP_DELETE_PUBLICOBJECT_TO_RIGHT_RELATIONSHIP
public static final int CASCADE_OP_DELETE_RELATIONSHIP_TO_LEFT_PUBLICOBJECT
public static final int CASCADE_OP_DELETE_RELATIONSHIP_TO_RIGHT_PUBLICOBJECT
public static final int CASCADE_OP_UNDELETE_PUBLICOBJECT_TO_LEFT_RELATIONSHIP
public static final int CASCADE_OP_UNDELETE_PUBLICOBJECT_TO_RIGHT_RELATIONSHIP
public static final int CASCADE_OP_UNDELETE_RELATIONSHIP_TO_LEFT_PUBLICOBJECT
public static final int CASCADE_OP_UNDELETE_RELATIONSHIP_TO_RIGHT_PUBLICOBJECT
public static final int CASCADE_OP_COPY_PUBLICOBJECT_TO_RIGHT_RELATIONSHIP
public static final int CASCADE_OP_UPDATE_PUBLICOBJECT_TO_CATEGORY
public static final int CASCADE_OP_UPDATE_CATEGORY_TO_PUBLICOBJECT
public static final int CASCADE_OP_FREE_SYSTEMOBJECT_TO_CATEGORY
public static final int CASCADE_OP_FREE_CATEGORY_TO_SYSTEMOBJECT
public static final int CASCADE_OP_UPDATE_SYSTEMOBJECT_TO_CATEGORY
public static final int CASCADE_OP_UPDATE_CATEGORY_TO_SYSTEMOBJECT
public static final int CASCADE_OP_FREE_SCHEMAOBJECT_TO_CATEGORY
public static final int CASCADE_OP_FREE_CATEGORY_TO_SCHEMAOBJECT
public static final int CASCADE_OP_UPDATE_SCHEMAOBJECT_TO_CATEGORY
public static final int CASCADE_OP_UPDATE_CATEGORY_TO_SCHEMAOBJECT
public static final int CASCADE_OP_COPY_PUBLICOBJECT_TO_CATEGORY
public static final String DEFAULT_RENDERER
protected S_LibrarySession m_Session
protected Long m_Id
protected Long m_ClassId
protected S_LibraryObject(S_LibrarySession session, S_LibraryObjectData data) throws IfsException
session
- current S_LibrarySessiondata
- the object's dataIfsException
protected S_LibraryObject(S_LibrarySession session) throws IfsException
session
- current S_LibrarySessionIfsException
protected S_LibraryObject(S_LibrarySession session, Long classId) throws IfsException
session
- current S_LibrarySessionIfsException
public Long getId() throws IfsException
getId
in interface LibraryObjectInterface
IfsException
- if the operation failspublic Long getClassId() throws IfsException
getClassObject().getId();
getClassId
in interface LibraryObjectInterface
IfsException
- if the operation failspublic boolean equals(S_LibraryObject item) throws IfsException
IfsException
- if operation fails.public int hashCode()
public void dispose() throws IfsException
IfsException
- if operation fails.public Serializable DYNInvalidateState(Serializable payload) throws IfsException
payload
- ignoredIfsException
- if operation fails.public void invalidateState() throws IfsException
This will clear any entry in the committed data cache, and places a "dirty" entry on the current uncommitted data frame. This method is meant to be overridden by subclasses, which will invoke super.invalidateState() and then clear any member variables or other cached information associated with the object.
IfsException
- if operation fails.protected S_ClassObjectData getClassData() throws IfsException
IfsException
public final S_ClassObject getClassObject() throws IfsException
IfsException
public String getClassName() throws IfsException
IfsException
public String getName() throws IfsException
IfsException
- if operation fails.public boolean hasNameAttribute() throws IfsException
IfsException
- if operation fails.protected void deriveUppercasedAttribute(S_LibraryObjectDefinition def, String attrname, String derivedAttrame) throws IfsException
def
- current object definitionattrname
- name of the base attributederivedAttrame
- name of the derived attributeIfsException
- if operation fails.protected String deriveOwnerUniqueName(AttributeValue avName, AttributeValue avOwner) throws IfsException
avName
- attribute value for the nameavOwner
- attribute value for the ownerIfsException
- if operation fails.protected String deriveOwnerUniqueName(AttributeValue avName, AttributeValue avOwner, String delim) throws IfsException
avName
- attribute value for the nameavOwner
- attribute value for the ownerdelim
- the delimiter to use that separates the owner from the nameIfsException
- if operation fails.public S_LibrarySession getSession() throws IfsException
IfsException
- if operation fails.public LibrarySessionInterface getSessionInterface() throws IfsException
getSessionInterface
in interface LibraryObjectInterface
IfsException
- if the operation failsprotected S_LibraryService getService() throws IfsException
IfsException
- if operation fails.protected ContentStorageManager getContentStorageManager() throws IfsException
IfsException
- if operation fails.protected S_LibraryObjectData getData() throws IfsException
IfsException
- if any other aspect of the operation fails.public String toString()
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
getAttributeByUpperCaseName
in interface LibraryObjectInterface
attr_name
- the attribute name; must be all upper caseIfsException
- if the operation failsprotected AttributeValue getEventualAttributeByUpperCaseName(String attrname, S_LibraryObjectDefinition def) throws IfsException
attrname
- the attribute name; must be all upper casedef
- the definitionIfsException
- if the operation failsprotected final ObjectReferenceAttributeValue getObjectReferenceAttribute(String attrname) throws IfsException
attrname
- the attribute nameIfsException
- if the operation failspublic void setAttribute(String attr_name, AttributeValue attr_value) throws IfsException
The value is set in the object's cache as well as in the CM SDK server. This variant will set the attribute's name in the AttributeValue to the name argument provided.
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
The value is set in the object's cache as well as in the CM SDK server.
attr_value
- the desired name & value of the AttributeIfsException
- if operation fails.public void privilegedUpdate(LibraryObjectDefinition lodef) throws IfsException
lodef
- the definition containing the updateIfsException
- if operation failspublic final 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 final 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 failsprotected void setAttributes(S_LibraryObjectDefinition def) throws IfsException
def
- the server-side definition class that holds the attribute changesIfsException
- if operation fails.public void update(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
opState
- Operation statedef
- the server-side definition class that holds the attribute changesIfsException
- if operation fails.protected final void preUpdate(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
opState
- Operation statedef
- the server-side definition class that holds the attribute changesIfsException
- if operation fails.protected final void verifyWriteableTransactionInProgress() throws IfsException
IfsException
- if operation fails.protected final void postInsert(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
def
- the S_LibraryObjectDefinition that contains
the settings for the new instance.IfsException
- if operation fails.protected void extendedPreUpdate(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
opState
- Operation statedef
- the server-side definition class that holds the attribute changesIfsException
- if operation fails.protected void postUpdate(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
This is overridden by classes that need to perform operations after successfully inserting the rows for the newly created instance.
opState
- the Operation statedef
- the S_LibraryObjectDefinition that contains the updates.IfsException
- if operation fails.protected void extendedPostUpdate(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
This is overridden by classes that need to perform operations after updating this object in the database, but before commit.
opState
- the Operation statedef
- the S_LibraryObjectDefinition that contains the updates.IfsException
- if operation fails.protected final void preFree(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
This is overridden by classes that need to perform operations after successfully deleting the rows for the freed instance.
opState
- the Operation statedef
- the S_LibraryObjectDefinition that contains the free options.IfsException
- if operation fails.protected final void preInsert(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
opState
- the operation statedef
- the LibraryObjectDefinition that contains
the settings for the new instance.IfsException
- if any other aspect of the operation fails.public void executePolicyOperation(String opName, OperationState opState, S_LibraryObjectDefinition def) throws IfsException
opName
- the operation nameopState
- the operation statedef
- the LibraryObjectDefinition that contains
the settings for the new instance.IfsException
- if the operation fails.protected void associatedPreInsert(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
opState
- the operation statedef
- the LibraryObjectDefinition that contains
the settings for the new instance.IfsException
- if any other aspect of the operation fails.protected void associatedPostInsert(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
opState
- the operation statedef
- the LibraryObjectDefinition that contains
the settings for the new instance.IfsException
- if any other aspect of the operation fails.protected void associatedPostFree(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
opState
- the operation statedef
- the LibraryObjectDefinition that contains
the settings for the new instance.IfsException
- if any other aspect of the operation fails.protected void postFree(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
opState
- the operation statedef
- the LibraryObjectDefinition that contains the free settings .IfsException
- if operation fails.protected void issueCascade(S_LibraryObject target, OperationState opState, S_LibraryObject source, int cascadeType, S_LibraryObjectDefinition sdef, Object customArg) throws IfsException
target
- object to receive this cascade requestopState
- originating operation statesource
- object initiating this cascade request
(usually this).cascadeType
- type of cascade requestsdef
- original Definition objectcustomArg
- any custom parameter.IfsException
- if operation fails.protected void handleCascade(OperationState opState, S_LibraryObject source, int cascadeType, S_LibraryObjectDefinition sdef, Object customArg) throws IfsException
opState
- originating operation statesource
- object initiating this cascade request (not
necessarily the original object)cascadeType
- type of cascade requestsdef
- original Definition objectcustomArg
- any custom parameter.IfsException
- if operation fails.protected void cascadeFree(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
opState
- current operation statedef
- object definitionIfsException
- if operation fails.protected void cascadeUpdate(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
opState
- current operation statedef
- object definitionIfsException
- if operation fails.protected void cascadeCopy(OperationState opState, S_LibraryObjectDefinition def, S_LibraryObject clone) throws IfsException
opState
- current operation statedef
- object definitionclone
- the copy of the target objectIfsException
- if operation fails.protected void extendedPreFree(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
opState
- current operation statedef
- object definitionIfsException
- if operation fails.protected void extendedPostFree(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
opState
- current operation statedef
- object definitionIfsException
- if operation fails.protected void extendedPreInsert(OperationState opState, S_LibraryObjectDefinition sdef) throws IfsException
The current operation state for the Create operation is passed along with the definition object that holds the attributes and options used in creating the object.
This method is typically overridden by subclasses that add attribute settings to the definition prior to the object being created. At this point, the ID is not set on the target instance. It can also be used to perform validation; this method should throw an exception to prevent the object creation from taking place if the definition specification is invalid.
opState
- current operation statesdef
- object definitionIfsException
- if operation fails.protected void extendedPostInsert(OperationState opState, S_LibraryObjectDefinition sdef) throws IfsException
opState
- current operation statesdef
- object definitionIfsException
- if operation fails.protected void extendedPreCopy(OperationState opState, S_LibraryObjectDefinition sdef) throws IfsException
opState
- current operation statesdef
- object definitionIfsException
- if operation fails.protected S_LibraryObjectDefinition getDefinition() throws IfsException
IfsException
- if operation fails.protected void deriveDefinition(S_LibraryObjectDefinition def) throws IfsException
This this called by getDefinition() on S_LibraryObject. All classes that extend this should call super.deriveDefinition() before applying any class-specific changes to the S_LibraryObjectDefinition object.
def
- the S_LibraryObjectDefinition that contains
the definition of the target object.IfsException
- if operation fails.protected void clonePublicObjectAttribute(OperationState opState, S_LibraryObjectDefinition sdef, String attrname) throws IfsException
opState
- The operation state.sdef
- The definition for the new copy.attrname
- The name of the attribute to copy.IfsException
- if operation fails.public S_LibraryObject copy(OperationState opState) throws IfsException
opState
- the OperationStateIfsException
- if operation fails.public S_LibraryObject copy(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
opState
- the OperationStatedef
- any modifications to make to the copied objectIfsException
- if operation fails.protected void free(OperationState opState) throws IfsException
opState
- the OperationStateIfsException
- if operation fails.public void free(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
opState
- The operation state.def
- The free options.IfsException
- if operation fails.protected LibraryConnection getLibraryConnection() throws IfsException
IfsException
- if operation fails.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 handleEvent(IfsEvent event) throws IfsException
handleEvent
in interface IfsEventHandler
event
- the eventIfsException
- if the operation failspublic 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 failsprotected Vector getEffectivePolicyActionContexts(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 failsprotected S_Policy determinePolicy(String operationName, S_LibraryObjectDefinition def) throws IfsException
operationName
- Operation namedef
- definition instance (PolicyBundle can be specified
as an attribute)IfsException
- if the operation failsprotected S_Policy determinePolicy(String operationName) throws IfsException
operationName
- Operation nameIfsException
- if the operation failsprotected static S_Policy findPolicyFromPropertyBundleAv(S_LibrarySession sess, AttributeValue av, String operationName)
sess
- av
- operationName
- public Object invokeOperation(OperationContext opContext) throws IfsException
opContext
- the operation specificationIfsException
- if the operation failsprotected Object invokePolicyMethod(String methodName, Object[] args, String[] argClassPaths) throws IfsException
methodName
- method nameIfsException
- if the operation failsprotected S_LibraryObjectData createInstance(OperationState opState, S_LibraryObjectDefinition def) throws IfsException
def
- the LibraryObjectDefinition that contains
the settings for the new instance.IfsException
- if any other aspect of the operation fails.protected void deleteRows() throws IfsException
IfsException
- if operation fails.protected void updateRows(S_LibraryObjectDefinition def) throws IfsException
def
- the Definition describing the updateIfsException
- if operation fails.public Serializable DYNLockRows(Serializable payload) throws IfsException
payload
- ignoredIfsException
- if operation fails.protected void lockRows() throws IfsException
IfsException
- if operation fails.protected void insertRows(S_LibraryObjectDefinition def) throws IfsException
def
- the Definition describing the insertIfsException
- if operation fails.protected boolean isBroadcastCreateEventEnabled() throws IfsException
Overridden by subclasses that require create events (most do not).
IfsException
- if operation fails.protected void insertRow(AttributeValue[] avs, S_ClassObjectData clssdata) throws IfsException
avs
- the values being updatedclssdata
- the class whose table is being updatedIfsException
- if operation fails.protected static void clearArrayTypeAttributeValues(S_Attribute attribute, S_LibrarySession session) throws IfsException
attribute
- the Attributesession
- the session contextIfsException
- if operation fails.protected static void clearMapTypeAttributeValues(S_Attribute attribute, S_LibrarySession session) throws IfsException
attribute
- the Attributesession
- the session contextIfsException
- if operation fails.protected void validateStringArray(String[] values, int maxLength, String attrName) throws IfsException
values
- the Strings to validatemaxLength
- the max string lengthattrName
- the Attribute name, to use in an exception, if neededIfsException
- if the operation failsprotected void checkSettable(S_LibraryObjectDefinition def) throws IfsException
def
- the definitionIfsException
- (IFS-30019) if an attribute in the
definition is not settableprotected void insertReferenceAttributes(S_LibraryObjectDefinition def) throws IfsException
def
- the definitionif
- operation failsIfsException
protected void verifyCanCreate(S_LibraryObjectDefinition def) throws IfsException
def
- the definitionIfsException
- if the operation failsprotected void verifyCanUpdate() throws IfsException
IfsException
- if the operation failsprotected void verifyCanFree() throws IfsException
IfsException
- if the operation failsprotected void verifyCanGetContent(S_ContentObject co) throws IfsException
co
- the content objectIfsException
- if the operation failsprotected void verifyCanSetContent() throws IfsException
IfsException
- if the operation failsprotected void verifyCanSetPolicy() throws IfsException
IfsException
- if the operation failsprotected void applyValueDefault(S_LibraryObjectDefinition def) throws IfsException
def
- the definitionIfsException
- if the operation failsprotected S_ValueDefault determineValueDefault(S_AttributeData attributeData, S_LibraryObjectDefinition def) throws IfsException
attributeData
- the Attribute datadef
- the definition contextIfsException
- if operation fails.protected void checkRequiredForInsert(S_LibraryObjectDefinition def) throws IfsException
def
- the definitionIfsException
- (IFS-30012) if a required attribute
is nullprotected S_ClassDomain determineClassDomain(S_AttributeData attributeData, S_LibraryObjectDefinition def) throws IfsException
attributeData
- the Attribute datadef
- the definition contextIfsException
- if operation fails.protected S_ValueDomain determineValueDomain(AttributeValue av, S_ClassObjectData classData, S_LibraryObjectDefinition def) throws IfsException
av
- the AttributeValueclassData
- class data for this instance (can be null)def
- the definition (for context by overriders)IfsException
- if operation fails.protected static void copyVectorToLibraryObjectArray(S_LibrarySession sess, Vector vector, S_LibraryObject[] objs) throws IfsException
sess
- session contextvector
- vector of data objectsobjs
- array to copy the constructed obejcts intoIfsException
protected static Long[] constructIdArray(S_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 boolean isInstanceOf(S_ClassObject clss) throws IfsException
IfsException
- if operation fails.public S_PropertyBundle getPropertyBundle() throws IfsException
IfsException
public AttributeValue getPropertyValue(String key) throws IfsException
key
- the property's keyIfsException
- if the operation failspublic S_PropertyBundle createDefaultPropertyBundle() throws IfsException
IfsException
- if operation failspublic S_PropertyBundle createDefaultPropertyBundle(String name) throws IfsException
name
- the name to use for the PropertyBundleIfsException
- if operation failspublic S_PolicyPropertyBundle createDefaultPolicyPropertyBundle() throws IfsException
IfsException
- if operation failspublic S_Folder getAuditEventFolderContext() throws IfsException
IfsException
- if the operation failspublic Long getAuditDomainContext() throws IfsException
IfsException
- if the operation failspublic String getAuditCertificateName() throws IfsException
IfsException
- if the operation failspublic boolean isAuditCertificateSecured() throws IfsException
IfsException
- if the operation failspublic 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 void verifyPersistent() throws IfsException
Throws IFS-10201 if the object no longer reflects a persistent object.
IfsException
- if target object is not persistentpublic boolean isPersistent()
Copyright © 2023. All rights reserved.