public class ClassObject extends TieSchemaObject
When installed, iFS creates a number of ClassObjects. Some of these are used internally; others are for commonly-encountered data types in content management applications. A content management application can use these provided ClassObjects, or create its own by subclassing them.
Each ClassObject may define one or more Attributes for its data. In addition to these, a ClassObject inherits its superclass's Attributes.
Any time a ClassObject is created, altered, or removed, the in-progress Transaction is implicitly committed.
ClassObjectDefinition
Modifier and Type | Field and Description |
---|---|
static String |
ABSTRACT_ATTRIBUTE
An indicator of whether this ClassObject is abstract.
|
static String |
BEANCLASSPATH_ATTRIBUTE
The fully-qualified classname of the Beans Java class used to represent
instances of this ClassObject in the repository SDK.
|
static String |
CLASS_NAME
The class name for this class.
|
static String |
CLASSACL_ATTRIBUTE
The ClassAccessControlList that determines which users and/or
groups can create instances of this ClassObject.
|
static String |
CLASSPOLICYLIST_ATTRIBUTE
The set of Policies implicitly applied to all instances of a ClassObject.
|
static String |
DATABASEOBJECTNAME_ATTRIBUTE
The base name for database objects used to store data for instances of this ClassObject.
|
static String |
DESCRIPTION_ATTRIBUTE
A textual description of this ClassObject.
|
static String |
FINAL_ATTRIBUTE
An indicator of whether this ClassObject is final.
|
protected ClassObject |
m_Superclass
The Superclass of this CLASSOBJECT.
|
protected boolean |
m_SuperclassResolved
Whether the superclass has been resolved.
|
static String |
PARTITIONED_ATTRIBUTE
An indicator of whether the database table that stores
data for instances of this ClassObject is partitioned.
|
static String |
SELECTORCLASSPATH_ATTRIBUTE
The fully-qualified classname of the Beans Java class used to represent
instances of this ClassObject in the repository SDK.
|
static String |
SERVERCLASSPATH_ATTRIBUTE
The fully-qualified classname of the Server Java class used to
represent instances of this ClassObject in the repository service.
|
static String |
SUPERCLASS_ATTRIBUTE
The ClassObject that is the superclass of this ClassObject.
|
static String |
UNIQUENAME_ATTRIBUTE
A system-set attribute used to ensure each ClassObject has a unique Name.
|
ACTIVE_ATTRIBUTE, NAME_ATTRIBUTE, POLICYBUNDLE_ATTRIBUTE, POLICYLISTS_ATTRIBUTE, PROPERTYBUNDLE_ATTRIBUTE
DOMAIN_UNIQUENAME_DEFAULT_DELIMITER, m_ClassId, m_Id, m_Session
Modifier | Constructor and Description |
---|---|
protected |
ClassObject(LibrarySession session,
Long id,
Long classId,
S_ClassObjectData data)
Internal use only: Constructs a ClassObject.
|
protected |
ClassObject(LibrarySession session,
Long id,
Long classId,
S_LibraryObjectData data)
Constructs a ClassObject.
|
Modifier and Type | Method and Description |
---|---|
Attribute |
addAttribute(AttributeDefinition def)
Adds an Attribute to this ClassObject.
|
protected static ClassObject |
constructClassObject(LibrarySession sess,
S_LibraryObjectData data)
Internal use only: Constructs a ClassObject for the specified data.
|
protected static Vector |
constructClassObjectVector(LibrarySession sess,
Vector vector)
Internal use only: Converts a vector of S_LibraryObjectDatas to a
vector of ClassObjects.
|
static ClassObject[] |
findAll(LibrarySession session)
Returns the set of defined ClassObjects.
|
static ClassObject |
findByName(LibrarySession session,
String name)
Returns the a ClassObject matching the
specified name.
|
Attribute |
getAttributeFromLabel(String label)
returns the Attribute, based on the specified Attribute Label.
|
String |
getBeanClasspath()
Gets the fully-qualified name of the Java class instantiated to
represent instances of this ClassObject within a document management
application.
|
Constructor |
getBeansConstructor()
Internal use only: Gets the four-argument constructor for the Java
class returned by
getBeansClasspath . |
ClassAccessControlList |
getClassAcl()
Gets the ClassAccessControlList of this ClassObject.
|
static ClassObject |
getClassObjectFromLabel(LibrarySession sess,
String label)
returns a ClassObject, based on a specified Label.
|
PolicyList |
getClassPolicyList()
Gets the ClassPolicyList of this object.
|
String |
getCommonName()
Returns the common Name of the ClassObject, preferably in the
original mixed case that was used to create it.
|
String |
getDatabaseObjectName()
Returns the Database Object Name.
|
String |
getDatabaseTableName()
Gets the name of the database table of the class.
|
String |
getDatabaseViewName()
Gets the name of the database view of the class.
|
String |
getDefinitionClasspath()
Gets the fully-qualified name of the Java class to use
as the definition class for this type.
|
String |
getDescription()
Returns the description of a Class Object.
|
ClassObject[] |
getDirectSubclasses()
Gets the direct subclasses of this ClassObject.
|
ClassObject |
getDirectSubclasses(int index)
Gets the specified direct subclass of this ClassObject.
|
int |
getEffectiveClassAttributeIndex(String attributeName)
Gets the index of the specified effective Attribute of this ClassObject.
|
Attribute[] |
getEffectiveClassAttributes()
Gets the effective Attributes of this ClassObject.
|
Attribute |
getEffectiveClassAttributes(int index)
Gets the specified effective Attribute of this ClassObject.
|
Attribute |
getEffectiveClassAttributes(String attributeName)
Gets the specified effective Attribute of this ClassObject.
|
Vector |
getEffectiveClassPolicyListElements(String operation)
Gets the set of policies, as PolicyListElements, implicitly applied
to all instances of this ClassObject for the specified operation.
|
int |
getExtendedClassAttributeIndex(String attributeName)
Gets the index of the specified extended Attribute of this ClassObject.
|
Attribute[] |
getExtendedClassAttributes()
Gets the extended Attributes of this ClassObject.
|
Attribute[] |
getExtendedClassAttributes(ClassObject superclass)
Gets an array of the Attributes that this ClassObject has and that the
specified superclass does not have.
|
Attribute |
getExtendedClassAttributes(int index)
Gets the specified extended Attribute of this ClassObject.
|
Attribute |
getExtendedClassAttributes(String attributeName)
Gets the specified extended Attribute of this ClassObject.
|
AttributeValue |
getInheritedPropertyValue(String name)
Gets named property, if any, by searching in the target
ClassObject's PropertyBundle, or in one of its
superclasses PropertyBundle.
|
AttributeValue |
getInheritedPropertyValue(String name,
boolean bypassNulls)
Gets named property, if any, by searching in the target
ClassObject's PropertyBundle, or in one of its
superclasses PropertyBundle.
|
String |
getLabel()
returns the Label for this Attribute, based on the Attribute's name
and class.
|
static LibraryObjectLookupCache |
getLibraryObjectLookupCache(LibrarySessionInterface session)
Returns the LibraryObjectLookupCache used by find
ClassObject instances by name.
|
String |
getSelectorClasspath()
Returns the SelectorClassPath Attribute of the Library Object.
|
String |
getServerClasspath()
Returns the ServerClassPath Attribute of the Library Object.
|
ClassObject[] |
getSubclasses()
Gets the subclasses of this ClassObject.
|
ClassObject |
getSubclasses(int index)
Gets the specified subclass of this ClassObject.
|
ClassObject |
getSuperclass()
Gets the superclass of this ClassObject.
|
boolean |
isAbstract()
Determines if this is an abstract object.
|
boolean |
isAttribute(String attrName)
Gets whether this ClassObject has an Attribute with the specified name.
|
boolean |
isDirectSubclassOf(ClassObject classObject)
Gets whether this ClassObject is a direct subclass of the specified
ClassObject.
|
boolean |
isFinal()
Determines if this is object cannot be sub-classed.
|
boolean |
isInstalledClass()
Gets whether this class was created as part of the base installation.
|
boolean |
isPartitioned()
Determines if this is a partitioned object.
|
boolean |
isSubclassOf(ClassObject classObject)
Gets whether this ClassObject is a subclass of the specified
ClassObject.
|
boolean |
isVersionable()
Gets whether instances of this ClassObject are versionable.
|
void |
putPolicy(Policy policy)
Deprecated.
CM SDK 10gR2: see release notes for changes to Policy framework
|
void |
refreshDependentViews()
Refresh any views that are dependent upon this ClassObject or any of its subs.
|
void |
removeAllPolicies()
Deprecated.
CM SDK 10gR2: see release notes for changes to Policy framework
|
void |
removeAttribute(Attribute attribute)
Removes an Attribute from this ClassObject.
|
void |
removeAttribute(Attribute attribute,
AttributeDefinition def)
Removes an attribute from this ClassObject.
|
void |
removePolicy(Policy policy)
Deprecated.
CM SDK 10gR2: see release notes for changes to Policy framework
|
void |
removePolicy(String opname)
Deprecated.
CM SDK 10gR2: see release notes for changes to Policy framework
|
void |
setBeanClasspath(String javaClassName)
Sets the fully-qualified name of the Java class instantiated to
represent instances of this ClassObject within a document management
application.
|
void |
setClassAcl(ClassAccessControlList acl)
Sets the ClassAccessControlList of this ClassObject.
|
void |
setClassPolicyList(PolicyList policyList)
Sets the ClassPolicyList of this object.
|
void |
setDescription(String description)
Sets the description of this ClassObject.
|
void |
setPolicyBundle(PolicyPropertyBundle bundle)
Deprecated.
CM SDK 10gR2: see release notes for changes to Policy framework
|
void |
setSelectorClasspath(String path)
Sets the Selector Class Path attribute.
|
void |
setServerClasspath(String path)
Sets the Server Class Path attribute.
|
protected static ClassObject |
vectorClassObjectElement(Vector vector,
int index)
Internal use only: Gets the specified element of a vector of
ClassObjects.
|
static ClassObject[] |
vectorToClassObjectArray(Vector vector)
Internal use only: Converts a vector of ClassObjects to an a ClassObject
array.
|
addCategory, constructSchemaObject, constructSchemaObjectVector, free, getCategories, getCategories, getCategories, getCategories, getPolicyBundle, getPolicyLists, handleCreate, hasNameAttribute, hasPropertyBundleAttribute, isActive, postCreate, postUpdate, setActive, 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, getCommonNameAndClass, getCopyContext, getCreateContext, getData, getDefinition, getDefinitionForSimplePropertyUpdates, getEffectivePolicyListElements, getEventualAttributeByUpperCaseName, getFreeContext, getId, getName, getObjectReferenceAttribute, getOperationActionSpecificationContext, getPropertyBundle, getPropertyValue, getPublicObjectAttribute, getResourceString, getResourceString, getSchemaObjectAttribute, getSession, getSessionInterface, getSharedStateFactory, getSimpleObjectAttribute, getSimpleProperties, getSimpleProperty, getSimplePropertyValue, getStringIdentifier, getSystemObjectAttribute, getTraceLogger, getUpdateContext, handleAdminModeChange, handleEvent, handleFree, handleUpdate, hashCode, invalidateState, invokeOperation, invokeOperation, invokeServerMethod, isConnected, isCoreEventPostingEnabled, isInstanceOf, isPersistent, isTraced, isValidEventType, lockRows, lookupInstanceLabel, performPostCreateExtensions, performPostFreeExtensions, performPostUpdateExtensions, performPreCreateExtensions, performPreFreeExtensions, performPreUpdateExtensions, postEvent, postEvent, postFree, preCreate, preFree, prePostAuditEvent, preUpdate, 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 SUPERCLASS_ATTRIBUTE
public static final String DESCRIPTION_ATTRIBUTE
public static final String SERVERCLASSPATH_ATTRIBUTE
public static final String BEANCLASSPATH_ATTRIBUTE
public static final String SELECTORCLASSPATH_ATTRIBUTE
public static final String DATABASEOBJECTNAME_ATTRIBUTE
public static final String CLASSACL_ATTRIBUTE
public static final String CLASSPOLICYLIST_ATTRIBUTE
public static final String ABSTRACT_ATTRIBUTE
public static final String FINAL_ATTRIBUTE
public static final String PARTITIONED_ATTRIBUTE
public static final String UNIQUENAME_ATTRIBUTE
protected ClassObject m_Superclass
protected boolean m_SuperclassResolved
protected ClassObject(LibrarySession session, Long id, Long classId, S_LibraryObjectData data) throws IfsException
session
- the sessionid
- the idclassId
- the class iddata
- the dataIfsException
- if the operation failsprotected ClassObject(LibrarySession session, Long id, Long classId, S_ClassObjectData data) throws IfsException
For internal use only. Do not use this method. To create a new
ClassObject, use LibrarySession.createSchemaObject
.
session
- the sessionid
- the idclassId
- the class iddata
- the dataIfsException
- if the operation failspublic String getCommonName() throws IfsException
Override the default implementation in LibraryObject.
getCommonName
in class LibraryObject
IfsException
- if operation fails.public String getDefinitionClasspath() throws IfsException
IfsException
- if the operation failspublic boolean isInstalledClass() throws IfsException
IfsException
- if the operation failspublic String getLabel() throws IfsException
getLabel
in class LibraryObject
IfsException
- if operation fails.public static ClassObject getClassObjectFromLabel(LibrarySession sess, String label) throws IfsException
sess
- The LibrarySessionlabel
- The LabelIfsException
- if operation fails.public Attribute getAttributeFromLabel(String label) throws IfsException
label
- the Attribute labelIfsException
- if operation fails.public String getBeanClasspath() throws IfsException
IfsException
- if the operation failspublic void setDescription(String description) throws IfsException
description
- the descriptionIfsException
- if the operation failspublic void setBeanClasspath(String javaClassName) throws IfsException
javaClassName
- the classnameIfsException
- if the operation failspublic void setClassPolicyList(PolicyList policyList) throws IfsException
policyList
- the ClassPolicyListIfsException
- if the operation failspublic PolicyList getClassPolicyList() throws IfsException
IfsException
- if the operation failspublic ClassAccessControlList getClassAcl() throws IfsException
IfsException
- if the operation failspublic void setClassAcl(ClassAccessControlList acl) throws IfsException
acl
- the ClassAccessControlListIfsException
- if the operation failspublic Vector getEffectiveClassPolicyListElements(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 a classobject precedes the PolicyListElements introduced by the superclasses of that classobject.
operation
- the operation of interest, or null for
all operationsIfsException
- if the operation failspublic void setPolicyBundle(PolicyPropertyBundle bundle) throws IfsException
setPolicyBundle
in class SchemaObject
bundle
- the policy bundleIfsException
- if the operation failspublic void putPolicy(Policy policy) throws IfsException
If this ClassObject doesn't have a policy bundle, this method will create one with a Published ACL and default name and description.
putPolicy
in class SchemaObject
policy
- the Policy to addIfsException
- if the operation failspublic void removePolicy(String opname) throws IfsException
removePolicy
in class SchemaObject
opname
- the operation name of the Policy to removeIfsException
- if the operation failspublic void removePolicy(Policy policy) throws IfsException
This method does not cause a "dedicated" PropertyBundle to be created.
removePolicy
in class SchemaObject
policy
- the Policy to removeIfsException
- if the operation failspublic void removeAllPolicies() throws IfsException
removeAllPolicies
in class SchemaObject
IfsException
- if the operation failspublic Attribute addAttribute(AttributeDefinition def) throws IfsException
def
- the AttributeDefinition of the new AttributeIfsException
- (IFS-30820) if the operation failspublic void removeAttribute(Attribute attribute) throws IfsException
attribute
- the Attribute to removeIfsException
- (IFS-30821) if the operation failspublic void removeAttribute(Attribute attribute, AttributeDefinition def) throws IfsException
attribute
- the attribute to removedef
- a definition that influences how the attribute is
removed, or null for default behaviorIfsException
- (IFS-30821) if the operation failspublic void refreshDependentViews() throws IfsException
IfsException
- if the operation failspublic Attribute[] getEffectiveClassAttributes() throws IfsException
The effective Attributes of a ClassObject are both the Attributes introduced by the ClassObject itself as well as the Attributes the ClassObject inherits from its superclasses.
IfsException
- if the operation failspublic Attribute getEffectiveClassAttributes(int index) throws IfsException
The effective Attributes of a ClassObject are both the Attributes introduced by the ClassObject itself as well as the Attributes the ClassObject inherits from its superclasses.
index
- the zero-based indexIfsException
- if the operation failspublic Attribute getEffectiveClassAttributes(String attributeName) throws IfsException
The effective Attributes of a ClassObject are both the Attributes introduced by the ClassObject itself as well as the Attributes the ClassObject inherits from its superclasses.
attributeName
- the Attribute nameIfsException
- if the operation failspublic int getEffectiveClassAttributeIndex(String attributeName) throws IfsException
The effective Attributes of a ClassObject are both the Attributes introduced by the ClassObject itself as well as the Attributes the ClassObject inherits from its superclasses.
attributeName
- the Attribute nameIfsException
- (IFS-10407) if the Attribute name is
not the name of an effective Attribute of this ClassObjectIfsException
- if the operation otherwise failspublic Attribute[] getExtendedClassAttributes() throws IfsException
The extended Attributes of a ClassObject are only the Attributes introduced by the ClassObject itself, and do not include any Attributes the ClassObject inherits from its superclasses.
IfsException
- if the operation failspublic Attribute[] getExtendedClassAttributes(ClassObject superclass) throws IfsException
superclass
- a superclass of this ClassObjectIfsException
- (IFS-19001) if superclass
is
nullIfsException
- (IFS-19005) if superclass
is
not a superclass of this ClassObjectIfsException
- if the operation otherwise failspublic Attribute getExtendedClassAttributes(int index) throws IfsException
The extended Attributes of a ClassObject are only the Attributes introduced by the ClassObject itself, and do not include any Attributes the ClassObject inherits from its superclasses.
index
- the zero-based indexIfsException
- if the operation failspublic Attribute getExtendedClassAttributes(String attributeName) throws IfsException
The extended Attributes of a ClassObject are only the Attributes introduced by the ClassObject itself, and do not include any Attributes the ClassObject inherits from its superclasses.
attributeName
- the Attribute nameIfsException
- if the operation failspublic int getExtendedClassAttributeIndex(String attributeName) throws IfsException
The extended Attributes of a ClassObject are only the Attributes introduced by the ClassObject itself, and do not include any Attributes the ClassObject inherits from its superclasses.
attributeName
- the Attribute nameIfsException
- (IFS-10407) if the Attribute name is
not the name of an extended Attribute of this ClassObjectIfsException
- if the operation otherwise failspublic boolean isAttribute(String attrName) throws IfsException
attrName
- the Attribute nameIfsException
- if the operation failspublic ClassObject getSuperclass() throws IfsException
IfsException
- if the operation failspublic ClassObject[] getDirectSubclasses() throws IfsException
The direct subclasses are the ClassObjects that directly extend this ClassObject.
IfsException
- if the operation failspublic ClassObject getDirectSubclasses(int index) throws IfsException
The direct subclasses are the ClassObjects that directly extend this ClassObject.
index
- the zero-based indexIfsException
- if the operation failspublic ClassObject[] getSubclasses() throws IfsException
The subclasses are the ClassObjects that directly extend this ClassObject and their subclasses, sub-subclasses, etc.
IfsException
- if the operation failspublic ClassObject getSubclasses(int index) throws IfsException
The subclasses are the ClassObjects that directly extend this ClassObject and their subclasses, sub-subclasses, etc.
index
- the zero-based indexIfsException
- if the operation failspublic boolean isDirectSubclassOf(ClassObject classObject) throws IfsException
classObject
- the ClassObject to testclassObject
IfsException
- (IFS-19001) if classObject
is nullpublic boolean isSubclassOf(ClassObject classObject) throws IfsException
classObject
- the ClassObject to testclassObject
IfsException
- (IFS-19001) if classObject
is nullpublic boolean isVersionable() throws IfsException
IfsException
- if the operation failspublic AttributeValue getInheritedPropertyValue(String name) throws IfsException
Return null if no property exists for this name.
name
- the Property nameIfsException
- if the operation failspublic AttributeValue getInheritedPropertyValue(String name, boolean bypassNulls) throws IfsException
If bypassNulls is true, null valued properties are ignored, and treated the same as if the property was not defined. Return null if no property exists for this name.
name
- the Property namebypassNulls
- indication as to whether null valued properties
should be treated the same as if the property
is not definedIfsException
- if the operation failspublic static LibraryObjectLookupCache getLibraryObjectLookupCache(LibrarySessionInterface session) throws IfsException
session
- the session contextIfsException
- if the operation fails.public static ClassObject[] findAll(LibrarySession session) throws IfsException
The instances will be sorted by name.
session
- the session contextIfsException
- if the operation fails.public static ClassObject findByName(LibrarySession session, String name) throws IfsException
ClassObject name lookups are case insensitive, so this operation ignores case.
session
- the session contextname
- the ClassObject nameIfsException
- if the operation fails.protected static Vector constructClassObjectVector(LibrarySession sess, Vector vector) throws IfsException
For internal use only. Do not use this method.
sess
- the sessionvector
- the S_LibraryObjectData vectorIfsException
- if the operation failsprotected static ClassObject constructClassObject(LibrarySession sess, S_LibraryObjectData data) throws IfsException
For internal use only. Do not use this method.
sess
- the sessiondata
- the dataIfsException
- if the operation failspublic static ClassObject[] vectorToClassObjectArray(Vector vector)
For internal use only. Do not use this method.
vector
- the vectorprotected static ClassObject vectorClassObjectElement(Vector vector, int index)
For internal use only. Do not use this method.
vector
- the vectorindex
- the zero-based indexpublic Constructor getBeansConstructor() throws IfsException
getBeansClasspath
.
For internal use only. Do not use this method.
IfsException
- if the operation failspublic String getDescription() throws IfsException
IfsException
- if the operation failspublic String getServerClasspath() throws IfsException
IfsException
- if the operation failspublic void setServerClasspath(String path) throws IfsException
path
- The server class pathIfsException
- if the operation fails.public String getSelectorClasspath() throws IfsException
IfsException
- if the operation failspublic void setSelectorClasspath(String path) throws IfsException
path
- The selector class pathIfsException
- if the operation fails.public String getDatabaseObjectName() throws IfsException
IfsException
- if the operation fails.public String getDatabaseTableName() throws IfsException
IfsException
- if the operation failspublic String getDatabaseViewName() throws IfsException
IfsException
- if the operation failspublic boolean isAbstract() throws IfsException
IfsException
- if the operation fails.public boolean isFinal() throws IfsException
IfsException
- if the operation fails.public boolean isPartitioned() throws IfsException
IfsException
- if the operation fails.Copyright © 2023. All rights reserved.