Java Code Examples for org.springframework.extensions.webscripts.Status#STATUS_ACCEPTED

The following examples show how to use org.springframework.extensions.webscripts.Status#STATUS_ACCEPTED . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ActionExecutionsEntityResource.java    From alfresco-remote-api with GNU Lesser General Public License v3.0 5 votes vote down vote up
@WebApiDescription(title = "Execute action", successStatus = Status.STATUS_ACCEPTED)
@Override
public List<Action> create(List<Action> entity, Parameters parameters)
{
    if (entity == null || entity.size() != 1)
    {
        throw new InvalidArgumentException("Please specify one action request only.");
    }

    List<Action> result = new ArrayList<>(1);
    result.add(actions.executeAction(entity.get(0), parameters));
    return result;
}
 
Example 2
Source File: NodeRenditionsRelation.java    From alfresco-remote-api with GNU Lesser General Public License v3.0 5 votes vote down vote up
@WebApiDescription(title = "Create rendition", successStatus = Status.STATUS_ACCEPTED)
@Override
public List<Rendition> create(String nodeId, List<Rendition> entity, Parameters parameters)
{
    NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, nodeId);
    renditions.createRenditions(nodeRef, entity, parameters);
    return null;
}
 
Example 3
Source File: NodeVersionRenditionsRelation.java    From alfresco-remote-api with GNU Lesser General Public License v3.0 5 votes vote down vote up
@WebApiDescription(title = "Create rendition", successStatus = Status.STATUS_ACCEPTED)
@Override
public List<Rendition> create(String nodeId, List<Rendition> entity, Parameters parameters)
{
    String versionId = parameters.getRelationshipId();

    NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, nodeId);
    renditions.createRenditions(nodeRef, versionId, entity, parameters);
    return null;
}
 
Example 4
Source File: SheepEntityResource.java    From alfresco-remote-api with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
@WebApiDescription(title = "Gets all the Sheep", successStatus = Status.STATUS_ACCEPTED)
@WebApiParameters({
            @WebApiParam(name = "siteId", title = "Site id", description="What ever."),
            @WebApiParam(name = "who", title = "Who", kind=ResourceParameter.KIND.HTTP_HEADER),
            @WebApiParam(name = "body", title = "aintnobody", kind=ResourceParameter.KIND.HTTP_BODY_OBJECT),
            @WebApiParam(name = "requiredParam", title = "",required=true, kind=ResourceParameter.KIND.QUERY_STRING)})
public CollectionWithPagingInfo<Sheep> readAll(Parameters params)
{
    return CollectionWithPagingInfo.asPagedCollection(new Sheep("paged"));
}
 
Example 5
Source File: QuickShareLinkEntityResource.java    From alfresco-remote-api with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Operation("email")
@WebApiDescription(title = "Email shared link", successStatus = Status.STATUS_ACCEPTED)
public void email(String sharedId, QuickShareLinkEmailRequest emailRequest, Parameters parameters, WithResponse response)
{
    quickShareLinks.emailSharedLink(sharedId, emailRequest, parameters);
}
 
Example 6
Source File: GrassEntityResource.java    From alfresco-remote-api with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Operation("grow")
@WebApiDescription(title = "Grow the grass",successStatus = Status.STATUS_ACCEPTED)
@WebApiParam(name = "Grass", title = "The grass.",required=true, kind = ResourceParameter.KIND.HTTP_BODY_OBJECT)
public String growTheLawn(String id, Grass grass, Parameters parameters, WithResponse withResponse) {
    return "Growing well";
}
 
Example 7
Source File: BadEntityResource.java    From alfresco-remote-api with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
@WebApiDescription(title = "Gets all the Sheep", successStatus = Status.STATUS_ACCEPTED)
public CollectionWithPagingInfo<Sheep> readAll(Parameters params)
{
    throw new RuntimeException("read all");
}
 
Example 8
Source File: MultiPartTestEntityResource.java    From alfresco-remote-api with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
@WebApiDescription(title = "Creates a multipart", successStatus = Status.STATUS_ACCEPTED)
public MultiPartTestResponse create(FormData formData, Parameters parameters, WithResponse withResponse)
{
    return new MultiPartTestResponse(formData.getParameters().get("name")[0]);
}