|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.ram.client.RAMSession
public class RAMSession
Represents the entry point to interact with Rational Asset Manager from a client. A session object can be instantiated by passing in the Web Service URL and user login ID and password. The Web Service URL is on the Extensions page of the Rational Asset Manager web client. If you integrate with the Rational Asset Manager rich client, you can also use com.ibm.ram.rich.core.RichClientCorePlugin.createClientSession(IRepositoryIdentifier repository) to construct a session from a workbench connection.
| Field Summary | |
|---|---|
static java.lang.String |
RAM_7_1_0_0_SERVICES_VERSION
The server is version 7.1.0.0 |
static java.lang.String |
RAM_7_1_0_1_SERVICES_VERSION
The server is version 7.1.0.1 |
static java.lang.String |
RAM_7_1_1_0_SERVICES_VERSION
The server is version 7.1.1.0 |
static java.lang.String |
RAM_7_1_1_1_SERVICES_VERSION
The server is version 7.1.1.1 |
static java.lang.String |
RAM_7_2_0_0_SERVICES_VERSION
The server is version 7.2.0.0 |
static java.lang.String |
RAM_7_2_0_1_SERVICES_VERSION
The server is version 7.2.0.1 |
static java.lang.String |
RAM_7_2_0_2_SERVICES_VERSION
The server is version 7.2.0.2 |
static java.lang.String |
RAM_7_5_0_0_SERVICES_VERSION
The server is version 7.5 |
static java.lang.String |
RAM_7_5_0_1_SERVICES_VERSION
The server is version 7.5.0.1 |
static java.lang.String |
RAM_7_5_0_2_SERVICES_VERSION
The server is version 7.5.0.2 |
static java.lang.String |
RAM_7_5_1_0_SERVICES_VERSION
The server is version 7.5.1 |
| Constructor Summary | |
|---|---|
protected |
RAMSession()
|
|
RAMSession(java.lang.String ramLocation,
java.lang.String userName,
java.lang.String password)
Connect to a Rational Asset Manager Server |
|
RAMSession(java.lang.String ramLocation,
java.lang.String userName,
java.lang.String password,
java.lang.String onBehalfOfUserId)
Connect to a Rational Asset Manager Server A repository admin may set the onBehalfOfUser to any userid when set all API calls will be made as if they were made by the set User. |
| Method Summary | |
|---|---|
void |
clear()
Clears out cached asset objects |
protected void |
clear(boolean includeMetaModel)
Clears out cached all session objects |
int |
compareServicesVersion(java.lang.String version)
Returns 0 if the versions are the same version Returns 1 if the passed in version is less than the current server version Returns -1 if the passed in version is greater than the connected version |
RAMAsset |
createAsset(Asset asset)
Deprecated. createAsset(Asset, RAMStatusMonitor) |
RAMAsset |
createAsset(Asset asset,
RAMStatusMonitor monitor)
This will create a duplicate of the asset passed in. |
RAMAsset |
createAsset(Asset asset,
java.lang.String GUID)
Deprecated. createAsset(Asset, String, RAMStatusMonitor) |
RAMAsset |
createAsset(Asset asset,
java.lang.String GUID,
RAMStatusMonitor monitor)
This will create a duplicate of the asset passed in. |
RAMAsset |
createAsset(Asset asset,
java.lang.String GUID,
java.lang.String version)
Deprecated. use createAsset(Asset, String, String, RAMStatusMonitor) |
RAMAsset |
createAsset(Asset asset,
java.lang.String GUID,
java.lang.String version,
RAMStatusMonitor monitor)
This will create a duplicate of the asset passed in. |
RAMAsset |
createAsset(java.lang.String version)
Create an empty asset to populate for upload A new GUID will be created for this asset The version is passed in The Asset is not created on the server until you call update to commitChanges |
RAMAsset |
createAsset(java.lang.String GUID,
java.lang.String version)
Create an empty asset to populate for upload The asset will have the GUID and version passed in The Asset is not created on the server until you call update to commitChanges |
RAMAssetAttribute |
createAssetAttribute(java.lang.String name)
Create a new asset attribute to populate for upload |
RAMAsset |
createAssetNewVersion(Asset asset,
java.lang.String version)
Deprecated. use createAssetNewVersion(Asset, String, RAMStatusMonitor) |
RAMAsset |
createAssetNewVersion(Asset asset,
java.lang.String version,
RAMStatusMonitor monitor)
This will create a duplicate of the asset passed in. |
SearchQuery |
createAssetQuery(java.lang.String queryText)
Constructs a simple search query. |
RAMAssetType |
createAssetType(java.lang.String name)
Create a new asset type to populate for upload The AssetType is not created on the server until you call update to commitChanges |
RAMCategorySchema |
createCategorySchema(java.lang.String name)
Create a new category schema to populate for upload |
RAMCommunity |
createCommunity(java.lang.String name)
Create a new community to populate for upload |
RAMCommunityAssetType |
createCommunityAssetType(java.lang.String name,
CommunityInformation community)
Returns a community scoped asset type |
RAMRelationshipType |
createRelationshipType(java.lang.String name,
java.lang.String reverseName)
Create a new relationship type to populate for upload |
void |
dequeueAssetForPut(RAMAsset asset)
Dequeue a work item |
RAMAssetAttribute[] |
getAllAssetAttributes()
Returns all custom attributes defined on the server |
RAMAssetType[] |
getAllAssetTypes()
Returns all Asset Types defined on the server |
RAMCategorySchema[] |
getAllCategorySchemas()
Fetch all category schemas defined on the server |
RAMCommunity[] |
getAllCommunities()
Returns all Communities defined on the server |
RAMRelationshipType[] |
getAllRelationshipTypes()
Returns all Relationship Types defined on the server |
RAMAsset |
getAsset(AssetIdentification id)
Fetches the asset metadata from the server. |
RAMAsset |
getAsset(java.lang.String GUID)
Deprecated. use getAsset(AssetIdentification) |
RAMAsset |
getAsset(java.lang.String GUID,
java.lang.String version)
Deprecated. use getAsset(AssetIdentification) |
RAMAssetAttribute |
getAssetAttribute(java.lang.String name)
Returns an asset attribute definition by name |
RAMAssetAttribute |
getAssetAttributeByURI(java.lang.String uri)
Returns an asset attribute definition by URI |
SearchResult |
getAssets(SearchQuery query)
Return a list of Assets that match the criteria of the given query. |
RAMAssetType |
getAssetType(java.lang.String name)
Fetch an Asset Type by name |
RAMAssetType |
getAssetTypeByURI(java.lang.String uri)
Fetch and Asset Type by URI |
RAMCategorySchema |
getCategorySchema(java.lang.String name)
Fetch a category schema by name |
RAMCategorySchema |
getCategorySchemaByURI(java.lang.String uri)
Returns a category schema by URI |
RAMCommunity[] |
getCommunitiesUserAdministers()
Returns all Communities that this user is admin for |
RAMCommunity[] |
getCommunitiesUserCanSubmitTo()
Returns the communities in which the user has permission to submit assets. |
RAMCommunity |
getCommunity(int id)
Fetch a Community by database id |
RAMCommunity |
getCommunity(java.lang.String name)
Fetch a community by name |
RAMCommunityAssetType |
getCommunityAssetType(AssetType master,
CommunityInformation community)
Returns a community scoped asset type |
RepositoryIdentification |
getIdentification()
Returns a copy of this Session's repository identification. |
RAMLibrary[] |
getLibraries()
All the libraries defined on the system |
RAMLibrary |
getLibrary(AssetIdentification id)
Fetch a Library Definition by GUID and version |
java.util.Locale |
getLocale()
The local which to connect to the server as. |
java.lang.String |
getLocalStorageLocation()
Get the location to store assets locally during upload and download |
RAMAsset |
getModifiedAsset(AssetIdentification id)
Returns the asset if we have a local modified version. |
RAMAsset |
getModifiedAsset(java.lang.String GUID,
java.lang.String version)
Deprecated. use getModifiedAsset(AssetIdentification) |
RAMAsset[] |
getModifiedAssets()
Returns a list of assets that have been modified or newly created. |
RAMUser |
getOnBehalfOfUser()
A repository admin may set the onBehalfOfUser to any user when set all API calls will be made as if they were made by the set User. |
RAMAsset[] |
getQueuedAssets()
Returns a list of assets queued up for putAssets() |
java.lang.String |
getRAMServerLoginid()
Deprecated. use RAMSession#getIdentification()#getLoginID() |
java.lang.String |
getRAMServerURL()
Deprecated. use RAMSession#getIdentification()#getServerURL() |
RAMRelationshipType |
getRelationshipType(java.lang.String name)
Fetch a relationship type by name. |
java.lang.String |
getServicesVersion()
Returns the version of the Web Services on the server you are connecting to RAM version 7.1.0.0 = 11.0.0.0 RAM version 7.1.0.1 = 11.0.1.0 |
protected java.lang.String |
getSessionTempDir()
|
RAMState |
getState(java.lang.String name)
Returns a RAMState object for a given name. |
RAMState |
getStateById(int id)
Retrun the RAMState object for a given id |
int |
getUploadTimeout()
Returns the number of seconds the HTTP upload timeout is set for |
RAMUser |
getUser()
Returns the User Object of the user who created this session |
RAMUser |
getUser(java.lang.String userid)
Fetch a User by userid. |
java.lang.String |
getWebServerURL()
Returns the recommended Web Services URL for this session. |
java.lang.String |
getWebServicesURL()
Returns the recommended Web Services URL for this session. |
int |
getWebServiceTimeout()
Returns the number of seconds the HTTP service timeout is set for |
boolean |
isOverrideValidation()
Returns whether asset validation errors will be ignored during asset update |
protected boolean |
isServerMode()
|
protected RAMAsset |
primCreateAsset(java.lang.String GUID,
java.lang.String version,
int managementStyle)
Create an empty asset to populate for upload. |
protected AbstractRAMClient |
primCreateClient(java.net.URL ramLocation,
java.lang.String userName,
java.lang.String password,
java.lang.String onBehalfOfUserId)
|
RAMStatus |
put(com.ibm.ram.client.IRAMSessionObject cachedObject,
IProgressMonitor monitor)
Pushes all changes to a local object up to the server |
RAMStatus |
putAssets(IProgressMonitor monitor)
Commits all changes to the server |
void |
queueAssetForPut(RAMAsset asset)
Adds the asset to a Queue to batch upload assets Use the method putAssets(IProgressMonitor)to upload all assets on the queue. |
void |
queueAssetForPut(RAMAsset asset,
boolean force)
Adds the asset to a Queue to batch upload assets Use the method putAssets(IProgressMonitor)to upload all assets on the queue. |
void |
release()
This is called to release the session from shared memory and free any RAM licenses taken by the session. |
void |
remove(com.ibm.ram.client.IRAMSessionObject cachedObject)
Remove an object from the local cache. |
RAMAsset |
replaceAssetNewVersion(Asset asset,
java.lang.String version)
This will create a duplicate of the asset passed in. |
void |
setLocale(java.util.Locale locale)
Set the local you will connect to the server as. |
void |
setLocalStorageLocation(java.lang.String localStorageLocation)
Overwrite where we store assets locally during upload and download |
void |
setOverrideValidation(boolean overrideValidation)
This option allows for updating of assets without running verifications and lifecycle processes. |
protected void |
setRAMClient(AbstractRAMClient ramClient)
|
void |
setUploadTimeout(int seconds)
Sets the socket inactivity time out for HTTP communications in seconds |
void |
setUser(RAMUser user)
Set the owner of this session TODO should we have this. |
void |
setWebServiceTimeout(int seconds)
Sets the socket inactivity time out for HTTP communications in seconds |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String RAM_7_1_0_0_SERVICES_VERSION
public static final java.lang.String RAM_7_1_0_1_SERVICES_VERSION
public static final java.lang.String RAM_7_1_1_0_SERVICES_VERSION
public static final java.lang.String RAM_7_1_1_1_SERVICES_VERSION
public static final java.lang.String RAM_7_2_0_0_SERVICES_VERSION
public static final java.lang.String RAM_7_2_0_1_SERVICES_VERSION
public static final java.lang.String RAM_7_2_0_2_SERVICES_VERSION
public static final java.lang.String RAM_7_5_0_0_SERVICES_VERSION
public static final java.lang.String RAM_7_5_0_1_SERVICES_VERSION
public static final java.lang.String RAM_7_5_0_2_SERVICES_VERSION
public static final java.lang.String RAM_7_5_1_0_SERVICES_VERSION
| Constructor Detail |
|---|
protected RAMSession()
public RAMSession(java.lang.String ramLocation,
java.lang.String userName,
java.lang.String password)
throws RAMRuntimeException
ramLocation - The URL of the RAM server for example
http://ramserver.myco.com:8080/ram.ws. The URL may be found on
the extensions page of your RAM web application.userName - The user id to log into Rational Asset Manager withpassword - The user's password
RAMRuntimeException
public RAMSession(java.lang.String ramLocation,
java.lang.String userName,
java.lang.String password,
java.lang.String onBehalfOfUserId)
throws RAMRuntimeException
ramLocation - The URL of the RAM server for example
http://ramserver.myco.com:8080/ram.ws. The URL may be found on
the extensions page of your RAM web application.userName - The user id to log into Rational Asset Manager withpassword - The user's password
RAMRuntimeException| Method Detail |
|---|
protected AbstractRAMClient primCreateClient(java.net.URL ramLocation,
java.lang.String userName,
java.lang.String password,
java.lang.String onBehalfOfUserId)
throws java.lang.SecurityException,
java.lang.NoSuchMethodException,
java.lang.IllegalArgumentException,
java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException,
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundExceptionpublic RAMAsset getAsset(AssetIdentification id)
AssetIdentification - unique id for the Asset to be fetched
RAMRuntimeException
public RAMAsset getAsset(java.lang.String GUID,
java.lang.String version)
throws RAMRuntimeException
getAsset(AssetIdentification)
GUID - version -
RAMRuntimeException
public RAMCommunity[] getCommunitiesUserCanSubmitTo()
throws RAMRuntimeException
RAMRuntimeException
public RAMAsset getAsset(java.lang.String GUID)
throws RAMRuntimeException
getAsset(AssetIdentification)
GUID - version -
RAMRuntimeExceptionpublic SearchQuery createAssetQuery(java.lang.String queryText)
queryText -
RAMAssetQueryBuilder,
RAMQueryBuilder
public SearchResult getAssets(SearchQuery query)
throws RAMRuntimeException
query -
RAMRuntimeExceptionpublic RAMAsset[] getModifiedAssets()
public RAMAsset[] getQueuedAssets()
RAMSession#putAssets()public RAMAsset getModifiedAsset(AssetIdentification id)
id - AssetIdentifaction of the Asset you are looking for.
public RAMAsset getModifiedAsset(java.lang.String GUID,
java.lang.String version)
getModifiedAsset(AssetIdentification)
public RAMAsset createAsset(java.lang.String version)
public RAMAsset createAsset(java.lang.String GUID,
java.lang.String version)
protected RAMAsset primCreateAsset(java.lang.String GUID,
java.lang.String version,
int managementStyle)
public RAMAsset createAsset(Asset asset)
createAsset(Asset, RAMStatusMonitor)
public RAMAsset createAsset(Asset asset,
RAMStatusMonitor monitor)
public RAMAsset createAsset(Asset asset,
java.lang.String GUID)
createAsset(Asset, String, RAMStatusMonitor)
public RAMAsset createAsset(Asset asset,
java.lang.String GUID,
RAMStatusMonitor monitor)
public RAMAsset createAsset(Asset asset,
java.lang.String GUID,
java.lang.String version)
createAsset(Asset, String, String, RAMStatusMonitor)
public RAMAsset createAsset(Asset asset,
java.lang.String GUID,
java.lang.String version,
RAMStatusMonitor monitor)
public RAMAsset createAssetNewVersion(Asset asset,
java.lang.String version)
createAssetNewVersion(Asset, String, RAMStatusMonitor)
public RAMAsset createAssetNewVersion(Asset asset,
java.lang.String version,
RAMStatusMonitor monitor)
public RAMAsset replaceAssetNewVersion(Asset asset,
java.lang.String version)
public RAMAssetType createAssetType(java.lang.String name)
public RAMCategorySchema createCategorySchema(java.lang.String name)
public RAMCommunity createCommunity(java.lang.String name)
public RAMCommunityAssetType createCommunityAssetType(java.lang.String name,
CommunityInformation community)
name - community -
public RAMCommunityAssetType getCommunityAssetType(AssetType master,
CommunityInformation community)
name - community - public int getWebServiceTimeout()
public void setWebServiceTimeout(int seconds)
seconds - public int getUploadTimeout()
public void setUploadTimeout(int seconds)
seconds - public RAMAssetAttribute createAssetAttribute(java.lang.String name)
public RAMRelationshipType createRelationshipType(java.lang.String name,
java.lang.String reverseName)
public void clear()
protected void clear(boolean includeMetaModel)
public RAMCommunity getCommunity(java.lang.String name)
throws RAMRuntimeException
RAMRuntimeExceptionpublic RAMCategorySchema getCategorySchema(java.lang.String name)
name -
public RAMAssetAttribute[] getAllAssetAttributes()
throws RAMRuntimeException
RAMRuntimeExceptionpublic RAMAssetAttribute getAssetAttribute(java.lang.String name)
name - public RAMAssetAttribute getAssetAttributeByURI(java.lang.String uri)
uri - public RAMCategorySchema getCategorySchemaByURI(java.lang.String uri)
name -
public RAMCommunity getCommunity(int id)
throws RAMRuntimeException
RAMRuntimeException
public RAMCommunity[] getAllCommunities()
throws RAMRuntimeException
RAMRuntimeExceptionpublic RAMCommunity[] getCommunitiesUserAdministers()
RAMRuntimeException
public RAMCategorySchema[] getAllCategorySchemas()
throws RAMRuntimeException
RAMRuntimeException
public RAMAssetType[] getAllAssetTypes()
throws RAMRuntimeException
RAMRuntimeException
public RAMAssetType getAssetType(java.lang.String name)
throws RAMRuntimeException
RAMRuntimeException
public RAMAssetType getAssetTypeByURI(java.lang.String uri)
throws RAMRuntimeException
RAMRuntimeException
public java.lang.String getServicesVersion()
throws RAMRuntimeException
RAMRuntimeExceptionpublic RAMState getState(java.lang.String name)
name - public RAMState getStateById(int id)
id -
public int compareServicesVersion(java.lang.String version)
throws RAMRuntimeException
version -
RAMRuntimeException
public RAMUser getUser(java.lang.String userid)
throws RAMRuntimeException
RAMRuntimeException
public RAMRelationshipType[] getAllRelationshipTypes()
throws RAMRuntimeException
RAMRuntimeException
public RAMRelationshipType getRelationshipType(java.lang.String name)
throws RAMRuntimeException
RAMRuntimeExceptionpublic RepositoryIdentification getIdentification()
public RAMStatus putAssets(IProgressMonitor monitor)
throws RAMRuntimeException,
java.io.IOException
clearLocalCache - set to true if you would like to clear assets on successful
commit
RAMRuntimeException
java.io.IOExceptionpublic java.util.Locale getLocale()
public RAMLibrary[] getLibraries()
public RAMLibrary getLibrary(AssetIdentification id)
id - The AssetIdentification contining the GUID and version of the Library
public void setLocale(java.util.Locale locale)
locale - public java.lang.String getLocalStorageLocation()
public void setLocalStorageLocation(java.lang.String localStorageLocation)
localStorageLocation - public java.lang.String getWebServerURL()
public java.lang.String getWebServicesURL()
public java.lang.String getRAMServerURL()
RAMSession#getIdentification()#getServerURL()
public java.lang.String getRAMServerLoginid()
RAMSession#getIdentification()#getLoginID()
public RAMUser getUser()
throws RAMRuntimeException
RAMRuntimeExceptionpublic void remove(com.ibm.ram.client.IRAMSessionObject cachedObject)
cache -
public RAMStatus put(com.ibm.ram.client.IRAMSessionObject cachedObject,
IProgressMonitor monitor)
cached - objectpublic void queueAssetForPut(RAMAsset asset)
cached - objectputAssets(IProgressMonitor)
public void queueAssetForPut(RAMAsset asset,
boolean force)
cached - objectforce - try to force the asset submission (overwrite any existing
asset)putAssets(IProgressMonitor)public void dequeueAssetForPut(RAMAsset asset)
cached - objectpublic void setUser(RAMUser user)
user - public void release()
public RAMUser getOnBehalfOfUser()
protected void setRAMClient(AbstractRAMClient ramClient)
protected boolean isServerMode()
protected java.lang.String getSessionTempDir()
public void setOverrideValidation(boolean overrideValidation)
overrideValidation - public boolean isOverrideValidation()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||