|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Registry
This is the "Full" Registry interface. It contains not only the get/put behavior from CoreRegistry, but also APIs which control tags/comments/ratings/versions/etc.
Method Summary | |
---|---|
boolean |
addAspect(java.lang.String name,
Aspect aspect)
Add aspect by passing a name and the aspect object. |
void |
addAssociation(java.lang.String sourcePath,
java.lang.String targetPath,
java.lang.String associationType)
Adds an association stating that the resource at "associationPath" associate on the resource at "associationPath". |
java.lang.String |
addComment(java.lang.String resourcePath,
Comment comment)
Adds a comment to a resource. |
void |
applyTag(java.lang.String resourcePath,
java.lang.String tag)
Applies the given tag to the resource in the given path. |
void |
associateAspect(java.lang.String resourcePath,
java.lang.String aspect)
Associate an Aspect with a resource. |
java.lang.String |
copy(java.lang.String sourcePath,
java.lang.String targetPath)
Copy a resource in the registry. |
void |
createLink(java.lang.String path,
java.lang.String target)
Create a symbolic link or mount a registry |
void |
createLink(java.lang.String path,
java.lang.String target,
java.lang.String subTargetPath)
Create a symbolic link or mount a registry |
void |
createVersion(java.lang.String path)
Creates a new version of the resource. |
void |
dump(java.lang.String path,
java.io.Writer writer)
Check out the given path as an xml. |
void |
editComment(java.lang.String commentPath,
java.lang.String text)
Change the text of an existing comment. |
Collection |
executeQuery(java.lang.String path,
java.util.Map parameters)
Executes a custom query which lives at the given path in the Registry. |
Association[] |
getAllAssociations(java.lang.String resourcePath)
Get all associations of the given resource. |
java.lang.String[] |
getAspectActions(java.lang.String resourcePath,
java.lang.String aspectName)
Obtain a list of the available actions on a given resource for a given Aspect. |
Association[] |
getAssociations(java.lang.String resourcePath,
java.lang.String associationType)
Get all associations of the given resource for a give association type. |
java.lang.String[] |
getAvailableAspects()
Get a list of the available Aspects for this Registry |
float |
getAverageRating(java.lang.String resourcePath)
Returns the average rating for the given resource. |
Comment[] |
getComments(java.lang.String resourcePath)
Get all comments for the given resource. |
java.lang.String |
getEventingServiceURL(java.lang.String path)
Gets the URL of the WS-Eventing Service. |
LogEntryCollection |
getLogCollection(java.lang.String resourcePath,
int action,
java.lang.String userName,
java.util.Date from,
java.util.Date to,
boolean recentFirst)
Returns the logs of the activities occurred in the registry. |
LogEntry[] |
getLogs(java.lang.String resourcePath,
int action,
java.lang.String userName,
java.util.Date from,
java.util.Date to,
boolean recentFirst)
Returns the logs of the activities occurred in the registry. |
Resource |
getMetaData(java.lang.String path)
Returns the meta data of the resource at a given path. |
int |
getRating(java.lang.String path,
java.lang.String userName)
Returns the rating given to the specified resource by the given user |
RegistryContext |
getRegistryContext()
Get the configuration for this Registry |
TaggedResourcePath[] |
getResourcePathsWithTag(java.lang.String tag)
Returns the paths of all Resources that are tagged with the given tag. |
Tag[] |
getTags(java.lang.String resourcePath)
Returns all tags used for tagging the given resource. |
java.lang.String[] |
getVersions(java.lang.String path)
Get a list of all versions of the resource located at the given path. |
java.lang.String |
importResource(java.lang.String suggestedPath,
java.lang.String sourceURL,
Resource resource)
Creates a resource by fetching the resource content from the given URL. |
void |
invokeAspect(java.lang.String resourcePath,
java.lang.String aspectName,
java.lang.String action)
This invokes an action on a specified Aspect, which must be associated with the Resource at the given path. |
void |
invokeAspect(java.lang.String resourcePath,
java.lang.String aspectName,
java.lang.String action,
java.util.Map<java.lang.String,java.lang.String> parameters)
This invokes an action on a specified Aspect, which must be associated with the Resource at the given path. |
java.lang.String |
move(java.lang.String currentPath,
java.lang.String newPath)
Move a resource in the registry. |
void |
rateResource(java.lang.String resourcePath,
int rating)
Rate the given resource. |
boolean |
removeAspect(java.lang.String aspect)
Remove the given aspect from registry context. |
void |
removeAssociation(java.lang.String sourcePath,
java.lang.String targetPath,
java.lang.String associationType)
To remove an association for a given resource |
void |
removeComment(java.lang.String commentPath)
Delete an existing comment. |
void |
removeLink(java.lang.String path)
Remove a symbolic link or mount point created |
void |
removeTag(java.lang.String path,
java.lang.String tag)
Removes a tag on a resource. |
java.lang.String |
rename(java.lang.String currentPath,
java.lang.String newName)
Rename a resource in the registry. |
void |
restore(java.lang.String path,
java.io.Reader reader)
Check in the input axiom element into database. |
void |
restoreVersion(java.lang.String versionPath)
Reverts a resource to a given version. |
Collection |
searchContent(java.lang.String keywords)
Search the content of resources |
void |
setEventingServiceURL(java.lang.String path,
java.lang.String eventingServiceURL)
Sets the URL of the WS-Eventing Service. |
Methods inherited from interface org.wso2.carbon.registry.core.CoreRegistry |
---|
delete, get, get, newCollection, newResource, put, resourceExists |
Methods inherited from interface org.wso2.carbon.registry.api.Registry |
---|
addComment, importResource |
Methods inherited from interface org.wso2.carbon.registry.api.CoreRegistry |
---|
put |
Methods inherited from interface org.wso2.carbon.registry.core.dataaccess.TransactionManager |
---|
beginTransaction, commitTransaction, rollbackTransaction |
Method Detail |
---|
Resource getMetaData(java.lang.String path) throws RegistryException
getMetaData
in interface org.wso2.carbon.registry.api.Registry
path
- Path of the resource. e.g. /project1/server/deployment.xml
RegistryException
- is thrown if the resource is not in the registryjava.lang.String importResource(java.lang.String suggestedPath, java.lang.String sourceURL, Resource resource) throws RegistryException
suggestedPath
- path where we'd like to add the new resource. Although this path is
specified by the caller of the method, resource may not be actually
added at this path.sourceURL
- where to fetch the resource contentresource
- a template Resource
RegistryException
- if we couldn't get or store the new resourcejava.lang.String rename(java.lang.String currentPath, java.lang.String newName) throws RegistryException
rename
in interface org.wso2.carbon.registry.api.Registry
currentPath
- current path of the resourcenewName
- the name of the new resource
RegistryException
- if something went wrongjava.lang.String move(java.lang.String currentPath, java.lang.String newPath) throws RegistryException
move
in interface org.wso2.carbon.registry.api.Registry
currentPath
- current path of the resourcenewPath
- where we'd like to move the resource
RegistryException
- if something went wrongjava.lang.String copy(java.lang.String sourcePath, java.lang.String targetPath) throws RegistryException
copy
in interface org.wso2.carbon.registry.api.Registry
sourcePath
- current path of the resourcetargetPath
- where we'd like to copy the resource
RegistryException
- if something went wrongvoid createVersion(java.lang.String path) throws RegistryException
createVersion
in interface org.wso2.carbon.registry.api.Registry
path
- the resource path.
RegistryException
- if something went wrong.java.lang.String[] getVersions(java.lang.String path) throws RegistryException
getVersions
in interface org.wso2.carbon.registry.api.Registry
path
- path of a current version of a resource
RegistryException
- if there is an errorvoid restoreVersion(java.lang.String versionPath) throws RegistryException
restoreVersion
in interface org.wso2.carbon.registry.api.Registry
versionPath
- path of the version to be reverted. It is not necessary to provide the
path of the resource as it can be derived from the version path.
RegistryException
- if there is an errorvoid addAssociation(java.lang.String sourcePath, java.lang.String targetPath, java.lang.String associationType) throws RegistryException
addAssociation
in interface org.wso2.carbon.registry.api.Registry
sourcePath
- Path of the source resourcetargetPath
- Path of the target resourceassociationType
- Type of the association
RegistryException
- Depends on the implementationvoid removeAssociation(java.lang.String sourcePath, java.lang.String targetPath, java.lang.String associationType) throws RegistryException
removeAssociation
in interface org.wso2.carbon.registry.api.Registry
sourcePath
- Path of the source resourcetargetPath
- Path of the target resourceassociationType
- Type of the association
RegistryException
- Depends on the implementationAssociation[] getAllAssociations(java.lang.String resourcePath) throws RegistryException
getAllAssociations
in interface org.wso2.carbon.registry.api.Registry
resourcePath
- Path of the resource to analyse associations.
RegistryException
- If something went wrongAssociation[] getAssociations(java.lang.String resourcePath, java.lang.String associationType) throws RegistryException
getAssociations
in interface org.wso2.carbon.registry.api.Registry
resourcePath
- Path of the resource to analyse associations.associationType
- Type of the association , that could be dependency, or some other
type.
RegistryException
- If something went wrongvoid applyTag(java.lang.String resourcePath, java.lang.String tag) throws RegistryException
applyTag
in interface org.wso2.carbon.registry.api.Registry
resourcePath
- Path of the resource to be tagged.tag
- Tag. Any string can be used for the tag.
RegistryException
- is thrown if a resource does not exist in the given path.TaggedResourcePath[] getResourcePathsWithTag(java.lang.String tag) throws RegistryException
getResourcePathsWithTag
in interface org.wso2.carbon.registry.api.Registry
tag
- the tag to search for
RegistryException
- if an error occursTag[] getTags(java.lang.String resourcePath) throws RegistryException
getTags
in interface org.wso2.carbon.registry.api.Registry
resourcePath
- Path of the resource
RegistryException
- is thrown if a resource does not exist in the given path.void removeTag(java.lang.String path, java.lang.String tag) throws RegistryException
removeTag
in interface org.wso2.carbon.registry.api.Registry
path
- Resource path tagged with the given tag.tag
- Name of the tag to be removed.
RegistryException
- if there's a problemjava.lang.String addComment(java.lang.String resourcePath, Comment comment) throws RegistryException
resourcePath
- Path of the resource to add the comment.comment
- Comment instance for the new comment.
RegistryException
- is thrown if a resource does not exist in the given path.void editComment(java.lang.String commentPath, java.lang.String text) throws RegistryException
editComment
in interface org.wso2.carbon.registry.api.Registry
commentPath
- path to comment resource ("..foo/r1;comment:1")text
- new text for the comment.
RegistryException
- Registry implementations may handle exceptions and throw
RegistryException if the exception has to be propagated to the
client.void removeComment(java.lang.String commentPath) throws RegistryException
removeComment
in interface org.wso2.carbon.registry.api.Registry
commentPath
- path to comment resource ("..foo/r1;comment:1")
RegistryException
- Registry implementations may handle exceptions and throw
RegistryException if the exception has to be propagated to the
client.Comment[] getComments(java.lang.String resourcePath) throws RegistryException
getComments
in interface org.wso2.carbon.registry.api.Registry
resourcePath
- path of the resource.
RegistryException
- Registry implementations may handle exceptions and throw
RegistryException if the exception has to be propagated to the
client.void rateResource(java.lang.String resourcePath, int rating) throws RegistryException
rateResource
in interface org.wso2.carbon.registry.api.Registry
resourcePath
- Path of the resource.rating
- Rating value between 1 and 5.
RegistryException
- Registry implementations may handle exceptions and throw
RegistryException if the exception has to be propagated to the
client.float getAverageRating(java.lang.String resourcePath) throws RegistryException
getAverageRating
in interface org.wso2.carbon.registry.api.Registry
resourcePath
- Path of the resource.
RegistryException
- if an error occursint getRating(java.lang.String path, java.lang.String userName) throws RegistryException
getRating
in interface org.wso2.carbon.registry.api.Registry
path
- Path of the resourceuserName
- username of the user
RegistryException
- if there is a problemCollection executeQuery(java.lang.String path, java.util.Map parameters) throws RegistryException
executeQuery
in interface org.wso2.carbon.registry.api.Registry
path
- Path of the query to execute.parameters
- a Map of query parameters (name -> value)
RegistryException
- depends on the implementation.LogEntry[] getLogs(java.lang.String resourcePath, int action, java.lang.String userName, java.util.Date from, java.util.Date to, boolean recentFirst) throws RegistryException
getLogs
in interface org.wso2.carbon.registry.api.Registry
resourcePath
- If given, only the logs related to the resource path will be returned. If
null, logs for all resources will be returned.action
- Only the logs pertaining to this action will be returned. For acceptable
values, see LogEntry.userName
- If given, only the logs for activities done by the given user will be
returned. If null, logs for all users will be returned.from
- If given, logs for activities occurred after the given date will be
returned. If null, there will not be a bound for the starting date.to
- If given, logs for activities occurred before the given date will be
returned. If null, there will not be a bound for the ending date.recentFirst
- If true, returned activities will be most-recent first. If false,
returned activities will be oldest first.
RegistryException
- if there is a problemAccepted values for action parameter
LogEntryCollection getLogCollection(java.lang.String resourcePath, int action, java.lang.String userName, java.util.Date from, java.util.Date to, boolean recentFirst) throws RegistryException
resourcePath
- If given, only the logs related to the resource path will be returned. If
null, logs for all resources will be returned.action
- Only the logs pertaining to this action will be returned. For acceptable
values, see LogEntry.userName
- If given, only the logs for activities done by the given user will be
returned. If null, logs for all users will be returned.from
- If given, logs for activities occurred after the given date will be
returned. If null, there will not be a bound for the starting date.to
- If given, logs for activities occurred before the given date will be
returned. If null, there will not be a bound for the ending date.recentFirst
- If true, returned activities will be most-recent first. If false,
returned activities will be oldest first.
RegistryException
- if there is a problemAccepted values for action parameter
java.lang.String[] getAvailableAspects()
getAvailableAspects
in interface org.wso2.carbon.registry.api.Registry
void associateAspect(java.lang.String resourcePath, java.lang.String aspect) throws RegistryException
associateAspect
in interface org.wso2.carbon.registry.api.Registry
resourcePath
- Path of the resourceaspect
- Name of the aspect
RegistryException
- If some thing went wrong while doing associating the phasevoid invokeAspect(java.lang.String resourcePath, java.lang.String aspectName, java.lang.String action) throws RegistryException
invokeAspect
in interface org.wso2.carbon.registry.api.Registry
resourcePath
- Path of the resourceaspectName
- Name of the aspectaction
- Which action was selected - actions are aspect-specific
RegistryException
- if the Aspect isn't associated with the Resource, or the action
isn't valid, or an Aspect-specific problem occurs.void invokeAspect(java.lang.String resourcePath, java.lang.String aspectName, java.lang.String action, java.util.Map<java.lang.String,java.lang.String> parameters) throws RegistryException
resourcePath
- Path of the resourceaspectName
- Name of the aspectaction
- Which action was selected - actions are aspect-specificparameters
- Parameters to be used for the operation
RegistryException
- if the Aspect isn't associated with the Resource, or the action
isn't valid, or an Aspect-specific problem occurs.java.lang.String[] getAspectActions(java.lang.String resourcePath, java.lang.String aspectName) throws RegistryException
getAspectActions
in interface org.wso2.carbon.registry.api.Registry
resourcePath
- path of the ResourceaspectName
- name of the Aspect to query for available actions
RegistryException
- if the Aspect isn't associated or an Aspect-specific problem
occursRegistryContext getRegistryContext()
Collection searchContent(java.lang.String keywords) throws RegistryException
searchContent
in interface org.wso2.carbon.registry.api.Registry
keywords
- keywords to look for
RegistryException
- throws if the operation failvoid createLink(java.lang.String path, java.lang.String target) throws RegistryException
createLink
in interface org.wso2.carbon.registry.api.Registry
path
- the mount pathtarget
- the point to be mounted
RegistryException
- throws if the operation failvoid createLink(java.lang.String path, java.lang.String target, java.lang.String subTargetPath) throws RegistryException
createLink
in interface org.wso2.carbon.registry.api.Registry
path
- the mount pathtarget
- the point to be mountedsubTargetPath
- sub path in the remote instance to be mounted
RegistryException
- throws if the operation failvoid removeLink(java.lang.String path) throws RegistryException
removeLink
in interface org.wso2.carbon.registry.api.Registry
path
- the mount path
RegistryException
- throws if the operation failvoid restore(java.lang.String path, java.io.Reader reader) throws RegistryException
restore
in interface org.wso2.carbon.registry.api.Registry
path
- path to check inreader
- reader containing resource
RegistryException
- throws if the operation failvoid dump(java.lang.String path, java.io.Writer writer) throws RegistryException
dump
in interface org.wso2.carbon.registry.api.Registry
path
- path to check outwriter
- writer to write the response
RegistryException
- throws if the operation failjava.lang.String getEventingServiceURL(java.lang.String path) throws RegistryException
getEventingServiceURL
in interface org.wso2.carbon.registry.api.Registry
path
- the path to which the WS-Eventing Service URL is required
RegistryException
- throws if the operation failvoid setEventingServiceURL(java.lang.String path, java.lang.String eventingServiceURL) throws RegistryException
setEventingServiceURL
in interface org.wso2.carbon.registry.api.Registry
path
- the path to which the WS-Eventing Service URL is associatedeventingServiceURL
- the URL of the WS-Eventing Service
RegistryException
- throws if the operation failboolean removeAspect(java.lang.String aspect) throws RegistryException
aspect
- the name of the aspect to be removed
RegistryException
- throws if the operation failboolean addAspect(java.lang.String name, Aspect aspect) throws RegistryException
name
- the name of the aspect to be addedaspect
- the name of the aspect object to be added to registry context
RegistryException
- throws if the operation fail
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |