com.adobe.repository.infomodel.bean
Class Resource

java.lang.Object
  extended by com.adobe.repository.infomodel.bean.Resource
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Fragment, GenericDocument, Image, ResourceCollection, Script

public class Resource
extends java.lang.Object
implements java.io.Serializable

A Resource represents any artifact that is managed by Repository. Each version of the artifact constitutes a resource instance. Artifact versions that share the same Lid (logical identifier) value are said to form a logical resource. A resource may have content.

See Also:
Serialized Form

Field Summary
static int ATTRIBUTE_ACL_ID
          Contains the attribute identifier value which represents the ACL.
static int ATTRIBUTE_APPSTORE_VERSION
          Contains the attribute identifier value which represents the application store version.
static int ATTRIBUTE_CONTACT_ID
           
static int ATTRIBUTE_CONTACT_USER_ID
           
static int ATTRIBUTE_CONTENT_IMPL_OID
          Contains the attribute identifier value which represents the content implementation object identifier.
static int ATTRIBUTE_CREATE_TIME
          Contains the attribute identifier value which represents the creation time.
static int ATTRIBUTE_CREATED_BY
          Contains the attribute identifier value which represents who created the resource.
static int ATTRIBUTE_CUSTOM_STATUS
          Contains the attribute identifier value which represents the custom status.
static int ATTRIBUTE_DEPLOYMENT_STATUS
          Contains the attribute identifier value which represents the deployment status.
static int ATTRIBUTE_DESCRIPTION
          Contains the attribute identifier value which represents the attribute description.
static int ATTRIBUTE_E_TAG
          Contains the attribute identifier value which represents a timestamp that is updated when a resource version is modified.
static int ATTRIBUTE_HEAD
          Contains the attribute identifier value which represents whether this is the head version.
static int ATTRIBUTE_ID
          Contains the attribute identifier value which represents the attribute identifier value which represents Resource instances.
static int ATTRIBUTE_LID
          Contains the attribute identifier value which represents the attribute logical identifier.
static int ATTRIBUTE_MAJOR_VERSION
          Contains the attribute identifier value which represents the major version number.
static int ATTRIBUTE_MINOR_VERSION
          Contains the attribute identifier value which represents the minor version number.
static int ATTRIBUTE_NAME
          Contains the attribute identifier value which represents the resource name.
static int ATTRIBUTE_OBJECT_STATUS
          Contains the attribute identifier value which represents the object status.
static int ATTRIBUTE_OBJECT_TYPE
          Contains the attribute identifier value which represents the object type.
static int ATTRIBUTE_OWNER_USER_ID
          Contains the attribute identifier value which represents the identifier of the user who created the resource.
static int ATTRIBUTE_PATH
          Contains the attribute identifier value which represents the path for this resource.
static int ATTRIBUTE_UPDATE_TIME
          Contains the attribute identifier value which represents the last time this resource was updated.
static int DEPLOYMENT_STATUS_ACTIVE
          Represents a deployment status of active.
static int DEPLOYMENT_STATUS_DEPLOYED
          Represents a deployment status of deployed.
static int DEPLOYMENT_STATUS_INACTIVE
          Represents a deployment status of inactive.
static int DEPLOYMENT_STATUS_UNSPECIFIED
          Represents a resource for which a deployment status has not been specified.
static short DEPTH_ZERO
          Depth constant indicating that an operation should apply/return a resource collection only and none of its internal members, or immediate children.
static int OBJECT_STATUS_DEPRECATED
          Represents a version of a resource which has been deprecated.
static int OBJECT_STATUS_LATEST
          Represents the latest version of a logical resource.
static int OBJECT_STATUS_UNSPECIFIED
          Represents a resource for which an object status has not been specified.
static int OBJECT_STATUS_UPDATED
          Represents a version of a resource which has been updated.
static int OBJECT_TYPE_RESOURCE
          Contains the object type value which represents Resource instances (not subtypes).
static int RELATION_CONTENT
          Represents the resource content.
static int RELATION_LOCKS
          Represents the resource locks.
static int RELATION_RESOURCE_PROPERTIES
          Represents the resource properties.
 
Constructor Summary
Resource()
          The default constructor.
 
Method Summary
 void addLock(Lock lock)
          Adds the specified lock to this resource.
 void addResourceProperty(ResourceProperty resourceProperty)
          Adds a dynamic property to this resource.
 java.lang.String getAclId()
          Retrieves the ACL identifier for this resource.
 java.lang.String getContactId()
           
 java.lang.String getContactUserId()
           
 ResourceContent getContent()
          Retrieves the file data associated with this resource.
 java.lang.String getCreatedBy()
          Retrieves the User Manager principal's object identifier for the user who created this resource.
 java.util.Date getCreateTime()
          Retrieves the time at which this resource was first written to the Repository.
 java.lang.String getCustomStatus()
          Retrieves this resource's custom status, which is a client-specified status string.
 int getDeploymentStatus()
          Retrieves this instance's deployment status.
 java.lang.String getDescription()
          Retrieves this resource's textual description.
 long getETag()
          Retrieves a timestamp that is updated every time a resource version is modified.
 boolean getHead()
          Determines whether this resource is the head version of a logical resource.
 Id getId()
          Retrieves this resource's unique identifier.
 Lid getLid()
          Retrieves this resource's logical identifier.
 java.util.Collection getLocks()
          Retrieves the locks that exist on this resource.
 int getMajorVersion()
          Retrieves this resource instance's major version number.
 int getMinorVersion()
          Retrieves this resource instance's minor version number.
 java.lang.String getName()
          Retrieves this resource's name.
 int getObjectStatus()
          Retrieves the status of this resource version.
 int getObjectType()
          Retrieves the type of the resource instance.
 java.lang.String getOwnerUserId()
          Retrieves the user identifier (login identifier) of the user who created this resource.
 java.lang.String getPath()
          Retrieves the path for this resource.
 java.util.Collection getResourceProperties()
          Retrieves the dynamic properties defined on this resource.
 java.util.Date getUpdateTime()
          Retrieves the time at which this resource was last modified.
 boolean isProjected(int attribute)
          Determines whether the supplied attribute or composed object is projected.
 void removeLock(Lock lock)
          Removes the specified lock from this resource.
 void removeResourceProperty(ResourceProperty resourceProperty)
          Removes a dynamic property from this resource.
 void setAclId(java.lang.String aclId)
          Sets the ACL identifier for this resource.
 void setContactId(java.lang.String contactId)
           
 void setContactUserId(java.lang.String contactUserId)
           
 void setContent(ResourceContent content)
          Associates this resource with the supplied ResourceContent object.
 void setCreatedBy(java.lang.String createdBy)
          Sets the User Manager principal's object identifier for the user who created this resource.
 void setCreateTime(java.util.Date createTime)
          Sets the time at which this resource was first written to the Repository.
 void setCustomStatus(java.lang.String customStatus)
          Sets this instance's custom status.
 void setDeploymentStatus(int deploymentStatus)
          Sets this instance's deployment status.
 void setDescription(java.lang.String description)
          Sets this resource's description.
 void setETag(long eTag)
          Sets a timestamp that is updated every time a resource version is modified.
 void setHead(boolean head)
          Sets whether this resource is the head version of a logical resource.
 void setId(Id idString)
          Sets this resource's unique identifier.
 void setLid(Lid lidString)
          Sets this resource's logical identifier, which is unique among distinct logical resources and common across all versions of the same logical resource.
 void setLocks(java.util.Collection locks)
           
 void setMajorVersion(int majorVersion)
          Sets the initial major version number to use when a new logical resource is created.
 void setMinorVersion(int minorVersion)
          Sets the initial minor version number to use when a new logical resource is created.
 void setName(java.lang.String name)
          Sets this resource's name.
 void setObjectStatus(int objectStatus)
          Sets this instance's status.
 void setObjectType(int objectType)
          Sets the type of the resource instance.
 void setOwnerUserId(java.lang.String ownerUserId)
          Sets the user identifier (login identifier) of the user who created this resource.
 void setPath(java.lang.String path)
          Sets the path for this resource.
 void setRepositoryLoadProfile(RepositoryLoadProfile loadProfile)
          Sets the Repository load profile for this resource.
 void setResourceProperties(java.util.Collection resourceProperties)
           
 void setUpdateTime(java.util.Date updateTime)
          Sets the time at which this resource was last modified.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OBJECT_STATUS_UNSPECIFIED

public static final int OBJECT_STATUS_UNSPECIFIED
Represents a resource for which an object status has not been specified. The repository will replace an unspecified object status value with either latest or updated during a write or update.

See Also:
Constant Field Values

OBJECT_STATUS_LATEST

public static final int OBJECT_STATUS_LATEST
Represents the latest version of a logical resource.

See Also:
Constant Field Values

OBJECT_STATUS_UPDATED

public static final int OBJECT_STATUS_UPDATED
Represents a version of a resource which has been updated.

See Also:
Constant Field Values

OBJECT_STATUS_DEPRECATED

public static final int OBJECT_STATUS_DEPRECATED
Represents a version of a resource which has been deprecated.

See Also:
Constant Field Values

DEPLOYMENT_STATUS_UNSPECIFIED

public static final int DEPLOYMENT_STATUS_UNSPECIFIED
Represents a resource for which a deployment status has not been specified.

See Also:
Constant Field Values

DEPLOYMENT_STATUS_DEPLOYED

public static final int DEPLOYMENT_STATUS_DEPLOYED
Represents a deployment status of deployed.

See Also:
Constant Field Values

DEPLOYMENT_STATUS_ACTIVE

public static final int DEPLOYMENT_STATUS_ACTIVE
Represents a deployment status of active.

See Also:
Constant Field Values

DEPLOYMENT_STATUS_INACTIVE

public static final int DEPLOYMENT_STATUS_INACTIVE
Represents a deployment status of inactive.

See Also:
Constant Field Values

DEPTH_ZERO

public static final short DEPTH_ZERO
Depth constant indicating that an operation should apply/return a resource collection only and none of its internal members, or immediate children.

See Also:
Constant Field Values

OBJECT_TYPE_RESOURCE

public static final int OBJECT_TYPE_RESOURCE
Contains the object type value which represents Resource instances (not subtypes).

See Also:
Constant Field Values

ATTRIBUTE_ID

public static final int ATTRIBUTE_ID
Contains the attribute identifier value which represents the attribute identifier value which represents Resource instances.

See Also:
Constant Field Values

ATTRIBUTE_OBJECT_TYPE

public static final int ATTRIBUTE_OBJECT_TYPE
Contains the attribute identifier value which represents the object type.

See Also:
Constant Field Values

ATTRIBUTE_PATH

public static final int ATTRIBUTE_PATH
Contains the attribute identifier value which represents the path for this resource.

See Also:
Constant Field Values

ATTRIBUTE_OBJECT_STATUS

public static final int ATTRIBUTE_OBJECT_STATUS
Contains the attribute identifier value which represents the object status.

See Also:
Constant Field Values

ATTRIBUTE_DEPLOYMENT_STATUS

public static final int ATTRIBUTE_DEPLOYMENT_STATUS
Contains the attribute identifier value which represents the deployment status.

See Also:
Constant Field Values

ATTRIBUTE_CUSTOM_STATUS

public static final int ATTRIBUTE_CUSTOM_STATUS
Contains the attribute identifier value which represents the custom status.

See Also:
Constant Field Values

ATTRIBUTE_APPSTORE_VERSION

public static final int ATTRIBUTE_APPSTORE_VERSION
Contains the attribute identifier value which represents the application store version.

See Also:
Constant Field Values

ATTRIBUTE_DESCRIPTION

public static final int ATTRIBUTE_DESCRIPTION
Contains the attribute identifier value which represents the attribute description.

See Also:
Constant Field Values

ATTRIBUTE_MAJOR_VERSION

public static final int ATTRIBUTE_MAJOR_VERSION
Contains the attribute identifier value which represents the major version number.

See Also:
Constant Field Values

ATTRIBUTE_MINOR_VERSION

public static final int ATTRIBUTE_MINOR_VERSION
Contains the attribute identifier value which represents the minor version number.

See Also:
Constant Field Values

ATTRIBUTE_OWNER_USER_ID

public static final int ATTRIBUTE_OWNER_USER_ID
Contains the attribute identifier value which represents the identifier of the user who created the resource.

See Also:
Constant Field Values

ATTRIBUTE_E_TAG

public static final int ATTRIBUTE_E_TAG
Contains the attribute identifier value which represents a timestamp that is updated when a resource version is modified.

See Also:
Constant Field Values

ATTRIBUTE_LID

public static final int ATTRIBUTE_LID
Contains the attribute identifier value which represents the attribute logical identifier.

See Also:
Constant Field Values

ATTRIBUTE_NAME

public static final int ATTRIBUTE_NAME
Contains the attribute identifier value which represents the resource name.

See Also:
Constant Field Values

ATTRIBUTE_CREATED_BY

public static final int ATTRIBUTE_CREATED_BY
Contains the attribute identifier value which represents who created the resource.

See Also:
Constant Field Values

ATTRIBUTE_CONTACT_ID

public static final int ATTRIBUTE_CONTACT_ID
See Also:
Constant Field Values

ATTRIBUTE_CONTACT_USER_ID

public static final int ATTRIBUTE_CONTACT_USER_ID
See Also:
Constant Field Values

ATTRIBUTE_HEAD

public static final int ATTRIBUTE_HEAD
Contains the attribute identifier value which represents whether this is the head version.

See Also:
Constant Field Values

ATTRIBUTE_ACL_ID

public static final int ATTRIBUTE_ACL_ID
Contains the attribute identifier value which represents the ACL.

See Also:
Constant Field Values

ATTRIBUTE_CONTENT_IMPL_OID

public static final int ATTRIBUTE_CONTENT_IMPL_OID
Contains the attribute identifier value which represents the content implementation object identifier.

See Also:
Constant Field Values

ATTRIBUTE_UPDATE_TIME

public static final int ATTRIBUTE_UPDATE_TIME
Contains the attribute identifier value which represents the last time this resource was updated.

See Also:
Constant Field Values

ATTRIBUTE_CREATE_TIME

public static final int ATTRIBUTE_CREATE_TIME
Contains the attribute identifier value which represents the creation time.

See Also:
Constant Field Values

RELATION_RESOURCE_PROPERTIES

public static final int RELATION_RESOURCE_PROPERTIES
Represents the resource properties.

See Also:
Constant Field Values

RELATION_LOCKS

public static final int RELATION_LOCKS
Represents the resource locks.

See Also:
Constant Field Values

RELATION_CONTENT

public static final int RELATION_CONTENT
Represents the resource content.

See Also:
Constant Field Values
Constructor Detail

Resource

public Resource()
The default constructor.

Method Detail

setRepositoryLoadProfile

public void setRepositoryLoadProfile(RepositoryLoadProfile loadProfile)
Sets the Repository load profile for this resource. The load profile which defines the object types and attributes to be returned from (projected in) a Repository query. For more information, see RepositoryLoadProfile.

Parameters:
loadProfile - The Repository load profile for this resource.

isProjected

public boolean isProjected(int attribute)
Determines whether the supplied attribute or composed object is projected.

Parameters:
attribute - Any one of the LOAD_* constants defined in the resource type and its subtypes.
Returns:
true if the supplied attribute or composed object is projected, false otherwise.

getId

public Id getId()
Retrieves this resource's unique identifier. The format of this identifier is urn:uuid:id<uuid>.

Returns:
This resource's unique identifier, which is an Id-based identifier.

setId

public void setId(Id idString)
Sets this resource's unique identifier.

Parameters:
idString - This resource's unique identifier.

getObjectType

public int getObjectType()
Retrieves the type of the resource instance.

