public interface IResource
extends org.eclipse.core.runtime.IAdaptable
getID()).| Modifier and Type | Method and Description |
|---|---|
void |
addChildResource(IResource pRes)
Deprecated.
use
addResourceChild(IResource) instead.
addChildResource(IResource) calls
addResourceChild(IResource) without a return value. |
void |
addPropertyValue(IPropertyValue pPropertyValue)
Set the value of the property associated with the given property value in
this resource to the given property value.
|
boolean |
addResourceChild(IResource pRes)
Adds a resource to the list of children resources.
|
void |
delete()
Removes this resource and all its children resources from cache.
|
java.util.Map<Property,IPropertyValue> |
getAllPropertyValues()
Get all property values of this resource.
|
java.util.List<? super IResource> |
getChildrenResources()
Deprecated.
This method is deprecated since the List interface provided a
bad performance. Use get
getResourceChildren()
instead. getChildrenResources() returns a copy of
the Collection returned by
getResourceChildren(). |
java.lang.String |
getID()
Gets the unique ID of the resource.
|
java.lang.String |
getName()
Gets the name of the resource.
|
IResource |
getParentResource()
Returns the parent of this resource or
null if there is
none. |
IPropertyValue |
getPropertyValue(Property pProperty)
Get the value of the given property in this resource.
|
IPropertyValue |
getPropertyValueFromHierarchy(Property pProperty)
Returns a property value of this resource and (if existent) parent
resources.
|
java.util.Collection<? super IResource> |
getResourceChildren()
Returns an unmodifiable
Collection of child resources. |
boolean |
removeResourceChild(IResource pRes)
Removes a resource of the list of children resources.
|
void |
setName(java.lang.String pName)
Sets the name of the resource.
|
void |
setPropertyValues(java.util.Collection<IPropertyValue> pPropertyValues)
Sets the property values of this resource.
|
java.lang.String getID()
java.lang.String getName()
void setName(java.lang.String pName)
pName - the new resource nameIPropertyValue getPropertyValue(Property pProperty)
pProperty - TAURUS propertyIPropertyValue getPropertyValueFromHierarchy(Property pProperty)
getPropertyValue(Property).
Otherwise getParentResource() will be called recursively until
getPropertyValue(Property) returns a value or the root parent is
reached.pProperty - the desired propertyIPropertyValue or null if the value
cannot be found in the hierarchy.java.util.Map<Property,IPropertyValue> getAllPropertyValues()
Modifying the returned map will have no effect on the resource.
void addPropertyValue(IPropertyValue pPropertyValue)
pPropertyValue - the new property valuevoid setPropertyValues(java.util.Collection<IPropertyValue> pPropertyValues)
pPropertyValues - the new property valuesIResource getParentResource()
null if there is
none.
Note: Parent/Child relationships will only be maintained if the
"Linked Element List" attribute (
ActionDescriptor.isLinkElementList()) is set to
true.
null.@Deprecated java.util.List<? super IResource> getChildrenResources()
getResourceChildren()
instead. getChildrenResources() returns a copy of
the Collection returned by
getResourceChildren().
Note: Parent/Child relationships will only be maintained if the
"Linked Element List" attribute (
ActionDescriptor.isLinkElementList()) is set to
true.
java.util.Collection<? super IResource> getResourceChildren()
Collection of child resources. Can be an
empty Collection if there are no child resources.
Note: Parent/Child relationships will only be maintained if the
"Linked Element List" attribute (
ActionDescriptor.isLinkElementList()) is set to
true.
Collection of children resources. Can be
empty.boolean removeResourceChild(IResource pRes)
pRes - the IResource to be added as child of this resource.true if an element was removed as a result of this
callgetResourceChildren()boolean addResourceChild(IResource pRes)
pRes - the IResource to be added as child of this resource.true if an element was added as a result of this
callgetResourceChildren()@Deprecated void addChildResource(IResource pRes)
addResourceChild(IResource) instead.
addChildResource(IResource) calls
addResourceChild(IResource) without a return value.pRes - the IResource to be added as child of this resource.getResourceChildren()void delete()
throws TaurusCoreException
TaurusCoreException - if the deletion of the resource failsgetChildrenResources()Copyright © 2015 Micro Focus GmbH. All rights reserved.