Class ThemeEditorResource


  • @Path("/lum-internal/admin/portal-studio/theme/editor")
    public class ThemeEditorResource
    extends java.lang.Object
    Supports Rest API for theme editor.
    Since:
    8.0.0
    Version:
    $Revision$ $Date$
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String areThemeFilesEditable​(java.lang.String themeId)  
      void createNewDirectory​(java.lang.String themeId, java.lang.String filePath, java.lang.String dirName)  
      void createNewFile​(java.lang.String themeId, java.lang.String filePath, java.lang.String fileName)  
      void deleteFile​(java.lang.String themeId, java.lang.String filePath)  
      java.lang.String deletePageHolder​(java.lang.String pageId, java.lang.String pageHolderName)  
      javax.ws.rs.core.Response downloadZip​(java.lang.String themeId, java.lang.String folderPath)  
      java.lang.String getEditableThemes​(java.lang.String pageId)  
      protected java.util.List<ITheme> getEditableThemes​(PageConfig page, ITransaction transaction)  
      java.lang.String getEditTheme​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)  
      javax.ws.rs.core.Response getFile​(java.lang.String themeId, java.lang.String filePath)  
      java.lang.String getFileText​(java.lang.String themeId, java.lang.String filePath)  
      java.lang.String getFolderChildren​(java.lang.String themeId, java.lang.String folderPath)  
      java.lang.String getPageBlockInfo​(java.lang.String pageId, java.lang.String pageBlockPath, int pageBlockPathParents)  
      java.lang.String getPageHolderInfo​(java.lang.String pageId, java.lang.String pageHolderPath)  
      java.lang.String getParentSelector​(java.lang.String pageId, java.lang.String pageHolderPath)  
      java.lang.String insertPageBlock​(java.lang.String pageId, java.lang.String pageBlockPath, int pageBlockPathParents, java.lang.String pageBlockName, java.lang.String pageBlockReference, java.lang.String selectedPageBlock)  
      java.lang.String insertPageHolder​(java.lang.String pageId, java.lang.String pageHolderPath, java.lang.String pageHolderName)  
      java.lang.String isPageLayoutFileEditable​(java.lang.String pageId)  
      void renameFile​(java.lang.String themeId, java.lang.String filePath, java.lang.String newFileName)  
      void saveFileText​(java.lang.String themeId, java.lang.String filePath, java.lang.String fileContent)  
      java.lang.String uploadFile​(java.io.InputStream uploadedInputStream, org.glassfish.jersey.media.multipart.FormDataContentDisposition fileDetail, java.lang.String themeId, java.lang.String filePath)  
      java.lang.String uploadZip​(java.io.InputStream uploadedInputStream, org.glassfish.jersey.media.multipart.FormDataContentDisposition fileDetail, java.lang.String themeId, java.lang.String filePath)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ThemeEditorResource

        public ThemeEditorResource()
    • Method Detail

      • areThemeFilesEditable

        @Path("/arethemefileseditable")
        @GET
        @Produces("text/plain")
        public java.lang.String areThemeFilesEditable​(@QueryParam("themeId")
                                                      java.lang.String themeId)
                                               throws PortalException
        Throws:
        PortalException
      • getEditableThemes

        @Path("/geteditablethemes")
        @GET
        @Produces("text/plain")
        public java.lang.String getEditableThemes​(@QueryParam("pageId")
                                                  java.lang.String pageId)
                                           throws PortalException,
                                                  java.io.IOException
        Throws:
        PortalException
        java.io.IOException
      • isPageLayoutFileEditable

        @Path("/ispagelayoutfileeditable")
        @GET
        @Produces("text/plain")
        public java.lang.String isPageLayoutFileEditable​(@QueryParam("pageId")
                                                         java.lang.String pageId)
                                                  throws PortalException,
                                                         java.io.IOException
        Throws:
        PortalException
        java.io.IOException
      • getPageHolderInfo

        @Path("/getpageholderinfo")
        @POST
        @Produces("application/json")
        public java.lang.String getPageHolderInfo​(@FormParam("pageId")
                                                  java.lang.String pageId,
                                                  @FormParam("pageHolderPath")
                                                  java.lang.String pageHolderPath)
                                           throws PortalException,
                                                  java.io.IOException
        Throws:
        PortalException
        java.io.IOException
      • getParentSelector

        @Path("/getparentselector")
        @POST
        @Produces("application/json")
        public java.lang.String getParentSelector​(@FormParam("pageId")
                                                  java.lang.String pageId,
                                                  @FormParam("pageHolderPath")
                                                  java.lang.String pageHolderPath)
                                           throws PortalException,
                                                  java.io.IOException
        Throws:
        PortalException
        java.io.IOException
      • insertPageHolder

        @Path("/insertpageholder")
        @POST
        @Produces("text/plain")
        public java.lang.String insertPageHolder​(@FormParam("pageId")
                                                 java.lang.String pageId,
                                                 @FormParam("pageHolderPath")
                                                 java.lang.String pageHolderPath,
                                                 @FormParam("pageHolderName")
                                                 java.lang.String pageHolderName)
                                          throws PortalException,
                                                 java.io.IOException
        Throws:
        PortalException
        java.io.IOException
      • deletePageHolder

        @Path("/deletepageholder")
        @POST
        @Produces("text/plain")
        public java.lang.String deletePageHolder​(@FormParam("pageId")
                                                 java.lang.String pageId,
                                                 @FormParam("pageHolderName")
                                                 java.lang.String pageHolderName)
                                          throws PortalException,
                                                 java.io.IOException
        Throws:
        PortalException
        java.io.IOException
      • getPageBlockInfo

        @Path("/getpageblockinfo")
        @POST
        @Produces("application/json")
        public java.lang.String getPageBlockInfo​(@FormParam("pageId")
                                                 java.lang.String pageId,
                                                 @FormParam("pageBlockPath")
                                                 java.lang.String pageBlockPath,
                                                 @FormParam("pageBlockPathParents")
                                                 int pageBlockPathParents)
                                          throws PortalException,
                                                 java.io.IOException
        Throws:
        PortalException
        java.io.IOException
      • insertPageBlock

        @Path("/insertpageblock")
        @POST
        @Produces("text/plain")
        public java.lang.String insertPageBlock​(@FormParam("pageId")
                                                java.lang.String pageId,
                                                @FormParam("pageBlockPath")
                                                java.lang.String pageBlockPath,
                                                @FormParam("pageBlockPathParents")
                                                int pageBlockPathParents,
                                                @FormParam("pageBlockName")
                                                java.lang.String pageBlockName,
                                                @FormParam("pageBlockReference")
                                                java.lang.String pageBlockReference,
                                                @FormParam("selectedPageBlock")
                                                java.lang.String selectedPageBlock)
                                         throws PortalException,
                                                java.io.IOException
        Throws:
        PortalException
        java.io.IOException
      • getEditTheme

        @Path("/editTheme")
        @GET
        public java.lang.String getEditTheme​(@Context
                                             javax.servlet.http.HttpServletRequest req,
                                             @Context
                                             javax.servlet.http.HttpServletResponse resp)
                                      throws PortalException,
                                             java.io.IOException
        Throws:
        PortalException
        java.io.IOException
      • getFolderChildren

        @Path("/getfolderchildren")
        @GET
        @Produces("text/plain")
        public java.lang.String getFolderChildren​(@QueryParam("themeId")
                                                  java.lang.String themeId,
                                                  @QueryParam("folderPath")
                                                  java.lang.String folderPath)
                                           throws PortalException,
                                                  java.io.IOException
        Throws:
        PortalException
        java.io.IOException
      • getFile

        @Path("/getfile")
        @GET
        public javax.ws.rs.core.Response getFile​(@QueryParam("themeId")
                                                 java.lang.String themeId,
                                                 @QueryParam("filePath")
                                                 java.lang.String filePath)
                                          throws java.io.IOException,
                                                 PortalException
        Throws:
        java.io.IOException
        PortalException
      • getFileText

        @Path("/getfiletext")
        @GET
        @Produces("text/plain")
        public java.lang.String getFileText​(@QueryParam("themeId")
                                            java.lang.String themeId,
                                            @QueryParam("filePath")
                                            java.lang.String filePath)
                                     throws java.io.IOException,
                                            PortalException
        Throws:
        java.io.IOException
        PortalException
      • saveFileText

        @Path("/savefiletext")
        @POST
        public void saveFileText​(@FormParam("themeId")
                                 java.lang.String themeId,
                                 @FormParam("filePath")
                                 java.lang.String filePath,
                                 @FormParam("fileContent")
                                 java.lang.String fileContent)
                          throws java.io.IOException,
                                 PortalException
        Throws:
        java.io.IOException
        PortalException
      • createNewFile

        @Path("/createnewfile")
        @POST
        public void createNewFile​(@FormParam("themeId")
                                  java.lang.String themeId,
                                  @FormParam("filePath")
                                  java.lang.String filePath,
                                  @FormParam("fileName")
                                  java.lang.String fileName)
                           throws java.io.IOException,
                                  PortalException
        Throws:
        java.io.IOException
        PortalException
      • createNewDirectory

        @Path("/createnewdir")
        @POST
        public void createNewDirectory​(@FormParam("themeId")
                                       java.lang.String themeId,
                                       @FormParam("filePath")
                                       java.lang.String filePath,
                                       @FormParam("dirName")
                                       java.lang.String dirName)
                                throws java.io.IOException,
                                       PortalException
        Throws:
        java.io.IOException
        PortalException
      • renameFile

        @Path("/renamefile")
        @POST
        public void renameFile​(@FormParam("themeId")
                               java.lang.String themeId,
                               @FormParam("filePath")
                               java.lang.String filePath,
                               @FormParam("newFileName")
                               java.lang.String newFileName)
                        throws java.io.IOException,
                               PortalException
        Throws:
        java.io.IOException
        PortalException
      • deleteFile

        @Path("/deletefile")
        @POST
        public void deleteFile​(@FormParam("themeId")
                               java.lang.String themeId,
                               @FormParam("filePath")
                               java.lang.String filePath)
                        throws java.io.IOException,
                               PortalException
        Throws:
        java.io.IOException
        PortalException
      • uploadFile

        @POST
        @Path("/uploadfile")
        @Consumes("multipart/form-data")
        public java.lang.String uploadFile​(java.io.InputStream uploadedInputStream,
                                           org.glassfish.jersey.media.multipart.FormDataContentDisposition fileDetail,
                                           java.lang.String themeId,
                                           java.lang.String filePath)
                                    throws PortalException,
                                           java.io.IOException
        Throws:
        PortalException
        java.io.IOException
      • uploadZip

        @POST
        @Path("/uploadzip")
        @Consumes("multipart/form-data")
        public java.lang.String uploadZip​(java.io.InputStream uploadedInputStream,
                                          org.glassfish.jersey.media.multipart.FormDataContentDisposition fileDetail,
                                          java.lang.String themeId,
                                          java.lang.String filePath)
                                   throws PortalException,
                                          java.io.IOException
        Throws:
        PortalException
        java.io.IOException
      • downloadZip

        @Path("/downloadzip")
        @GET
        @Produces("application/octet-stream")
        public javax.ws.rs.core.Response downloadZip​(@QueryParam("themeId")
                                                     java.lang.String themeId,
                                                     @QueryParam("folderPath")
                                                     java.lang.String folderPath)
                                              throws java.io.IOException,
                                                     PortalException
        Throws:
        java.io.IOException
        PortalException