Returns:
A constant value selected from one of the OBJECT_TYPE_* constants.

setObjectType

public void setObjectType(int objectType)
Sets the type of the resource instance.

Parameters:
objectType - A constant value selected from one of the OBJECT_TYPE_* constants.

getPath

public java.lang.String getPath()
Retrieves the path for this resource.

Returns:
The path for this resource.

setPath

public void setPath(java.lang.String path)
Sets the path for this resource.

Parameters:
path - The path for this resource.

getObjectStatus

public int getObjectStatus()
Retrieves the status of this resource version.

Returns:
A positive integer selected from one of the OBJECT_STATUS_* constants, or a client-specified value greater than or equal to 1024.

setObjectStatus

public void setObjectStatus(int objectStatus)
Sets this instance's status.

Parameters:
objectStatus - A positive integer selected from one of the OBJECT_STATUS_* constants, or a client-specified value greater than or equal to 1024.

getDeploymentStatus

public int getDeploymentStatus()
Retrieves this instance's deployment status.

Returns:
A positive integer selected from one of the DEPLOYMENT_STATUS_* constants, or a client-specified value greater than or equal to 1024.

setDeploymentStatus

public void setDeploymentStatus(int deploymentStatus)
Sets this instance's deployment status.

Parameters:
deploymentStatus - This instance's deployment status.

getCustomStatus

public java.lang.String getCustomStatus()
Retrieves this resource's custom status, which is a client-specified status string.

Returns:
This resource's custom status, which may be null.

setCustomStatus

public void setCustomStatus(java.lang.String customStatus)
Sets this instance's custom status.

Parameters:
customStatus - A client-specified status string, which may be null.

getDescription

public java.lang.String getDescription()
Retrieves this resource's textual description.

Returns:
This resource's textual description, which may be null.

setDescription

public void setDescription(java.lang.String description)
Sets this resource's description.

Parameters:
description - This resource's description, which may be null.

getMajorVersion

public int getMajorVersion()
Retrieves this resource instance's major version number.

Returns:
This resource instance's major version number.

setMajorVersion

public void setMajorVersion(int majorVersion)
Sets the initial major version number to use when a new logical resource is created.

Parameters:
majorVersion - An integer that is strictly greater than zero if the minor version is equal to zero. The major version is greater than or equal to zero if the minor version is greater than zero.

getMinorVersion

public int getMinorVersion()
Retrieves this resource instance's minor version number.

Returns:
This resource instance's minor version number.

setMinorVersion

public void setMinorVersion(int minorVersion)
Sets the initial minor version number to use when a new logical resource is created.

Parameters:
minorVersion - An integer that is greater than zero if the major version is equal to zero. The minor version is greater than or equal to zero if the major version is greater than zero.

getOwnerUserId

public java.lang.String getOwnerUserId()
Retrieves the user identifier (login identifier) of the user who created this resource.

Returns:
The user identifier of the user who created this resource.

setOwnerUserId

public void setOwnerUserId(java.lang.String ownerUserId)
Sets the user identifier (login identifier) of the user who created this resource.

Parameters:
ownerUserId - The user identifier (login identifier) of the user who created this resource.

getETag

public long getETag()
Retrieves a timestamp that is updated every time a resource version is modified. This is only relevant to ResourceCollection and its subclasses, and enables clients to determine if the contents of a collection have changed. E-Tag values on non-ResourceCollection types will never change.

Returns:
A timestamp that is updated every time a resource version is modified.

setETag

public void setETag(long eTag)
Sets a timestamp that is updated every time a resource version is modified. This is only relevant to ResourceCollection and its subclasses, and enables clients to determine if the contents of a collection have changed. E-Tag values on non-ResourceCollection types will never change.

Parameters:
eTag - A timestamp that is updated every time a resource version is modified.

getLid

public Lid getLid()
Retrieves this resource's logical identifier.

Returns:
This resource's logical identifier.

setLid

public void setLid(Lid lidString)
Sets this resource's logical identifier, which is unique among distinct logical resources and common across all versions of the same logical resource.

