@Path(value="/service/req/squash")
@Service
@Produces(value="application/json")
public class SquashPluginResource
extends org.ligoj.app.resource.plugin.AbstractToolPluginResource
implements org.ligoj.app.plugin.req.ReqServicePlugin
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY
Plug-in key.
|
static String |
PARAMETER_PASSWORD
Squash TM user password able to connect to instance.
|
static String |
PARAMETER_PROJECT
Squash TM project's identifier, an integer
|
static String |
PARAMETER_URL
Web site URL
|
static String |
PARAMETER_USER
Squash TM user name able to connect to instance.
|
static String |
URL
Plug-in key.
|
| Constructor and Description |
|---|
SquashPluginResource() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkStatus(Map<String,String> parameters) |
org.ligoj.app.api.SubscriptionStatusWithData |
checkSubscriptionStatus(Map<String,String> parameters) |
List<SquashProject> |
findAllByName(String node,
String criteria)
Search the Squash TM the projects matching to the given criteria.
|
String |
getKey() |
String |
getLastVersion() |
protected SquashProject |
getProject(Map<String,String> parameters,
int id)
Return Squash project from its identifier.
|
protected List<SquashProject> |
getProjects(Map<String,String> parameters)
Return all Squash TM projects without limit.
|
protected List<SquashProject> |
getProjectsDataTables(Map<String,String> parameters,
String criteria)
Return all Squash TM projects without limit and an optional criteria.
|
protected String |
getResource(org.ligoj.app.resource.plugin.CurlProcessor processor,
Map<String,String> parameters,
String url,
String resource)
Return a Squash's resource.
|
protected String |
getResource(Map<String,String> parameters,
String resource)
Return a Squash's resource.
|
String |
getVersion(Map<String,String> parameters) |
void |
link(int subscription) |
javax.ws.rs.core.Response |
redirect(int subscription)
Redirect to the home page of the linked project.
|
protected String |
validateAdminAccess(Map<String,String> parameters)
Validate the basic REST connectivity to Squash.
|
protected SquashProject |
validateProject(Map<String,String> parameters)
Validate the project connectivity.
|
create, download, getInstalledEntities, getVersionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static final String URL
public static final String KEY
public static final String PARAMETER_USER
public static final String PARAMETER_PASSWORD
public static final String PARAMETER_PROJECT
public static final String PARAMETER_URL
public void link(int subscription)
throws IOException
link in interface org.ligoj.app.api.ServicePluginIOExceptionprotected SquashProject validateProject(Map<String,String> parameters) throws IOException
parameters - the project parameters.IOExceptionprotected String validateAdminAccess(Map<String,String> parameters)
parameters - the server parameters.protected String getResource(Map<String,String> parameters, String resource)
null when the resource is
not found.protected String getResource(org.ligoj.app.resource.plugin.CurlProcessor processor, Map<String,String> parameters, String url, String resource)
null when the resource is
not found.@GET
@Path(value="redirect/{subscription:\\d+}")
public javax.ws.rs.core.Response redirect(@PathParam(value="subscription")
int subscription)
throws URISyntaxException
URISyntaxExceptionpublic String getVersion(Map<String,String> parameters)
getVersion in interface org.ligoj.app.api.ToolPluginprotected List<SquashProject> getProjects(Map<String,String> parameters) throws IOException
IOExceptionprotected List<SquashProject> getProjectsDataTables(Map<String,String> parameters, String criteria) throws IOException
IOExceptionprotected SquashProject getProject(Map<String,String> parameters, int id) throws IOException
IOException@GET
@Path(value="{node}/{criteria}")
@Consumes(value="application/json")
public List<SquashProject> findAllByName(@PathParam(value="node")
String node,
@PathParam(value="criteria")
String criteria)
throws IOException
node - the node to be tested with given parameters.criteria - the search criteria.IOExceptionpublic String getKey()
getKey in interface org.ligoj.app.api.FeaturePluginpublic String getLastVersion() throws IOException
getLastVersion in interface org.ligoj.app.api.ToolPluginIOExceptionpublic org.ligoj.app.api.SubscriptionStatusWithData checkSubscriptionStatus(Map<String,String> parameters) throws IOException
checkSubscriptionStatus in interface org.ligoj.app.api.ToolPluginIOExceptionCopyright © 2017 Gfi Informatique. All rights reserved.