net.fortuna.ical4j.connector.jcr
C - the supported collection typepublic abstract class AbstractJcrObjectStore<C extends AbstractJcrObjectCollection<?>> extends Object implements ObjectStore<C>
| Constructor and Description |
|---|
AbstractJcrObjectStore(javax.jcr.Repository repository,
String path,
org.jcrom.Jcrom jcrom) |
| Modifier and Type | Method and Description |
|---|---|
C |
addCollection(String name)
Adds the specified collection to the store.
|
C |
addCollection(String name,
String displayName,
String description,
String[] supportedComponents,
net.fortuna.ical4j.model.Calendar timezone) |
protected void |
assertConnected() |
boolean |
connect()
Connect to a object store anonymously.
|
boolean |
connect(String username,
char[] password)
Connect to a object store using the specified credentials.
|
void |
disconnect() |
C |
getCollection(String name) |
protected abstract AbstractJcrObjectCollectionDao<C> |
getCollectionDao() |
List<C> |
getCollections() |
boolean |
isConnected() |
protected abstract C |
newCollection() |
C |
removeCollection(String name)
Removes the collection with specified id from the store.
|
public AbstractJcrObjectStore(javax.jcr.Repository repository,
String path,
org.jcrom.Jcrom jcrom)
repository - a repository instancepath - a repository store pathjcrom - a JCROM instancepublic final boolean connect()
throws ObjectStoreException
connect in interface ObjectStore<C extends AbstractJcrObjectCollection<?>>ObjectStoreException - where an unexpected error occurspublic final boolean connect(String username, char[] password) throws ObjectStoreException
connect in interface ObjectStore<C extends AbstractJcrObjectCollection<?>>username - connection usernamepassword - connection passwordObjectStoreException - where an unexpected error occurspublic final void disconnect()
throws ObjectStoreException
disconnect in interface ObjectStore<C extends AbstractJcrObjectCollection<?>>ObjectStoreException - where an unexpected error occurspublic boolean isConnected()
isConnected in interface ObjectStore<C extends AbstractJcrObjectCollection<?>>public final C addCollection(String name) throws ObjectStoreException
addCollection in interface ObjectStore<C extends AbstractJcrObjectCollection<?>>name - a collection identifierObjectStoreException - if a calendar with the specified id already
exists in the storepublic final C addCollection(String name, String displayName, String description, String[] supportedComponents, net.fortuna.ical4j.model.Calendar timezone) throws ObjectStoreException
addCollection in interface ObjectStore<C extends AbstractJcrObjectCollection<?>>name - a collection identifierdisplayName - the collection namedescription - the collection descriptionsupportedComponents - supported collection objectstimezone - collection timezoneObjectStoreException - where an unexpected error occurspublic final C getCollection(String name) throws ObjectStoreException, ObjectNotFoundException
getCollection in interface ObjectStore<C extends AbstractJcrObjectCollection<?>>name - a collection identifierObjectNotFoundException is thrown.ObjectStoreException - where an unexpected error occursObjectNotFoundException - if a collection with the specified identifier doesn't existpublic List<C> getCollections() throws ObjectStoreException, ObjectNotFoundException
getCollections in interface ObjectStore<C extends AbstractJcrObjectCollection<?>>ObjectStoreExceptionObjectNotFoundExceptionpublic final C removeCollection(String name) throws ObjectStoreException, ObjectNotFoundException
removeCollection in interface ObjectStore<C extends AbstractJcrObjectCollection<?>>name - a collection identifierObjectStoreException - where an unexpected error occursObjectNotFoundException - if a collection with the specified identifier doesn't existprotected final void assertConnected()
throws ObjectStoreException
ObjectStoreException - where the store is not connectedprotected abstract C newCollection()
protected abstract AbstractJcrObjectCollectionDao<C> getCollectionDao()
Copyright © 2008-2013 Micronode. All Rights Reserved.