Parameters:
lidString - This resource's logical identifier. The format of this identifier is "urn:uuid:lid:<uuid>", where <uuid> is a DCE 128-bit Universally Unique Identifier (UUID).

getName

public java.lang.String getName()
Retrieves this resource's name.

Returns:
This resource's name.

setName

public void setName(java.lang.String name)
Sets this resource's name. The name of the resource is used to calculate paths.

Parameters:
name - This resource's name, which may not contain forward ( / ) or back ( ) slashes, or any other character that is not legal for Windows paths.

getCreatedBy

public java.lang.String getCreatedBy()
Retrieves the User Manager principal's object identifier for the user who created this resource.

Returns:
The User Manager principal's object identifier for the user who created this resource.

setCreatedBy

public void setCreatedBy(java.lang.String createdBy)
Sets the User Manager principal's object identifier for the user who created this resource.

Parameters:
createdBy - The User Manager principal's object identifier for the user who created this resource.

getContactId

public java.lang.String getContactId()
Returns:

setContactId

public void setContactId(java.lang.String contactId)
Parameters:
contactId -

getContactUserId

public java.lang.String getContactUserId()
Returns:

setContactUserId

public void setContactUserId(java.lang.String contactUserId)
Parameters:
contactUserId -

getHead

public boolean getHead()
Determines whether this resource is the head version of a logical resource.

Returns:
true if this resource is the head version of a logical resource, false otherwise.

setHead

public void setHead(boolean head)
Sets whether this resource is the head version of a logical resource.

Parameters:
head - true if this resource is the head version of a logical resource, false otherwise.

getAclId

public java.lang.String getAclId()
Retrieves the ACL identifier for this resource. For more information on ACLs, see AccessControlList.

Returns:
The ACL identifier for this resource.

setAclId

public void setAclId(java.lang.String aclId)
Sets the ACL identifier for this resource.

Parameters:
aclId - The ACL identifier for this resource.

getUpdateTime

public java.util.Date getUpdateTime()
Retrieves the time at which this resource was last modified.

Returns:
The time at which this resource was last modified.

setUpdateTime

public void setUpdateTime(java.util.Date updateTime)
Sets the time at which this resource was last modified.

Parameters:
updateTime - The time at which this resource was last modified.

getCreateTime

public java.util.Date getCreateTime()
Retrieves the time at which this resource was first written to the Repository.

Returns:
The time at which this resource was first written to the Repository.

setCreateTime

public void setCreateTime(java.util.Date createTime)
Sets the time at which this resource was first written to the Repository.

Parameters:
createTime - The time at which this resource was first written to the Repository.

getResourceProperties

public java.util.Collection getResourceProperties()
Retrieves the dynamic properties defined on this resource.

Returns:
A non-null Collection of ResourceProperty instances.

setResourceProperties

public void setResourceProperties(java.util.Collection resourceProperties)

addResourceProperty

public void addResourceProperty(ResourceProperty resourceProperty)
Adds a dynamic property to this resource.

Parameters:
resourceProperty -

removeResourceProperty

public void removeResourceProperty(ResourceProperty resourceProperty)
Removes a dynamic property from this resource. The property's name and namespace are used in an attempt to match it against existing properties.

Parameters:
resourceProperty - The dynamic property to be removed from this resource.

getLocks

public java.util.Collection getLocks()
Retrieves the locks that exist on this resource.

Returns:
The locks that exist on this resource.

setLocks

public void setLocks(java.util.Collection locks)

addLock

public void addLock(Lock lock)
Adds the specified lock to this resource.

Parameters:
lock - The lock to be added.

removeLock

public void removeLock(Lock lock)
Removes the specified lock from this resource. For more information on locking, see Lock.

Parameters:
lock - The lock to be removed from this resource.

getContent

public ResourceContent getContent()
Retrieves the file data associated with this resource.

Returns:
The file data associated with this resource.

setContent

public void setContent(ResourceContent content)
Associates this resource with the supplied ResourceContent object.

Parameters:
content -


[an error occurred while processing this directive] [an error occurred while processing this directive]