org.jasig.portal.layout.dlm
Class EditManager

java.lang.Object
  extended by org.jasig.portal.layout.dlm.EditManager

public class EditManager
extends Object

Handles ILF node edit directives recorded in the PLF.

Since:
uPortal 2.5
Version:
$Revision: 19776 $ $Date: 2010-01-14 16:17:21 -0600 (Thu, 14 Jan 2010) $

Field Summary
static String RCS_ID
           
 
Constructor Summary
EditManager()
           
 
Method Summary
static void addPrefsDirective(Element plfNode, String attributeName, IPerson person)
          Create and append a user preferences edit directive to the edit set if not there.
static boolean applyEditSet(Element plfChild, Element original)
          Evaluate whether attribute changes exist in the ilfChild and if so apply them.
static void removeEditDirective(String elementId, String attributeName, IPerson person)
          Searches for a dlm:edit command which indicates that a node attribute was reset to the value in the fragment and if found removes it from the user's PLF.
static void removePreferenceDirective(IPerson person, String elementId, String attributeName)
          Searches for a dlm:pref command which indicates that a user preference was change and if found removes it from the user's PLF.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RCS_ID

public static final String RCS_ID
See Also:
Constant Field Values
Constructor Detail

EditManager

public EditManager()
Method Detail

addPrefsDirective

public static void addPrefsDirective(Element plfNode,
                                     String attributeName,
                                     IPerson person)
                              throws PortalException
Create and append a user preferences edit directive to the edit set if not there. This only records that the attribute was changed. The value will be in the user preferences object for the user.

Throws:
PortalException

applyEditSet

public static boolean applyEditSet(Element plfChild,
                                   Element original)
Evaluate whether attribute changes exist in the ilfChild and if so apply them. Returns true if some changes existed. If changes existed but matched those in the original node then they are not applicable, are removed from the editSet, and false is returned.


removePreferenceDirective

public static void removePreferenceDirective(IPerson person,
                                             String elementId,
                                             String attributeName)
Searches for a dlm:pref command which indicates that a user preference was change and if found removes it from the user's PLF.


removeEditDirective

public static void removeEditDirective(String elementId,
                                       String attributeName,
                                       IPerson person)
Searches for a dlm:edit command which indicates that a node attribute was reset to the value in the fragment and if found removes it from the user's PLF.



Copyright © 2010 Jasig. All Rights Reserved.