|
|||||||||
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 |
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(Path path)
Get the current modified state of a Path. |
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()
|
void |
logout()
|
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 RepositoryException
RepositoryException
- If something goes wrong.public void addNode(NodeImpl ni) throws RepositoryException
ni
- Node to add
RepositoryException
- If the Path cannot be determined.public ItemImpl getItem(Path path) throws InvalidPathException, RepositoryException
InvalidPathException
RepositoryException
public void logout()
public void copy(Path srcpath, Path destpath) throws RepositoryException
RepositoryException
public NodeImpl findByUUID(java.lang.String uuid) throws RepositoryException
RepositoryException
public java.util.List<PropertyImpl> getReferences(java.lang.String uuid) throws RepositoryException
uuid
-
RepositoryException
public java.util.List<Path> listNodes(Path parentpath) throws RepositoryException
RepositoryException
public java.util.Collection<? extends java.lang.String> listWorkspaces() throws RepositoryException
RepositoryException
public boolean itemExists(Path path, ItemType type) throws RepositoryException
RepositoryException
public void remove(ItemImpl item) throws RepositoryException
RepositoryException
public void stop()
public boolean hasPendingChanges()
public void clear()
public void save(Path path) throws RepositoryException
RepositoryException
public java.util.Collection<? extends Path> listProperties(Path path) throws RepositoryException
RepositoryException
public void putProperty(NodeImpl impl, PropertyImpl property) throws RepositoryException
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 RepositoryException
path
- The path to check
RepositoryException
- If something goes wrong.public Path getPath(PathRef p) throws PathNotFoundException
PathNotFoundException
public PathManager getPathManager()
public ItemState getState(Path path)
path
-
public ItemState getState(PathRef m_path) throws PathNotFoundException
PathNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |