com.plumtree.server
Interface IPTObjectManager

All Superinterfaces:
IPTUnknown
All Known Subinterfaces:
IPTExpressionManager

public interface IPTObjectManager
extends IPTUnknown

Object Managers are used to create, open, copy, delete, and find administrative objects. Each class of object is associated with a particular Object Manager.

Author:
michaels
See Also:
IPTObject

Method Summary
 void ClearData(int objId)
          Internal server use only: Clears data stream
 int Clone(int nObjectID, int iFolderID)
          Create a new object of this class that is a copy of an existing object.
 int Clone(int nObjectID, java.lang.Object vNewNameOrNewFolderID)
          deprecated
 int Clone(int nObjectID, java.lang.String sNewName)
          Create a new object of this class that is a copy of an existing object.
 java.lang.Object Create(int lAdminFolderID)
          Create a new object of this class.
 void Delete(int nObjectID)
          Delete the object with the specified Object ID
 java.lang.Object[] DeleteObjects(int ObjectIDs)
          Deprecated.  
 java.lang.Object[] DeleteObjects(int[] ObjectIDs)
          Delete multiple objects with the specified IDs
 int GetCreationRight()
          The activity right (from PT_ACTIVITY_RIGHTS) needed to create objects of this class
 int GetManagedClassID()
          The Class ID of objects managed by this manager (from PT_CLASSIDS)
 java.lang.Object GetReadDataStream(int nObjectID, java.lang.Object pbstrNote)
          Obtain stream to read data from BLOB or file associated with object.
 java.lang.Object[][] GetSchema()
          Returns an array of PT_PROPIDs, Names, Types, and Sizes for the searchable schema of this object class.
 IPTSession GetSession()
          Returns the IPTSession that was used to create this Object Manager
 java.lang.Object GetWriteDataStream(int objId, java.lang.String bstrNote)
          Obtain stream to write data to BLOB or file associated with object.
 boolean IsObjectAccessible(int lObjectID, int lUserID, int lMinAccessLevel)
          Used to test if the object in question is accessible by the given user at the given security level
 int[] LookupObjectIdFromName(java.lang.String objectName)
          Looks up the id (or ids if there are more than one) of the objects with the specified name.
 boolean ObjectExists(int nObjectID)
          Check if the object exists
 java.lang.Object Open(int nObjectID, boolean bLockInitially)
          Open the object with the specified ObjectID
 IPTQueryResult Query(int nPropIDMask, int lFolderID, int[][] vOrderBy, int nSkipRows, int nMaxRows, java.lang.Object[][] vQueryFilter)
          Perform a query for objects of this type.
 IPTQueryResult Query(int nPropIDMask, int lFolderID, int[] vOrderBy, int nSkipRows, int nMaxRows, java.lang.Object[][] vQueryFilter)
          Perform a query for objects of this type.
 IPTQueryResult Query(int nPropIDMask, int lFolderID, int vOrderBy, int nSkipRows, int nMaxRows, java.lang.Object[][] vQueryFilter)
          Perform a query for objects of this type.
 IPTQueryResult Query(int nPropIDMask, int lFolderID, java.lang.Object vOrderBy, int nSkipRows, int nMaxRows, java.lang.Object[][] vQueryFilter)
          Deprecated.  
 int QueryCount(int lFolderID, java.lang.Object[][] vQueryFilter)
          Counts the number of objects of this class that match a filter
 IPTQueryResult QuerySingleObject(int nObjectID)
          Returns a Query Result (very similar to that returned by Query) that contains information about a specific object
 IPTQueryResult SimpleQuery(int lFolderID, int OrderBy)
          Return an IPTQueryResult containing information about all objects of this class that are stored in the indicated folder
 
Methods inherited from interface com.plumtree.server.IPTUnknown
GetInterfaces
 

Method Detail

GetSession

IPTSession GetSession()
Returns the IPTSession that was used to create this Object Manager

Returns:
the session

GetManagedClassID

int GetManagedClassID()
The Class ID of objects managed by this manager (from PT_CLASSIDS)

Returns:
the class id
See Also:
PT_CLASSIDS

GetSchema

java.lang.Object[][] GetSchema()
Returns an array of PT_PROPIDs, Names, Types, and Sizes for the searchable schema of this object class. Used internally for object serialization.

Returns:
a 2D array containing a row for each item known about objects of this class

Create

java.lang.Object Create(int lAdminFolderID)
Create a new object of this class. User must have edit permissions on parent folder and must have the activity right to create the object.

Parameters:
lAdminFolderID - the ID of the folder in which to create the object
Returns:
the newly created object

Clone

int Clone(int nObjectID,
          int iFolderID)
Create a new object of this class that is a copy of an existing object. Place the copy in a different folder than the original, but name the new object with the same name as the original.

Parameters:
nObjectID - the ID of the object to be copied
iFolderID - the ID of the folder in which the new object should be stored
Returns:
the ObjectID of the new object

Clone

int Clone(int nObjectID,
          java.lang.String sNewName)
Create a new object of this class that is a copy of an existing object. Place the copy in the same folder, and name the new object with the specified name

Parameters:
nObjectID - the ID of the object to be copied
sNewName - the name to give to the new object
Returns:
the ObjectID of the new object

Clone

int Clone(int nObjectID,
          java.lang.Object vNewNameOrNewFolderID)
deprecated


Delete

void Delete(int nObjectID)
Delete the object with the specified Object ID

Parameters:
nObjectID - ID of the object to be deleted

DeleteObjects

java.lang.Object[] DeleteObjects(int[] ObjectIDs)
Delete multiple objects with the specified IDs

Parameters:
ObjectIDs - array of object ID for objects to be deleted
Returns:
an array of error codes, one corresponding to each ObjectID in the ObjectIDs argument. If item was deleted successfully, error code is 0.

DeleteObjects

java.lang.Object[] DeleteObjects(int ObjectIDs)
Deprecated. 


Open

java.lang.Object Open(int nObjectID,
                      boolean bLockInitially)
Open the object with the specified ObjectID

Parameters:
nObjectID - the ID of the object to open
bLockInitially - Should the object be locked before opening it? Open will fail if bLockInitially is true and the object is already locked. If true is passed in for bLockInitially, the client is responsible for calling IPTServerContext.UnlockObject
Returns:
the object to be opened
See Also:
IPTServerContext

SimpleQuery

IPTQueryResult SimpleQuery(int lFolderID,
                           int OrderBy)
Return an IPTQueryResult containing information about all objects of this class that are stored in the indicated folder

Parameters:
lFolderID - the folder whose contents are being queried, or -1 for all folders
OrderBy - a PT_PROPIDS to order the results by in ascending order
Returns:
a Query Result holding the results
See Also:
IPTQueryResult

Query

IPTQueryResult Query(int nPropIDMask,
                     int lFolderID,
                     int[][] vOrderBy,
                     int nSkipRows,
                     int nMaxRows,
                     java.lang.Object[][] vQueryFilter)
Perform a query for objects of this type. The query supports filtering, sorting, etc.

Parameters:
nPropIDMask - a bitmask of PT_PROPIDS values that indicates what properties should appear in the IPTQueryResult result
lFolderID - the folder whose contents are being queried, or -1 for all folders
vOrderBy - a 2D array specifying how results should be ordered. The first column holds the PT_PROPIDS by which to order, and the second column holds the order direction, from PT_ORDERBY_SETTINGS. Multiple rows can be included for multi-level ordering, but a maximum of three rows will be respected.
nSkipRows - number of rows to skip at the beginning, or 0 for none
nMaxRows - maximum number of rows to return, or -1 for all
vQueryFilter - is a 2D array with 3 columns. The first column holds the property id, from PT_PROPIDS. The second column holds the operator, from PT_FILTEROPS. The third column holds the value to be matched.
Returns:
an IPTQueryResult that holds the requested records

Query

IPTQueryResult Query(int nPropIDMask,
                     int lFolderID,
                     int[] vOrderBy,
                     int nSkipRows,
                     int nMaxRows,
                     java.lang.Object[][] vQueryFilter)
Perform a query for objects of this type. The query supports filtering, sorting, etc.

Parameters:
nPropIDMask - a bitmask of PT_PROPIDS values that indicates what properties should appear in the IPTQueryResult result
lFolderID - the folder whose contents are being queried, or -1 for all folders
vOrderBy - a 1D array specifying how results should be ordered. The column holds the PT_PROPIDS by which to order, all ordering will be in ascending order. Multiple rows can be included for multi-level ordering, but a maximum of three rows will be respected.
nSkipRows - number of rows to skip at the beginning, or 0 for none
nMaxRows - maximum number of rows to return, or -1 for all
vQueryFilter - is a 2D array with 3 columns. The first column holds the property id, from PT_PROPIDS. The second column holds the operator, from PT_FILTEROPS. The third column holds the value to be matched.
Returns:
an IPTQueryResult that holds the requested records

Query

IPTQueryResult Query(int nPropIDMask,
                     int lFolderID,
                     int vOrderBy,
                     int nSkipRows,
                     int nMaxRows,
                     java.lang.Object[][] vQueryFilter)
Perform a query for objects of this type. The query supports filtering, sorting, etc.

Parameters:
nPropIDMask - a bitmask of PT_PROPIDS values that indicates what properties should appear in the IPTQueryResult result
lFolderID - the folder whose contents are being queried, or -1 for all folders
vOrderBy - a PT_PROPIDS value by which to order the results, which will be returned in ascending order
nSkipRows - number of rows to skip at the beginning, or 0 for none
nMaxRows - maximum number of rows to return, or -1 for all
vQueryFilter - is a 2D array with 3 columns. The first column holds the property id, from PT_PROPIDS. The second column holds the operator, from PT_FILTEROPS. The third column holds the value to be matched.
Returns:
an IPTQueryResult that holds the requested records

Query

IPTQueryResult Query(int nPropIDMask,
                     int lFolderID,
                     java.lang.Object vOrderBy,
                     int nSkipRows,
                     int nMaxRows,
                     java.lang.Object[][] vQueryFilter)
Deprecated. 


QueryCount

int QueryCount(int lFolderID,
               java.lang.Object[][] vQueryFilter)
Counts the number of objects of this class that match a filter

Parameters:
lFolderID - the folder whose contents are being queried, or -1 for all folders
vQueryFilter - is a 2D array with 3 columns. The first column holds the property id, from PT_PROPIDS. The second column holds the operator, from PT_FILTEROPS. The third column holds the value to be matched.

QuerySingleObject

IPTQueryResult QuerySingleObject(int nObjectID)
Returns a Query Result (very similar to that returned by Query) that contains information about a specific object

Parameters:
nObjectID - the object ID of the object for which information is sought
Returns:
an IPTQueryResult that holds the requested record

GetReadDataStream

java.lang.Object GetReadDataStream(int nObjectID,
                                   java.lang.Object pbstrNote)
Obtain stream to read data from BLOB or file associated with object. Used internally for job persistence.

Parameters:
nObjectID - the object ID of the object whose stream is sought
pbstrNote - a String populated by the call for header information
Returns:
a read data stream for this object

GetWriteDataStream

java.lang.Object GetWriteDataStream(int objId,
                                    java.lang.String bstrNote)
Obtain stream to write data to BLOB or file associated with object. Used internally for job persistence.

Parameters:
objId - the object ID of the object whose stream is sought
bstrNote - Optional header information String
Returns:
a write data stream for this object

ClearData

void ClearData(int objId)
Internal server use only: Clears data stream

Parameters:
objId - Object ID

IsObjectAccessible

boolean IsObjectAccessible(int lObjectID,
                           int lUserID,
                           int lMinAccessLevel)
Used to test if the object in question is accessible by the given user at the given security level

Parameters:
lObjectID - the ID of the object in question
lUserID - the ID of the user whose access is being tested
lMinAccessLevel - the access level that the user should have on the object
Returns:
true if user lUserID has at least lMinAccessLevel on object lObjectID. False otherwise.

GetCreationRight

int GetCreationRight()
The activity right (from PT_ACTIVITY_RIGHTS) needed to create objects of this class

Returns:
a value from PT_ACTIVITY_RIGHTS

LookupObjectIdFromName

int[] LookupObjectIdFromName(java.lang.String objectName)
Looks up the id (or ids if there are more than one) of the objects with the specified name.

Parameters:
objectName -
Returns:

ObjectExists

boolean ObjectExists(int nObjectID)
Check if the object exists

Parameters:
nObjectID - Object id to check
Returns:
true if the object exists