As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
http://localhost:8080/alfresco/s/someco/example/moveCategory?sourceNodeRef=workspace://SpacesStore/4847824c-11e1-4dd6-9c10-e5a680481809&targetNodeRef=workspace://SpacesStore/4b764d55-2c57-428c-802d-f396bc95c3b9
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status) { final String sourceNodeRefString = req.getParameter("sourceNodeRef"); final String targetNodeRefString = req.getParameter("targetNodeRef"); if (sourceNodeRefString == null || targetNodeRefString == null) { logger.debug("Source or target node ref not set"); status.setCode(400); status.setMessage("Required data has not been provided"); status.setRedirect(true); } NodeRef sourceNodeRef = new NodeRef(sourceNodeRefString); NodeRef targetNodeRef = new NodeRef(targetNodeRefString); String sourceName = (String) nodeService.getProperty(sourceNodeRef, ContentModel.PROP_NAME); nodeService.moveNode(sourceNodeRef, targetNodeRef, ContentModel.ASSOC_SUBCATEGORIES, QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, sourceName)); Map<String, Object> model = new HashMap<String, Object>(); model.put("sourceNodeRef", sourceNodeRefString); model.put("sourceName", sourceName); model.put("targetNodeRef", targetNodeRefString); return model; }