"Packaged Stuff"
What is "Packaged Stuff"
"Packaged Stuff" is a sub-pane of the customization options, which allows users to subscribe to tabs containing pre-defined sets of portlets, in a similar manner to adding a portlet to their layout. These tabs must be configured in order to allow users to opt-in to their presence in the layout; this is done in the audience element of the fragment definition DLM file (for an example see “uportal-war/src/main/data/quickstart_entities/fragment-definition/ent-lo.fragment-definition.xml”).
Step 1: Set up a Fragment
To setup a fragment (tab) which users can subscribe to, the fragment must be configured to use "org.jasig.portal.layout.dlm.providers.SubscribedTabEvaluatorFactory" as the Evaluator factory instead of “org.jasig.portal.layout.dlm.providers.GroupMembershipEvaluatorFactory”. More information found on how to setup and define a fragment.
Note that generally the updated configuration must be loaded into the database after modification. You can import the fragment using the "data-import" tool below or you can upload your fragment-definition from the Portal Administration portlet using the "Import, Export, and Delete Entities" feature.
ant data-import -Dfile=/path/to/ent-lo.fragment-definition.xml"
The resulting fragment should look something like this:
<dlm:fragment name='Entertainment' ownerID='ent-lo' precedence='60' description="Games, humor, and entertainment news"> <dlm:audience evaluatorFactory="org.jasig.portal.layout.dlm.providers.SubscribedTabEvaluatorFactory"/> </dlm:fragment>
In this case it will be titled Entertainment, and the description will be "Games, humor, and entertainment news". If a description is not specified, the name of the fragment layout will be used as the description instead.
Step 2: Set up Group Membership
You must define a membership for the fragment’s owner, whether a single group membership or a group itself. By default a group called “Subscribable Fragments” is included as part of the quickstart configuration, and is generally sufficient for this purpose.
<group script="classpath://org/jasig/portal/io/import-group_membership_v3-2.crn"> <name>Custom Fragments</name> <entity-type>org.jasig.portal.security.IPerson</entity-type> <creator>system</creator> <description>This is a Custom Fragment</description> <children/> </group>
Step 3: Add the Fragment to "Packaged Stuff" list
To add a fragment to the “Packaged Stuff” sub-pane, you will need a permission set for the fragment. There is a sensible default permission set provided, which provides everyone with the ability to subscribe to fragments in the “Subscribable Fragments” group.
<permission-set script="classpath://org/jasig/portal/io/import-permission_set_v3-1.crn"> <owner>UP_FRAGMENT</owner> <principal-type>org.jasig.portal.groups.IEntityGroup</principal-type> <principal> <group>Everyone</group> </principal> <activity>FRAGMENT_SUBSCRIBE</activity> <target permission-type="GRANT"> <group>Custom Fragments</group> </target> </permission-set>
Further details on permissions can be found at https://wiki.jasig.org/display/UPM40/About+uPortal+Permissions; in general permission sets for subscribable fragments would be defined in terms of groups (i.e. “Everyone”, “Student PAGS”, “College of Medicine and Veterinary Medicine - MVM”, etc.)
Step 4: Add portlets to the "Packaged Stuff" Fragment
Fragment layout is configured via the portal administration interface. Full details are provided at https://wiki.jasig.org/display/UPM40/setup+a+fragment+layout, however in summary:
- Under “Portal Administration Tools”, select “Manage DLM Fragments"
Select the fragment to configure, and then “Go”
You will automatically be logged in as the owner of the fragment, and be presented with options to edit the fragment as below:
Here portlets can be added/removed as normal. It’s also possible to edit the permissions which users have on each column and the tab as a whole, for example to stop users from being able to change the layout.