Examples of LayoutDecoration


Examples of org.apache.jetspeed.decoration.LayoutDecoration

        themes = new ArrayList<ThemeBean>();
        RequestContext rc = (RequestContext) request.getAttribute(RequestContext.REQUEST_PORTALENV);           
        Set<String> decorators = (Set<String>)decorationFactory.getPageDecorations(rc);
        for (String name : decorators)
        {
            LayoutDecoration decor = decorationFactory.getLayoutDecoration(name, rc);
            String compatibility = decor.getProperty("compatibility");
            if (compatibility != null && compatibility.compareTo("2.2.1") >= 0)
            {
                ResourceBundle rb = decor.getResourceBundle(rc.getLocale(), rc);
                String title = null;
                try
                {
                    title = rb.getString("title");
                }
                catch(Exception e)
                {}
                if (title == null)
                    title = decor.getName();
                String icon = decor.getProperty("icon");
                if (icon == null)
                {
                    icon = "";
                }
                ThemeBean theme = new ThemeBean(decor.getName(), title, icon);               
                Theme pageTheme = (Theme)rc.getRequest().getAttribute("org.apache.jetspeed.theme");
                if (overrideTheme == null)
                  overrideTheme = pageTheme.getPageLayoutDecoration().getName();
                if (overrideTheme.equals(decor.getName()))
                    theme.setSelected(true);
                themes.add(theme);
            }
        }
        request.getPortletSession().setAttribute("themes", themes);
View Full Code Here

Examples of org.apache.jetspeed.decoration.LayoutDecoration

    {
        RequestContext rc = (RequestContext) request.getAttribute(RequestContext.REQUEST_PORTALENV);           
      Set<String> decorators = (Set<String>)decorationFactory.getPageDecorations(rc);
        for (String name : decorators)
        {
            LayoutDecoration decor = decorationFactory.getLayoutDecoration(name, rc);
            String compatibility = decor.getProperty("compatibility");
            if (compatibility != null && compatibility.compareTo("2.2.1") >= 0)
            {
              return decor.getName();
            }
        }
        return "jetspeed";
    }
View Full Code Here

Examples of org.apache.jetspeed.decoration.LayoutDecoration

              StringBuffer dojoConfigAddOn = new StringBuffer();
              dojoConfigAddOn.append( "    " ).append( DOJO_CONFIG_LAYOUT_DECORATION_PATH_VAR_NAME ).append( " = \"" ).append( desktopContext.getLayoutBasePath() ).append( "\";" ).append( EOL );
              dojoConfigAddOn.append( "    " ).append( DOJO_CONFIG_LAYOUT_VAR_NAME ).append( " = \"" ).append( layoutDecorationName ).append( "\";" ).append( EOL );
              dojoConfigAddOn.append( "    " ).append( DOJO_CONFIG_PORTLET_DECORATIONS_PATH_VAR_NAME ).append( " = \"" ).append( portletDecorationsBasePath ).append( "\";" ).append( EOL );

              LayoutDecoration desktopLayoutDecoration = decorationFactory.getLayoutDecoration( layoutDecorationName, request );
              if ( desktopLayoutDecoration != null )
              {
                boolean atLeastOneFound = false;
                StringBuffer loadingPropsBuffer = new StringBuffer();
                  loadingPropsBuffer.append( "    " ).append( DOJO_CONFIG_LOADING_IMGPROPS_NAME ).append( " = { " );
                  for ( int i = 0 ; i < DESKTOP_LOADING_PROPERTY_NAMES.length ; i++ )
                  {
                      String propValue = desktopLayoutDecoration.getProperty( DESKTOP_LOADING_IMG_NAME_PREFIX + DESKTOP_LOADING_PROPERTY_NAMES[ i ] );
                      if ( propValue != null )
                      {
                          if ( atLeastOneFound )
                          {
                              loadingPropsBuffer.append( ", " );
View Full Code Here

Examples of org.apache.jetspeed.decoration.LayoutDecoration

              StringBuffer dojoConfigAddOn = new StringBuffer();
              dojoConfigAddOn.append( "    " ).append( DOJO_CONFIG_LAYOUT_DECORATION_PATH_VAR_NAME ).append( " = \"" ).append( desktopContext.getLayoutBasePath() ).append( "\";" ).append( EOL );
              dojoConfigAddOn.append( "    " ).append( DOJO_CONFIG_LAYOUT_VAR_NAME ).append( " = \"" ).append( layoutDecorationName ).append( "\";" ).append( EOL );
              dojoConfigAddOn.append( "    " ).append( DOJO_CONFIG_PORTLET_DECORATIONS_PATH_VAR_NAME ).append( " = \"" ).append( portletDecorationsBasePath ).append( "\";" ).append( EOL );

              LayoutDecoration desktopLayoutDecoration = decorationFactory.getLayoutDecoration( layoutDecorationName, request );
              if ( desktopLayoutDecoration != null )
              {
                boolean atLeastOneFound = false;
                StringBuffer loadingPropsBuffer = new StringBuffer();
                  loadingPropsBuffer.append( "    " ).append( DOJO_CONFIG_LOADING_IMGPROPS_NAME ).append( " = { " );
                  for ( int i = 0 ; i < DESKTOP_LOADING_PROPERTY_NAMES.length ; i++ )
                  {
                      String propValue = desktopLayoutDecoration.getProperty( DESKTOP_LOADING_IMG_NAME_PREFIX + DESKTOP_LOADING_PROPERTY_NAMES[ i ] );
                      if ( propValue != null )
                      {
                          if ( atLeastOneFound )
                          {
                              loadingPropsBuffer.append( ", " );
View Full Code Here

Examples of org.apache.jetspeed.decoration.LayoutDecoration

              StringBuffer dojoConfigAddOn = new StringBuffer();
              dojoConfigAddOn.append( "    " ).append( DOJO_CONFIG_LAYOUT_DECORATION_PATH_VAR_NAME ).append( " = \"" ).append( desktopContext.getLayoutBasePath() ).append( "\";" ).append( EOL );
              dojoConfigAddOn.append( "    " ).append( DOJO_CONFIG_LAYOUT_VAR_NAME ).append( " = \"" ).append( layoutDecorationName ).append( "\";" ).append( EOL );
              dojoConfigAddOn.append( "    " ).append( DOJO_CONFIG_PORTLET_DECORATIONS_PATH_VAR_NAME ).append( " = \"" ).append( portletDecorationsBasePath ).append( "\";" ).append( EOL );

              LayoutDecoration desktopLayoutDecoration = decorationFactory.getLayoutDecoration( layoutDecorationName, request );
              if ( desktopLayoutDecoration != null )
              {
                boolean atLeastOneFound = false;
                StringBuffer loadingPropsBuffer = new StringBuffer();
                  loadingPropsBuffer.append( "    " ).append( DOJO_CONFIG_LOADING_IMGPROPS_NAME ).append( " = { " );
                  for ( int i = 0 ; i < DESKTOP_LOADING_PROPERTY_NAMES.length ; i++ )
                  {
                      String propValue = desktopLayoutDecoration.getProperty( DESKTOP_LOADING_IMG_NAME_PREFIX + DESKTOP_LOADING_PROPERTY_NAMES[ i ] );
                      if ( propValue != null )
                      {
                          if ( atLeastOneFound )
                          {
                              loadingPropsBuffer.append( ", " );
View Full Code Here

Examples of org.apache.jetspeed.decoration.LayoutDecoration

        }
        else
        {
            Set<String> styleSheets = new HashSet<String>();
           
            LayoutDecoration layoutDecoration = decorationFactory.getLayoutDecoration(overrideDecoratorName, context);
           
            if (layoutDecoration != null)
            {
                styleSheets.add(layoutDecoration.getStyleSheet());
                styleSheets.add(layoutDecoration.getStyleSheetPortal());
            }
           
            PortletDecoration portletDecoration = decorationFactory.getPortletDecoration(overrideDecoratorName, context);
           
            if (portletDecoration != 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.