Examples of SkinDescription


Examples of org.apache.cocoon.portal.layout.SkinDescription

                final Configuration[] skinConfs = current.getChild("skins").getChildren("skin");
                if ( skinConfs != null ) {
                    for(int s=0;s<skinConfs.length;s++) {
                        final Configuration currentSkin = skinConfs[s];
                        final String skinName = currentSkin.getAttribute("name");
                        final SkinDescription desc = new SkinDescription();
                        desc.setName(skinName);
                        desc.setBasePath(currentSkin.getAttribute("base-path"));
                        desc.setThumbnailPath(currentSkin.getChild("thumbnail-path").getValue(null));
                        skinList.add(desc);
                    }
                }
            } catch (Exception e) {
                throw new ConfigurationException("Unable to setup new portal component manager for portal " + name, e);
View Full Code Here

Examples of org.apache.cocoon.portal.layout.SkinDescription

                    skinName = "common";
                }
            }
           
            // find the correct skin
            SkinDescription desc = null;
            final Iterator i = portalService.getSkinDescriptions().iterator();
            while ( i.hasNext() && desc == null ) {
                final SkinDescription current = (SkinDescription)i.next();
                if ( current.getName().equals(skinName) ) {
                    desc = current;
                }
            }
            if ( desc != null ) {
                if ( "skin".equals(name) ) {
                    return skinName;
                } else if ( "skin.basepath".equals(name) ) {
                    return desc.getBasePath();
                } else if ( "skin.thumbnailpath".equals(name) ) {
                    return desc.getThumbnailPath();
                } else if ( name.startsWith("skin.thumbnailuri.") ) {
                    String selectedSkinName = name.substring(name.lastIndexOf(".")+ 1, name.length());
                    for(Iterator it = portalService.getSkinDescriptions().iterator(); it.hasNext();) {
                        SkinDescription selected = (SkinDescription) it.next();
                        if(selected.getName().equals(selectedSkinName)) {
                            return selected.getBasePath() + "/"  + selected.getThumbnailPath();
                        }
                    }
                }
            }
            return null;
View Full Code Here

Examples of org.apache.cocoon.portal.layout.SkinDescription

                final Configuration[] skinConfs = current.getChild("skins").getChildren("skin");
                if ( skinConfs != null ) {
                    for(int s=0;s<skinConfs.length;s++) {
                        final Configuration currentSkin = skinConfs[s];
                        final String skinName = currentSkin.getAttribute("name");
                        final SkinDescription desc = new SkinDescription();
                        desc.setName(skinName);
                        desc.setBasePath(currentSkin.getAttribute("base-path"));
                        desc.setThumbnailPath(currentSkin.getChild("thumbnail-path").getValue(null));
                        skinList.add(desc);
                    }
                }
            } catch (Exception e) {
                throw new ConfigurationException("Unable to setup new portal component manager for portal " + name, e);
View Full Code Here

Examples of org.apache.cocoon.portal.layout.SkinDescription

                final Configuration[] skinConfs = current.getChild("skins").getChildren("skin");
                if ( skinConfs != null ) {
                    for(int s=0;s<skinConfs.length;s++) {
                        final Configuration currentSkin = skinConfs[s];
                        final String skinName = currentSkin.getAttribute("name");
                        final SkinDescription desc = new SkinDescription();
                        desc.setName(skinName);
                        desc.setBasePath(currentSkin.getAttribute("base-path"));
                        desc.setThumbnailPath(currentSkin.getChild("thumbnail-path").getValue(null));
                        skinList.add(desc);
                    }
                }
            } catch (Exception e) {
                throw new ConfigurationException("Unable to setup new portal component manager for portal " + name, e);
View Full Code Here

Examples of org.apache.cocoon.portal.layout.SkinDescription

                    skinName = "common";
                }
            }
           
            // find the correct skin
            SkinDescription desc = null;
            final Iterator i = portalService.getSkinDescriptions().iterator();
            while ( i.hasNext() && desc == null ) {
                final SkinDescription current = (SkinDescription)i.next();
                if ( current.getName().equals(skinName) ) {
                    desc = current;
                }
            }
            if ( desc != null ) {
                if ( "skin".equals(name) ) {
                    return skinName;
                } else if ( "skin.basepath".equals(name) ) {
                    return desc.getBasePath();
                } else if ( "skin.thumbnailpath".equals(name) ) {
                    return desc.getThumbnailPath();
                } else if ( name.startsWith("skin.thumbnailuri.") ) {
                    String selectedSkinName = name.substring(name.lastIndexOf(".")+ 1, name.length());
                    for(Iterator it = portalService.getSkinDescriptions().iterator(); it.hasNext();) {
                        SkinDescription selected = (SkinDescription) it.next();
                        if(selected.getName().equals(selectedSkinName)) {
                            return selected.getBasePath() + "/"  + selected.getThumbnailPath();
                        }
                    }
                }
            }
            return null;
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.