|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.ram.common.data.AssetInformation
com.ibm.ram.common.data.Asset
com.ibm.ram.client.RAMAsset
public class RAMAsset
Represents the metadata of an asset. getContents() returns an input stream to download the RAS file.
| Method Summary | |
|---|---|
RAMRelationship |
addRelatedAsset(Asset relatedAsset,
RelationshipType relationType)
Add a relationship to another asset |
void |
addSubscription(RAMSubscription subscription)
Adds a subscription to an asset. |
RAMAssetTag[] |
addTags(java.lang.String tags)
Adds tags to the current asset Multiple tags can be entered comma or space separated. |
void |
categorize(Category category,
java.lang.String categorization)
Sets the value of a specific Asset category if it is a free form value it just sets the value. |
void |
categorize(SubCategory subCategory)
Categorizes and asset as a specific sub category |
RAMForum |
createForum(java.lang.String title,
java.lang.String description)
Create a new forum with the given name and description |
RAMAction |
getAction()
Returns the current action that will be performed when an asset is passed to the put or putAssets method Supported actions are... |
RAMAssetActivity[] |
getActivites(int[] activityTypes,
long fromTime,
long toTime)
Returns all activities for this asset matching the criteria passed in |
CategorySchema[] |
getAllAvailableCategorySchemas()
Returns all category schema's available to an asset Note this will return an empty list until you have set both the community and asset type Use RAMSession.getAllCategorySchemas() to get all schemas defined
on the repository |
FolderArtifact |
getArtifactsRoot()
Returns a root Object of all the assets Artifacts. |
AssetAttribute |
getAssetAttribute(java.lang.String name)
Return a custom attribute by name for this Asset |
AssetAttribute[] |
getAssetAttributes()
Return a list of the custom attributes for this Asset |
AssetType |
getAssetType()
Gets the asset type for the asset |
RAMAction[] |
getAvailableActions()
The actions available for the current state |
CategorySchema |
getAvailableCategorySchema(java.lang.String name)
Returns a category schema available to an asset by name Note this will return an empty list until you have set both the community and asset type Use RAMSession.getAllCategorySchemas() to get all schemas defined
on the repository |
double |
getAverageRating()
|
java.lang.String[] |
getCategorizations(Category category)
Given a Category this method returns a list of the sub-categorizations that have been set on this asset as paths relative to the Category Utility method to just get the list of all sub catgeories set on an asset for a given category |
CategorySchema |
getCategorySchema(java.lang.String name)
Returns a category schema set on this asset or null if it has not been set Use RAMSession.getCategorySchema(String) to get a schema defined
on the repository
Use getAvailableCategorySchema(String) to get a schema
available to this asset |
CategorySchema[] |
getCategorySchemas()
Returns only the category schema's set on an asset Use getAllAvailableCategorySchemas() to get all schemas
available to the asset
Use RAMSession.getAllCategorySchemas() to get all schemas defined
on the repository |
CommunityInformation |
getCommunity()
Returns the community this asset belongs to. |
java.lang.String |
getCommunityName()
|
java.io.InputStream |
getContents()
Returns an InputStream to download the asset as a RAS file. |
PersonTime |
getCreationTime()
The estimated creation time |
RAMStateHistory |
getCurrentStateHistory()
Current state history |
java.lang.String |
getDescription()
Gets the description value for this Asset. |
Forum[] |
getForums()
Returns the Forums available to this asset. |
java.lang.String |
getGUID()
Deprecated. use RAMAsset#getIdentification()#getGUID() |
AssetIdentification |
getIdentification()
Overrides the method AssetInformation.getIdentification()
This method returns a copy of the AssetIdentifaction. |
long |
getLastModified()
|
AssetIdentification |
getMainAssetId()
If this is a pending Asset, a revision of an approved asset that is in draft or under review, this method will return the identification of the main asset. |
int |
getManagementStyle()
|
java.lang.String |
getManifestAsString()
Return the Asset's manifest as a String |
java.lang.String |
getName()
|
UserInformation[] |
getOwners()
Returns the owners of this asset |
AssetIdentification |
getPendingAssetId()
If there is a pending revision of this Asset (one under review or a draft) this method will return the AssetIdentifcation of that pending asset. |
AssetRatings |
getRatings()
The Asset's user ratings and feedback |
Relationship[] |
getRelationships()
Returns the relationships. |
int |
getRevisionCount()
An Asset's full version is defined by it's GUID version and database revision. |
RAMSession |
getSession()
Returns the session object that created this Asset object. |
java.lang.String |
getShortDescription()
Gets the shortDescription value for this AssetInformation. |
State |
getState()
Returns the State of the asset |
int |
getStateID()
If state object is not null the id of the state object is used. |
java.lang.String |
getStateName()
If state object is not null the name of the state object is used. |
RAMSubscription[] |
getSubscriptions()
Return all the subscriptions |
AssetTag[] |
getTags()
Return the tags set on the asset |
java.lang.String |
getTypeName()
|
PersonTime |
getUsageTime()
The estimated usage time |
java.lang.String |
getVersion()
Deprecated. use RAMAsset#getIdentification()#getVersion() |
java.lang.String[] |
getVersions()
Returns an array of published versions of this asset This method uses the search index so there will be delay from when an asset is submitted to when it becomes visible to this API. |
boolean |
isDirty()
Returns true if the Object has been modified from the copy on the server |
boolean |
isUpdate()
Is this asset marked for update or creation. |
void |
recordActivity(AssetActivity activity)
Add an AssetActivity to be recored when the asset is uploaded. |
void |
refresh()
Reload from the server |
void |
removeRelationship(Relationship rel)
Remove the relationship to another asset |
void |
removeRelationshipRange(Asset relatedAsset,
RelationshipType relationshipType)
Removes the relationship range from the relationships of the relatedAsset with the relationshipType |
void |
removeTag(AssetTag tag)
Removes a tag from the current asset |
void |
setAction(RAMAction action)
Set the action that will be performed when an asset is passed to the put or putAssets method Supported actions are... |
void |
setArtifactsRoot(FolderArtifact root)
Returns a root Object of all the assets Artifacts. |
void |
setAssetAttributes(AssetAttribute[] customAttributes)
Set the set of asset attributes on this asset. |
void |
setAssetType(AssetType assetType)
Sets the asset type for the asset |
void |
setAverageRating(double averageRating)
|
void |
setCategorySchemas(CategorySchema[] schemas)
Set the set of CategorySchema to be applied to this asset. |
void |
setCommunity(CommunityInformation community)
Sets the community for the asset |
void |
setCommunityName(java.lang.String communityName)
|
void |
setCreationTime(PersonTime creationTime)
The estimated creation time |
void |
setDescription(java.lang.String description)
Sets the description value for this Asset. |
void |
setForums(Forum[] forums)
Set the forums for this asset. |
void |
setGUID(java.lang.String guid)
Deprecated. use RAMAsset#getIdentification()#setGUID(String) |
void |
setIdentification(AssetIdentification identification)
Set the unique identifier for this asset. |
void |
setLastModified(long lastModified)
|
void |
setMainAssetId(AssetIdentification mainAsset)
Set the Main Asset's Identification. |
void |
setManagementStyle(int managementStyle)
|
void |
setName(java.lang.String name)
|
void |
setOwners(UserInformation[] owners)
Sets the owners for the asset |
void |
setPendingAssetId(AssetIdentification pendingAsset)
Set the Pending Asset's Identification. |
void |
setRatings(AssetRatings ratings)
Set the rating on this asset. |
RAMRelationship[] |
setRelationshipRange(Asset relatedAsset,
RelationshipType relationshipType,
RelationshipRange relationshipRange)
Sets relationships to another assets that satisfy the range. |
void |
setRelationships(Relationship[] relationships)
Set the list of asset relationships for this asset. |
void |
setShortDescription(java.lang.String shortDescription)
Sets the shortDescription value for this AssetInformation. |
void |
setState(State state)
Set the state of this asset. |
void |
setStateID(int stateID)
|
void |
setStateName(java.lang.String stateName)
|
void |
setTags(AssetTag[] tags)
Set the tags for this asset. |
void |
setTypeName(java.lang.String typeName)
|
void |
setUsageTime(PersonTime usageTime)
The estimated usage time |
void |
setVersion(java.lang.String version)
Deprecated. use RAMAsset#getIdentification()#setVersion(String) |
java.lang.String |
toString()
|
void |
uncategorize(Category category,
java.lang.String categorization)
Remove a specific categorization from the asset |
void |
uncategorize(SubCategory subCategory)
Remove a specific categorization from the asset |
RAMAssetValidation[] |
validate()
Validate this asset and return a list of validation messages. |
| Methods inherited from class com.ibm.ram.common.data.Asset |
|---|
getInternalResourceURI, getResourceURI, setAction |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public RAMAction[] getAvailableActions()
throws RAMRuntimeException
RAMRuntimeExceptionpublic java.lang.String getName()
getName in class AssetInformationpublic void setName(java.lang.String name)
setName in class AssetInformationname - The new name of the asset
public java.lang.String getGUID()
throws RAMRuntimeException
RAMAsset#getIdentification()#getGUID()
getGUID in class AssetInformationRAMRuntimeExceptionpublic void setGUID(java.lang.String guid)
RAMAsset#getIdentification()#setGUID(String)
setGUID in class AssetInformationthe - unique id for this asset.public AssetIdentification getIdentification()
AssetInformation.getIdentification()
This method returns a copy of the AssetIdentifaction. Changes to this
object will not change the Identification of the asset. Each call will return
a new copy.
getIdentification in class AssetInformationRAMSession.createAsset(String),
RAMSession.createAsset(Asset, String),
RAMSession.createAsset(Asset, String, String),
RAMSession.createAssetNewVersion(Asset, String),
RAMSession.replaceAssetNewVersion(Asset, String)public AssetIdentification getMainAssetId()
AssetInformation
getMainAssetId in class AssetInformationpublic AssetIdentification getPendingAssetId()
AssetInformation
getPendingAssetId in class AssetInformationpublic void setIdentification(AssetIdentification identification)
AssetInformation
setIdentification in class AssetInformationpublic void setMainAssetId(AssetIdentification mainAsset)
AssetInformation
setMainAssetId in class AssetInformationpublic void setPendingAssetId(AssetIdentification pendingAsset)
AssetInformation
setPendingAssetId in class AssetInformationpublic java.lang.String getVersion()
RAMAsset#getIdentification()#getVersion()
getVersion in class AssetInformationpublic void setVersion(java.lang.String version)
RAMAsset#getIdentification()#setVersion(String)
setVersion in class AssetInformationversion - the version of this asset.public java.lang.String getDescription()
getDescription in class Assetpublic void setDescription(java.lang.String description)
setDescription in class Assetdescription - public RAMAssetValidation[] validate()
public java.lang.String getShortDescription()
getShortDescription in class AssetInformationpublic void setShortDescription(java.lang.String shortDescription)
setShortDescription in class AssetInformationshortDescription -
public int getRevisionCount()
throws RAMRuntimeException
RAMRuntimeException
public Relationship[] getRelationships()
throws RAMRuntimeException
Asset
getRelationships in class AssetRAMRuntimeException
public RAMRelationship addRelatedAsset(Asset relatedAsset,
RelationshipType relationType)
throws RAMRuntimeException
relatedAsset - relationType -
RAMRuntimeExceptionpublic void addSubscription(RAMSubscription subscription)
public RAMSubscription[] getSubscriptions()
public RAMRelationship[] setRelationshipRange(Asset relatedAsset,
RelationshipType relationshipType,
RelationshipRange relationshipRange)
throws RAMRuntimeException
relatedAsset - relationshipType - relationshipRange -
RAMRuntimeException
public void removeRelationshipRange(Asset relatedAsset,
RelationshipType relationshipType)
throws RAMRuntimeException
relatedAsset - relationshipType - relationshipRange -
RAMRuntimeExceptionpublic void removeRelationship(Relationship rel)
relatedAsset -
public void recordActivity(AssetActivity activity)
throws RAMRuntimeException
activity -
RAMRuntimeException - if passing in AssetDevActivity or AssetBuildActivity on a server prior to 711CustomAssetActivity, AssetBuildActivity, AssetDevActivity
public FolderArtifact getArtifactsRoot()
throws RAMRuntimeException
getArtifactsRoot in class AssetRAMRuntimeException
public void setArtifactsRoot(FolderArtifact root)
throws RAMRuntimeException
setArtifactsRoot in class AssetRAMRuntimeExceptionpublic CommunityInformation getCommunity()
Asset
getCommunity in class Assetpublic java.lang.String getManifestAsString()
public void setCommunity(CommunityInformation community)
throws RAMRuntimeException
setCommunity in class AssetassetType -
RAMRuntimeException
public AssetAttribute[] getAssetAttributes()
throws RAMRuntimeException
getAssetAttributes in class AssetRAMRuntimeException
public AssetAttribute getAssetAttribute(java.lang.String name)
throws RAMRuntimeException
getAssetAttribute in class AssetRAMRuntimeExceptionpublic RAMAction getAction()
getAction in class AssetRAMAction.CREATE,
RAMAction.UPDATE,
RAMAction.DELETE,
RAMAction#CREATE_ASIS,
RAMAction#SAVE_AS_DRAFTpublic void setAction(RAMAction action)
action - the action to setRAMAction.CREATE,
RAMAction.UPDATE,
RAMAction.DELETE,
RAMAction.CREATE_AS_IS,
RAMAction.CREATE_DRAFT,
RAMAction.RETIRE,
RAMAction.ARCHIVEpublic java.lang.String[] getVersions()
public void categorize(SubCategory subCategory)
throws RAMRuntimeException
subCategory -
RAMRuntimeException
public RAMForum createForum(java.lang.String title,
java.lang.String description)
public void categorize(Category category,
java.lang.String categorization)
throws RAMRuntimeException
value -
RAMRuntimeExceptionpublic void uncategorize(SubCategory subCategory)
category - value -
public void uncategorize(Category category,
java.lang.String categorization)
ramCategory - value - public java.lang.String[] getCategorizations(Category category)
ramCategory -
public CategorySchema[] getAllAvailableCategorySchemas()
RAMSession.getAllCategorySchemas() to get all schemas defined
on the repository
public RAMAssetActivity[] getActivites(int[] activityTypes,
long fromTime,
long toTime)
throws EntitlementException,
AssetNotFoundException,
RAMException
EntitlementException
AssetNotFoundException
RAMExceptionpublic CategorySchema getAvailableCategorySchema(java.lang.String name)
RAMSession.getAllCategorySchemas() to get all schemas defined
on the repository
public CategorySchema[] getCategorySchemas()
getAllAvailableCategorySchemas() to get all schemas
available to the asset
Use RAMSession.getAllCategorySchemas() to get all schemas defined
on the repository
getCategorySchemas in class Assetpublic CategorySchema getCategorySchema(java.lang.String name)
RAMSession.getCategorySchema(String) to get a schema defined
on the repository
Use getAvailableCategorySchema(String) to get a schema
available to this asset
getCategorySchema in class Assetname -
public AssetType getAssetType()
getAssetType in class Asset
public void setAssetType(AssetType assetType)
throws RAMRuntimeException
setAssetType in class AssetassetType -
RAMRuntimeExceptionpublic UserInformation[] getOwners()
Asset
getOwners in class Asset
public void setOwners(UserInformation[] owners)
throws RAMRuntimeException
setOwners in class Assetowners -
RAMRuntimeException
public java.io.InputStream getContents()
throws RAMRuntimeException,
java.io.IOException
RAMRuntimeException
java.io.IOExceptionpublic RAMSession getSession()
public boolean isDirty()
public boolean isUpdate()
public double getAverageRating()
getAverageRating in class AssetInformationpublic java.lang.String getCommunityName()
getCommunityName in class Assetpublic long getLastModified()
getLastModified in class AssetInformationpublic int getStateID()
Asset
getStateID in class Assetpublic java.lang.String getStateName()
Asset
getStateName in class Assetpublic java.lang.String getTypeName()
getTypeName in class Asset
public State getState()
throws RAMRuntimeException
Asset
getState in class AssetRAMRuntimeException
public AssetTag[] getTags()
throws RAMRuntimeException
getTags in class AssetRAMRuntimeException
public RAMAssetTag[] addTags(java.lang.String tags)
throws RAMRuntimeException
tag -
RAMRuntimeException
public void removeTag(AssetTag tag)
throws RAMRuntimeException
tag -
RAMRuntimeExceptionpublic AssetRatings getRatings()
Asset
getRatings in class AssetRAMRuntimeException
public Forum[] getForums()
throws RAMRuntimeException
Asset
getForums in class AssetRAMRuntimeException
public void refresh()
throws RAMRuntimeException
RAMRuntimeExceptionpublic PersonTime getUsageTime()
getUsageTime in class Assetpublic void setUsageTime(PersonTime usageTime)
setUsageTime in class AssetusageTime - the usageTime to setpublic PersonTime getCreationTime()
getCreationTime in class Assetpublic void setCreationTime(PersonTime creationTime)
setCreationTime in class AssetcreationTime - the creationTime to setpublic java.lang.String toString()
toString in class Assetpublic void setAssetAttributes(AssetAttribute[] customAttributes)
setAssetAttributes in class AssetcustomAttributes - public void setCategorySchemas(CategorySchema[] schemas)
Asset
setCategorySchemas in class Assetpublic void setForums(Forum[] forums)
Asset
setForums in class Assetpublic void setRatings(AssetRatings ratings)
Asset
setRatings in class Assetpublic void setRelationships(Relationship[] relationships)
Asset
setRelationships in class Assetpublic void setState(State state)
Asset
setState in class Assetpublic void setTags(AssetTag[] tags)
Asset
setTags in class Assetpublic int getManagementStyle()
getManagementStyle in class AssetInformationpublic void setAverageRating(double averageRating)
setAverageRating in class AssetInformationaverageRating - The averageRating to set.public void setCommunityName(java.lang.String communityName)
setCommunityName in class AssetInformationpublic void setLastModified(long lastModified)
setLastModified in class AssetInformationpublic void setManagementStyle(int managementStyle)
setManagementStyle in class AssetInformationmanagementStyle - The managementStyle to set.public void setStateID(int stateID)
setStateID in class AssetInformationstateID - The stateID to set.public void setStateName(java.lang.String stateName)
setStateName in class AssetInformationstateName - the name of the state this asset is in.public void setTypeName(java.lang.String typeName)
setTypeName in class AssetInformation
public RAMStateHistory getCurrentStateHistory()
throws RAMRuntimeException
RAMRuntimeException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||