|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is used to isolate the implementation of a resource manager from the application. The interface is defined against an abstract class the ProjectResource class. Normally only one instance of the Resourcemanager should be instantiated.
Method Summary | |
void |
add(ProjectResource resource)
Adds the resource to the internal list of available resources. |
void |
addView(ResourceView view)
Adds a new view of this manager |
void |
clear()
Removes all resources from the manager. |
ProjectResource |
create(java.lang.String name)
The only thing that must be known when creating a new resource is the name of the resource. |
ProjectResource |
create(java.lang.String name,
int i)
|
ProjectResource |
getById(int id)
Retrieves an ancestor of ProjectResource identified by an identity value. |
java.util.ArrayList |
getResources()
Retrieves a list of all resources available. |
java.util.ArrayList |
load(java.io.InputStream source)
Loads resources from the InputStreamReader. |
void |
remove(ProjectResource resource)
Removes the resource. |
void |
removeById(int Id)
Removes the resource by its id. |
void |
save(java.io.OutputStream target)
Writes all resources stored in the OutputStreamWriter. |
Method Detail |
public ProjectResource create(java.lang.String name)
name
- The name of the resource that should be added.
ProjectResource
public ProjectResource create(java.lang.String name, int i)
public void add(ProjectResource resource)
resource
- The resource that should be added to the list.public ProjectResource getById(int id)
id
- The id is an integer value that is unique for every resource.
ProjectResource
public void remove(ProjectResource resource)
resource
- The resource to remove.public void removeById(int Id)
Id
- Id of the resource to remove.public java.util.ArrayList getResources()
ProjectResource
public java.util.ArrayList load(java.io.InputStream source)
source
- The InputStreamReader from which the data will be read.
The format and kind of data read is subject of the class
implementing this interface.
public void save(java.io.OutputStream target)
target
- Stream to write the data to.public void clear()
public void addView(ResourceView view)
view
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |