Package org.jasig.portal.layout.dlm

Examples of org.jasig.portal.layout.dlm.FragmentDefinition


    if (fragmentDefElement == null) {
      throw new IllegalArgumentException("Could not find required dlm:fragment element in fragment-definition file");
    }
    final String fragmentName = fragmentDefElement.getAttribute("name");
   
    FragmentDefinition fragmentDefinition = this.fragmentDefinitionDao.getFragmentDefinition(fragmentName);
    if (fragmentDefinition == null) {
      fragmentDefinition = new FragmentDefinition(fragmentDefElement);
    }
   
    fragmentDefinition.loadFromEelement(fragmentDefElement);
   
    this.fragmentDefinitionDao.updateFragmentDefinition(fragmentDefinition);
  }
View Full Code Here


  /* (non-Javadoc)
   * @see org.jasig.portal.io.xml.crn.AbstractDom4jExporter#exportDataElement(java.lang.String)
   */
  @Override
  protected Element exportDataElement(String id) {
    final FragmentDefinition fragmentDefinition = fragmentDefinitionDao.getFragmentDefinition(id);
    if (fragmentDefinition == null) {
      return null;
    }
   
        final org.dom4j.Document fragmentDefDoc = new org.dom4j.DocumentFactory().createDocument();
        final Element fragmentDefElement = fragmentDefDoc.addElement("fragment-definition");
        fragmentDefElement.addNamespace("dlm", "http://www.uportal.org/layout/dlm");
        fragmentDefElement.addAttribute("script", "classpath://org/jasig/portal/io/import-fragment-definition_v3-1.crn");
    fragmentDefinition.toElement(fragmentDefElement);
       
        return fragmentDefElement;
  }
View Full Code Here

TOP

Related Classes of org.jasig.portal.layout.dlm.FragmentDefinition

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.