@Path(value="/commands/v2") public class CommandEndpoint extends AbstractCommandEndpoint<CommandEndpointDefinition>
CommandEndpointDefinition
commandsManager, STATUS_MESSAGE_COMMAND_NOT_FOUND, STATUS_MESSAGE_ERROR_OCCURRED, STATUS_MESSAGE_FORBIDDEN, STATUS_MESSAGE_OK
Constructor and Description |
---|
CommandEndpoint(CommandEndpointDefinition commandEndpointDefinition,
info.magnolia.commands.CommandsManager commandsManager) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
executeCommand(String commandName,
Map<String,Object> commandMap) |
javax.ws.rs.core.Response |
executeCommand(String catalogName,
String commandName,
Map<String,Object> commandMap) |
protected Collection<String> |
getResponseContextParametersForCommand(String catalogName,
String commandName)
Returns context parameters for particular
Command that will be added to the response after successful command execution. |
isCommandExecutableByCurrentUser
@Inject public CommandEndpoint(CommandEndpointDefinition commandEndpointDefinition, info.magnolia.commands.CommandsManager commandsManager)
@POST @Path(value="/{catalogName}/{commandName:(.)*}") @Consumes(value={"application/json","application/xml"}) @Produces(value={"application/json","application/xml"}) public javax.ws.rs.core.Response executeCommand(@PathParam(value="catalogName") String catalogName, @PathParam(value="commandName") String commandName, Map<String,Object> commandMap) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@POST @Path(value="/{commandName:(.)*}") @Consumes(value={"application/json","application/xml"}) @Produces(value={"application/json","application/xml"}) public javax.ws.rs.core.Response executeCommand(@PathParam(value="commandName") String commandName, Map<String,Object> commandMap) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected Collection<String> getResponseContextParametersForCommand(String catalogName, String commandName)
Command
that will be added to the response after successful command execution.Copyright © 2015 Magnolia International Ltd.. All rights reserved.