Class AbstractLocalObjectStore<C extends AbstractLocalObjectCollection<?>>
- java.lang.Object
- 
- net.fortuna.ical4j.connector.local.AbstractLocalObjectStore<C>
 
- 
- All Implemented Interfaces:
- ObjectStore<C>
 - Direct Known Subclasses:
- LocalCalendarStore,- LocalCardStore
 
 public abstract class AbstractLocalObjectStore<C extends AbstractLocalObjectCollection<?>> extends Object implements ObjectStore<C> 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description CaddCollection(String id)Adds the specified collection to the store.CaddCollection(String id, String displayName, String description, String[] supportedComponents, Calendar timezone)booleanconnect()Connect to a object store anonymously.booleanconnect(String username, char[] password)Connect to a object store using the specified credentials.voiddisconnect()CgetCollection(String id)List<C>getCollections()protected FilegetRoot()booleanisConnected()protected abstract CnewCollection(String id)CremoveCollection(String id)Removes the collection with specified id from the store.
 
- 
- 
- 
Method Detail- 
getRootprotected File getRoot() 
 - 
connectpublic boolean connect() throws ObjectStoreExceptionDescription copied from interface:ObjectStoreConnect to a object store anonymously.- Specified by:
- connectin interface- ObjectStore<C extends AbstractLocalObjectCollection<?>>
- Returns:
- true if connection is successful, otherwise false
- Throws:
- ObjectStoreException- where an unexpected error occurs
 
 - 
connectpublic boolean connect(String username, char[] password) throws ObjectStoreException Description copied from interface:ObjectStoreConnect to a object store using the specified credentials.- Specified by:
- connectin interface- ObjectStore<C extends AbstractLocalObjectCollection<?>>
- Parameters:
- username- connection username
- password- connection password
- Returns:
- true if connection is successful, otherwise false
- Throws:
- ObjectStoreException- where an unexpected error occurs
 
 - 
disconnectpublic void disconnect() - Specified by:
- disconnectin interface- ObjectStore<C extends AbstractLocalObjectCollection<?>>
 
 - 
isConnectedpublic boolean isConnected() - Specified by:
- isConnectedin interface- ObjectStore<C extends AbstractLocalObjectCollection<?>>
 
 - 
addCollectionpublic C addCollection(String id) throws ObjectStoreException Description copied from interface:ObjectStoreAdds the specified collection to the store.- Specified by:
- addCollectionin interface- ObjectStore<C extends AbstractLocalObjectCollection<?>>
- Parameters:
- id- a collection identifier
- Returns:
- the new collection instance
- Throws:
- ObjectStoreException- if a calendar with the specified id already exists in the store
 
 - 
addCollectionpublic C addCollection(String id, String displayName, String description, String[] supportedComponents, Calendar timezone) throws ObjectStoreException - Specified by:
- addCollectionin interface- ObjectStore<C extends AbstractLocalObjectCollection<?>>
- Parameters:
- id- a collection identifier
- displayName- the collection name
- description- the collection description
- supportedComponents- supported collection objects
- timezone- collection timezone
- Returns:
- the new collection instance
- Throws:
- ObjectStoreException- where an unexpected error occurs
 
 - 
removeCollectionpublic C removeCollection(String id) Description copied from interface:ObjectStoreRemoves the collection with specified id from the store.- Specified by:
- removeCollectionin interface- ObjectStore<C extends AbstractLocalObjectCollection<?>>
- Parameters:
- id- a collection identifier
- Returns:
- if a collection with the specified id exists in the store it is returned. Otherwise returns null.
 
 - 
getCollectionpublic C getCollection(String id) throws ObjectStoreException, ObjectNotFoundException - Specified by:
- getCollectionin interface- ObjectStore<C extends AbstractLocalObjectCollection<?>>
- Parameters:
- id- a collection identifier
- Returns:
- an object collection with the specified id. If no collection with the specified id
 is found in this store, an ObjectNotFoundExceptionis thrown.
- Throws:
- ObjectStoreException- where an unexpected error occurs
- ObjectNotFoundException- if a collection with the specified identifier doesn't exist
 
 - 
getCollectionspublic List<C> getCollections() - Specified by:
- getCollectionsin interface- ObjectStore<C extends AbstractLocalObjectCollection<?>>
 
 
- 
 
-