Movatterモバイル変換


[0]ホーム

URL:


6.2.2 Workspace Read Methods

In a level 1 repository theWorkspace object serves only to encapsulate a number of methods for accessing either information about theWorkspace or classes that provide further repository functions. The following are the level 1 methods ofWorkspace.Workspace has other methods as well, though in a level 1-only implementation these will either do nothing or throw an exception.

javax.jcr.
Workspace

Session

getSession()

Returns theSession object through which thisWorkspace object was acquired.

String

getName()

Returns the name of the actual persistent workspace represented by thisWorkspace object. This is the name used inRepository.login.

QueryManager

getQueryManager()

Returns theQueryManager, through which search methods are accessed. See6.6Searching Repository Content.

ARepositoryException is thrown if an error occurs.

NamespaceRegistry

getNamespaceRegistry()

Returns theNamespaceRegistry object, which can be used to access the mapping between prefixes and namespaces. See6.3Namespaces.

ARepositoryException is thrown if an error occurs.

NodeTypeManager

getNodeTypeManager()

Returns theNodeTypeManager, which is used to access information about which node types are available in the repository. There is one node type registry per repository, therefore theNodeTypeManager is not workspace-specific; it provides introspection methods for the global, repository-wide set of available node types. See6.7Node Types.

ARepositoryException is thrown if an error occurs.

String[]

getAccessibleWorkspaceNames()

Returns an string array containing the names of all workspaces in this repository that are accessible to this user, given theCredentials that were used to get theSession to which thisWorkspace is tied.

In order to access one of the listed workspaces, the user performs anotherRepository.login, specifying the name of the desired workspace, and receives a newSession object.

ARepositoryException is thrown if an error occurs.


[8]ページ先頭

©2009-2025 Movatter.jp