public class ClientManager extends AbstractSimpleDAO implements IClientResolver
IDAO.EModeDEFAULT_AUTO_SAVE_ENABLED, m_aRWLock| Constructor and Description |
|---|
ClientManager(String sFilename) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsAllClientsWithID(Collection<String> aIDs)
Check if all passed client IDs are contained
|
boolean |
containsClientWithID(String sID) |
IClient |
createClient(String sClientID,
String sDisplayName) |
protected com.helger.commons.microdom.IMicroDocument |
createWriteData()
Create the XML document that should be saved to the file.
|
Set<String> |
getAllClientIDs() |
Collection<? extends IClient> |
getAllClients() |
int |
getClientCount() |
IClient |
getClientOfID(String sID)
Get the client of the specified ID.
|
boolean |
hasAnyClient() |
boolean |
hasAnyClientExceptGlobal() |
protected com.helger.commons.state.EChange |
onInit()
Custom initialization routine.
|
protected com.helger.commons.state.EChange |
onRead(com.helger.commons.microdom.IMicroDocument aDoc)
Fill the internal structures with from the passed XML document.
|
String |
toString() |
com.helger.commons.state.EChange |
updateClient(String sClientID,
String sDisplayName) |
beforeWriteToFile, getDAOIO, getFilenameProvider, getInitCount, getLastFilename, getLastInitDateTime, getLastReadDateTime, getLastWriteDateTime, getReadCount, getSafeFile, getWriteCount, getXMLWriterSettings, initialRead, markAsChanged, modifyWriteData, onFilenameChange, triggerExceptionHandlersRead, triggerExceptionHandlersWrite, writeToFileOnPendingChangesbeginWithoutAutoSave, endWithoutAutoSave, getExceptionHandlersRead, getExceptionHandlersWrite, hasPendingChanges, internalHasPendingChanges, internalIsAutoSaveEnabled, internalSetPendingChanges, isAutoSaveEnabled, performWithoutAutoSave, performWithoutAutoSave, performWithoutAutoSave, performWithoutAutoSavepublic ClientManager(@Nonnull@Nonempty String sFilename) throws DAOException
DAOException@Nonnull protected com.helger.commons.state.EChange onInit()
AbstractSimpleDAOonInit in class AbstractSimpleDAOEChange.CHANGED if something was modified inside this
method@Nonnull protected com.helger.commons.state.EChange onRead(@Nonnull com.helger.commons.microdom.IMicroDocument aDoc)
AbstractSimpleDAOonRead in class AbstractSimpleDAOaDoc - The XML document to read from. Never null.EChange.CHANGED if reading the data changed something in
the internal structures that requires a writing.@Nonnull protected com.helger.commons.microdom.IMicroDocument createWriteData()
AbstractSimpleDAOcreateWriteData in class AbstractSimpleDAOnull document to write to the file.@Nullable public IClient createClient(@Nonnull@Nonempty String sClientID, @Nonnull@Nonempty String sDisplayName)
@Nonnull public com.helger.commons.state.EChange updateClient(@Nonnull@Nonempty String sClientID, @Nonnull@Nonempty String sDisplayName)
public boolean hasAnyClient()
public boolean hasAnyClientExceptGlobal()
@Nonnegative public int getClientCount()
@Nonnull @ReturnsMutableCopy public Collection<? extends IClient> getAllClients()
@Nullable public IClient getClientOfID(@Nullable String sID)
IClientResolvergetClientOfID in interface IClientResolversID - The ID to be resolved. May be null.null if no such client exists.public boolean containsAllClientsWithID(@Nullable Collection<String> aIDs)
aIDs - The IDs to be checked. May be null.true if either an empty collection was passed or if
really all passed client IDs are contained!public String toString()
toString in class AbstractSimpleDAOCopyright © 2014–2015 Philip Helger. All rights reserved.