| java.lang.Object com.caucho.jcr.base.BaseSession
All known Subclasses: com.caucho.jcr.file.FileSession,
BaseSession | abstract public class BaseSession implements Session(Code) | | Represents an open session to a Repository workspace.
|
Method Summary | |
public void | addLockToken(String lt) Adds a lock token. | public void | checkPermission(String absPath, String actions) Checks if the session can perform the given actions for the path. | public void | exportDocumentView(String absPath, ContentHandler contentHandler, boolean skipBinary, boolean noRecurse) Exports XML data from the given node based on the document view. | public void | exportDocumentView(String absPath, OutputStream out, boolean skipBinary, boolean noRecurse) Exports XML data from the given node based on the document view. | public void | exportSystemView(String absPath, ContentHandler contentHandler, boolean skipBinary, boolean noRecurse) Exports XML data from the given node based on the system view. | public void | exportSystemView(String absPath, OutputStream out, boolean skipBinary, boolean noRecurse) Exports XML data from the given node based on the system view. | public Object | getAttribute(String name) Returns a session attribute. | public String[] | getAttributeNames() Returns an array of the session attribute names. | public ContentHandler | getImportContentHandler(String parentAbsPath, int uuidBehavior) Returns a SAX ContentHandler to important data. | public Item | getItem(String absPath) Returns an item based on an absolute path. | public String[] | getLockTokens() Returns the current lock tokens. | public String | getNamespacePrefix(String uri) Returns the prefix for a given URI. | public String[] | getNamespacePrefixes() Returns the session's namespace prefixes. | public String | getNamespaceURI(String prefix) Returns the URI for a given namespace prefix. | public Node | getNodeByUUID(String uuid) | abstract public Repository | getRepository() Returns the owning repository. | abstract public Node | getRootNode() Returns the session's root node. | public String | getUserID() Returns the user who opened this session. | public ValueFactory | getValueFactory() Returns the session's value factory. | public Workspace | getWorkspace() Returns the repository's workspace for this session. | public boolean | hasPendingChanges() Returns true if the session has changes. | public Session | impersonate(Credentials credentials) Create a new session with the new credentials. | public void | importXML(String parentAbsPath, InputStream in, int uuidBehavior) Import data based on an XML stream. | public boolean | isLive() Return true if the session is active. | public boolean | itemExists(String absPath) Returns true if the item named by the path exists. | public void | logout() Close the session. | public void | move(String srcAbsPath, String destAbsPath) Moves the node given by the source path to the destination path. | public void | refresh(boolean keepChanges) Updates changes from the repository. | public void | removeLockToken(String lt) Removes the named lock token. | public void | save() Saves changes to the workspace. | public void | setNamespacePrefix(String newPrefix, String existingUri) Exports XML data from the given node based on the document view. |
addLockToken | public void addLockToken(String lt) throws LockException, RepositoryException(Code) | | Adds a lock token.
|
checkPermission | public void checkPermission(String absPath, String actions) throws java.security.AccessControlException, RepositoryException(Code) | | Checks if the session can perform the given actions for the path.
Parameters: absPath - absolute path to a node. Parameters: actions - actions attempted on the node. |
exportDocumentView | public void exportDocumentView(String absPath, ContentHandler contentHandler, boolean skipBinary, boolean noRecurse) throws PathNotFoundException, SAXException, RepositoryException(Code) | | Exports XML data from the given node based on the document view.
Parameters: absPath - path to the node serving as root to export Parameters: out - OutputStream to receive the XML |
exportDocumentView | public void exportDocumentView(String absPath, OutputStream out, boolean skipBinary, boolean noRecurse) throws IOException, PathNotFoundException, RepositoryException(Code) | | Exports XML data from the given node based on the document view.
Parameters: absPath - path to the node serving as root to export Parameters: out - OutputStream to receive the XML |
exportSystemView | public void exportSystemView(String absPath, ContentHandler contentHandler, boolean skipBinary, boolean noRecurse) throws PathNotFoundException, SAXException, RepositoryException(Code) | | Exports XML data from the given node based on the system view.
Parameters: absPath - path to the node serving as root to export Parameters: contentHandler - SAX ContentHandler to receive the XML |
exportSystemView | public void exportSystemView(String absPath, OutputStream out, boolean skipBinary, boolean noRecurse) throws IOException, PathNotFoundException, RepositoryException(Code) | | Exports XML data from the given node based on the system view.
Parameters: absPath - path to the node serving as root to export Parameters: out - OutputStream to receive the XML |
getAttribute | public Object getAttribute(String name)(Code) | | Returns a session attribute.
Parameters: name - the session attribute name |
getAttributeNames | public String[] getAttributeNames()(Code) | | Returns an array of the session attribute names.
|
getImportContentHandler | public ContentHandler getImportContentHandler(String parentAbsPath, int uuidBehavior) throws PathNotFoundException, ConstraintViolationException, VersionException, LockException, RepositoryException(Code) | | Returns a SAX ContentHandler to important data.
Parameters: parentAbsPath - the absolute path of the parent node |
getItem | public Item getItem(String absPath) throws PathNotFoundException, RepositoryException(Code) | | Returns an item based on an absolute path.
Parameters: absPath - the path locating the item. throws: PathNotFoundException - if the path does not name an item |
getLockTokens | public String[] getLockTokens()(Code) | | Returns the current lock tokens.
|
getNamespacePrefix | public String getNamespacePrefix(String uri) throws NamespaceException, RepositoryException(Code) | | Returns the prefix for a given URI.
|
getNamespacePrefixes | public String[] getNamespacePrefixes() throws RepositoryException(Code) | | Returns the session's namespace prefixes.
|
getNamespaceURI | public String getNamespaceURI(String prefix) throws NamespaceException, RepositoryException(Code) | | Returns the URI for a given namespace prefix.
|
getNodeByUUID | public Node getNodeByUUID(String uuid) throws ItemNotFoundException, RepositoryException(Code) | | Finds a node by its UUID
Parameters: uuid - the node's UUID. |
getRepository | abstract public Repository getRepository()(Code) | | Returns the owning repository.
|
getRootNode | abstract public Node getRootNode() throws RepositoryException(Code) | | Returns the session's root node.
|
getUserID | public String getUserID()(Code) | | Returns the user who opened this session.
|
getValueFactory | public ValueFactory getValueFactory() throws UnsupportedRepositoryOperationException, RepositoryException(Code) | | Returns the session's value factory.
|
getWorkspace | public Workspace getWorkspace()(Code) | | Returns the repository's workspace for this session.
|
hasPendingChanges | public boolean hasPendingChanges() throws RepositoryException(Code) | | Returns true if the session has changes.
|
impersonate | public Session impersonate(Credentials credentials) throws LoginException, RepositoryException(Code) | | Create a new session with the new credentials.
Parameters: credentials - security credentials for the new sessions. |
importXML | public void importXML(String parentAbsPath, InputStream in, int uuidBehavior) throws IOException, PathNotFoundException, ItemExistsException, ConstraintViolationException, VersionException, InvalidSerializedDataException, LockException, RepositoryException(Code) | | Import data based on an XML stream.
Parameters: parentAbsPath - path to the node which will be the data's parent. Parameters: in - InputStream to the XML data |
isLive | public boolean isLive()(Code) | | Return true if the session is active.
|
itemExists | public boolean itemExists(String absPath) throws RepositoryException(Code) | | Returns true if the item named by the path exists.
Parameters: absPath - a path locating the item. |
logout | public void logout()(Code) | | Close the session.
|
move | public void move(String srcAbsPath, String destAbsPath) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, RepositoryException(Code) | | Moves the node given by the source path to the destination path.
Parameters: srcAbsPath - the absolute path name of the source node Parameters: destAbsPath - the absolute path name of the destination node |
refresh | public void refresh(boolean keepChanges) throws RepositoryException(Code) | | Updates changes from the repository.
|
removeLockToken | public void removeLockToken(String lt)(Code) | | Removes the named lock token.
|
save | public void save() throws AccessDeniedException, ItemExistsException, ConstraintViolationException, InvalidItemStateException, VersionException, LockException, NoSuchNodeTypeException, RepositoryException(Code) | | Saves changes to the workspace.
|
setNamespacePrefix | public void setNamespacePrefix(String newPrefix, String existingUri) throws NamespaceException, RepositoryException(Code) | | Exports XML data from the given node based on the document view.
Parameters: absPath - path to the node serving as root to export Parameters: out - OutputStream to receive the XML |
|
|