public class DirectoryUser extends TieDirectoryObject
This class is referenced by several other classes by attributes that hold information as to "who" has performed some action. For example, the Owner attribute on PublicObject references the DirectoryUser who owns that particular PublicObject.
Modifier and Type | Field and Description |
---|---|
static String |
ADMINENABLED_ATTRIBUTE
An indicator of whether this DirectoryUser has administrative privileges and can enter administration mode.
|
static String |
CLASS_NAME
Name of this class.
|
static String |
SYSTEMADMINENABLED_ATTRIBUTE
An indicator of whether this DirectoryUser has system administrative privileges.
|
static String |
UNIQUENAME_ATTRIBUTE
A system-set attribute used to ensure each DirectoryUser has a unique Name.
|
static String |
USER_CLASS_DOMAIN_NAME
name of class domain used for this class
|
CREDENTIALMANAGER_ATTRIBUTE, DISTINGUISHEDNAME_ATTRIBUTE
ACL_ATTRIBUTE, CREATEDATE_ATTRIBUTE, CREATOR_ATTRIBUTE, DELETOR_ATTRIBUTE, DESCRIPTION_ATTRIBUTE, EXPIRATIONDATE_ATTRIBUTE, FAMILY_ATTRIBUTE, FLAG_CATEGORY_EXISTS, FLAG_CONFIGURATIONCATEGORY_EXISTS, FLAG_MARKED, FLAG_NOINFERIOR, FLAG_NOSELECT, FLAG_NTFS_ARCHIVE, FLAG_NTFS_HIDDEN, FLAG_NTFS_READONLY, FLAG_NTFS_SYSTEM, FLAG_UNMARKED, FLAGS_ATTRIBUTE, LASTMODIFIER_ATTRIBUTE, LASTMODIFYDATE_ATTRIBUTE, LOCKENTRIES_ATTRIBUTE, LOCKOBJECT_ATTRIBUTE, NAME_ATTRIBUTE, OWNER_ATTRIBUTE, POLICYBUNDLE_ATTRIBUTE, POLICYLISTS_ATTRIBUTE, PRIMARYPARENTFOLDER_ATTRIBUTE, PROPERTYBUNDLE_ATTRIBUTE, RESOLVEDPUBLICOBJECT_ATTRIBUTE, SECURINGPUBLICOBJECT_ATTRIBUTE
DOMAIN_UNIQUENAME_DEFAULT_DELIMITER, m_ClassId, m_Id, m_Session
Modifier | Constructor and Description |
---|---|
protected |
DirectoryUser(LibrarySession session,
Long id,
Long classId,
S_LibraryObjectData data)
Construct a DirectoryUser object.
|
Modifier and Type | Method and Description |
---|---|
void |
applicationConnected(Long appSessionId)
Reacts to notification of an Application connection.
|
void |
applicationDisconnected(Long appSessionId)
Reacts to notification of an Application disconnect.
|
void |
auditEmailSent(String mailType,
int mode)
Audits an event indicating that an email was sent as a side-effect
of some other operation.
|
protected void |
auditSessionConnected()
Audits a LibrarySession connect.
|
protected void |
auditSessionDisconnected()
Audits a LibrarySession disconnect.
|
protected void |
auditUpdated(LibraryObjectDefinition lodef)
Creates audit events for the update operation.
|
void |
auditUserPreferenceUpdated(String key)
Audits the update of a user preference.
|
protected static DirectoryUser |
constructDirectoryUser(LibrarySession sess,
S_LibraryObjectData data)
Constructs a DirectoryUser from a S_LibraryObjectData.
|
protected static Vector |
constructDirectoryUserVector(LibrarySession sess,
Vector vector)
Constructs a DirectoryUser Vector from a Vector of S_DirectoryObjectData.
|
Actor |
createDefaultActor()
Creates a default Actor designation for this user.
|
protected PrimaryUserProfile |
fetchPrimaryUserProfile()
Selects the user's PrimaryUserProfile from the database.
|
static DirectoryUser[] |
findAll(LibrarySession session)
Returns the set of defined DirectoryUsers.
|
static DirectoryUser |
findByDistinguishedName(LibrarySession session,
String dn)
Gets the DirectoryUser with the specified distinguished name.
|
static DirectoryUser |
findByName(LibrarySession session,
String name)
Returns the a DirectoryUser matching the
specified name.
|
DirectoryUser[] |
getAllUserMembers()
Gets this DirectoryUser.
|
DirectoryUser |
getAllUserMembers(int index)
Gets this DirectoryUser at specified index.
|
String |
getCharacterSet()
Gets the CharacterSet preference for this DirectoryUser.
|
Folder |
getCurrentAuditDomainContext()
Gets the current "Audit Domain" context for the session's user.
|
Folder |
getCurrentOrDefaultAuditDomainContext()
Gets the current or default "Audit Domain" context for the session's user.
|
String |
getEmailAddress()
Gets the email address for this DirectoryUser.
|
Folder |
getHomeFolder()
Gets the Home folder for this DirectoryUser.
|
String |
getLanguage()
Gets the Language preference for this DirectoryUser.
|
static LibraryObjectLookupCache |
getLibraryObjectLookupCache(LibrarySessionInterface session)
Returns the LibraryObjectLookupCache used by find
DirectoryUser instances by name.
|
Locale |
getLocale()
Gets the Locale preference for this DirectoryUser.
|
PrimaryUserProfile |
getPrimaryUserProfile()
Gets the PrimaryUserProfile of this DirectoryUser.
|
TimeZone |
getTimeZone()
Gets the TimeZone preference for this DirectoryUser.
|
String |
getUniqueName()
Gets the unique name for the user.
|
boolean |
isAdminEnabled()
Checks if this DirectoryUser has admin privileges.
|
boolean |
isCurrentUser()
Checks if this DirectoryUser is the current user of the session.
|
boolean |
isEquivalentTo(DirectoryUser other)
Returns true if this DirectoryUser is equivalent to
other . |
boolean |
isSystemAdminEnabled()
Checks if this DirectoryUser has system admin privileges.
|
boolean |
isSystemOrGuest()
Returns true if the target user is "SYSTEM" or "GUEST".
|
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.
|
protected void |
postConnect()
Perform operations as part of establishing a new LibrarySession.
|
protected void |
postCreate(LibraryObjectDefinition lodef)
Extensibility point to perform actions after the
creation of a PublicObject.
|
void |
postSystemAuditEvent(AuditEvent event)
Posts a System event.
|
protected void |
preDisconnect()
Perform operations as part of disconnecting a LibrarySession.
|
protected void |
preFree(LibraryObjectDefinition lodef)
Extensibility point to perform actions prior to the
permanent deletion ("free") of a object.
|
protected void |
reportUserCreated()
Audits a User create operation.
|
protected void |
reportUserFreed()
Audits a User free operation.
|
void |
setAdminEnabled(boolean value)
Sets admin privileges of this DirectoryUser.
|
void |
setSystemAdminEnabled(boolean value)
Sets system admin privileges of this DirectoryUser.
|
LibrarySession |
switchSessionMode(int mode)
Switches the current session into the specified mode.
|
static DirectoryUser[] |
toDirectoryUserArray(DirectoryObject[] dos)
Convert an array of DirectoryObject to an array of DirectoryUser.
|
void |
validateSessionMode(int mode)
Checks if the specified "session mode" is valid for the target user.
|
protected static DirectoryUser |
vectorDirectoryUserElement(Vector vector,
int index)
Returns a specific DirectoryUser element from the Vector of DirectoryUser
at the specified index.
|
protected static DirectoryUser[] |
vectorToDirectoryUserArray(Vector vector)
Converts a Vector of DirectoryUser to an array of DirectoryUser.
|
constructDirectoryObject, constructDirectoryObjectArray, constructDirectoryObjectVector, getAllAncestorIds, getAllAncestors, getAllAncestors, getAllMembers, getAllMembers, getCredentialManager, getDirectAncestors, getDirectAncestors, getDirectMembers, getDirectMembers, getDistinguishedName, isMemberOf, resetAllAncestors, resetDirectAncestors, setCredentialManager, setDistinguishedName, vectorDirectoryObjectElement, vectorToDirectoryObjectArray
addAccess, addAttachment, addCategory, addFlags, addMessageList, addRelationship, auditPublicObjectLocked, auditPublicObjectUnlocked, canAcquireManualLock, canReleaseDavLock, canReleaseLock, canReleaseManualLock, capabilities, checkAuditViewCapability, checkCapabilities, checkCapability, checkEffectiveAccess, checkEffectiveAccess, checkLockAccess, checkParentFolderCapability, checkVersioned, clearFlags, constructPublicObject, constructPublicObjectArray, constructPublicObjectVector, containsLockEntry, copy, coreAutoFolderingEnabled, createCategories, createDedicatedPolicyPropertyBundle, delete, deriveEffectiveAccessLevel, findAttachmentRelation, findOrAddActivityRecord, findOrAddActivityRecord, findOrAddActor, findOrAddActor, findOrAddMessageList, findOrAddMessageList, free, getAcl, getActivityRecord, getActor, getAllFolderPaths, getAllFolderPaths, getAllFolderPaths, getAnyFolderPath, getAnyFolderPath, getAnyFolderPath, getAttachmentRelation, getAttachmentRelations, getAttachments, getCapabilities, getCategories, getCategories, getCategories, getCategories, getCategories, getCategory, getConsumedStorage, getCreateDate, getCreator, getDefaultAccessLevel, getDefinitionForSimplePropertyUpdates, getDeletor, getDescription, getEffectiveAccessLevel, getEffectiveAccessLevel, getExpirationDate, getFamily, getFirstCategory, getFirstVersion, getFlags, getFolderReferences, getFolderReferences, getFolderReferencesSortSpecification, getLastModifier, getLastModifyDate, getLastVersion, getLeftwardRelationshipObjects, getLeftwardRelationshipObjects, getLeftwardRelationships, getLeftwardRelationships, getLeftwardRelationshipsCount, getLeftwardRelationshipsCount, getLinks, getLockEntries, getLockEntries, getLockObject, getLockRestrictions, getLockTypeAuditProperties, getMessageList, getNextVersion, getOwner, getPolicyBundle, getPolicyLists, getPreviousVersion, getPrimaryFolderPath, getPrimaryParentFolder, getPrimaryParentFolder, getRelations, getReservationComment, getReservationDate, getReservor, getResolvedPublicObject, getRestrictingLockEntries, getRightwardRelationshipObjects, getRightwardRelationshipObjects, getRightwardRelationships, getRightwardRelationships, getSecuringPublicObject, getSingletonVersionDescription, getVersionNumber, getVersions, getVersionSeries, getWorkingCopy, grantAccess, handleCopy, handleCreate, handleUnlockAll, hasActivityRecord, hasActor, hasAttachmentRelation, hasCategories, hasCategory, hasConfigurationCategories, hasMessageList, hasNameAttribute, hasPropertyBundleAttribute, isAttachment, isDeleted, isLatestVersion, isLocked, isLockingSupported, isOwner, isReserved, isReservedByCurrentUser, isVersionable, isVersioned, isWorkingCopy, listLeftwardRelationships, listRightwardRelationships, lock, lock, lock, lock, newVersion, postCopy, postSecurityChangedEvent, postUpdate, preCopy, preCreate, preUpdate, putPolicy, reassociateLinks, removeAllPolicies, removeAttachment, removePolicy, removePolicy, removeRelationship, reserveNext, resetFolderReferences, resolveFolderReferenceSortSpecification, revokeAccess, revokeAllAccess, setAcl, setDescription, setExpirationDate, setFlags, setFolderReferencesSortSpecification, setLockEntries, setLockEntrySecurity, setOwner, setOwnerByName, setPolicyBundle, setPolicyLists, setSecuringPublicObject, toPublicObjectArray, undelete, unlock, unlock, unlockAll, unReserve, updateFlags, updateLock, vectorPublicObjectElement, vectorToPublicObjectArray, verifyAddRelationshipCapability, verifyCapabilities, verifyCapability, verifyDeleteCapability, verifyLockCapability, verifyRemoveRelationshipCapability, verifyUnlockCapability, verifyVersionSeries
added, addSimpleProperty, addSimpleProperty, applyProperties, auditCreated, 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, 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, handleUpdate, hashCode, invalidateState, invokeOperation, invokeOperation, invokeServerMethod, isConnected, isCoreEventPostingEnabled, isInstanceOf, isPersistent, isTraced, 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
Useful for methods that take a class name argument.
public static final String ADMINENABLED_ATTRIBUTE
public static final String SYSTEMADMINENABLED_ATTRIBUTE
public static final String UNIQUENAME_ATTRIBUTE
public static final String USER_CLASS_DOMAIN_NAME
protected DirectoryUser(LibrarySession session, Long id, Long classId, S_LibraryObjectData data) throws IfsException
session
- the sessionid
- the idclassId
- the class iddata
- the DirectoryUser dataIfsException
- if the operation failspublic DirectoryUser[] getAllUserMembers() throws IfsException
getAllUserMembers
in class DirectoryObject
IfsException
- if operation fails.public DirectoryUser getAllUserMembers(int index) throws IfsException
This is an override of the method in DirectoryObject. Since a DirectoryUser does not have any other members, the index must be 0.
getAllUserMembers
in class DirectoryObject
index
- must be zero to get this DirectoryUserIfsException
- if operation fails.public PrimaryUserProfile getPrimaryUserProfile() throws IfsException
IfsException
- if operation fails.protected PrimaryUserProfile fetchPrimaryUserProfile() throws IfsException
IfsException
- if operation fails.public Actor createDefaultActor() throws IfsException
If this instance already has an Actor designation, the existing Actor designation will be returned.
IfsException
- if operation fails.public String getLanguage() throws IfsException
IfsException
- if operation fails.public String getCharacterSet() throws IfsException
IfsException
- if operation fails.public TimeZone getTimeZone() throws IfsException
IfsException
- if operation fails.public Folder getHomeFolder() throws IfsException
IfsException
- if operation fails.public Locale getLocale() throws IfsException
IfsException
- if operation fails.public String getEmailAddress() throws IfsException
IfsException
- if operation fails.public Folder getCurrentAuditDomainContext() throws IfsException
The impl here in the base class simply returns the root folder. Application can override (e.g. in the Tie Class).
IfsException
- if the operation failspublic Folder getCurrentOrDefaultAuditDomainContext() throws IfsException
The impl here in the base class simply returns the root folder. Application can override (e.g. in the Tie Class).
IfsException
- if the operation failspublic boolean isAdminEnabled() throws IfsException
IfsException
- if the operation fails.public boolean isSystemAdminEnabled() throws IfsException
IfsException
- if the operation fails.public void validateSessionMode(int mode) throws IfsException
Has no effect in CORE, but subclasses may override.
mode
- a proposed session modeIfsException
- if the operation failspublic LibrarySession switchSessionMode(int mode) throws IfsException
Has no effect in CORE, but subclasses may override.
mode
- the desired mode for the sessionIfsException
- if the operation failspublic String getUniqueName() throws IfsException
IfsException
- if the operation fails.public boolean isCurrentUser() throws IfsException
IfsException
- if the operation fails.public boolean isEquivalentTo(DirectoryUser other) throws IfsException
other
.
Always returns false if the specified user is null. Returns true if the target and specified user are the same user.
This is overridden in ECM mode, to check for admin-users.
other
- the other DirectoryUser to test equivalence to
this DirectoryUserother
IfsException
- if the operation failspublic void setAdminEnabled(boolean value) throws IfsException
value
- true if enabling admin modeIfsException
- if the operation fails.public void setSystemAdminEnabled(boolean value) throws IfsException
value
- true if enabling system admin modeIfsException
- if the operation fails.protected void postCreate(LibraryObjectDefinition lodef) throws IfsException
PublicObject
This assumes that a transaction context has already been established.
postCreate
in class PublicObject
lodef
- object definition that was used to create the objectIfsException
- if the operation failsprotected void preFree(LibraryObjectDefinition lodef) throws IfsException
PublicObject
Override to free all existing categories, in such a way that the PO doesn't get updated for each category free.
preFree
in class PublicObject
lodef
- object definition used to hold
options related to the free operationIfsException
- if operation fails.protected void postConnect() throws IfsException
Called late in the construction and initialization of a LibrarySession, given subclasses the ability to override and throw an exception preventing the establishment of a LibrarySession for the target user, or provide other extensions such as setting up session state.
IfsException
- if the operation failsprotected void preDisconnect() throws IfsException
Called early in the disconnect process, given subclasses the ability to override to provide extensions such as tearing down session state.
IfsException
- if the operation failspublic void applicationConnected(Long appSessionId) throws IfsException
appSessionId
- the Application session IDIfsException
- if the operation failspublic void applicationDisconnected(Long appSessionId) throws IfsException
appSessionId
- the Application session IDIfsException
- if the operation failsprotected void auditSessionConnected() throws IfsException
IfsException
- if the operation failsprotected void auditSessionDisconnected() throws IfsException
IfsException
- if the operation failspublic void auditUserPreferenceUpdated(String key) throws IfsException
key
- the preference keyIfsException
- if the operation failspublic void auditEmailSent(String mailType, int mode) throws IfsException
mailType
- the type of mail sentmode
- the post modeIfsException
- if the operation failsprotected void auditUpdated(LibraryObjectDefinition lodef) throws IfsException
LibraryObject
auditUpdated
in class LibraryObject
lodef
- The update definitionIfsException
- if the operation fails.protected void reportUserCreated() throws IfsException
IfsException
- if the operation failsprotected void reportUserFreed() throws IfsException
IfsException
- if the operation failspublic boolean isSystemOrGuest() throws IfsException
IfsException
- if the operation failspublic void postSystemAuditEvent(AuditEvent event) throws IfsException
The target must be the system user.
event
- the event to postIfsException
- if the operation failsprotected boolean isValidEventType(AuditEvent event) throws IfsException
isValidEventType
in class LibraryObject
event
- the event being posted on this objectIfsException
- if the operation failspublic static LibraryObjectLookupCache getLibraryObjectLookupCache(LibrarySessionInterface session) throws IfsException
session
- the session contextIfsException
- if the operation fails.public static DirectoryUser[] findAll(LibrarySession session) throws IfsException
The instances will be sorted by name.
session
- the session contextIfsException
- if the operation fails.public static DirectoryUser findByName(LibrarySession session, String name) throws IfsException
session
- the session contextname
- the DirectoryUser nameIfsException
- if the operation fails.public static DirectoryUser findByDistinguishedName(LibrarySession session, String dn) throws IfsException
session
- the session; requireddn
- the distinguished nameIfsException
- if the operation failsprotected static DirectoryUser[] vectorToDirectoryUserArray(Vector vector) throws IfsException
vector
- Vector of DirectoryObjectIfsException
- if the operation failsprotected static DirectoryUser vectorDirectoryUserElement(Vector vector, int index) throws IndexOutOfBoundsException
vector
- Vector of DirectoryUserindex
- index into DirectoryUser VectorIndexOutOfBoundsException
- if invalid index specified.protected static DirectoryUser constructDirectoryUser(LibrarySession sess, S_LibraryObjectData data) throws IfsException
sess
- current LibrarySessiondata
- data componentIfsException
- if the operation failsprotected static Vector constructDirectoryUserVector(LibrarySession sess, Vector vector) throws IfsException
sess
- current LibrarySessionvector
- vector of DirectoryUserIfsException
- if the operation failspublic static DirectoryUser[] toDirectoryUserArray(DirectoryObject[] dos) throws IfsException
dos
- set of directory objectsIfsException
- if the operation failsCopyright © 2023. All rights reserved.