com.ibm.ram.client
Class RAMSession

java.lang.Object
  extended by com.ibm.ram.client.RAMSession

public class RAMSession
extends java.lang.Object

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.

Since:
7.1
Author:
kbauer, Srimanth Gunturi

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

RAM_7_1_0_0_SERVICES_VERSION

public static final java.lang.String RAM_7_1_0_0_SERVICES_VERSION
The server is version 7.1.0.0

Since:
7.1.1

RAM_7_1_0_1_SERVICES_VERSION

public static final java.lang.String RAM_7_1_0_1_SERVICES_VERSION
The server is version 7.1.0.1

Since:
7.1.1

RAM_7_1_1_0_SERVICES_VERSION

public static final java.lang.String RAM_7_1_1_0_SERVICES_VERSION
The server is version 7.1.1.0

Since:
7.1.1

RAM_7_1_1_1_SERVICES_VERSION

public static final java.lang.String RAM_7_1_1_1_SERVICES_VERSION
The server is version 7.1.1.1

Since:
7.2

RAM_7_2_0_0_SERVICES_VERSION

public static final java.lang.String RAM_7_2_0_0_SERVICES_VERSION
The server is version 7.2.0.0

Since:
7.2

RAM_7_2_0_1_SERVICES_VERSION

public static final java.lang.String RAM_7_2_0_1_SERVICES_VERSION
The server is version 7.2.0.1

Since:
7.2.0.1

RAM_7_2_0_2_SERVICES_VERSION

public static final java.lang.String RAM_7_2_0_2_SERVICES_VERSION
The server is version 7.2.0.2

Since:
7.2.0.2

RAM_7_5_0_0_SERVICES_VERSION

public static final java.lang.String RAM_7_5_0_0_SERVICES_VERSION
The server is version 7.5

Since:
7.5

RAM_7_5_0_1_SERVICES_VERSION

public static final java.lang.String RAM_7_5_0_1_SERVICES_VERSION
The server is version 7.5.0.1

Since:
7.5.0.1

RAM_7_5_0_2_SERVICES_VERSION

public static final java.lang.String RAM_7_5_0_2_SERVICES_VERSION
The server is version 7.5.0.2

Since:
7.5.0.2

RAM_7_5_1_0_SERVICES_VERSION

public static final java.lang.String RAM_7_5_1_0_SERVICES_VERSION
The server is version 7.5.1

Since:
7.5.1
Constructor Detail

RAMSession

protected RAMSession()

RAMSession

public RAMSession(java.lang.String ramLocation,
                  java.lang.String userName,
                  java.lang.String password)
           throws RAMRuntimeException
Connect to a Rational Asset Manager Server

Parameters:
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 with
password - The user's password
Throws:
RAMRuntimeException
Since:
7.1

RAMSession

public RAMSession(java.lang.String ramLocation,
                  java.lang.String userName,
                  java.lang.String password,
                  java.lang.String onBehalfOfUserId)
           throws RAMRuntimeException
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.

Parameters:
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 with
password - The user's password
Throws:
RAMRuntimeException
Since:
7.2
Method Detail

primCreateClient

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
Throws:
java.lang.SecurityException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException

getAsset

public RAMAsset getAsset(AssetIdentification id)
Fetches the asset metadata from the server. Once you have the asset call the downloadContents() method to download the asset as a RAS file. The * character can be used as a wild card in the version string to fecth the latest version for a pattern branch. i.e. assets with the same guid and version 1.0 1.1.1 and 2 version = "*" will return version 2 of the asset. version = "1.*" would retrun version 1.1.1

Parameters:
AssetIdentification - unique id for the Asset to be fetched
Throws:
RAMRuntimeException
Since:
7.1.1

getAsset

public RAMAsset getAsset(java.lang.String GUID,
                         java.lang.String version)
                  throws RAMRuntimeException
Deprecated. use getAsset(AssetIdentification)

Fetches the asset metadata from the server. Once you have the asset call the downloadContents() method to download the asset as a RAS file. The * character can be used as a wild card in the version string to fecth the latest version for a pattern branch. i.e. assets with the same guid and version 1.0 1.1.1 and 2 version = "*" will return version 2 of the asset. version = "1.*" would retrun version 1.1.1

Parameters:
GUID -
version -
Throws:
RAMRuntimeException
Since:
7.1

getCommunitiesUserCanSubmitTo

public RAMCommunity[] getCommunitiesUserCanSubmitTo()
                                             throws RAMRuntimeException
Returns the communities in which the user has permission to submit assets.

Throws:
RAMRuntimeException
Since:
7.1.1

getAsset

public RAMAsset getAsset(java.lang.String GUID)
                  throws RAMRuntimeException
Deprecated. use getAsset(AssetIdentification)

Fetches the asset metadata from the server. Once you have the asset call the downloadContents() method to download the asset as a RAS file. Fetches the latest version of the asset. i.e. assets with the same guid and version 1.0 1.1.1 and 2 version = "*" will return version 2 of the asset. version = "1.*" would retrun version 1.1.1

Parameters:
GUID -
version -
Returns:
Throws:
RAMRuntimeException
Since:
7.1

createAssetQuery

public SearchQuery createAssetQuery(java.lang.String queryText)
Constructs a simple search query. This is equal to typing a search string into the Search text box. You can also use a search short cut captured from the Rich or Web clients This will return an instance of the RAMAssetQueryBuilder which can be used for more complex querying. You can also construct a RAMAssetQueryBuilder with new RAMAssetQueryBuilder(session) passing in your session

Parameters:
queryText -
Returns:
Since:
7.1
See Also:
RAMAssetQueryBuilder, RAMQueryBuilder

getAssets

public SearchResult getAssets(SearchQuery query)
                       throws RAMRuntimeException
Return a list of Assets that match the criteria of the given query.

Parameters:
query -
Throws:
RAMRuntimeException
Since:
7.1

getModifiedAssets

public RAMAsset[] getModifiedAssets()
Returns a list of assets that have been modified or newly created.

Since:
7.1

getQueuedAssets

public RAMAsset[] getQueuedAssets()
Returns a list of assets queued up for putAssets()

Since:
7.1
See Also:
RAMSession#putAssets()

getModifiedAsset

public RAMAsset getModifiedAsset(AssetIdentification id)
Returns the asset if we have a local modified version. Or it returns null if one does not exist.

Parameters:
id - AssetIdentifaction of the Asset you are looking for.
Since:
7.1.1

getModifiedAsset

public RAMAsset getModifiedAsset(java.lang.String GUID,
                                 java.lang.String version)
Deprecated. use getModifiedAsset(AssetIdentification)

Returns the asset if we have a local modified version. Or it returns null if one does not exist.

Since:
7.1

createAsset

public 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

Since:
7.1

createAsset

public 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

Since:
7.1

primCreateAsset

protected RAMAsset primCreateAsset(java.lang.String GUID,
                                   java.lang.String version,
                                   int managementStyle)
Create an empty asset to populate for upload. Sets the management style of the asset. The asset will have the GUID and version passed in The Asset is not created on the server until you call update to commitChanges

Since:
7.5.1

createAsset

public RAMAsset createAsset(Asset asset)
Deprecated. createAsset(Asset, RAMStatusMonitor)

This will create a duplicate of the asset passed in. It will copy over as much information from the passed in asset as possible A new GUID will be created for this asset The will be set to the version passed in The Asset is not created on the server until you call update to commitChanges If an AssetIdentifaction object is available on the Asset the GUID and version from that will be used if not the GUID and version on the Asset will be used.

Since:
7.1

createAsset

public RAMAsset createAsset(Asset asset,
                            RAMStatusMonitor monitor)
This will create a duplicate of the asset passed in. It will copy over as much information from the passed in asset as possible A new GUID will be created for this asset The will be set to the version passed in The Asset is not created on the server until you call update to commitChanges If an AssetIdentifaction object is available on the Asset the GUID and version from that will be used if not the GUID and version on the Asset will be used.

Since:
7.1.1.1

createAsset

public RAMAsset createAsset(Asset asset,
                            java.lang.String GUID)
Deprecated. createAsset(Asset, String, RAMStatusMonitor)

This will create a duplicate of the asset passed in. It will copy over as much information from the passed in asset as possible A new GUID will be the GUID passed in The version will be the same as the version of the asset passed in The Asset is not created on the server until you call update to commitChanges If an AssetIdentifaction object is available on the Asset the version from that will be used if not the version on the Asset will be used.

Since:
7.1

createAsset

public RAMAsset createAsset(Asset asset,
                            java.lang.String GUID,
                            RAMStatusMonitor monitor)
This will create a duplicate of the asset passed in. It will copy over as much information from the passed in asset as possible A new GUID will be the GUID passed in The version will be the same as the version of the asset passed in The Asset is not created on the server until you call update to commitChanges If an AssetIdentifaction object is available on the Asset the version from that will be used if not the version on the Asset will be used.

Since:
7.1.1.1

createAsset

public RAMAsset createAsset(Asset asset,
                            java.lang.String GUID,
                            java.lang.String version)
Deprecated. use createAsset(Asset, String, String, RAMStatusMonitor)

This will create a duplicate of the asset passed in. It will copy over as much information from the passed in asset as possible A new GUID will be the GUID passed in The version will be the same as the version of the asset passed in The Asset is not created on the server until you call update to commitChanges

Since:
7.1

createAsset

public RAMAsset createAsset(Asset asset,
                            java.lang.String GUID,
                            java.lang.String version,
                            RAMStatusMonitor monitor)
This will create a duplicate of the asset passed in. It will copy over as much information from the passed in asset as possible A new GUID will be the GUID passed in The version will be the same as the version of the asset passed in The Asset is not created on the server until you call update to commitChanges

Since:
7.1.1.1

createAssetNewVersion

public RAMAsset createAssetNewVersion(Asset asset,
                                      java.lang.String version)
Deprecated. use createAssetNewVersion(Asset, String, RAMStatusMonitor)

This will create a duplicate of the asset passed in. It will copy over as much information from the passed in asset as possible A new GUID will be the GUID passed in The version will be the same as the version of the asset passed in The Asset is not created on the server until you call update to commitChanges If an AssetIdentifaction object is available on the Asset the version from that will be used if not the version on the Asset will be used.

Since:
7.1

createAssetNewVersion

public RAMAsset createAssetNewVersion(Asset asset,
                                      java.lang.String version,
                                      RAMStatusMonitor monitor)
This will create a duplicate of the asset passed in. It will copy over as much information from the passed in asset as possible A new GUID will be the GUID passed in The version will be the same as the version of the asset passed in The Asset is not created on the server until you call update to commitChanges If an AssetIdentifaction object is available on the Asset the version from that will be used if not the version on the Asset will be used.

Since:
7.1.1.1

replaceAssetNewVersion

public RAMAsset replaceAssetNewVersion(Asset asset,
                                       java.lang.String version)
This will create a duplicate of the asset passed in. It will copy over as much information from the passed in asset as possible. On commit this asset will replace the asset on the server with the old GUI and version with this asset with the same GUID but a different version. The Asset is not created on the server until you call update to commitChanges

Since:
7.1

createAssetType

public 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

Since:
7.1

createCategorySchema

public RAMCategorySchema createCategorySchema(java.lang.String name)
Create a new category schema to populate for upload

Since:
7.1

createCommunity

public RAMCommunity createCommunity(java.lang.String name)
Create a new community to populate for upload

Since:
7.1

createCommunityAssetType

public RAMCommunityAssetType createCommunityAssetType(java.lang.String name,
                                                      CommunityInformation community)
Returns a community scoped asset type

Parameters:
name -
community -
Since:
7.1

getCommunityAssetType

public RAMCommunityAssetType getCommunityAssetType(AssetType master,
                                                   CommunityInformation community)
Returns a community scoped asset type

Parameters:
name -
community -
Since:
7.1

getWebServiceTimeout

public int getWebServiceTimeout()
Returns the number of seconds the HTTP service timeout is set for

Since:
7.2

setWebServiceTimeout

public void setWebServiceTimeout(int seconds)
Sets the socket inactivity time out for HTTP communications in seconds

Parameters:
seconds -
Since:
7.2

getUploadTimeout

public int getUploadTimeout()
Returns the number of seconds the HTTP upload timeout is set for

Since:
7.2

setUploadTimeout

public void setUploadTimeout(int seconds)
Sets the socket inactivity time out for HTTP communications in seconds

Parameters:
seconds -
Since:
7.2

createAssetAttribute

public RAMAssetAttribute createAssetAttribute(java.lang.String name)
Create a new asset attribute to populate for upload

Since:
7.1

createRelationshipType

public RAMRelationshipType createRelationshipType(java.lang.String name,
                                                  java.lang.String reverseName)
Create a new relationship type to populate for upload

Since:
7.1

clear

public void clear()
Clears out cached asset objects

Since:
7.1

clear

protected void clear(boolean includeMetaModel)
Clears out cached all session objects

Since:
7.5

getCommunity

public RAMCommunity getCommunity(java.lang.String name)
                          throws RAMRuntimeException
Fetch a community by name

Returns:
The RAM community with the given name
Throws:
RAMRuntimeException
Since:
7.1

getCategorySchema

public RAMCategorySchema getCategorySchema(java.lang.String name)
Fetch a category schema by name

Parameters:
name -
Since:
7.1

getAllAssetAttributes

public RAMAssetAttribute[] getAllAssetAttributes()
                                          throws RAMRuntimeException
Returns all custom attributes defined on the server

Throws:
RAMRuntimeException
Since:
7.1

getAssetAttribute

public RAMAssetAttribute getAssetAttribute(java.lang.String name)
Returns an asset attribute definition by name

Parameters:
name -
Since:
7.1

getAssetAttributeByURI

public RAMAssetAttribute getAssetAttributeByURI(java.lang.String uri)
Returns an asset attribute definition by URI

Parameters:
uri -
Since:
7.1

getCategorySchemaByURI

public RAMCategorySchema getCategorySchemaByURI(java.lang.String uri)
Returns a category schema by URI

Parameters:
name -
Since:
7.1

getCommunity

public RAMCommunity getCommunity(int id)
                          throws RAMRuntimeException
Fetch a Community by database id

Returns:
The RAM community with the given name
Throws:
RAMRuntimeException
Since:
7.1

getAllCommunities

public RAMCommunity[] getAllCommunities()
                                 throws RAMRuntimeException
Returns all Communities defined on the server

Throws:
RAMRuntimeException
Since:
7.1

getCommunitiesUserAdministers

public RAMCommunity[] getCommunitiesUserAdministers()
Returns all Communities that this user is admin for

Throws:
RAMRuntimeException
Since:
7.1

getAllCategorySchemas

public RAMCategorySchema[] getAllCategorySchemas()
                                          throws RAMRuntimeException
Fetch all category schemas defined on the server

Throws:
RAMRuntimeException
Since:
7.1

getAllAssetTypes

public RAMAssetType[] getAllAssetTypes()
                                throws RAMRuntimeException
Returns all Asset Types defined on the server

Throws:
RAMRuntimeException
Since:
7.1

getAssetType

public RAMAssetType getAssetType(java.lang.String name)
                          throws RAMRuntimeException
Fetch an Asset Type by name

Returns:
The RAM AssetType with the given name
Throws:
RAMRuntimeException
Since:
7.1

getAssetTypeByURI

public RAMAssetType getAssetTypeByURI(java.lang.String uri)
                               throws RAMRuntimeException
Fetch and Asset Type by URI

Returns:
The RAM AssetType with the given name
Throws:
RAMRuntimeException
Since:
7.1

getServicesVersion

public java.lang.String getServicesVersion()
                                    throws RAMRuntimeException
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

Returns:
Throws:
RAMRuntimeException
Since:
7.1.1

getState

public RAMState getState(java.lang.String name)
Returns a RAMState object for a given name.

Parameters:
name -
Since:
7.1.1.1

getStateById

public RAMState getStateById(int id)
Retrun the RAMState object for a given id

Parameters:
id -
Since:
7.1.1.1

compareServicesVersion

public int compareServicesVersion(java.lang.String version)
                           throws RAMRuntimeException
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

Parameters:
version -
Throws:
RAMRuntimeException
Since:
7.1.1

getUser

public RAMUser getUser(java.lang.String userid)
                throws RAMRuntimeException
Fetch a User by userid. If the user is not registered you will get back a new user object with only the userid set and isRegisted() set to false.

Returns:
The RAM User with the given userid
Throws:
RAMRuntimeException
Since:
7.1

getAllRelationshipTypes

public RAMRelationshipType[] getAllRelationshipTypes()
                                              throws RAMRuntimeException
Returns all Relationship Types defined on the server

Throws:
RAMRuntimeException
Since:
7.1

getRelationshipType

public RAMRelationshipType getRelationshipType(java.lang.String name)
                                        throws RAMRuntimeException
Fetch a relationship type by name. This method will return a relationship type by name if an exact match exists. If not it will try to find an exact match by display name.

Returns:
The RAM Asset Relationship with the given display name
Throws:
RAMRuntimeException
Since:
7.1

getIdentification

public RepositoryIdentification getIdentification()
Returns a copy of this Session's repository identification. This includes the Unique ID for this RAM Repository, loginid of the user and URL. Changes to these objects will not effect the Identification of this session.

Returns:
Since:
7.1.1

putAssets

public RAMStatus putAssets(IProgressMonitor monitor)
                    throws RAMRuntimeException,
                           java.io.IOException
Commits all changes to the server

Parameters:
clearLocalCache - set to true if you would like to clear assets on successful commit
Throws:
RAMRuntimeException
java.io.IOException
Since:
7.1

getLocale

public java.util.Locale getLocale()
The local which to connect to the server as.

Since:
7.1

getLibraries

public RAMLibrary[] getLibraries()
All the libraries defined on the system

Returns:
Since:
7.1.1

getLibrary

public RAMLibrary getLibrary(AssetIdentification id)
Fetch a Library Definition by GUID and version

Parameters:
id - The AssetIdentification contining the GUID and version of the Library
Returns:
Since:
7.1.1

setLocale

public void setLocale(java.util.Locale locale)
Set the local you will connect to the server as. Default is Locale.getDefault()

Parameters:
locale -
Since:
7.1

getLocalStorageLocation

public java.lang.String getLocalStorageLocation()
Get the location to store assets locally during upload and download

Returns:
Since:
7.5.1

setLocalStorageLocation

public void setLocalStorageLocation(java.lang.String localStorageLocation)
Overwrite where we store assets locally during upload and download

Parameters:
localStorageLocation -
Since:
7.1

getWebServerURL

public java.lang.String getWebServerURL()
Returns the recommended Web Services URL for this session.

Since:
7.5.0.1

getWebServicesURL

public java.lang.String getWebServicesURL()
Returns the recommended Web Services URL for this session.

Since:
7.5.0.1

getRAMServerURL

public java.lang.String getRAMServerURL()
Deprecated. use RAMSession#getIdentification()#getServerURL()

Return the Web Services URL used to construct this session.

Since:
7.1

getRAMServerLoginid

public java.lang.String getRAMServerLoginid()
Deprecated. use RAMSession#getIdentification()#getLoginID()

Returns the login id of the user who created this session.

Since:
7.1

getUser

public RAMUser getUser()
                throws RAMRuntimeException
Returns the User Object of the user who created this session

Throws:
RAMRuntimeException
Since:
7.1

remove

public void remove(com.ibm.ram.client.IRAMSessionObject cachedObject)
Remove an object from the local cache. This will remove an object like Asset from the local cache

Parameters:
cache -
Since:
7.1

put

public RAMStatus put(com.ibm.ram.client.IRAMSessionObject cachedObject,
                     IProgressMonitor monitor)
Pushes all changes to a local object up to the server

Parameters:
cached - object
Since:
7.1

queueAssetForPut

public 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.

Parameters:
cached - object
Since:
7.1
See Also:
putAssets(IProgressMonitor)

queueAssetForPut

public 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.

Parameters:
cached - object
force - try to force the asset submission (overwrite any existing asset)
Since:
7.1
See Also:
putAssets(IProgressMonitor)

dequeueAssetForPut

public void dequeueAssetForPut(RAMAsset asset)
Dequeue a work item

Parameters:
cached - object
Since:
7.1

setUser

public void setUser(RAMUser user)
Set the owner of this session TODO should we have this. I am not sure this should be possible without re-authenticating.

Parameters:
user -
Since:
7.1

release

public void release()
This is called to release the session from shared memory and free any RAM licenses taken by the session.

Since:
7.1.0.1

getOnBehalfOfUser

public 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.

Returns:
User the session is on behlf of or null if on behalf is not set
Since:
7.2

setRAMClient

protected void setRAMClient(AbstractRAMClient ramClient)

isServerMode

protected boolean isServerMode()

getSessionTempDir

protected java.lang.String getSessionTempDir()

setOverrideValidation

public void setOverrideValidation(boolean overrideValidation)
This option allows for updating of assets without running verifications and lifecycle processes. Some basic verifications like missing asset name, asset GUID, asset version, asset community, etc. will be done. This does not apply when submitting new assets, or creating new versions of an asset (leaving old version intact) via update. Due to the potential for destabilization, this option will work only for community & repository administrators. Setting this option by other users will result in an exception during updating.

Parameters:
overrideValidation -
Since:
7.5.1

isOverrideValidation

public boolean isOverrideValidation()
Returns whether asset validation errors will be ignored during asset update

Returns:
Since:
7.5.1