|
|||||||||
| 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(Category category,
String categorization, boolean force) 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 |
void |
categorize(SubCategory subCategory, boolean force) Sets the value of a specific Asset category. If it is a free form value it just sets the value. |
RAMForum |
createForum(java.lang.String title,
java.lang.String description) Create a new forum with the given name and description |
protected
static java.lang.String[] |
fetchVersions(java.lang.String guid,
java.lang.String versionPattern,
boolean syncSearch, RAMSession session) Fetch a list of versions for the given GUID and version pattern. |
protected String[] |
fetchVersionsViaDB() Fetch a list of versions based on current asset's guid from database. |
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() Deprecated. Creation time no longer used. |
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() Deprecated. usage time no longer used. |
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. |
String[] |
getVersions(boolean viaDB, boolean syncSearch) Returns an array of published versions of this asset. This method uses the search index if parameter viaDB is set false, 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 |
lockAsset() Lock the asset. |
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) Deprecated. Creation time no longer used. |
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. |
RAMRelationship[] |
setRelationshipRange(java.lang.String guid,
RelationshipType relationshipType,
RelationshipRange relationshipRange) Sets relationship range to another asset GUID 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) Deprecated. Usage Time no longer used. |
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 |
void |
unlockAsset() Unlock 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 assetpublic 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()
AssetInformationgetMainAssetId in
class AssetInformationpublic AssetIdentification getPendingAssetId()
AssetInformationgetPendingAssetId in
class AssetInformationpublic void setIdentification(AssetIdentification identification)
AssetInformationsetIdentification in
class AssetInformationpublic void setMainAssetId(AssetIdentification mainAsset)
AssetInformationsetMainAssetId in
class AssetInformationpublic void setPendingAssetId(AssetIdentification pendingAsset)
AssetInformationsetPendingAssetId 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 void lockAsset(String)
comment - the required comment as to why it is being
locked. Limited to 200 characters. public void unlockAsset(String)
comment - the required comment as to why it is being
unlocked. Limited to 200 characters. public java.lang.String getShortDescription()
getShortDescription in
class AssetInformationpublic void setShortDescription(java.lang.String shortDescription)
setShortDescription in
class AssetInformationshortDescription - public int getRevisionCount()
throws RAMRuntimeException RAMRuntimeExceptionpublic Relationship[] getRelationships()
throws RAMRuntimeException AssetgetRelationships in
class AssetRAMRuntimeExceptionpublic RAMRelationship addRelatedAsset(Asset relatedAsset,
RelationshipType relationType)
throws RAMRuntimeException relatedAsset - relationType - RAMRuntimeExceptionpublic void addSubscription(RAMSubscription subscription)
public RAMSubscription[] getSubscriptions()
public RAMRelationship[] setRelationshipRange(java.lang.String guid,
RelationshipType relationshipType,
RelationshipRange relationshipRange) The method will remove the relationships for the relationshipType that are not for the this guid. If the assets actually exist they will be added to the relationships also.
guid - relationshipType - relationshipRange - 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, AssetDevActivitypublic FolderArtifact getArtifactsRoot()
throws RAMRuntimeException getArtifactsRoot in
class AssetRAMRuntimeExceptionpublic void setArtifactsRoot(FolderArtifact root)
throws RAMRuntimeException setArtifactsRoot in
class AssetRAMRuntimeExceptionpublic CommunityInformation getCommunity()
AssetgetCommunity in
class Assetpublic java.lang.String getManifestAsString()
public void setCommunity(CommunityInformation community)
throws RAMRuntimeException setCommunity in
class AssetassetType - RAMRuntimeExceptionpublic AssetAttribute[] getAssetAttributes()
throws RAMRuntimeException getAssetAttributes in
class AssetRAMRuntimeExceptionpublic 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 String[] getVersions(boolean viaDB, boolean syncSearch)
Note: Only repository administrator user could perform get versions against database.
Parameter viaDB function will run query to get versions against database when true, else the versions result will be returned from RAM index. Parameter syncSearch works only when viaDB is false. Set it true to perform a synchronized search against index.
protected static java.lang.String[] fetchVersions(java.lang.String guid,
java.lang.String versionPattern,
boolean syncSearch,
RAMSession session) guid - GUID to search for.versionPattern - the version pattern.syncSearch - true to do a synchronous
search, false to do a standard search. Unless necessary
for up to date results it is cheaper to use false.session - protected String[] fetchVersionsViaDB()
throws RAMServiceException RAMServiceExceptionpublic void categorize(SubCategory subCategory)
throws RAMRuntimeException subCategory - RAMRuntimeExceptionpublic RAMForum createForum(java.lang.String title,
java.lang.String description) public void categorize(Category category,
java.lang.String categorization)
throws RAMRuntimeException value - RAMRuntimeExceptionpublic void categorize(Category category,
String categorization,boolean force) value - force - RAMRuntimeExceptionpublic void categorize(SubCategory subCategory,boolean force)
value - force - 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 EntitlementExceptionAssetNotFoundExceptionRAMExceptionpublic 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 Assetpublic void setAssetType(AssetType assetType)
throws RAMRuntimeException setAssetType in
class AssetassetType - RAMRuntimeExceptionpublic UserInformation[] getOwners()
AssetgetOwners in
class Assetpublic void setOwners(UserInformation[] owners)
throws RAMRuntimeException setOwners in
class Assetowners - RAMRuntimeExceptionpublic java.io.InputStream getContents()
throws RAMRuntimeException,
java.io.IOException RAMRuntimeExceptionjava.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()
AssetgetStateID in
class Assetpublic java.lang.String getStateName()
AssetgetStateName in
class Assetpublic java.lang.String getTypeName()
getTypeName in
class Assetpublic State getState()
throws RAMRuntimeException AssetgetState in
class AssetRAMRuntimeExceptionpublic AssetTag[] getTags()
throws RAMRuntimeException getTags in
class AssetRAMRuntimeExceptionpublic RAMAssetTag[] addTags(java.lang.String tags)
throws RAMRuntimeException tag - RAMRuntimeExceptionpublic void removeTag(AssetTag tag)
throws RAMRuntimeException tag - RAMRuntimeExceptionpublic AssetRatings getRatings()
AssetgetRatings in
class AssetRAMRuntimeExceptionpublic Forum[] getForums()
throws RAMRuntimeException AssetgetForums in
class AssetRAMRuntimeExceptionpublic 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)
AssetsetCategorySchemas in
class Assetpublic void setForums(Forum[] forums)
AssetsetForums in
class Assetpublic void setRatings(AssetRatings ratings)
AssetsetRatings in
class Assetpublic void setRelationships(Relationship[] relationships)
AssetsetRelationships in
class Assetpublic void setState(State state)
AssetsetState in
class Assetpublic void setTags(AssetTag[] tags)
AssetsetTags 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 AssetInformationpublic RAMStateHistory getCurrentStateHistory()
throws RAMRuntimeException RAMRuntimeException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||