Package org.jasig.portal

Examples of org.jasig.portal.ChannelDefinition


        String type = ls.getType();
        if (type != null && type.startsWith(Constants.LEGACY_NS))
            type = Constants.NS + type.substring(Constants.LEGACY_NS.length());

  if (ls.isChannel()) {
            ChannelDefinition channelDef = crs.getChannelDefinition(ls.getChanId());
    if (channelDef != null && channelApproved(channelDef.getApprovalDate())) {
        if (localeAware) {
            channelDef.setLocale(ls.getLocale()); // for i18n by Shoji
            }
      structure = channelDef.getDocument(doc, channelPrefix + ls.getStructId());
    } else {
        // Create an error channel if channel is missing or not approved
        ChannelDefinition cd = new ChannelDefinition(ls.getChanId());
        cd.setTitle("Missing channel");
        cd.setName("Missing channel");
        cd.setTimeout(20000);
        String missingChannel = "Unknown";
        if (channelDef != null) {
            missingChannel = channelDef.getName();
        }
        structure = cd.getDocument(doc, channelPrefix + ls.getStructId(),
                "The '" + missingChannel + "' channel is no longer available. " +
                "Please remove it from your layout.",
                ErrorCode.CHANNEL_MISSING_EXCEPTION.getCode());
    }
  } else
View Full Code Here


                 throw new SAXException(pe);
               }
            } // Getting the channel ID by the fname
            else if ( qName.equals("channel") ) {
             String fname = atts.getValue("fname");
             ChannelDefinition chanDef;
             try {
              chanDef = channelStore.getChannelDefinition(fname);
             } catch ( Exception e ) {
                 // We have to catch Exception because getChannelDefinition() throws Exception.
                 throw new SAXException(e);
             }
             if (chanDef == null){
                 throw new SAXException("Unable to find definition for channel fname: "+ fname);
             }              
             ai.addAttribute(uri,"id","id","CDATA",chanDef.getId()+"");
            }

            if(qName.equals("group")) { // this could be made more robust by adding another mode for "groups" element
                groupMode=true;
                groupUri=uri; groupLocalName=localName; groupAtts=new AttributesImpl(atts);
View Full Code Here

TOP

Related Classes of org.jasig.portal.ChannelDefinition

Copyright © 2018 www.massapicom. 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.