001: /* Copyright 2002 The JA-SIG Collaborative. All rights reserved.
002: * See license distributed with this file and
003: * available online at http://www.uportal.org/license.html
004: */
005:
006: package org.jasig.portal.layout.alm;
007:
008: import java.util.Map;
009: import java.util.Collection;
010: import org.jasig.portal.PortalException;
011: import org.jasig.portal.UserPreferences;
012: import org.jasig.portal.UserProfile;
013: import org.jasig.portal.security.IPerson;
014: import org.jasig.portal.groups.IGroupMember;
015: import org.jasig.portal.layout.IUserLayoutStore;
016:
017: /**
018: * IAggregatedUserLayoutStore defines the base methods working with aggregated user layout store.
019: *
020: * Prior to uPortal 2.5, this class existed in the package org.jasig.portal.layout.
021: * It was moved to its present package to reflect that it is part of Aggregated
022: * Layouts.
023: *
024: * @author Michael Ivanov
025: * @version $Revision: 36812 $
026: */
027: public interface IAggregatedUserLayoutStore extends IUserLayoutStore {
028:
029: /**
030: * Add the new user layout node.
031: * @param person an <code>IPerson</code> object specifying the user
032: * @param profile a user profile for which the layout is being stored
033: * @param node a <code>ALNode</code> object specifying the node
034: * @return a <code>ALNode</code> object specifying the node with the generated node ID
035: * @exception PortalException if an error occurs
036: */
037: public ALNode addUserLayoutNode(IPerson person,
038: UserProfile profile, ALNode node) throws PortalException;
039:
040: /**
041: * Returns the user layout internal representation.
042: * @param person an <code>IPerson</code> object specifying the user
043: * @param profile a user profile for which the layout is being stored
044: * @return a <code>IAggregatedLayout</code> object containing the internal representation of the user layout
045: * @exception PortalException if an error occurs
046: */
047:
048: public IAggregatedLayout getAggregatedLayout(IPerson person,
049: UserProfile profile) throws PortalException;
050:
051: /**
052: * Persists user layout document.
053: * @param person an <code>IPerson</code> object specifying the user
054: * @param profile a user profile for which the layout is being stored
055: * @param layout a <code>IAggregatedLayout</code> containing an aggregated user layout
056: * @exception PortalException if an error occurs
057: */
058: public void setAggregatedLayout(IPerson person,
059: UserProfile profile, IAggregatedLayout layout)
060: throws PortalException;
061:
062: /**
063: * Persists the fragment
064: * @param person an <code>IPerson</code> object specifying the user
065: * @param layoutImpl a <code>ILayoutFragment</code> object containing a fragment
066: * @param userPrefs a <code>UserPreferences</code> object containing user preferences for column width persistance
067: * @exception PortalException if an error occurs
068: */
069: public void setFragment(IPerson person, ILayoutFragment layoutImpl,
070: UserPreferences userPrefs) throws PortalException;
071:
072: /**
073: * Returns the layout fragment as a user layout.
074: * @param person an <code>IPerson</code> object specifying the user
075: * @param fragmentId a fragment ID
076: * @return a <code>ILayoutFragment</code> object containing the internal representation of the user fragment
077: * @exception PortalException if an error occurs
078: */
079: public ILayoutFragment getFragment(IPerson person, String fragmentId)
080: throws PortalException;
081:
082: /**
083: * Deletes the fragment that has been loaded as a layout.
084: * @param person an <code>IPerson</code> object specifying the user
085: * @param fragmentId a fragment ID
086: * @exception PortalException if an error occurs
087: */
088: public void deleteFragment(IPerson person, String fragmentId)
089: throws PortalException;
090:
091: /**
092: * Returns the fragment IDs/names which the user is an owner of
093: * @param person an <code>IPerson</code> object specifying the user
094: * @return a <code>Map</code> object containing the fragment IDs
095: * @exception PortalException if an error occurs
096: */
097: public Map getFragments(IPerson person) throws PortalException;
098:
099: /**
100: * Returns the list of Ids of the fragments that the user can subscribe to
101: * @param person an <code>IPerson</code> object specifying the user
102: * @return <code>Collection</code> a set of the fragment IDs
103: * @exception PortalException if an error occurs
104: */
105: public Collection getSubscribableFragments(IPerson person)
106: throws PortalException;
107:
108: /**
109: * Returns the user group keys which the fragment is published to
110: * @param person an <code>IPerson</code> object specifying the user
111: * @param fragmentId a <code>String</code> value
112: * @return a <code>Collection</code> object containing the group keys
113: * @exception PortalException if an error occurs
114: */
115: public Collection getPublishGroups(IPerson person, String fragmentId)
116: throws PortalException;
117:
118: /**
119: * Persists the user groups which the fragment is published to
120: * @param groups an array of <code>IGroupMember</code> objects
121: * @param person an <code>IPerson</code> object specifying the user
122: * @param fragmentId a <code>String</code> value
123: * @exception PortalException if an error occurs
124: */
125: public void setPublishGroups(IGroupMember[] groups, IPerson person,
126: String fragmentId) throws PortalException;
127:
128: /**
129: * Returns the next fragment ID
130: *
131: * @return a <code>String</code> next fragment ID
132: * @exception PortalException if an error occurs
133: */
134: public String getNextFragmentId() throws PortalException;
135:
136: /**
137: * Returns the priority range defined for the given user group
138: * @param groupKey a <code>String</code> group key
139: * @return a int array containing the min and max priority values
140: * @exception PortalException if an error occurs
141: */
142: public int[] getPriorityRange(String groupKey)
143: throws PortalException;
144:
145: }
|