Examples of SkinService


Examples of org.exoplatform.portal.resource.SkinService

        addUIFormInput(uiSettingSet);
        UIFormInputIconSelector uiIconSelector = new UIFormInputIconSelector("Icon", "icon");
        addUIFormInput(uiIconSelector);

        UIFormInputThemeSelector uiThemeSelector = new UIFormInputThemeSelector(FIELD_THEME, null);
        SkinService skinService = getApplicationComponent(SkinService.class);
        uiThemeSelector.getChild(UIItemThemeSelector.class).setValues(skinService.getPortletThemes());
        addUIFormInput(uiThemeSelector);

        PortalRequestContext prc = Util.getPortalRequestContext();
        if (prc.getSiteType() != SiteType.USER) {
            UIListPermissionSelector uiListPermissionSelector = createUIComponent(UIListPermissionSelector.class, null, null);
View Full Code Here

Examples of org.exoplatform.portal.resource.SkinService

        StandaloneAppRequestContext context = WebuiRequestContext.getCurrentInstance();
        return service.getJSConfig(context.getControllerContext(), context.getLocale());
    }

    public Collection<Skin> getPortalSkins() {
        SkinService skinService = getApplicationComponent(SkinService.class);
        Collection<Skin> skins = new ArrayList<Skin>(skinService.getPortalSkins(skin_));
        return skins;
    }
View Full Code Here

Examples of org.exoplatform.portal.resource.SkinService

        if (!isPortalExist(editPortal)) {
            return;
        }

        SkinService skinService = getApplicationComponent(SkinService.class);
        skinService.invalidatePortalSkinCache(editPortal.getName(), editPortal.getSkin());
        try {
            dataStorage.save(portalConfig);
        } catch (StaleModelException ex) {
            // Temporary solution for concurrency-related issue. The StaleModelException should be
            // caught in the ApplicationLifecycle
View Full Code Here

Examples of org.exoplatform.portal.resource.SkinService

    @SuppressWarnings("unchecked")
    public UISkinSelector() {
        name_ = "UIChangeSkin";
        UIPortal uiPortal = Util.getUIPortal();
        List<SelectItemCategory> itemCategories = new ArrayList<SelectItemCategory>();
        SkinService skinService = uiPortal.getApplicationComponent(SkinService.class);
        for (String skin : skinService.getAvailableSkinNames()) {
            SelectItemCategory skinCategory = new SelectItemCategory(skin, false);
            skinCategory.addSelectItemOption(new SelectItemOption(skin, skin, skin));
            itemCategories.add(skinCategory);
        }
        itemCategories.get(0).setSelected(true);
View Full Code Here

Examples of org.exoplatform.portal.resource.SkinService

     * - skin for portlets that belongs to portal (not in the page).
     * Those portlet skins will be merged into one css resource called CompositeSkin <br/>
     * we are using ajax to change navigation, if only page is change, only the skin of portlet in page is changed (not the portlet belongs to portal)
     */
    public Collection<Skin> getPortalSkins() {
        SkinService skinService = getApplicationComponent(SkinService.class);

        //
        Collection<Skin> skins = new ArrayList<Skin>(skinService.getPortalSkins(skin_));

        //
        SkinConfig skinConfig = skinService.getSkin(Util.getUIPortal().getName(), skin_);
        if (skinConfig != null) {
            skins.add(skinConfig);
        }

        //
        Set<SkinConfig> portletConfigs = getPortalPortletSkins();
        // don't merge portlet if portlet not available
        if (!portletConfigs.isEmpty()) {
            skins.add(skinService.merge(portletConfigs));
        }
        //
        return skins;
    }
View Full Code Here

Examples of org.exoplatform.portal.resource.SkinService

    public void setSkin(String skin) {
        this.skin_ = skin;
    }

    private SkinConfig getSkin(String module, String skin) {
        SkinService skinService = getApplicationComponent(SkinService.class);
        return skinService.getSkin(module, skin);
    }
View Full Code Here

Examples of org.exoplatform.portal.resource.SkinService

                    uiContainer.findComponentOfType(uiportlets, UIPortlet.class);
                }
            }
        }
        List<SkinConfig> skins = new ArrayList<SkinConfig>();
        SkinService skinService = getApplicationComponent(SkinService.class);
        for (UIPortlet uiPortlet : uiportlets) {
            String skinId = uiPortlet.getSkinId();
            if (skinId != null) {
                SkinConfig skinConfig = skinService.getSkin(skinId, skin_);
                if (skinConfig != null)
                    skins.add(skinConfig);
            }
        }
        StringBuilder b = new StringBuilder(1000);
View Full Code Here

Examples of org.exoplatform.portal.resource.SkinService

        uiSettingSet.addUIFormInput(new UIFormStringInput(FIELD_DESCRIPTION, FIELD_DESCRIPTION, null));
        uiSettingSet.addUIFormInput(new UIFormSelectBox(FIELD_LOCALE, FIELD_LOCALE, languages)
                .addValidator(MandatoryValidator.class));

        List<SelectItemOption<String>> listSkin = new ArrayList<SelectItemOption<String>>();
        SkinService skinService = getApplicationComponent(SkinService.class);
        List<String> skinNames = new ArrayList<String>(skinService.getAvailableSkinNames());
        Collections.sort(skinNames);
        for (String skin : skinNames) {
            SelectItemOption<String> skinOption = new SelectItemOption<String>(skin, skin);
            listSkin.add(skinOption);
        }
View Full Code Here

Examples of org.exoplatform.portal.resource.SkinService

        uiSettingSet.addUIFormInput(new UIFormStringInput(FIELD_DESCRIPTION, FIELD_DESCRIPTION, null));
        uiSettingSet.addUIFormInput(new UIFormSelectBox(FIELD_LOCALE, FIELD_LOCALE, languages)
                .addValidator(MandatoryValidator.class));

        List<SelectItemOption<String>> listSkin = new ArrayList<SelectItemOption<String>>();
        SkinService skinService = getApplicationComponent(SkinService.class);
        for (String skin : skinService.getAvailableSkinNames()) {
            SelectItemOption<String> skinOption = new SelectItemOption<String>(skin, skin);
            listSkin.add(skinOption);
        }
        listSkin.get(0).setSelected(true);
View Full Code Here

Examples of org.exoplatform.portal.resource.SkinService

        PortalRequestContext prc = PortalRequestContext.getCurrentInstance();
        return service.getJSConfig(prc.getControllerContext(), prc.getLocale());
    }

    public Collection<SkinConfig> getPortalSkins(SkinVisitor visitor) {
        SkinService skinService = getApplicationComponent(SkinService.class);
        if (visitor != null) {
            return skinService.findSkins(visitor);
        } else {
            return Collections.emptyList();
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.