arlut.csd.ganymede
Class adminPersonaCustom

java.lang.Object
  |
  +--arlut.csd.ganymede.DBObject
        |
        +--arlut.csd.ganymede.DBEditObject
              |
              +--arlut.csd.ganymede.adminPersonaCustom
All Implemented Interfaces:
db_object, FieldType, ObjectStatus, java.rmi.Remote, SchemaConstants

public class adminPersonaCustom
extends DBEditObject
implements SchemaConstants

This file is a management class for admin personae objects in Ganymede.


Field Summary
(package private) static boolean debug
           
 
Fields inherited from class arlut.csd.ganymede.DBEditObject
ADDELEMENT, ADDELEMENTS, committing, DELELEMENT, DELELEMENTS, deleting, editset, FIRSTOP, LASTOP, maxDate, minDate, original, SETELEMENT, SETPASSCRYPT, SETPASSMD5, SETPASSPLAIN, SETPASSWINHASHES, SETVAL, status, stored
 
Fields inherited from class arlut.csd.ganymede.DBObject
debugEmit, fieldAry, gSession, myInvid, next, objectBase, permCacheAry, shadowObject
 
Fields inherited from interface arlut.csd.ganymede.SchemaConstants
BackLinksField, ContainerField, CreationDateField, CreatorField, EventBase, EventDescription, EventExternalMail, EventMailBoolean, EventMailOwners, EventMailToSelf, EventName, EventToken, ExpirationField, FinalBase, FinalSystemField, ModificationDateField, ModifierField, NotesField, ObjectEventBase, ObjectEventDescription, ObjectEventExternalMail, ObjectEventMailOwners, ObjectEventMailToSelf, ObjectEventName, ObjectEventObjectName, ObjectEventObjectType, ObjectEventToken, OwnerBase, OwnerCcAdmins, OwnerExternalMail, OwnerListField, OwnerMembersField, OwnerNameField, OwnerObjectsOwned, OwnerSupergash, PersonaAdminConsole, PersonaAdminPower, PersonaAssocUser, PersonaBase, PersonaGroupsField, PersonaLabelField, PersonaMailAddr, PersonaMonitorObj, PersonaNameField, PersonaPasswordField, PersonaPrivs, PersonaSupergashObj, RemovalField, RoleBase, RoleDefaultMatrix, RoleDefaultObj, RoleDelegatable, RoleMatrix, RoleName, RolePersonae, TaskBase, TaskClass, TaskName, TaskOptionStrings, TaskPeriodAnchor, TaskPeriodCount, TaskPeriodUnit, TaskRunOnCommit, TaskRunPeriodically, UserAdminPersonae, UserBase, UserPassword, UserUserName
 
Fields inherited from interface arlut.csd.ganymede.ObjectStatus
CREATING, DELETING, DROPPING, EDITING
 
Fields inherited from interface arlut.csd.ganymede.FieldType
BOOLEAN, DATE, FIRSTFIELD, FLOAT, INVID, IP, LASTFIELD, NUMERIC, PASSWORD, PERMISSIONMATRIX, STRING
 
Constructor Summary
adminPersonaCustom(DBObjectBase objectBase)
          Customization Constructor
adminPersonaCustom(DBObjectBase objectBase, Invid invid, DBEditSet editset)
          Create new object constructor
adminPersonaCustom(DBObject original, DBEditSet editset)
          Check-out constructor, used by DBObject.createShadow() to pull out an object for editing.
 
Method Summary
 boolean anonymousLinkOK(DBObject object, short fieldID)
          This method is used to control whether or not it is acceptable to make a link to the given field in this DBObject type when the user only has editing access for the source InvidDBField and not the target.
 boolean canSeeField(DBSession session, DBField field)
          Customization method to verify whether the user should be able to see a specific field in a given object.
static java.lang.String convertAdminInvidToString(Invid adminInvid, DBSession session)
          This method takes an Invid pointing to an Admin persona record, and returns a string that can be used to send email to that person.
 boolean fieldRequired(DBObject object, short fieldid)
          Customization method to control whether a specified field is required to be defined at commit time for a given object.

To be overridden in DBEditObject subclasses.

*PSEUDOSTATIC*
 ReturnVal finalizeSetValue(DBField field, java.lang.Object value)
          We want any change to the 'name' or associated user field to update our hidden label field, which both provides our composite label and does our namespace checks for us.
 java.util.Vector getEmailTargets(DBObject object)
          This method provides a hook to allow custom DBEditObject subclasses to return a Vector of Strings comprising a list of addresses to be notified above and beyond the normal owner group notification when the given object is changed in a transaction.
 boolean hasEmailTarget(DBObject object)
          This method provides a hook to allow custom DBEditObject subclasses to indicate that the given object is interested in receiving notification when changes involving it occur, and can provide one or more addresses for such notification to go to.
 QueryResult obtainChoiceList(DBField field)
          This method provides a hook that can be used to generate choice lists for invid and string fields that provide such.
 java.lang.Object obtainChoicesKey(DBField field)
          This method returns a key that can be used by the client to cache the value returned by choices().
 ReturnVal refreshLabelField(java.lang.String descrip, Invid userInvid, java.lang.String newName)
          This private method is used to keep the hidden label field up-to-date.
 
Methods inherited from class arlut.csd.ganymede.DBEditObject
anonymousLinkOK, anonymousLinkOK, anonymousUnlinkOK, anonymousUnlinkOK, anonymousUnlinkOK, attemptBackLinkClear, canBeInactivated, canClone, canCloneField, canCreate, canInactivate, canRead, canRemove, canWrite, checkNewField, checkpoint, choiceListHasExceptions, clearBackLink, cloneFromObject, commitPhase1, commitPhase2, consistencyCheck, createNewEmbeddedObject, diff, excludeSelected, finalizeAddElement, finalizeAddElements, finalizeDeleteElement, finalizeDeleteElements, finalizeInactivate, finalizeReactivate, finalizeRemove, finalizeSetElement, getEditSet, getLabel, getLabelHook, getOriginal, getSession, getStatus, getVirtualValue, grantOwnership, inactivate, initializeNewObject, instantiateNewField, internalSession, isCommitting, isDateLimited, isDeleting, isFloatLimited, isIntLimited, isIPv6OK, isStored, maxDate, maxFloat, maxInt, minDate, minFloat, minInt, mustChoose, permExpand, permExpand, permOverride, permOverride, reactivate, release, remove, rollback, setDebug, setFieldValue, setFieldValueLocal, setStatus, verifyNewValue, virtualizeField, wizardHook
 
Methods inherited from class arlut.csd.ganymede.DBObject
appendObjectInfo, canInactivate, checkRequiredFields, clearField, clearFieldPerm, clearShadow, createShadow, emit, emitXML, equals, exportFields, findField, getASymmetricTargets, getBackLinks, getBase, getContainingLabel, getEmailTargets, getExpirationDate, getField, getField, getFieldDef, getFieldId, getFieldInfoVector, getFieldName, getFieldPerm, getFieldValue, getFieldValueLocal, getFieldValues, getFieldValuesLocal, getFieldVect, getFieldVector, getGSession, getID, getInvid, getLabelField, getLabelFieldID, getPrintString, getRemovalDate, getSummaryDescription, getTypeDesc, getTypeID, getTypeName, hasEmailTarget, hashCode, isEmbedded, isInactivated, isSet, isValid, listFields, lookupLabel, print, print, receive, replaceField, retrieveField, saveField, setBackPointers, toString, unsetBackPointers, updateBaseRefs, willBeRemoved, willExpire
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

debug

static final boolean debug
Constructor Detail

adminPersonaCustom

public adminPersonaCustom(DBObjectBase objectBase)
                   throws java.rmi.RemoteException
Customization Constructor

adminPersonaCustom

public adminPersonaCustom(DBObjectBase objectBase,
                          Invid invid,
                          DBEditSet editset)
                   throws java.rmi.RemoteException
Create new object constructor

adminPersonaCustom

public adminPersonaCustom(DBObject original,
                          DBEditSet editset)
                   throws java.rmi.RemoteException
Check-out constructor, used by DBObject.createShadow() to pull out an object for editing.
Method Detail

convertAdminInvidToString

public static java.lang.String convertAdminInvidToString(Invid adminInvid,
                                                         DBSession session)

This method takes an Invid pointing to an Admin persona record, and returns a string that can be used to send email to that person. This method will return null if no address could be determined for this administrator.


hasEmailTarget

public boolean hasEmailTarget(DBObject object)

This method provides a hook to allow custom DBEditObject subclasses to indicate that the given object is interested in receiving notification when changes involving it occur, and can provide one or more addresses for such notification to go to.

*PSEUDOSTATIC*

Overrides:
hasEmailTarget in class DBEditObject

getEmailTargets

public java.util.Vector getEmailTargets(DBObject object)

This method provides a hook to allow custom DBEditObject subclasses to return a Vector of Strings comprising a list of addresses to be notified above and beyond the normal owner group notification when the given object is changed in a transaction. Used for letting end-users be notified of changes to their account, etc.

*PSEUDOSTATIC*

Overrides:
getEmailTargets in class DBEditObject

finalizeSetValue

public ReturnVal finalizeSetValue(DBField field,
                                  java.lang.Object value)
We want any change to the 'name' or associated user field to update our hidden label field, which both provides our composite label and does our namespace checks for us. We do this in finalizeSetValue() so that this operation is always done, even if our GanymedeSession's enableOversight is set to false.
Overrides:
finalizeSetValue in class DBEditObject

refreshLabelField

public ReturnVal refreshLabelField(java.lang.String descrip,
                                   Invid userInvid,
                                   java.lang.String newName)
This private method is used to keep the hidden label field up-to-date.

obtainChoicesKey

public java.lang.Object obtainChoicesKey(DBField field)
This method returns a key that can be used by the client to cache the value returned by choices(). If the client already has the key cached on the client side, it can provide the choice list from its cache rather than calling choices() on this object again. If there is no caching key, this method will return null.
Overrides:
obtainChoicesKey in class DBEditObject

obtainChoiceList

public QueryResult obtainChoiceList(DBField field)
This method provides a hook that can be used to generate choice lists for invid and string fields that provide such. String and Invid DBFields will call their owner's obtainChoiceList() method to get a list of valid choices. This method will provide a reasonable default for targetted invid fields.
Overrides:
obtainChoiceList in class DBEditObject

fieldRequired

public boolean fieldRequired(DBObject object,
                             short fieldid)
Customization method to control whether a specified field is required to be defined at commit time for a given object.

To be overridden in DBEditObject subclasses.

*PSEUDOSTATIC*
Overrides:
fieldRequired in class DBEditObject

canSeeField

public boolean canSeeField(DBSession session,
                           DBField field)
Customization method to verify whether the user should be able to see a specific field in a given object. Instances of DBField will wind up calling up to here to let us override the normal visibility process. Note that it is permissible for session to be null, in which case this method will always return the default visiblity for the field in question. If field is not from an object of the same base as this DBEditObject, an exception will be thrown. To be overridden in DBEditObject subclasses. *PSEUDOSTATIC*
Overrides:
canSeeField in class DBEditObject

anonymousLinkOK

public boolean anonymousLinkOK(DBObject object,
                               short fieldID)
This method is used to control whether or not it is acceptable to make a link to the given field in this DBObject type when the user only has editing access for the source InvidDBField and not the target.
Overrides:
anonymousLinkOK in class DBEditObject
Parameters:
object - The object that the link is to be created in
fieldID - The field that the link is to be created in