com.ibm.ram.common.data
Class AssetIdentification

java.lang.Object
  extended by com.ibm.ram.common.data.AssetIdentification

public class AssetIdentification
extends java.lang.Object

Provides the unique identification for an asset: all that is necessary to identify an asset.

Since:
7.1.1

Constructor Summary
AssetIdentification()
          Construct an empty identification.
AssetIdentification(java.lang.String GUID, java.lang.String version)
          Convenience constructor to create fully filled in.
AssetIdentification(java.lang.String GUID, java.lang.String version, boolean pending)
          Convenience constructor to create fully filled in.
AssetIdentification(java.lang.String GUID, java.lang.String version, boolean pending, RepositoryIdentification repositoryIdentification)
          Convenience constructor to create fully filled in.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getGUID()
           
 RepositoryIdentification getRepositoryIdentification()
          Optionally provide information about which repository this asset belongs to.
 java.lang.String getVersion()
           
 int hashCode()
           
 boolean isPendingAsset()
          Answer whether this is a pending asset or a main asset.
 void setGUID(java.lang.String id)
           
 void setPendingAsset(boolean pendingAsset)
          Set whether this is a pending asset or a main asset.
 void setRepositoryIdentification(RepositoryIdentification repositoryIdentification)
          Optionally set information about which repository this asset is from
 void setVersion(java.lang.String version)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AssetIdentification

public AssetIdentification()
Construct an empty identification.

Since:
7.1.1

AssetIdentification

public AssetIdentification(java.lang.String GUID,
                           java.lang.String version)
Convenience constructor to create fully filled in. Pending flag will default to false Repository ID will default to null

Parameters:
GUID - external id of the asset.
version - the version of the asset.
Since:
7.1.1

AssetIdentification

public AssetIdentification(java.lang.String GUID,
                           java.lang.String version,
                           boolean pending)
Convenience constructor to create fully filled in.

Parameters:
GUID - external id of the asset.
version - the version of the asset.
fPendingAsset - true if submission asset, false if not main asset. Repository ID will default to null
Since:
7.1.1

AssetIdentification

public AssetIdentification(java.lang.String GUID,
                           java.lang.String version,
                           boolean pending,
                           RepositoryIdentification repositoryIdentification)
Convenience constructor to create fully filled in.

Parameters:
GUID - external id of the asset.
version - the version of the asset.
fPendingAsset - true if submission asset, false if not main asset.
Since:
7.1.1
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getGUID

public java.lang.String getGUID()
Returns:
the unique id for this asset.
Since:
7.1

setGUID

public void setGUID(java.lang.String id)
Parameters:
the - unique id for this asset.
Since:
7.1

getVersion

public java.lang.String getVersion()
Returns:
the version of this asset.
Since:
7.1

setVersion

public void setVersion(java.lang.String version)
Parameters:
version - the version of this asset.
Since:
7.1

isPendingAsset

public boolean isPendingAsset()
Answer whether this is a pending asset or a main asset. A pending asset is a revision of an approved asset that is under review or in draft.

Returns:
true if this is a submission asset, false if this is the main asset.
Since:
7.1.1

setPendingAsset

public void setPendingAsset(boolean pendingAsset)
Set whether this is a pending asset or a main asset. A pending asset is a revision of an approved asset that is under review or in draft.

Parameters:
pendingAsset - true if this is a submission asset, false if this is the main asset.
Since:
7.1.1

getRepositoryIdentification

public RepositoryIdentification getRepositoryIdentification()
Optionally provide information about which repository this asset belongs to.

Returns:
Returns the repositoryIdentification. null if one is not available.
Since:
7.1.1

setRepositoryIdentification

public void setRepositoryIdentification(RepositoryIdentification repositoryIdentification)
Optionally set information about which repository this asset is from

Parameters:
repositoryIdentification - The repositoryIdentification to set.
Since:
7.1.1

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object