Michiel Rop pushed to branch feature/wpm at cms-community / hippo-site-toolkit


Commits:
f2de294c by Michiel Rop at 2017-04-24T15:16:54+02:00
HSTTWO-3980 Add url for create and select branch

- add url for creating a new branch for a certain project
- add url for selecting a project

These url's are called from the project.service.js in the channel
manager to select and associate a project from a channel.

- - - - -


1 changed file:

- 
client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java


Changes:

=====================================
client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java
=====================================
--- 
a/client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java
+++ 
b/client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java
@@ -31,6 +31,7 @@ import javax.jcr.query.QueryManager;
 import javax.jcr.query.QueryResult;
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
@@ -177,6 +178,24 @@ public class MountResource extends AbstractConfigResource {
         return ok("New Page model loaded successfully", 
newPageModelRepresentation);
     }
 
+    @POST
+    @Path("/selectbranch")
+    @Produces(MediaType.APPLICATION_JSON)
+    public Response selectBranch(@QueryParam("mountId") final String mountId, 
String branchId) {
+        log.debug("Select branch:{} of mount:{}", branchId, mountId);
+        return ok("Branch selected successfully");
+    }
+
+    @PUT
+    @Path("/createbranch")
+    @Produces(MediaType.APPLICATION_JSON)
+    public Response createBranch(@QueryParam("mountId") final String mountId, 
String branchId) {
+        log.debug("Create branch:{} from mount:{}", branchId, mountId);
+        return ok("Branch created successfully");
+    }
+
+
+
     private NewPageModelRepresentation getNewPageModelRepresentation(final 
Mount mount) {
         PrototypesRepresentation prototypePagesRepresentation = new 
PrototypesRepresentation().represent(mount.getHstSite(),
                 true, getPageComposerContextService());



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/f2de294c9ce89041c9da952bb195c4f4b0056f51
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to