Package org.eclipse.emf.cdo.util
Class CDOURIData
java.lang.Object
org.eclipse.emf.cdo.util.CDOURIData
Represents a CDO-specific
URI in connection-aware format.
CDO URIs are in one of two different formats, either canonical or connection-aware. The connection-aware format is:
cdo.net4j. ConnectorType :// [User [: Password] @] ConnectorSpecificAuthority / RepositoryName / ResourcePath [? Param=Value (& Param=Value)*]The non-terminals being:
- ConnectorType: one of tcp | ssl | jvm | http
- User/Password: to be provided if the repository is configured with an
IUserManagerand, hence, triggers authentication on the client. Note: the password may be stored in resources in clear text! - ConnectorSpecificAuthority: examples are
- Host [: Port] (if ConnectorType is tcp)
- AcceptorName (if ConnectorType is jvm)
- RepositoryName: the
nameof the repository (not theUUID!). - ResourcePath: the full path of the
resourcewithin the repository, segments separated by slashes, no leading slash. - Param: one of the following
- branch: the value must be a
branch path, the full path of the branch in the branch tree, segments separated by slashes, no leading slash, defaults to MAIN. - time: the value must be the time at which the resource is supposed to be valid, parseable by SimpleDateFormat. The special value HEAD indicates a floating view/transaction that always shows the latest state in the chosen branch, the default if no Time parameter is specified.
- transactional: a boolean value. The value true forces a the resource to be opened in a transaction rather than in a read-only view. This can not be combined with a Time other than HEAD.
- prefetch: a boolean value. The value true attempts to load all objects contained by the resource in a single server-round trip and cache the results.
- branch: the value must be a
Note: With the current design and implementation of connection-aware URI (mainly CDONet4jViewProvider) it is still unclear when and how the allocated "resources" (aka IConnector, CDOSession, CDOView, etc) are supposed to be freed!
For a description of the canonical URI format refer to CDOURIUtil.
- Since:
- 4.0
- Author:
- Eike Stepper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongbooleanvoidsetAuthority(String authority) voidsetBranchPath(IPath branchPath) voidsetExtraParameters(Map<String, String> extraParameters) voidsetPassWord(String passWord) voidsetRepositoryName(String repositoryName) voidsetResourcePath(IPath resourcePath) voidvoidsetTimeStamp(long timeStamp) voidsetTransactional(boolean transactional) voidsetUserName(String userName) voidtoString()toURI()
-
Field Details
-
BRANCH_PARAMETER
- See Also:
-
TIME_PARAMETER
- See Also:
-
VIEW_ID_PARAMETER
- Since:
- 4.1
- See Also:
-
TRANSACTIONAL_PARAMETER
- See Also:
-
-
Constructor Details
-
CDOURIData
public CDOURIData() -
CDOURIData
- Throws:
InvalidURIException
-
CDOURIData
- Throws:
InvalidURIException
-
-
Method Details
-
getScheme
-
setScheme
-
getUserName
-
setUserName
-
getPassWord
-
setPassWord
-
getAuthority
-
setAuthority
-
getRepositoryName
-
setRepositoryName
-
getResourcePath
-
setResourcePath
-
getBranchPath
-
setBranchPath
-
getTimeStamp
public long getTimeStamp() -
setTimeStamp
public void setTimeStamp(long timeStamp) -
getViewID
- Since:
- 4.1
-
setViewID
- Since:
- 4.1
-
isTransactional
public boolean isTransactional() -
setTransactional
public void setTransactional(boolean transactional) -
getExtraParameters
- Since:
- 4.1
-
setExtraParameters
- Since:
- 4.4
-
toURI
-
toString
-