|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPTServerContext
The IPTServerContext interface is used to set and retrieve object metadata that is common to Plumtree objects.
The following metadata can be set/retrieved via the IPTServerContext interface: - The object's ID - The object's owner - The ACL of the object - The user that last modified the object - The lock state of the object
In addition, the Session used to instantiate the object can be retrieved, as well as that Session's access level to the underlying object.
Finally, the SetServerContextSettings() and GetServerContextSettings() methods set and retrieve flags that control the behavior of the Store() method of the IPTStorable interface, which IPTServerContext extends. These flags are specified in the PT_SERVERCONTEXT_SETTINGS enumeration.
PT_SERVERCONTEXT_SETTINGS
Method Summary | |
---|---|
int |
GetAccessLevel()
Retrieves the access level of the Session used to instantiate this object. |
IPTAccessList |
GetACL()
Retrieves the ACL of this object. |
int |
GetLastModifiedBy()
Retrieves the user id of the user that last modified this object. |
int |
GetLockState()
Returns the current lock state of the object. |
int |
GetObjectID()
Returns the object ID of this object, which is unique for each object of a particular class (unique by class ID). |
int |
GetOwnerID()
Retrieves owner of this object, which is generally the user that created it. |
int |
GetServerContextSettings(int iSetting)
Retrieves the value associated with a setting for this object |
IPTSession |
GetSession()
Returns the IPTSession that was used to instantiate the underlying object. |
int |
GetSettings(int iSetting)
Deprecated. Use GetServerContextSettings(int) |
boolean |
LockObject()
Locks the object. |
void |
SetLastModifiedBy(int iUser)
Sets the user that last modified the object to be the passed-in user id. |
void |
SetObjectID(int iObjectID)
Sets this object's ID. |
void |
SetOwnerID(int iOwnerID)
Sets a user as the owner of this object. |
void |
SetServerContextSettings(int iSetting,
int iValue)
Associates a value with the passed-in setting id. |
void |
SetSettings(int iSetting,
int iValue)
Deprecated. Use SetServerContextSettings(int) |
void |
UnlockObject()
Unlocks the object. |
Methods inherited from interface com.plumtree.server.IPTStorable |
---|
Store |
Method Detail |
---|
IPTSession GetSession()
int GetObjectID()
void SetObjectID(int iObjectID)
iObjectID
- - The new ID of the object. Most implementations will
throw an exception since object ID gets set when the object is created and
cannot be subsequently modified.
PTException
- - PT_RESULTCODES.PT_E_ACCESSDENIED indicates that the
implementation does not support modifying the object ID.int GetOwnerID()
void SetOwnerID(int iOwnerID)
iOwnerID
- - The user ID of this object's new owner.IPTAccessList GetACL()
int GetAccessLevel()
void UnlockObject()
PTException
- - PT_RESULTCODES.PT_E_ACCESSDENIED indicates the calling
user does not have sufficient access to perform this operation.
PTException
- - PT_RESULTCODES.PT_E_OBJECTNOTLOCKED indicates either
that object is not in the PT_LOCKSTATES.PT_LOCKED state. Generally this means
that either the object was newly created, or LockObject() was not called prior
to calling this method.boolean LockObject()
PTException
- - PT_RESULTCODES.PT_E_ACCESSDENIED indicates the calling
user does not have sufficient access to perform this operation, or that the
object has not yet been stored (e.g. its lock state is PT_LOCKSTATES.PT_NEWLYCREATED).
PTException
- - PT_RESULTCODES.PT_E_OBJECTLOCKED indicates the calling
user already has a lock on this object.int GetLockState()
int GetSettings(int iSetting)
iSetting
- - The id of the setting to retrieve. Valid values
are from the PT_SERVERCONTEXT_SETTINGS enumeration.
int GetServerContextSettings(int iSetting)
iSetting
- - The id of the setting to retrieve. Valid values
are from the PT_SERVERCONTEXT_SETTINGS enumeration:
PT_SERVERCONTEXT_SETTINGS.PT_SERVERCONTEXT_AUTOUNIQUENAMING
PT_SERVERCONTEXT_SETTINGS.PT_SERVERCONTEXT_DIRTYACL
void SetSettings(int iSetting, int iValue)
iSetting
- - The setting id of the setting to set. Valid values
are from the PT_SERVERCONTEXT_SETTINGS enumeration.iValue
- - The value to associate with the passed-in setting id.void SetServerContextSettings(int iSetting, int iValue)
iSetting
- - The setting id of the setting to set. Valid values
are from the PT_SERVERCONTEXT_SETTINGS enumeration:
PT_SERVERCONTEXT_SETTINGS.PT_SERVERCONTEXT_AUTOUNIQUENAMING
PT_SERVERCONTEXT_SETTINGS.PT_SERVERCONTEXT_DIRTYACLiValue
- The value to associated with the passed-in setting id.int GetLastModifiedBy()
void SetLastModifiedBy(int iUser)
iUser
- - The userid of the user that will be returned by subsequent
calls to IPTServerContext.GetLastModifiedBy().
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |