Interface IResourceSnapshot<T extends IResource>
- All Known Subinterfaces:
IContainerSnapshot<T>
public interface IResourceSnapshot<T extends IResource>
IResourceSnapshot is a lightweight snapshot that describes the common
attributes of a resource to be created.
- Since:
- 3.20
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Given a resource handle, create an actual resource with the attributes of the receiver resource description.createResource
(IProgressMonitor monitor) Create an existent resource from this resource description.Create a resource handle that can be used to create a resource from this resource description.getName()
Get the name of this resource.boolean
isValid()
Return a boolean indicating whether this resource description has enough information to create a resource.void
recordStateFromHistory
(IProgressMonitor monitor) Record the appropriate state of this resource description using any available resource history.boolean
verifyExistence
(boolean checkMembers) Return a boolean indicating whether this description represents an existent resource.
-
Method Details
-
createResourceHandle
T createResourceHandle()Create a resource handle that can be used to create a resource from this resource description. This handle can be used to create the actual resource, or to describe the creation to a resource delta factory.- Returns:
- the resource handle that can be used to create a resource from this description
-
getName
String getName()Get the name of this resource.- Returns:
- the name of the Resource
-
createResource
Create an existent resource from this resource description.- Parameters:
monitor
- the progress monitor to use- Returns:
- a resource that has the attributes of this resource description
- Throws:
CoreException
- if creation failed
-
createExistentResourceFromHandle
Given a resource handle, create an actual resource with the attributes of the receiver resource description.- Parameters:
monitor
- the progress monitor to be used when creating the resource- Throws:
CoreException
- if creation failed
-
isValid
boolean isValid()Return a boolean indicating whether this resource description has enough information to create a resource.- Returns:
true
if the resource can be created, andfalse
if it does not have enough information
-
recordStateFromHistory
Record the appropriate state of this resource description using any available resource history.- Parameters:
monitor
- the progress monitor to be used- Throws:
CoreException
- in case of error
-
verifyExistence
boolean verifyExistence(boolean checkMembers) Return a boolean indicating whether this description represents an existent resource.- Parameters:
checkMembers
- Usetrue
if members should also exist in order for this description to be considered existent. A value offalse
indicates that the existence of members does not matter.- Returns:
- a boolean indicating whether this description represents an existent resource.
-