|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.priha.core.SessionProvider
public class SessionProvider
This is a special provider which stores the state of the Session.
At the moment this could be O(N) depending on the size of the unsaved items.
Constructor Summary | |
---|---|
SessionProvider(SessionImpl session,
ItemStore source)
|
Method Summary | |
---|---|
void |
addNode(NodeImpl ni)
Call when you wish to add a new Node in this Session. |
void |
clear()
|
void |
close()
|
void |
copy(Path srcpath,
Path destpath)
|
NodeImpl |
findByUUID(java.lang.String uuid)
|
ItemImpl |
getItem(Path path)
|
Path |
getPath(PathRef p)
|
PathManager |
getPathManager()
|
java.util.List<PropertyImpl> |
getReferences(java.lang.String uuid)
Finds all references to the given UUID. |
ItemState |
getState(PathRef m_path)
|
boolean |
hasPendingChanges()
|
boolean |
itemExists(Path path,
ItemType type)
|
java.util.List<Path> |
listNodes(Path parentpath)
|
java.util.Collection<? extends Path> |
listProperties(Path path)
|
java.util.Collection<? extends java.lang.String> |
listWorkspaces()
|
boolean |
nodeExistsInRepository(Path path)
Goes directly into the repository, to find whether a Node exists currently. |
void |
putProperty(NodeImpl impl,
PropertyImpl property)
|
void |
refresh(boolean keepChanges,
Path path)
Refreshes all the items within the given path. |
void |
remove(ItemImpl item)
|
void |
save()
Saves everything starting from root node. |
void |
save(Path path)
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SessionProvider(SessionImpl session, ItemStore source)
Method Detail |
---|
public void save() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
- If something goes wrong.public void addNode(NodeImpl ni) throws javax.jcr.RepositoryException
ni
- Node to add
javax.jcr.RepositoryException
- If the Path cannot be determined.public ItemImpl getItem(Path path) throws InvalidPathException, javax.jcr.RepositoryException
InvalidPathException
javax.jcr.RepositoryException
public void close()
public void copy(Path srcpath, Path destpath) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public NodeImpl findByUUID(java.lang.String uuid) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public java.util.List<PropertyImpl> getReferences(java.lang.String uuid) throws javax.jcr.RepositoryException
uuid
-
javax.jcr.RepositoryException
public java.util.List<Path> listNodes(Path parentpath) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public java.util.Collection<? extends java.lang.String> listWorkspaces() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public boolean itemExists(Path path, ItemType type) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public void remove(ItemImpl item) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public void stop()
public boolean hasPendingChanges()
public void clear()
public void save(Path path) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public java.util.Collection<? extends Path> listProperties(Path path) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public void putProperty(NodeImpl impl, PropertyImpl property) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public void refresh(boolean keepChanges, Path path)
keepChanges
- If true, does nothing (Priha implements COPY-ON-WRITE). If false,
purges all changes from the path.path
- The path from which to start refreshing.public boolean nodeExistsInRepository(Path path) throws javax.jcr.RepositoryException
path
- The path to check
javax.jcr.RepositoryException
- If something goes wrong.public Path getPath(PathRef p) throws javax.jcr.PathNotFoundException
javax.jcr.PathNotFoundException
public PathManager getPathManager()
public ItemState getState(PathRef m_path) throws javax.jcr.PathNotFoundException
javax.jcr.PathNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |