org.jasig.portal.layout.dlm
Class DistributedUserPreferences

java.lang.Object
  extended by org.jasig.portal.StylesheetUserPreferences
      extended by org.jasig.portal.ThemeStylesheetUserPreferences
          extended by org.jasig.portal.StructureStylesheetUserPreferences
              extended by org.jasig.portal.layout.dlm.DistributedUserPreferences
All Implemented Interfaces:
Serializable

public class DistributedUserPreferences
extends StructureStylesheetUserPreferences

Distributed layout Extension to user preferences object for stylesheets performing structure or theme transformation. This extension adds support for user preferences set by layout owneres in incorporated elements.

Since:
uPortal 2.5
Version:
$Revision: 19776 $ $Date: 2010-01-14 16:17:21 -0600 (Thu, 14 Jan 2010) $
Author:
Mark Boyd mboyd@campuspipeline.com
See Also:
Serialized Form

Field Summary
protected  Hashtable incorporatedChannelAttributeValues
           
protected  Hashtable incorporatedFolderAttributeValues
           
static String RCS_ID
           
 
Fields inherited from class org.jasig.portal.StructureStylesheetUserPreferences
defaultFolderAttributeValues, folderAttributeNumbers, folderAttributeValues
 
Fields inherited from class org.jasig.portal.ThemeStylesheetUserPreferences
channelAttributeNumbers, channelAttributeValues, defaultChannelAttributeValues
 
Constructor Summary
DistributedUserPreferences()
          Creates a new DistributedUserPreferences object with empty tables.
DistributedUserPreferences(DistributedUserPreferences dup)
          Creates a new DistributedUserPreferences object populated with all values from the passed-in instance.
DistributedUserPreferences(StructureStylesheetUserPreferences ssup)
          Creates a DistributedUserPreferences with values for super classes derived from those of the passed in StructureStylesheetUserPreferences object.
DistributedUserPreferences(ThemeStylesheetUserPreferences tsup)
          If instantiated with a theme stylesheet preferences then this object should only be used in place of a theme stylesheet user prefs since structure stylesheet oriented variables will not be initialized.
 
Method Summary
 void changeChannelId(String oldChannelId, String newChannelId)
          Used when loading fragment layouts and converting them to their "fragmentized" version suitable for incorporating into other user's layouts.
 void changeFolderId(String oldFolderId, String newFolderId)
          Used when loading fragment layouts and converting them to their "fragmentized" version suitable for incorporating into other user's layouts.
 String getChannelAttributeValue(String channelSubscribeId, String attributeName)
           
 Enumeration getChannels()
           
 String getDefaultChannelAttributeValue(String channelSubscribeId, String attributeName)
          Returns the default value for the specified attribute for the specified channel.
 String getDefaultFolderAttributeValue(String folderId, String attributeName)
          Returns the default value for the specified attribute for the specified folder.
 String getFolderAttributeValue(String folderId, String attributeName)
           
 Enumeration getFolders()
           
 boolean hasChannel(String chanId)
           
 boolean hasFolder(String folderId)
           
 Object newInstance()
          Provides a copy of this object with all fields instantiated to reflect the values of this object.
 void removeChannel(String channelSubscribeId)
           
 void removeDefinedChannelAttributeValue(String channelID, String attributeName)
           
 void removeDefinedFolderAttributeValue(String folderID, String attributeName)
           
 void removeFolder(String folderID)
           
 void setIncorporatedChannelAttributeValue(String channelSubscribeId, String attributeName, String attributeValue)
          Sets the value of an attribute to the value that it had on the channel in the fragment from which it was incorporated.
 void setIncorporatedFolderAttributeValue(String folderSubscribeId, String attributeName, String attributeValue)
          Sets the value of an attribute to the value that it had on the folder in the fragment from which it was incorporated.
 
Methods inherited from class org.jasig.portal.StructureStylesheetUserPreferences
addFolder, addFolderAttribute, getCacheKey, getDefinedFolderAttributeValue, getFolderAttributeNames, removeFolderAttribute, setFolderAttributeDefaultValue, setFolderAttributeValue
 
Methods inherited from class org.jasig.portal.ThemeStylesheetUserPreferences
addChannel, addChannelAttribute, getChannelAttributeNames, getDefinedChannelAttributeValue, removeChannelAttribute, setChannelAttributeDefaultValue, setChannelAttributeValue
 
Methods inherited from class org.jasig.portal.StylesheetUserPreferences
deleteParameter, getParameterValue, getParameterValues, getStylesheetId, putParameterValue, setParameterValues, setStylesheetId
 
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

incorporatedChannelAttributeValues

protected Hashtable incorporatedChannelAttributeValues

incorporatedFolderAttributeValues

protected Hashtable incorporatedFolderAttributeValues
Constructor Detail

DistributedUserPreferences

public DistributedUserPreferences()
Creates a new DistributedUserPreferences object with empty tables.


DistributedUserPreferences

public DistributedUserPreferences(StructureStylesheetUserPreferences ssup)
Creates a DistributedUserPreferences with values for super classes derived from those of the passed in StructureStylesheetUserPreferences object.

Parameters:
ssup -

DistributedUserPreferences

public DistributedUserPreferences(ThemeStylesheetUserPreferences tsup)
If instantiated with a theme stylesheet preferences then this object should only be used in place of a theme stylesheet user prefs since structure stylesheet oriented variables will not be initialized.


DistributedUserPreferences

public DistributedUserPreferences(DistributedUserPreferences dup)
Creates a new DistributedUserPreferences object populated with all values from the passed-in instance.

Parameters:
dup -
Method Detail

newInstance

public Object newInstance()
Provides a copy of this object with all fields instantiated to reflect the values of this object. This allows subclasses to override to add correct copying behavior for their added fields.

Overrides:
newInstance in class StructureStylesheetUserPreferences
Returns:
a copy of this object

getFolders

public Enumeration getFolders()
Overrides:
getFolders in class StructureStylesheetUserPreferences

hasFolder

public boolean hasFolder(String folderId)
Overrides:
hasFolder in class StructureStylesheetUserPreferences

getDefaultFolderAttributeValue

public String getDefaultFolderAttributeValue(String folderId,
                                             String attributeName)
Returns the default value for the specified attribute for the specified folder. Defaults for an attribute may be unique to a folder since an incorporated value becomes the default value for a fragment user.


getFolderAttributeValue

public String getFolderAttributeValue(String folderId,
                                      String attributeName)
Overrides:
getFolderAttributeValue in class StructureStylesheetUserPreferences

setIncorporatedFolderAttributeValue

public void setIncorporatedFolderAttributeValue(String folderSubscribeId,
                                                String attributeName,
                                                String attributeValue)
Sets the value of an attribute to the value that it had on the folder in the fragment from which it was incorporated. User overrides, if allowed, are not set here. The setFolderAttributeValue() method is where user overrides are set and maintained distinctly from the original values had in the originating fragment.

Parameters:
folderSubscribeId -
attributeName -
attributeValue -

removeFolder

public void removeFolder(String folderID)
Overrides:
removeFolder in class StructureStylesheetUserPreferences

removeChannel

public void removeChannel(String channelSubscribeId)
Overrides:
removeChannel in class ThemeStylesheetUserPreferences

removeDefinedFolderAttributeValue

public void removeDefinedFolderAttributeValue(String folderID,
                                              String attributeName)

changeFolderId

public void changeFolderId(String oldFolderId,
                           String newFolderId)
Used when loading fragment layouts and converting them to their "fragmentized" version suitable for incorporating into other user's layouts. One aspect of fragmentization is converting the user and layout node IDs to globally unique and consistent IDs. This method is used to replace the folder's user and layout specific ID with its globally unique value.

Parameters:
oldFolderId -
newFolderId -

getChannels

public Enumeration getChannels()
Overrides:
getChannels in class ThemeStylesheetUserPreferences

hasChannel

public boolean hasChannel(String chanId)
Overrides:
hasChannel in class ThemeStylesheetUserPreferences

getDefaultChannelAttributeValue

public String getDefaultChannelAttributeValue(String channelSubscribeId,
                                              String attributeName)
Returns the default value for the specified attribute for the specified channel. Defaults for an attribute may be unique to a channel since an incorporated value becomes the default value for a fragment user.


getChannelAttributeValue

public String getChannelAttributeValue(String channelSubscribeId,
                                       String attributeName)
Overrides:
getChannelAttributeValue in class ThemeStylesheetUserPreferences

setIncorporatedChannelAttributeValue

public void setIncorporatedChannelAttributeValue(String channelSubscribeId,
                                                 String attributeName,
                                                 String attributeValue)
Sets the value of an attribute to the value that it had on the channel in the fragment from which it was incorporated. User overrides, if allowed, are not set here. The setChannelAttributeValue() method is where user overrides are set and maintained distinctly from the original values had in the originating fragment.

Parameters:
channelSubscribeId -
attributeName -
attributeValue -

removeDefinedChannelAttributeValue

public void removeDefinedChannelAttributeValue(String channelID,
                                               String attributeName)

changeChannelId

public void changeChannelId(String oldChannelId,
                            String newChannelId)
Used when loading fragment layouts and converting them to their "fragmentized" version suitable for incorporating into other user's layouts. One aspect of fragmentization is converting the user and layout node IDs to globally unique and consistent IDs. This method is used to replace the channel's user and layout specific ID with its globally unique value.

Parameters:
oldChannelId -
newChannelId -


Copyright © 2010 Jasig. All Rights Reserved.