Class CommonSkinDAO

    • Method Detail

      • getPreviewURI

        public String getPreviewURI​(String siteName,
                                    String lang)
        Get the URI to preview a site
        Parameters:
        siteName - the site name
        lang - the site langage
        Returns:
        The uri
      • saveChanges

        public Map<String,​ObjectsaveChanges​(String skinName,
                                                    boolean quit)
                                             throws IOException
        Save the current skin into the skin work folder
        Parameters:
        skinName - The name of the skin
        quit - True if the temp directory can be removed
        Returns:
        The name of the skin
        Throws:
        IOException - if an error occurs while manipulating files
      • commitChanges

        public Map<String,​ObjectcommitChanges​(String skinName,
                                                      boolean quit)
                                               throws Exception
        Commit the changes made to the skin
        Parameters:
        skinName - the name of the skin
        quit - True to remove the temporary directory
        Returns:
        A map with information
        Throws:
        Exception - if an error occurs when committing the skin changes
      • cancelChanges

        public Map<String,​ObjectcancelChanges​(String skinName,
                                                      boolean workVersion,
                                                      String toolId)
                                               throws IOException
        Cancel the current modification to the skin
        Parameters:
        skinName - The name of the skin
        workVersion - True it is the work version, false for the temp version
        toolId - the id of the tool
        Returns:
        True if some changes were canceled
        Throws:
        IOException - if an error occurs while manipulating files
      • getSkinModel

        public String getSkinModel​(String siteName,
                                   String skinName,
                                   String mode)
        Get the model for the skin
        Parameters:
        siteName - the site name. Can be null if skinName is not null.
        skinName - the skin name. Can be null if siteName is not null.
        mode - the edition mode. Can be null.
        Returns:
        the model's name or null if there is no model for this skin
      • getLock

        public Map<String,​ObjectgetLock​(String siteName,
                                                String skinName)
                                         throws IOException
        Get lock informations on a skin
        Parameters:
        siteName - the site name. Can be null if skinName is not null.
        skinName - the skin name. Can be null if siteName is not null.
        Returns:
        Informations about the lock
        Throws:
        IOException - if an error occurs
      • clearModifications

        public Map<String,​ObjectclearModifications​(String skinName,
                                                           boolean workVersion)
                                                    throws IOException
        Revert changes and back to last work version or to current skin
        Parameters:
        skinName - The skin name
        workVersion - true to get back the work version
        Returns:
        The skin name in case of success or lock infos if the skin is locked.
        Throws:
        IOException - if an error occurs