public class RetentionPolicy extends TieSystemObject
Modifier and Type | Field and Description |
---|---|
static String |
CLASS_NAME
The name of the ClassObject representing this class.
|
static String |
DESCRIPTION_ATTRIBUTE
The name of the attribute that holds a textual description
of the RetentionPolicy.
|
static String |
NAME_ATTRIBUTE
The name of the attribute that holds the name of this
RetentionPolicy.
|
static String |
RECORD_ATTRIBUTE
The name of the attribute that indicates whether document instances
that reference this RetentionPolicy are implicitly considered records.
|
static String |
REFERENCED_ATTRIBUTE
The name of the attribute that indicates whether any document instances
reference this RetentionPolicy.
|
ACTIVE_ATTRIBUTE, POLICYBUNDLE_ATTRIBUTE, POLICYLISTS_ATTRIBUTE, PROPERTYBUNDLE_ATTRIBUTE
DOMAIN_UNIQUENAME_DEFAULT_DELIMITER, m_ClassId, m_Id, m_Session
Modifier | Constructor and Description |
---|---|
protected |
RetentionPolicy(LibrarySession session,
Long id,
Long classId,
S_LibraryObjectData data)
Construct a RetentionPolicy object.
|
Modifier and Type | Method and Description |
---|---|
void |
applyLock(Document doc)
Apply a record lock on the specified document, as it
is in the process of referencing this RetentionPolicy.
|
void |
applyLock(DocumentDefinition def)
Apply a record lock on the specified document, as it
is in the process of referencing this RetentionPolicy.
|
void |
applyUnlock(Document doc)
Release the lock held on the specified document, as it
is in the process of not referencing this RetentionPolicy.
|
static RetentionPolicy[] |
findAll(LibrarySession session)
Returns the set of defined RetentionPolicy instances.
|
static RetentionPolicy |
findByName(LibrarySession session,
String name)
Returns a RetentionPolicy matching the specified name.
|
String |
getDescription()
Gets the description of this RetentionPolicy.
|
protected void |
handleUpdate(LibraryObjectDefinition lodef)
Handle the low-level repository update
|
boolean |
hasNameAttribute()
Returns true if this object is an instance of a class
that has a NAME attribute, and false otherwise.
|
boolean |
isRecord()
Gets the indication of whether document instances
that reference this RetentionPolicy are implicitly considered records.
|
boolean |
isReferenced()
Gets the indication of whether any document instances
reference this RetentionPolicy.
|
protected void |
preFree(LibraryObjectDefinition lodef)
Extensibility point to perform actions prior to the
permanent deletion ("free") of a object.
|
void |
setReferenced(boolean active)
Sets the REFERENCED attribute for this object.
|
addCategory, constructSystemObject, constructSystemObjectVector, free, freeCategories, getCategories, getCategories, getCategories, getCategories, getPolicyBundle, getPolicyLists, handleCreate, hasPropertyBundleAttribute, isActive, postCreate, postUpdate, preCreate, preUpdate, putPolicy, removeAllPolicies, removePolicy, removePolicy, setActive, setPolicyBundle, setPolicyLists
added, addSimpleProperty, addSimpleProperty, applyProperties, auditCreated, auditUpdated, canPurge, checkIfPropertyBundleSupported, checkRequiredAttributeSet, clearCopyContext, clearFreeContext, clearUpdateContext, compareTo, constructIdArray, constructIdArray, constructLibraryObject, constructLibraryObjectVector, createDedicatedPropertyBundle, createInstance, deriveDomainUniqueName, dispose, equals, equals, free, freeAll, get, getAttribute, getAttributeByUpperCaseName, getAttributes, getAttributesByUpperCaseNames, getAuditDomainContext, getAuditEventFolderContext, getClassId, getClassname, getClassName, getClassObject, getCommonName, getCommonNameAndClass, getCopyContext, getCreateContext, getData, getDefinition, getDefinitionForSimplePropertyUpdates, getEffectivePolicyListElements, getEventualAttributeByUpperCaseName, getFreeContext, getId, getLabel, getName, getObjectReferenceAttribute, getOperationActionSpecificationContext, getPropertyBundle, getPropertyValue, getPublicObjectAttribute, getResourceString, getResourceString, getSchemaObjectAttribute, getSession, getSessionInterface, getSharedStateFactory, getSimpleObjectAttribute, getSimpleProperties, getSimpleProperty, getSimplePropertyValue, getStringIdentifier, getSystemObjectAttribute, getTraceLogger, getUpdateContext, handleAdminModeChange, handleEvent, handleFree, hashCode, invalidateState, invokeOperation, invokeOperation, invokeServerMethod, isConnected, isCoreEventPostingEnabled, isInstanceOf, isPersistent, isTraced, isValidEventType, lockRows, lookupInstanceLabel, performPostCreateExtensions, performPostFreeExtensions, performPostUpdateExtensions, performPreCreateExtensions, performPreFreeExtensions, performPreUpdateExtensions, postEvent, postEvent, postFree, prePostAuditEvent, putProperty, putProperty, removeAllProperties, removeAllSimpleProperties, removeAllSimpleProperties, removed, removeProperty, removeSimpleProperty, removeSimpleProperty, renderAsRandomAccessContent, renderAsReader, renderAsStream, setAttribute, setAttribute, setAttributes, setAttributes, setCopyContext, setFreeContext, setId, setName, setPropertyBundle, setPropertyValue, setUpdateContext, toString, trace, trustHandleCreate, trustHandleCreateAsAdmin, trustHandleFree, trustHandleFreeAsAdmin, trustHandleUpdate, trustHandleUpdateAsAdmin, update, updateAndExposeDefinition, validatePropertyValues, vectorLibraryObjectElement, vectorToLibraryObjectArray, verifyAdministrationMode, verifyConnected, verifyPersistent, verifySystemUserAccess, verifyTargetObject
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAttributeByUpperCaseName, getClassId, getId, getSessionInterface
getTraceLogger, isTraced, trace
public static final String CLASS_NAME
public static final String NAME_ATTRIBUTE
public static final String DESCRIPTION_ATTRIBUTE
public static final String RECORD_ATTRIBUTE
public static final String REFERENCED_ATTRIBUTE
protected RetentionPolicy(LibrarySession session, Long id, Long classId, S_LibraryObjectData data) throws IfsException
session
- current LibrarySessionid
- object idclassId
- class iddata
- data componentIfsException
- if the operation failspublic boolean hasNameAttribute() throws IfsException
LibraryObject
hasNameAttribute
in class LibraryObject
IfsException
- if operation fails.public String getDescription() throws IfsException
IfsException
- if operation failspublic boolean isRecord() throws IfsException
IfsException
- if operation failspublic boolean isReferenced() throws IfsException
IfsException
- if operation failspublic void setReferenced(boolean active) throws IfsException
This is set to true the first time a document references this policy. It is eventually set to false once it is determined that no documents still reference the policy.
active
- the new REFERENCED status valueIfsException
- if operation fails.public void applyLock(DocumentDefinition def) throws IfsException
Called from within the create operation on Document, when this RetentionPolicy is being referenced by the Document.
def
- the DocumentDefinition that is now referencing this policyIfsException
- if operation fails.public void applyLock(Document doc) throws IfsException
Called from within the update operation on Document, when this RetentionPolicy is being referenced by the Document.
doc
- the Document that is now referencing this policyIfsException
- if operation fails.public void applyUnlock(Document doc) throws IfsException
Called from within the update operation on Document, when a previously referenced record RetentionPolicy was being referenced. This instance is the previously referenced RetentionPolicy.
doc
- the Document that was referencing this policyIfsException
- if operation fails.protected void handleUpdate(LibraryObjectDefinition lodef) throws IfsException
LibraryObject
handleUpdate
in class LibraryObject
lodef
- the LibraryObjectDefinition describing the desired updates.IfsException
- if operation fails.protected void preFree(LibraryObjectDefinition lodef) throws IfsException
LibraryObject
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
.
preFree
in class LibraryObject
lodef
- object definition used to hold options related to the free
operationIfsException
- if operation fails.public static RetentionPolicy[] findAll(LibrarySession session) throws IfsException
The instances will be sorted by name.
session
- the session contextIfsException
- if the operation fails.public static RetentionPolicy findByName(LibrarySession session, String name) throws IfsException
RetentionPolicy names are case sensitive, so this operations requires an exact match with respect to case.
session
- the session contextname
- the RetentionPolicy nameIfsException
- if the operation fails.Copyright © 2023. All rights reserved.