define fragments
For uPortal Version 4.0.4+
There are two ways to deal with this change if it affects you:
Option 1: Stick with your dlm.xml. You can undo the switch to database-persisted fragments very easily.
- Uncomment the 'dlmConfigurationLoader' bean that references the 'dlmConfigurationLoader' class in uportal-war/src/main/resources/properties/contexts/layoutContext.xml, and comment out the one that references the 'RDBMConfigurationLoader' class.
- Make sure your dlm.xml file is present in the proper location: uportal-war/src/main/resources/properties/. WARNING: If your DLM fragments are defined in this way when you migrate data from a previous version, you will experience issues migrating user customizations to fragment-based content.
For instructions on configuring the dlm.xml file see define a fragment using dlm.xml
Option 2: Convert to database-persisted fragments
For additional information on database-persisted fragments see define fragments as database entities
- Take each <dlm:fragment> element in your dlm.xml file and surround it with a complete <fragment-definition> element (full example below).
- Paste these elements each in their own file with a .fragment-definition.xml extension
- Then use the command: > ant data-import -Ddir=<path.to.fragment-def.dir> to import your fragment definitions into the portal database.
<?xml version="1.0" encoding="UTF-8"?> <fragment-definition xmlns:dlm="http://org.jasig.portal.layout.dlm.config" script="classpath://org/jasig/portal/io/import-fragment-definition_v3-1.crn"> <dlm:fragment name="Academics" ownerID="academics-lo" precedence="350"> <dlm:audience evaluatorFactory="org.jasig.portal.layout.dlm.providers.GroupMembershipEvaluatorFactory"> <paren mode="OR"> <attribute mode="deepMemberOf" name="Students"/> </paren> </dlm:audience> </dlm:fragment> </fragment-definition>
*NOTE: The format for <dlm:fragment> elements is identical to dlm.xml
Users upgrading from 4.0.2 or 4.0.3
Due to a column name reserved word conflict the UP_EVENT_AGGR_CONF_INTRVL_EXC and UP_EVENT_AGGR_CONF_INTRVL_INC tables need to be manually dropped and then re-created using ant db-hibernate-update
For uPortal Version 4.0.0 - 4.0.3
By default, fragments are defined using dlm.xml. However, you still have the option to configure fragments using database entities.You can find instructions for both options here: