com.ibm.ftt.projects.core.logical
Interface ILogicalResource

All Superinterfaces:
IAdaptable
All Known Subinterfaces:
ILogicalContainer, ILogicalFile, ILogicalProject, ILogicalSubProject, IRemoteProject, IRemoteResource, IRemoteSubProject, LZOSDataSet, LZOSDataSetMember, LZOSPartitionedDataSet, LZOSProject, LZOSResource, LZOSSequentialDataSet, LZOSSubProject

public interface ILogicalResource
extends IAdaptable

Logical resources represent z/OS projects and the artifacts that have been added to them. A logical resource can represent a logical grouping of resources, or it can refer to a physical resource (represented by an IPhysicalResource). Multiple logical resources can refer to the same physical resource. Methods of a logical resource object typically invoke related methods of the physical resource it refers to.


Field Summary
static String COPY_RIGHT
           
 
Method Summary
 void delete(boolean force, IProgressMonitor monitor)
          Deletes this resource.
 void deleteOverriddenPropertiesInCategory(com.ibm.ftt.properties.ICategory category)
          Deletes the overridden properties for the given category for the current property group of this resource.
 void deleteOverride(com.ibm.ftt.properties.IProperty property)
          Deletes the override for the given property.
 com.ibm.ftt.properties.IPropertyGroup getCurrentPropertyGroup()
          Returns the current property group for the resource.
 IPath getFullPath()
          Returns the full path of the resource.
 ILogicalContainer getLogicalParent()
          Returns the parent of this resource.
 String getName()
          Returns the name of the resource.
 List getOverriddenProperties()
          Returns the overridden properties for this resource.
 String getPersistentProperty(String key)
          Returns the value of a persistent property of this resource.
 IPhysicalResource getPhysicalResource()
          Returns the physical resource which this logical resource represents.
 IResourcePublisher getResourcePublisher()
          Returns the resource publisher that manages subscriptions for this logical resource.
 Object getSessionProperty(QualifiedName key)
          Returns the value of a session property of this resource.
 ILogicalSubProject getSubProject()
          Convenience method which returns the containing subproject
 void refresh(int depth, IProgressMonitor monitor)
          Refreshes this resource to reflect the true state of the file system.
 void remove()
          Removes this resource (and all its children) from its container.
 void rename(String newName)
          Renames this resource.
 void setCurrentPropertyGroup(com.ibm.ftt.properties.IPropertyGroup propertyGroup)
          Sets the current property group for the resource.
 void setOverride(com.ibm.ftt.properties.IProperty property, String newValue)
          Overrides the given property value with the new value for the given resource.
 void setPersistentProperty(String key, String value)
          Sets a persistent property of this resource.
 void setSessionProperty(QualifiedName key, Object value)
          Sets the value of a session property of this resource.
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

COPY_RIGHT

static final String COPY_RIGHT
See Also:
Constant Field Values
Method Detail

getName

String getName()
Returns the name of the resource.

Returns:
a String containing the name of the resource

getPhysicalResource

IPhysicalResource getPhysicalResource()
Returns the physical resource which this logical resource represents.

Returns:
an IPhysicalResource representing the physical resource, or null if the ILogicalResource does not represent a physical resource.

getFullPath

IPath getFullPath()
Returns the full path of the resource. For the MVS file system, the full path is of the form PROJECT_NAME/SUBPROJECT_NAME/DATA_SET_NAME/MEMBER_NAME. Depending on the type of this ILogicalResource, some of the path segments may be left out.

Returns:
the IPath containing the full path of this resource.

delete

void delete(boolean force,
            IProgressMonitor monitor)
            throws OperationFailedException
Deletes this resource. The physical resource represented by this resource is also deleted by this method.

Parameters:
force - Currently not used. It is recommended to set this to true for now.
monitor - a progress monitor, or null if progress reporting is not desired
Throws:
OperationFailedException

rename

void rename(String newName)
            throws OperationFailedException
Renames this resource. The physical resource represented by this resource is also renamed by this method.

Parameters:
newName - a String containing the new name for the resource
Throws:
OperationFailedException

remove

void remove()
Removes this resource (and all its children) from its container.


refresh

void refresh(int depth,
             IProgressMonitor monitor)
Refreshes this resource to reflect the true state of the file system.

Parameters:
depth - is modeled after the concept for IResource:
monitor - a progress monitor, or null if progress reporting is not desired
See Also:
ILogicalResource.setStalenessLevel(int)

getLogicalParent

ILogicalContainer getLogicalParent()
Returns the parent of this resource.

Returns:
the ILogicalContainer which is the parent of this resource

getSubProject

ILogicalSubProject getSubProject()
Convenience method which returns the containing subproject

Returns:
containing subproject

getResourcePublisher

IResourcePublisher getResourcePublisher()
Returns the resource publisher that manages subscriptions for this logical resource.

This method should not return null. Implementers of ILogicalResource must create a new IResourcePublisher instance if one has not yet been created.

Returns:
the resource publisher instance. Never returns null.

setPersistentProperty

void setPersistentProperty(String key,
                           String value)
Sets a persistent property of this resource. This can be used for setting compiler and link options, for instance. A set of pre-defined property keys can be found in IPhysicalResourceCoreConstants.

Persistent properties are saved and restored across workbench shutdown and restart.

Parameters:
key - a String containing the key of the property to be set
value - a String containing the value to be assigned to the property, or null to remove the property

getPersistentProperty

String getPersistentProperty(String key)
Returns the value of a persistent property of this resource. This can be used for retrieving compiler and link options, for instance. A set of pre-defined property keys can be found in IPhysicalResourceCoreConstants.

Persistent properties are saved and restored across workbench shutdown and restart.

Parameters:
key - a String containing the key of the property whose value is requested
Returns:
a String containing the value of the property, or null if this resource has no such property.

setSessionProperty

void setSessionProperty(QualifiedName key,
                        Object value)
Sets the value of a session property of this resource. If the specified value is null then the property is removed.

Session properties will be cleared after workbench shutdown.

Parameters:
key - a QualifiedName which contains the key of the property whose value is to be set
value - an Object which is to be saved for the specified key

getSessionProperty

Object getSessionProperty(QualifiedName key)
Returns the value of a session property of this resource. by the given key or null if this resource has no such property

Session properties will be cleared after workbench shutdown.

Parameters:
key - a QualifiedName which contains the key of the property whose value is requested
Returns:
an Object containing the value of the property, or null if this resource has no such property.

setCurrentPropertyGroup

void setCurrentPropertyGroup(com.ibm.ftt.properties.IPropertyGroup propertyGroup)
Sets the current property group for the resource.

Parameters:
propertyGroup - The property group that will be the current property group, or null to remove the current property group.
See Also:
ILogicalResource.getCurrentPropertyGroup()

getCurrentPropertyGroup

com.ibm.ftt.properties.IPropertyGroup getCurrentPropertyGroup()
Returns the current property group for the resource. If there is no current property group for this resource, the logical parents of the resource are checked. If one of the logical parents has a current property group, that property group is returned. If there is no current property group for this resource or any logical parent, null is returned.

Returns:
The current property group. This can be null if this resource and all of its logical parents do not have a current property group.

setOverride

void setOverride(com.ibm.ftt.properties.IProperty property,
                 String newValue)
                 throws UnsupportedOperationException,
                        com.ibm.ftt.properties.IllegalPropertyException
Overrides the given property value with the new value for the given resource.

Parameters:
property - The property to be overridden.
newValue - The new value.

Throws:
UnsupportedOperationException - If the resource does not support property overrides.
com.ibm.ftt.properties.IllegalPropertyException - If the current property group for this resource does not have a category instance with the given property, or if the current property group is null.

deleteOverride

void deleteOverride(com.ibm.ftt.properties.IProperty property)
                    throws UnsupportedOperationException,
                           com.ibm.ftt.properties.NoOverrideException
Deletes the override for the given property. The original property value will be used rather than the overridden value.

Parameters:
property - The property that was overridden.

Throws:
UnsupportedOperationException - If the resource does not support property overrides.
com.ibm.ftt.properties.NoOverrideException - If there is no override for the given property for this resource.

getOverriddenProperties

List getOverriddenProperties()
                             throws UnsupportedOperationException
Returns the overridden properties for this resource. If there are no overrides, an empty list is returned.

Returns:
An unmodifiable list of the overridden values; the list is empty if there are no property overrides.

Throws:
UnsupportedOperationException - If the resource does not support property overrides.

deleteOverriddenPropertiesInCategory

void deleteOverriddenPropertiesInCategory(com.ibm.ftt.properties.ICategory category)
                                          throws UnsupportedOperationException,
                                                 com.ibm.ftt.properties.NoOverrideException
Deletes the overridden properties for the given category for the current property group of this resource.

Parameters:
category - The overridden properties of the category instance for this category are deleted.
Throws:
UnsupportedOperationException - If this resource does not support overrides for properties.
com.ibm.ftt.properties.NoOverrideException