|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jcms.fileprocessor.repository.RepositoryManager
public class RepositoryManager
This singleton manages Repositories in the following way : - allows checkin/checkout ; - allows launching/stopping ; - manages scheduling informations ; - tells if a task from a scan of the repository is pending.
Field Summary | |
---|---|
static String |
JCMS_UPLOAD_REPOSITORY
|
static String |
REVISION
|
Method Summary | |
---|---|
boolean |
addRepository(Repository configuration)
A new repository is added to the manager, except if : it is null; the id is alreadey used for another configuration; the conditions are not verified. |
boolean |
executeNextAlarmNow(String id)
Execute now, in a specific thread (not in the current thread) the AlarmListener |
static RepositoryManager |
getInstance()
The first time, instanciate the RepositoryManager. |
Date |
getNextScanDate(String id)
Returns the date of the next call to the AlarmListener scheduled. |
Collection<Repository> |
getRepositories()
Gives the collection of RepositoryConfiguration registered in the manager. |
Repository |
getRepository(String id)
Gives the RepositoryConfiguration mapped with this id. |
boolean |
isLaunched(String id)
We store in memory the information that a repository is stored. |
boolean |
launchRepository(String id)
Launch a repository if not. |
Repository |
removeRepository(String id)
Stops, removes and returns the repository mapped to this id off from the manager. |
boolean |
stopRepository(String id)
Stops the treatment if needed and checkout the AlarmEntry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
public static final String JCMS_UPLOAD_REPOSITORY
Method Detail |
---|
public static RepositoryManager getInstance()
public boolean addRepository(Repository configuration)
launchRepository(String)
configuration
- the Repository configuration to add to the manager
public Repository removeRepository(String id)
Returns null if no repository is mapped to this id.
id
- the id of the Repository
public Repository getRepository(String id)
id
- The id of the repository
public Collection<Repository> getRepositories()
public boolean isLaunched(String id)
id
- The id of the repository
public boolean launchRepository(String id)
id
- The id of the repository
public boolean stopRepository(String id)
id
- The id of the repository
public boolean executeNextAlarmNow(String id)
id
- The id of the repository
public Date getNextScanDate(String id)
id
- The id of the repository
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |