Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.theme.editor
Class Editor

java.lang.Object
  extended by org.nuxeo.theme.editor.Editor

public class Editor
extends Object


Constructor Summary
Editor()
           
 
Method Summary
static void activateSkin(String themeName, String bankName, String collectionName, String resourceName, boolean isBaseSkin)
           
static String addPage(String path)
           
static String addPreset(String themeName, String presetName, String category, String value)
           
static String addTheme(String name)
           
static void alignElement(Element element, String position)
           
static void assignStyleProperty(Element element, String propertyName, String value)
           
static void convertCssValueToPreset(String themeName, String category, String presetName, String value)
           
static void createFragmentPreview(String currentThemeName)
           
static void createNamedStyle(Element element, String styleName, String themeName)
           
static void createStyle(Element element)
           
static void deactivateSkin(String themeName)
           
static void deleteElement(Element element)
           
static void deleteNamedStyle(Element element, String styleName, String themeName)
           
static void deletePage(String pagePath)
           
static void deletePreset(String themeName, String presetName)
           
static void deleteStyleView(Style style, String viewName)
           
static void deleteTheme(String src)
           
static int duplicateElement(Element element)
           
static void editPreset(String themeName, String presetName, String value)
           
static List<String> getBankCollections(String bankName)
           
static List<ImageInfo> getBankImages(String bankName)
           
static List<SkinInfo> getBankSkins(String bankName)
           
static List<StyleInfo> getBankStyles(String bankName)
           
static String getCurrentBaseSkinName(String themeName)
           
static Style getCurrentPageSkin(String themeName)
           
static String getCurrentTopSkinName(String themeName)
           
static List<FragmentType> getFragments(String templateEngine)
           
static List<String> getHardcodedColors(String themeName)
           
static List<String> getHardcodedImages(String themeName)
           
static Style getNamedStyleOf(Element element)
           
static List<Style> getNamedStyles(String themeName, ResourceBank resourceBank)
           
static Map<String,String> getPageStyles(String themeName)
           
static SkinInfo getSkinInfo(String bankName, String skinName)
           
static Style getThemeSkin(String themeName)
           
static List<ViewType> getViews(String fragmentTypeName, String templateEngine)
           
static void insertFragment(Element destElement, String typeName, String styleName)
           
static void insertSectionAfter(Element element)
           
static List<Style> listNamedStylesDirectlyInheritingFrom(Style style)
           
static void loadTheme(String src)
           
static void makeElementUseNamedStyle(Element element, String styleName, String themeName)
           
static void moveElement(Element srcElement, Element destElement, int order)
           
static void pasteElement(Element element, String destId)
           
static void removeStyleInheritance(String styleName, String themeName)
           
static void renamePreset(String themeName, String oldName, String newName)
           
static String renderCssPreview(Element element, Style style, String viewName, String basePath)
           
static void repairTheme(String src)
           
static void restoreNamedStyle(Style style, String themeName)
           
static void saveTheme(String themeName)
           
static void saveToUndoBuffer(String themeName, String message)
           
static void setPageStyles(String themeName, Map<String,String> propertyMap)
           
static void setPresetCategory(String themeName, String presetName, String category)
           
static void setStyleInheritance(String styleName, String ancestorStyleName, String themeName)
           
static void splitElement(Element element)
           
static String uncustomizeTheme(String src)
           
static String undo(String themeName)
           
static void updateElementDescription(Element element, String description)
           
static void updateElementLayout(Element element, Map<String,String> propertyMap)
           
static void updateElementProperties(Element element, Map<String,String> propertyMap)
           
static void updateElementStyle(Element element, Style style, String path, String viewName, Map<String,String> propertyMap)
           
static void updateElementStyleCss(Element element, Style style, String viewName, String cssSource)
           
static void updateElementVisibility(Element element, List<String> perspectives, boolean alwaysVisible)
           
static void updateElementWidget(Element element, String viewName)
           
static void updateElementWidth(Format layout, String width)
           
static void updateNamedStyleCss(Style style, String cssSource, String themeName)
           
static void useNoResourceBank(String themeSrc)
           
static void useResourceBank(String themeSrc, String bankName)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Editor

public Editor()
Method Detail

updateElementWidget

public static void updateElementWidget(Element element,
                                       String viewName)
                                throws ThemeException
Throws:
ThemeException

updateElementLayout

public static void updateElementLayout(Element element,
                                       Map<String,String> propertyMap)
                                throws ThemeException
Throws:
ThemeException

updateElementVisibility

public static void updateElementVisibility(Element element,
                                           List<String> perspectives,
                                           boolean alwaysVisible)
                                    throws ThemeException
Throws:
ThemeException

updateElementStyle

public static void updateElementStyle(Element element,
                                      Style style,
                                      String path,
                                      String viewName,
                                      Map<String,String> propertyMap)
                               throws ThemeException
Throws:
ThemeException

setPageStyles

public static void setPageStyles(String themeName,
                                 Map<String,String> propertyMap)
                          throws ThemeException
Throws:
ThemeException

splitElement

public static void splitElement(Element element)
                         throws NodeException,
                                ThemeException
Throws:
NodeException
ThemeException

updateElementStyleCss

public static void updateElementStyleCss(Element element,
                                         Style style,
                                         String viewName,
                                         String cssSource)
                                  throws ThemeException
Throws:
ThemeException

updateNamedStyleCss

public static void updateNamedStyleCss(Style style,
                                       String cssSource,
                                       String themeName)
                                throws ThemeException
Throws:
ThemeException

restoreNamedStyle

public static void restoreNamedStyle(Style style,
                                     String themeName)
                              throws ThemeException
Throws:
ThemeException

updateElementWidth

public static void updateElementWidth(Format layout,
                                      String width)
                               throws ThemeException
Throws:
ThemeException

updateElementProperties

public static void updateElementProperties(Element element,
                                           Map<String,String> propertyMap)
                                    throws ThemeIOException,
                                           ThemeException
Throws:
ThemeIOException
ThemeException

updateElementDescription

public static void updateElementDescription(Element element,
                                            String description)
                                     throws ThemeException
Throws:
ThemeException

repairTheme

public static void repairTheme(String src)
                        throws ThemeIOException,
                               ThemeException
Throws:
ThemeIOException
ThemeException

deleteTheme

public static void deleteTheme(String src)
                        throws ThemeIOException,
                               ThemeException
Throws:
ThemeIOException
ThemeException

deletePage

public static void deletePage(String pagePath)
                       throws ThemeIOException,
                              ThemeException
Throws:
ThemeIOException
ThemeException

saveTheme

public static void saveTheme(String themeName)
                      throws ThemeException
Throws:
ThemeException

renderCssPreview

public static String renderCssPreview(Element element,
                                      Style style,
                                      String viewName,
                                      String basePath)

pasteElement

public static void pasteElement(Element element,
                                String destId)
                         throws ThemeException,
                                NodeException
Throws:
ThemeException
NodeException

moveElement

public static void moveElement(Element srcElement,
                               Element destElement,
                               int order)
                        throws ThemeException,
                               NodeException
Throws:
ThemeException
NodeException

makeElementUseNamedStyle

public static void makeElementUseNamedStyle(Element element,
                                            String styleName,
                                            String themeName)
                                     throws ThemeException
Throws:
ThemeException

removeStyleInheritance

public static void removeStyleInheritance(String styleName,
                                          String themeName)
                                   throws ThemeException
Throws:
ThemeException

setStyleInheritance

public static void setStyleInheritance(String styleName,
                                       String ancestorStyleName,
                                       String themeName)
                                throws ThemeException
Throws:
ThemeException

addPage

public static String addPage(String path)
                      throws ThemeException,
                             NodeException,
                             ThemeIOException
Throws:
ThemeException
NodeException
ThemeIOException

addTheme

public static String addTheme(String name)
                       throws ThemeException
Throws:
ThemeException

uncustomizeTheme

public static String uncustomizeTheme(String src)
                               throws ThemeException
Throws:
ThemeException

assignStyleProperty

public static void assignStyleProperty(Element element,
                                       String propertyName,
                                       String value)
                                throws ThemeException
Throws:
ThemeException

alignElement

public static void alignElement(Element element,
                                String position)
                         throws ThemeException
Throws:
ThemeException

deleteElement

public static void deleteElement(Element element)
                          throws ThemeException,
                                 NodeException
Throws:
ThemeException
NodeException

duplicateElement

public static int duplicateElement(Element element)
                            throws ThemeException,
                                   NodeException
Throws:
ThemeException
NodeException

createStyle

public static void createStyle(Element element)
                        throws ThemeException
Throws:
ThemeException

createNamedStyle

public static void createNamedStyle(Element element,
                                    String styleName,
                                    String themeName)
                             throws ThemeException
Throws:
ThemeException

getNamedStyleOf

public static Style getNamedStyleOf(Element element)
                             throws ThemeException
Throws:
ThemeException

deleteNamedStyle

public static void deleteNamedStyle(Element element,
                                    String styleName,
                                    String themeName)
                             throws ThemeException
Throws:
ThemeException

deleteStyleView

public static void deleteStyleView(Style style,
                                   String viewName)
                            throws ThemeException
Throws:
ThemeException

getHardcodedColors

public static List<String> getHardcodedColors(String themeName)

getHardcodedImages

public static List<String> getHardcodedImages(String themeName)

addPreset

public static String addPreset(String themeName,
                               String presetName,
                               String category,
                               String value)
                        throws ThemeException
Throws:
ThemeException

editPreset

public static void editPreset(String themeName,
                              String presetName,
                              String value)
                       throws ThemeException
Throws:
ThemeException

setPresetCategory

public static void setPresetCategory(String themeName,
                                     String presetName,
                                     String category)
                              throws ThemeException
Throws:
ThemeException

renamePreset

public static void renamePreset(String themeName,
                                String oldName,
                                String newName)
                         throws ThemeException
Throws:
ThemeException

deletePreset

public static void deletePreset(String themeName,
                                String presetName)
                         throws ThemeException
Throws:
ThemeException

convertCssValueToPreset

public static void convertCssValueToPreset(String themeName,
                                           String category,
                                           String presetName,
                                           String value)
                                    throws ThemeException
Throws:
ThemeException

loadTheme

public static void loadTheme(String src)
                      throws ThemeIOException,
                             ThemeException
Throws:
ThemeIOException
ThemeException

insertFragment

public static void insertFragment(Element destElement,
                                  String typeName,
                                  String styleName)
                           throws NodeException,
                                  ThemeException
Throws:
NodeException
ThemeException

insertSectionAfter

public static void insertSectionAfter(Element element)
                               throws NodeException,
                                      ThemeException
Throws:
NodeException
ThemeException

saveToUndoBuffer

public static void saveToUndoBuffer(String themeName,
                                    String message)
                             throws ThemeException
Throws:
ThemeException

undo

public static String undo(String themeName)
                   throws ThemeException
Throws:
ThemeException

createFragmentPreview

public static void createFragmentPreview(String currentThemeName)

activateSkin

public static void activateSkin(String themeName,
                                String bankName,
                                String collectionName,
                                String resourceName,
                                boolean isBaseSkin)
                         throws ThemeException
Throws:
ThemeException

deactivateSkin

public static void deactivateSkin(String themeName)
                           throws ThemeException
Throws:
ThemeException

getCurrentTopSkinName

public static String getCurrentTopSkinName(String themeName)

getCurrentBaseSkinName

public static String getCurrentBaseSkinName(String themeName)

getCurrentPageSkin

public static Style getCurrentPageSkin(String themeName)

useResourceBank

public static void useResourceBank(String themeSrc,
                                   String bankName)
                            throws ThemeException
Throws:
ThemeException

useNoResourceBank

public static void useNoResourceBank(String themeSrc)
                              throws ThemeException
Throws:
ThemeException

getBankSkins

public static List<SkinInfo> getBankSkins(String bankName)

getBankStyles

public static List<StyleInfo> getBankStyles(String bankName)

getSkinInfo

public static SkinInfo getSkinInfo(String bankName,
                                   String skinName)

getBankCollections

public static List<String> getBankCollections(String bankName)

getBankImages

public static List<ImageInfo> getBankImages(String bankName)

getNamedStyles

public static List<Style> getNamedStyles(String themeName,
                                         ResourceBank resourceBank)

listNamedStylesDirectlyInheritingFrom

public static List<Style> listNamedStylesDirectlyInheritingFrom(Style style)

getPageStyles

public static Map<String,String> getPageStyles(String themeName)

getThemeSkin

public static Style getThemeSkin(String themeName)

getFragments

public static List<FragmentType> getFragments(String templateEngine)

getViews

public static List<ViewType> getViews(String fragmentTypeName,
                                      String templateEngine)

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.