ModeShape Distribution 3.2.0.Final

org.modeshape.web.jcr.rest.client
Interface IRestClient

All Known Implementing Classes:
JsonRestClient

Deprecated. since ModeShape 3.1, this should be obsolete

@Deprecated
public interface IRestClient

The IRestClient interface is the API for all REST clients used by the Eclipse ModeShape plugin.


Method Summary
 boolean fileExists(File file, Workspace workspace, String path)
          Deprecated. Checks if the given file exists or not on the server, by issuing a GET request.
 Map<String,NodeType> getNodeTypes(Repository repository)
          Deprecated. Obtains the ModeShape node types defined within the specified workspace.
 Collection<Repository> getRepositories(Server server)
          Deprecated. Obtains the ModeShape repositories defined within the specified server.
 URL getUrl(File file, String path, Workspace workspace)
          Deprecated. Returns a url string, representing a "server recognizable" url for a the given file.
 Collection<Workspace> getWorkspaces(Repository repository)
          Deprecated. Obtains the workspaces defined within the specified ModeShape respository.
 Status publish(Workspace workspace, String path, File file)
          Deprecated. Publishes, or uploads, a local file to the workspace at the specified path.
 Status publish(Workspace workspace, String path, File file, boolean useVersioning)
          Deprecated. Publishes, or uploads, a local file to the workspace at the specified path.
 List<QueryRow> query(Workspace workspace, String language, String statement)
          Deprecated. Executes the given query in the workspace.
 List<QueryRow> query(Workspace workspace, String language, String statement, int offset, int limit)
          Deprecated. Executes the given query in the workspace.
 List<QueryRow> query(Workspace workspace, String language, String statement, int offset, int limit, Map<String,String> variables)
          Deprecated. Executes the given query in the workspace.
 Status unpublish(Workspace workspace, String path, File file)
          Deprecated. Unpublishes, or deletes, the resource at the specified path in the workspace.
 Server validate(Server server)
          Deprecated. Determines whether the specified server is valid and can be used to establish a connection.
 

Method Detail

validate

Server validate(Server server)
                throws Exception
Deprecated. 
Determines whether the specified server is valid and can be used to establish a connection. This method returns a Server instance (that may be slightly different than the supplied Server instance, based upon the version of the server being used) and which should be used in all subsequent operations.

Parameters:
server - the server (never null)
Returns:
the validated server, which should be used in all subsequent operations (never null)
Throws:
Exception - if there is a problem validating the server
Since:
3.0

getRepositories

Collection<Repository> getRepositories(Server server)
                                       throws Exception
Deprecated. 
Obtains the ModeShape repositories defined within the specified server.

Parameters:
server - the server whose repositories are being requested (never null)
Returns:
the repositories within the specified server (never null)
Throws:
Exception - if there is a problem obtaining the repositories

getNodeTypes

Map<String,NodeType> getNodeTypes(Repository repository)
                                  throws Exception
Deprecated. 
Obtains the ModeShape node types defined within the specified workspace.

Parameters:
repository - for whose node types are being requested (never null)
Returns:
the node types defined within the specified workspace (never null)
Throws:
Exception - if there is a problem obtaining the node types

getUrl

URL getUrl(File file,
           String path,
           Workspace workspace)
           throws Exception
Deprecated. 
Returns a url string, representing a "server recognizable" url for a the given file. NOTE: This does not issue a request

Parameters:
file - the file whose URL is being requested (never null)
path - the path in the ModeShape workspace where the file is/could be located (never null)
workspace - the workspace where the file is/could be located (never null)
Returns:
the workspace URL for the specified file (never null)
Throws:
Exception - if there is a problem obtaining the URL or if the file is a directory

fileExists

boolean fileExists(File file,
                   Workspace workspace,
                   String path)
                   throws Exception
Deprecated. 
Checks if the given file exists or not on the server, by issuing a GET request.

Parameters:
file - the file whose existence is checked, (never null)
workspace - the workspace where the file is/could be located (never null)
path - the path in the ModeShape workspace to the parent of the file (never null)
Returns:
true if the file exists on the server, or false otherwise.
Throws:
Exception - if there is a problem while performing the check

getWorkspaces

Collection<Workspace> getWorkspaces(Repository repository)
                                    throws Exception
Deprecated. 
Obtains the workspaces defined within the specified ModeShape respository.

Parameters:
repository - the repository whose workspaces are being requested (never null)
Returns:
the workspaces within the specified repository (never null)
Throws:
Exception - if there is a problem obtaining the workspaces

publish

Status publish(Workspace workspace,
               String path,
               File file)
Deprecated. 
Publishes, or uploads, a local file to the workspace at the specified path. This method does not utilize any versioning, and is equivalent to calling "publish(workspace,path,file,false) ".

Parameters:
workspace - the workspace where the resource will be published (never null)
path - the unencoded path to the folder where the file will be published (never null)
file - the resource being published (never null)
Returns:
a status of the publishing operation outcome (never null)

publish

Status publish(Workspace workspace,
               String path,
               File file,
               boolean useVersioning)
Deprecated. 
Publishes, or uploads, a local file to the workspace at the specified path. This method allows the client to specify whether the uploaded file should be versioned. If so, this method will add the "mix:versionable" mixin to the "nt:file" node, and subsequent attempts to re-publish will result in new versions in the version history of the file. If no versioning is to be done, then no version history is maintained for the file, and subsequent attemps to re-publish will simply overwrite any existing content.

Parameters:
workspace - the workspace where the resource will be published (never null)
path - the unencoded path to the folder where the file will be published (never null)
file - the resource being published (never null)
useVersioning - true if the uploaded file should be versioned, or false if no JCR versioning be used
Returns:
a status of the publishing operation outcome (never null)

unpublish

Status unpublish(Workspace workspace,
                 String path,
                 File file)
Deprecated. 
Unpublishes, or deletes, the resource at the specified path in the workspace. If a file being unpublished is not found in the workspace an info status is returned.

Parameters:
workspace - the workspace where the resource will be unpublished (never null)
path - the unencoded path to the folder where the file is published (never null)
file - the file being unpublished (never null)
Returns:
a status of the unpublishing operation outcome (never null)

query

List<QueryRow> query(Workspace workspace,
                     String language,
                     String statement)
                     throws Exception
Deprecated. 
Executes the given query in the workspace.

Parameters:
workspace - the workspace where the resource will be unpublished (never null)
language - the JCR query language to use (never null)
statement - the query itself (never null)
Returns:
the list of rows returned by the query (never null)
Throws:
Exception - if there is a problem obtaining the workspaces

query

List<QueryRow> query(Workspace workspace,
                     String language,
                     String statement,
                     int offset,
                     int limit)
                     throws Exception
Deprecated. 
Executes the given query in the workspace.

Parameters:
workspace - the workspace where the resource will be unpublished (never null)
language - the JCR query language to use (never null)
statement - the query itself (never null)
offset - the first row to be returned; if this value is negative, rows are returned starting with the first row
limit - the maximum number of rows to be returned; if this value is negative, all rows are returned
Returns:
the list of rows returned by the query (never null)
Throws:
Exception - if there is a problem obtaining the workspaces

query

List<QueryRow> query(Workspace workspace,
                     String language,
                     String statement,
                     int offset,
                     int limit,
                     Map<String,String> variables)
                     throws Exception
Deprecated. 
Executes the given query in the workspace.

Parameters:
workspace - the workspace where the resource will be unpublished (never null)
language - the JCR query language to use (never null)
statement - the query itself (never null)
offset - the first row to be returned; if this value is negative, rows are returned starting with the first row
limit - the maximum number of rows to be returned; if this value is negative, all rows are returned
variables - the query variables; may be null
Returns:
the list of rows returned by the query (never null)
Throws:
Exception - if there is a problem obtaining the workspaces

ModeShape Distribution 3.2.0.Final

Copyright © 2008-2013 JBoss, a division of Red Hat. All Rights Reserved.