|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.trendmicro.grid.acl.ds.RepositorySelector<R>
public class RepositorySelector<R extends Repository>
Is a helper class used to maintain the selection of an active repository.
Constructor Summary | |
---|---|
RepositorySelector()
|
|
RepositorySelector(Map<String,R> repositories,
Class<R> repositoryClass)
|
Method Summary | |
---|---|
List<String> |
getAvailableKeys()
Returns a list of all registered implementations. |
long |
getLastModified()
|
R |
getRepository()
Returns the currently selected repository. |
R |
getRepository(String key)
|
String |
getRepositoryClass()
Returns the interface of the repository that this selector is selecting the implementation for. |
String |
getSelectedKey()
Returns the name of the currently selected repository implementation. |
boolean |
hasSelection()
|
void |
init(Map<String,R> repositories,
Class<R> repositoryClass)
|
void |
initFrom(RepositorySelector<R> other)
|
boolean |
isAutoSelectedKey()
|
void |
setLastModified(long time)
|
void |
setSelectedKey(String selectedKey)
Sets the implementation key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RepositorySelector()
public RepositorySelector(Map<String,R> repositories, Class<R> repositoryClass)
Method Detail |
---|
public void initFrom(RepositorySelector<R> other)
public void init(Map<String,R> repositories, Class<R> repositoryClass)
public long getLastModified()
public void setLastModified(long time)
public String getRepositoryClass()
getRepositoryClass
in interface RepositorySelectorMBean
public R getRepository(String key)
public R getRepository()
public boolean hasSelection()
public boolean isAutoSelectedKey()
public String getSelectedKey()
getSelectedKey
in interface RepositorySelectorMBean
public void setSelectedKey(String selectedKey)
setSelectedKey
in interface RepositorySelectorMBean
selectedKey
- the implementation key.public List<String> getAvailableKeys()
getAvailableKeys
in interface RepositorySelectorMBean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |