com.ibm.carma.model
Interface CARMAResource

All Superinterfaces:
CustomActionAccepter, org.eclipse.emf.ecore.EObject, org.eclipse.core.runtime.IAdaptable, org.eclipse.emf.common.notify.Notifier
All Known Subinterfaces:
CARMAContainer, CARMAContent, CARMAMember, CARMAMemberVersion, RepositoryInstance, ResourceContainer

public interface CARMAResource
extends CustomActionAccepter

A representation of the model object 'CARMA Resource'. A resource of the CARMA system representing content created by a Repository manager object

The following features are supported:

See Also:
ModelPackage.getCARMAResource()

Field Summary
static java.lang.String copyright
           
static java.lang.String NO_EXTENSION
          Contstant value for time when the user sets that no extension should be applied to the given resource
 
Method Summary
 CARMAReturn delete(org.eclipse.core.runtime.IProgressMonitor pm, boolean force, java.lang.Object[] parameters)
          Removes the CARMA Resource from the CARMA content hierarchy
 CARMAReturn delete(org.eclipse.core.runtime.IProgressMonitor pm, java.lang.Object[] parameters)
          Removes the CARMA Resource from the CARMA content hierarchy with the force option set to false
 CARMA getCARMA()
          Returns the CARMA connection manager associated with the CARMA resource
 java.lang.String getFileName()
          Returns the value of the 'File Name' attribute.
 java.util.Date getLastRefreshTime()
          Returns the value of the 'Last Refresh Time' attribute.
 java.lang.String getLocalExtension()
          Returns the value of the 'Local Extension' attribute.
 java.lang.String getMemberId()
          Returns the value of the 'Member Id' attribute.
 java.lang.String getMemberInfo(org.eclipse.core.runtime.IProgressMonitor pm, java.lang.String key, java.lang.Object[] parameters)
          Retrieves a specific piece of member information (meta-data) from the host relating to the CARMA resource.
 org.eclipse.emf.common.util.EMap getMemberInfoMap()
          Returns the value of the 'Member Info Map' map.
 java.lang.String getName()
          Returns the value of the 'Name' attribute.
 java.lang.String getRamExtension()
          Returns the value of the 'Ram Extension' attribute.
 RepositoryInstance getRepository()
          Returns the value of the 'Repository' reference.
 RepositoryManager getRepositoryManager()
          Returns the repository manager associated with the CARMA resource
 boolean isBinary()
          Returns the value of the 'Binary' attribute.
 boolean isSetBinary()
          Returns whether the value of the 'Binary' attribute is set.
 boolean isSetLocalExtension()
          Returns whether the value of the 'Local Extension' attribute is set.
 boolean isSetMemberInfoMap()
          Returns whether the value of the 'Member Info Map' map is set.
 boolean isSetRamExtension()
          Returns whether the value of the 'Ram Extension' attribute is set.
 void refreshMemberInfo(org.eclipse.core.runtime.IProgressMonitor pm, boolean sendNotification, java.lang.Object[] parameters)
          Updates the list of member information (meta-data) for all information relating to the CARMA resource on the host.
 void refreshRAMFileExtension(org.eclipse.core.runtime.IProgressMonitor pm, java.lang.Object[] parameters)
          Updates the file extension member information (meta-data) for the CARMA resource by querying the RAM for the file extension key on the host.
 void setBinary(boolean value)
          Sets the value of the 'Binary' attribute.
 void setLocalExtension(java.lang.String value)
          Sets the value of the 'Local Extension' attribute.
 void setMemberInfo(org.eclipse.core.runtime.IProgressMonitor pm, java.lang.String key, java.lang.String value, java.lang.Object[] parameters)
          Sets the value of a specific piece of member information (meta-data) for the CARMA resource on the host The setMemberInfo action specification can be located using the CustomActionAccepter.findActionFor(String) method and inspecting the action object returned.
 void setName(java.lang.String value)
          Sets the value of the 'Name' attribute.
 void unsetBinary()
          Unsets the value of the 'Binary' attribute.
 void unsetLocalExtension()
          Unsets the value of the 'Local Extension' attribute.
 
Methods inherited from interface com.ibm.carma.model.CustomActionAccepter
findActionFor, markActionUnsupported, performAction
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

copyright

static final java.lang.String copyright

See Also:
Constant Field Values

NO_EXTENSION

static final java.lang.String NO_EXTENSION
Contstant value for time when the user sets that no extension should be applied to the given resource

See Also:
Constant Field Values
Method Detail

getMemberId

java.lang.String getMemberId()
Returns the value of the 'Member Id' attribute. Unique identifier of the member.

Returns:
the value of the 'Member Id' attribute.
See Also:
ModelPackage.getCARMAResource_MemberId()

getName

java.lang.String getName()
Returns the value of the 'Name' attribute.

The name of the resource to display to user's navigating the CARMA content hierachy

Displayable name of the object

Returns:
the value of the 'Name' attribute.
See Also:
setName(String), ModelPackage.getCARMAResource_Name()

setName

void setName(java.lang.String value)
Sets the value of the 'Name' attribute.

Parameters:
value - the new value of the 'Name' attribute.
See Also:
getName()

getFileName

java.lang.String getFileName()
Returns the value of the 'File Name' attribute. The filename as suggested by the model for times when the resource should be written to the file system. The file name is usually the name of the resource appended with the (local) file extension for the resource.

Returns:
the value of the 'File Name' attribute.
See Also:
ModelPackage.getCARMAResource_FileName()

getLastRefreshTime

java.util.Date getLastRefreshTime()
Returns the value of the 'Last Refresh Time' attribute. The date/time of the last completed refresh

Returns:
the value of the 'Last Refresh Time' attribute.
See Also:
ModelPackage.getCARMAResource_LastRefreshTime()

getLocalExtension

java.lang.String getLocalExtension()
Returns the value of the 'Local Extension' attribute. The default value is "". The local extension to provide for the resource/children of the resource when viewing the resource contents

Returns:
the value of the 'Local Extension' attribute.
See Also:
isSetLocalExtension(), unsetLocalExtension(), setLocalExtension(String), ModelPackage.getCARMAResource_LocalExtension()

setLocalExtension

void setLocalExtension(java.lang.String value)
Sets the value of the 'Local Extension' attribute.

Parameters:
value - the new value of the 'Local Extension' attribute.
See Also:
isSetLocalExtension(), unsetLocalExtension(), getLocalExtension()

unsetLocalExtension

void unsetLocalExtension()
Unsets the value of the 'Local Extension' attribute. When the local extension is unset, the extension is inherited from the parent object

See Also:
isSetLocalExtension(), getLocalExtension(), setLocalExtension(String)

isSetLocalExtension

boolean isSetLocalExtension()
Returns whether the value of the 'Local Extension' attribute is set. When the value returned is "false", the extension is inherited from the parent object

Returns:
whether the value of the 'Local Extension' attribute is set.
See Also:
unsetLocalExtension(), getLocalExtension(), setLocalExtension(String)

getRamExtension

java.lang.String getRamExtension()
Returns the value of the 'Ram Extension' attribute. value of the local file extension as retrieved from the RAM in the resource member info

Returns:
the value of the 'Ram Extension' attribute.
See Also:
isSetRamExtension(), ModelPackage.getCARMAResource_RamExtension()

isSetRamExtension

boolean isSetRamExtension()
Returns whether the value of the 'Ram Extension' attribute is set.

Returns:
whether the value of the 'Ram Extension' attribute is set.
See Also:
getRamExtension()

isBinary

boolean isBinary()
Returns the value of the 'Binary' attribute. The default value is "false". Marks the CARMA member as a binary member. A binary member signals to the host that the contents of the member should not have codepage conversion or record delimiting performed

Returns:
the value of the 'Binary' attribute.
See Also:
isSetBinary(), unsetBinary(), setBinary(boolean), ModelPackage.getCARMAResource_Binary()

setBinary

void setBinary(boolean value)
Sets the value of the 'Binary' attribute.

Parameters:
value - the new value of the 'Binary' attribute.
See Also:
isSetBinary(), unsetBinary(), isBinary()

unsetBinary

void unsetBinary()
Unsets the value of the 'Binary' attribute. When the binary flag is unset, the binary attribute is inherited from the parent object

See Also:
isSetBinary(), isBinary(), setBinary(boolean)

isSetBinary

boolean isSetBinary()
Returns whether the value of the 'Binary' attribute is set. When this method returns "false", the binary attribute is inherited from the parent object

Returns:
whether the value of the 'Binary' attribute is set.
See Also:
unsetBinary(), isBinary(), setBinary(boolean)

getRepository

RepositoryInstance getRepository()
                                 throws java.lang.IllegalStateException
Returns the value of the 'Repository' reference. The repository instance which with the CARMAResource is associated

Returns:
the value of the 'Repository' reference.
Throws:
java.lang.IllegalStateException
See Also:
ModelPackage.getCARMAResource_Repository(), RepositoryInstance

getRepositoryManager

RepositoryManager getRepositoryManager()
                                       throws java.lang.IllegalStateException
Returns the repository manager associated with the CARMA resource

Returns:
repository manager associated with the resource
Throws:
java.lang.IllegalStateException - repository manager is not set

getCARMA

CARMA getCARMA()
               throws java.lang.IllegalStateException
Returns the CARMA connection manager associated with the CARMA resource

Returns:
CARMA object associated with the resource
Throws:
java.lang.IllegalStateException - CARMA connection manager is not set

getMemberInfoMap

org.eclipse.emf.common.util.EMap getMemberInfoMap()
                                                  throws NotSynchronizedException
Returns the value of the 'Member Info Map' map. The key is of type String, and the value is of type Object, Map of member information (meta-data) relating to the resource

Returns:
the value of the 'Member Info Map' map.
Throws:
NotSynchronizedException - Exception is thrown when the Member Info Map has not been initialized and requires a refreshMemberInfo(IProgressMonitor, boolean, Object[]) operation in order to initialize the attribute
See Also:
isSetMemberInfoMap(), ModelPackage.getCARMAResource_MemberInfoMap()

isSetMemberInfoMap

boolean isSetMemberInfoMap()
Returns whether the value of the 'Member Info Map' map is set. Returns true if the Member Info Map has been initialized

Returns:
whether the value of the 'Member Info Map' map is set.
See Also:
getMemberInfoMap()

delete

CARMAReturn delete(org.eclipse.core.runtime.IProgressMonitor pm,
                   java.lang.Object[] parameters)
                   throws org.eclipse.core.runtime.CoreException,
                          UnsupportedCARMAOperationException,
                          NotConnectedException
Removes the CARMA Resource from the CARMA content hierarchy with the force option set to false

The delete action specification can be located using the CustomActionAccepter.findActionFor(String) method and inspecting the action object returned. The parameter array is expected to consist of object values of the type defined by the action parameter list in the order specified by the parameter list.

The parameters array should:

Deletes the resource from the CARMA system

Parameters:
pm - progress monitor for the operation
parameters - the set of parameters required for the method to execute properly
Throws:
org.eclipse.core.runtime.CoreException - An error occured during execution of the command
NotConnectedException - The action could not be performed because the CARMA connection is not active.
UnsupportedCARMAOperationException - The action could not be performed because the action is not supported by the Repository Manager on the host
See Also:
delete(IProgressMonitor, boolean, Object[]), ActionIdentifier.DELETE

delete

CARMAReturn delete(org.eclipse.core.runtime.IProgressMonitor pm,
                   boolean force,
                   java.lang.Object[] parameters)
                   throws org.eclipse.core.runtime.CoreException,
                          UnsupportedCARMAOperationException,
                          NotConnectedException
Removes the CARMA Resource from the CARMA content hierarchy

The delete action specification can be located using the CustomActionAccepter.findActionFor(String) method and inspecting the action object returned. The parameter array is expected to consist of object values of the type defined by the action parameter list in the order specified by the parameter list.

The parameters array should:

Deletes the resource from the CARMA system

Parameters:
pm - progress monitor for the operation
force - set to true if the delete should be forced on the RAM
parameters - the set of parameters required for the method to execute properly
Throws:
org.eclipse.core.runtime.CoreException - An error occured during execution of the command
NotConnectedException - The action could not be performed because the CARMA connection is not active.
UnsupportedCARMAOperationException - The action could not be performed because the action is not supported by the Repository Manager on the host
See Also:
ActionIdentifier.DELETE

getMemberInfo

java.lang.String getMemberInfo(org.eclipse.core.runtime.IProgressMonitor pm,
                               java.lang.String key,
                               java.lang.Object[] parameters)
                               throws org.eclipse.core.runtime.CoreException,
                                      UnsupportedCARMAOperationException,
                                      NotConnectedException
Retrieves a specific piece of member information (meta-data) from the host relating to the CARMA resource.

The getMemberInfo action specification can be located using the CustomActionAccepter.findActionFor(String) method and inspecting the action object returned. The parameter array is expected to consist of object values of the type defined by the action parameter list in the order specified by the parameter list.

The parameters array should:

Return the value of the member information referenced by the specific key

Parameters:
pm - progress monitor for the operation
key - the key of the member information key-value pair to inspect
parameters - the set of parameters required for the method to execute properly
Returns:
the value referenced by the given member information key
Throws:
org.eclipse.core.runtime.CoreException - An error occured during execution of the command
NotConnectedException - The action could not be performed because the CARMA connection is not active.
UnsupportedCARMAOperationException - The action could not be performed because the action is not supported by the Repository Manager on the host
See Also:
ActionIdentifier.GET_MEMBER_INFO

setMemberInfo

void setMemberInfo(org.eclipse.core.runtime.IProgressMonitor pm,
                   java.lang.String key,
                   java.lang.String value,
                   java.lang.Object[] parameters)
                   throws org.eclipse.core.runtime.CoreException,
                          UnsupportedCARMAOperationException,
                          NotConnectedException
Sets the value of a specific piece of member information (meta-data) for the CARMA resource on the host The setMemberInfo action specification can be located using the CustomActionAccepter.findActionFor(String) method and inspecting the action object returned. The parameter array is expected to consist of object values of the type defined by the action parameter list in the order specified by the parameter list.

The parameters array should:

Set the member information referenced by the key to a new value.

Parameters:
pm - progress monitor for the operation
key - the key of the member information key-value pair to set to the given value
value - the value to set the associated key lookup to
parameters - the set of parameters required for the method to execute properly
Throws:
org.eclipse.core.runtime.CoreException - An error occured during execution of the command
NotConnectedException - The action could not be performed because the CARMA connection is not active.
UnsupportedCARMAOperationException - The action could not be performed because the action is not supported by the Repository Manager on the host
See Also:
ActionIdentifier.GET_MEMBER_INFO

refreshMemberInfo

void refreshMemberInfo(org.eclipse.core.runtime.IProgressMonitor pm,
                       boolean sendNotification,
                       java.lang.Object[] parameters)
                       throws org.eclipse.core.runtime.CoreException,
                              UnsupportedCARMAOperationException,
                              NotConnectedException
Updates the list of member information (meta-data) for all information relating to the CARMA resource on the host. The refreshMemberInfo action specification can be located using the CustomActionAccepter.findActionFor(String) method and inspecting the action object returned. The parameter array is expected to consist of object values of the type defined by the action parameter list in the order specified by the parameter list.

The parameters array should:

Refresh all member information

Parameters:
pm - progress monitor for the operation
sendNotification - set to true if notification messages should be issued from changes made during the refresh operation
parameters - the set of parameters required for the method to execute properly
Throws:
org.eclipse.core.runtime.CoreException - An error occured during execution of the command
NotConnectedException - The action could not be performed because the CARMA connection is not active.
UnsupportedCARMAOperationException - The action could not be performed because the action is not supported by the Repository Manager on the host
See Also:
ActionIdentifier.REFRESH_ALL_MEMBER_INFO

refreshRAMFileExtension

void refreshRAMFileExtension(org.eclipse.core.runtime.IProgressMonitor pm,
                             java.lang.Object[] parameters)
                             throws org.eclipse.core.runtime.CoreException,
                                    NotConnectedException,
                                    UnsupportedCARMAOperationException
Updates the file extension member information (meta-data) for the CARMA resource by querying the RAM for the file extension key on the host. The refreshMemberInfo action specification can be located using the CustomActionAccepter.findActionFor(String) method and inspecting the action object returned. The parameter array is expected to consist of object values of the type defined by the action parameter list in the order specified by the parameter list.

The parameters array should:

Retrieves the local file extension from the RAM metadata refreshing the metadata property as necessary

Parameters:
pm - progress monitor for the operation
parameters - the set of parameters required for the method to execute properly
Throws:
org.eclipse.core.runtime.CoreException - An error occured during execution of the command
NotConnectedException - The action could not be performed because the CARMA connection is not active.
UnsupportedCARMAOperationException - The action could not be performed because the action is not supported by the Repository Manager on the host
See Also:
ActionIdentifier.REFRESH_ALL_MEMBER_INFO, refreshMemberInfo(IProgressMonitor, boolean, Object[])