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.services.stats;
007:
008: import org.jasig.portal.ChannelDefinition;
009: import org.jasig.portal.UserProfile;
010: import org.jasig.portal.layout.node.IUserLayoutChannelDescription;
011: import org.jasig.portal.layout.node.IUserLayoutFolderDescription;
012: import org.jasig.portal.security.IPerson;
013:
014: /**
015: * <p>Gathers portal usage statistics such as user logins.
016: * All the implementors of this interface should handle
017: * their own exceptions.</p>
018: * <p>In a multiple-server environment,
019: * the <code>IStatsRecorder</code> implementation will be
020: * called by the portal on each JVM. For such a set-up,
021: * the <code>IStatsRecorder</code> implementation should
022: * probably aggregate statistics on a single server.</p>
023: *
024: * @author Ken Weiner, kweiner@unicon.net
025: * @version $Revision: 35167 $
026: */
027: public interface IStatsRecorder {
028: /**
029: * Called when user authenticates successfully.
030: * @param person the IPerson object
031: */
032: public void recordLogin(IPerson person);
033:
034: /**
035: * Called when user logs out.
036: * @param person the IPerson object
037: */
038: public void recordLogout(IPerson person);
039:
040: /**
041: * Called when a new session is created for a user.
042: * @param person the IPerson object
043: */
044: public void recordSessionCreated(IPerson person);
045:
046: /**
047: * Called when the user's session is destroyed. This
048: * occurs when the user logs out or his/her session
049: * simply times out.
050: * @param person the IPerson object
051: */
052: public void recordSessionDestroyed(IPerson person);
053:
054: /**
055: * Called when a user publishes a channel
056: * @param person the person pubishing the channel
057: * @param channelDef the channel being published
058: */
059: public void recordChannelDefinitionPublished(IPerson person,
060: ChannelDefinition channelDef);
061:
062: /**
063: * Called when a user modifies an existing channel
064: * @param person the person modifying the channel
065: * @param channelDef the channel being modified
066: */
067: public void recordChannelDefinitionModified(IPerson person,
068: ChannelDefinition channelDef);
069:
070: /**
071: * Called when a user removes an existing channel
072: * @param person the person removing the channel
073: * @param channelDef the channel being removed
074: */
075: public void recordChannelDefinitionRemoved(IPerson person,
076: ChannelDefinition channelDef);
077:
078: /**
079: * Called when a channel is being added to a user layout
080: * @param person the person adding the channel
081: * @param profile the profile of the layout to which the channel is added
082: * @param channelDesc the channel being subscribed to
083: */
084: public void recordChannelAddedToLayout(IPerson person,
085: UserProfile profile,
086: IUserLayoutChannelDescription channelDesc);
087:
088: /**
089: * Called when a channel is being updated in a user layout
090: * @param person the person updating the channel
091: * @param profile the profile of the layout in which the channel is updated
092: * @param channelDesc the channel being updated
093: */
094: public void recordChannelUpdatedInLayout(IPerson person,
095: UserProfile profile,
096: IUserLayoutChannelDescription channelDesc);
097:
098: /**
099: * Called when a channel is being moved in a user layout
100: * @param person the person moving the channel
101: * @param profile the profile of the layout in which the channel is moved
102: * @param channelDesc the channel being moved
103: */
104: public void recordChannelMovedInLayout(IPerson person,
105: UserProfile profile,
106: IUserLayoutChannelDescription channelDesc);
107:
108: /**
109: * Called when a channel is being removed from a user layout
110: * @param person the person removing the channel
111: * @param profile the profile of the layout to which the channel is removed
112: * @param channelDesc the channel being removed from a user layout
113: */
114: public void recordChannelRemovedFromLayout(IPerson person,
115: UserProfile profile,
116: IUserLayoutChannelDescription channelDesc);
117:
118: /**
119: * Called when a folder is being added to a user layout
120: * @param person the person adding the folder
121: * @param profile the profile of the layout to which the folder is added
122: * @param folderDesc the folder being subscribed to
123: */
124: public void recordFolderAddedToLayout(IPerson person,
125: UserProfile profile, IUserLayoutFolderDescription folderDesc);
126:
127: /**
128: * Called when a folder is being updated in a user layout
129: * @param person the person updating the folder
130: * @param profile the profile of the layout in which the folder is updated
131: * @param folderDesc the folder being updated
132: */
133: public void recordFolderUpdatedInLayout(IPerson person,
134: UserProfile profile, IUserLayoutFolderDescription folderDesc);
135:
136: /**
137: * Called when a folder is being moved in a user layout
138: * @param person the person moving the folder
139: * @param profile the profile of the layout in which the folder is moved
140: * @param folderDesc the folder being moved
141: */
142: public void recordFolderMovedInLayout(IPerson person,
143: UserProfile profile, IUserLayoutFolderDescription folderDesc);
144:
145: /**
146: * Called when a folder is being removed from a user layout
147: * @param person the person removing the folder
148: * @param profile the profile of the layout to which the folder is removed
149: * @param folderDesc the folder being removed from a user layout
150: */
151: public void recordFolderRemovedFromLayout(IPerson person,
152: UserProfile profile, IUserLayoutFolderDescription folderDesc);
153:
154: /**
155: * Called when a channel is being instantiated
156: * @param person the person instantiating the channel
157: * @param profile the profile of the layout in which this channel is instantiated
158: * @param channelDesc the channel being instantiated
159: */
160: public void recordChannelInstantiated(IPerson person,
161: UserProfile profile,
162: IUserLayoutChannelDescription channelDesc);
163:
164: /**
165: * Called when a channel is being rendered
166: * @param person the person rendering the channel
167: * @param profile the profile of the layout in which this channel is rendered
168: * @param channelDesc the channel being rendered
169: */
170: public void recordChannelRendered(IPerson person,
171: UserProfile profile,
172: IUserLayoutChannelDescription channelDesc);
173:
174: /**
175: * Called when a channel is being targeted
176: * @param person the person interacting with the channel
177: * @param profile the profile of the layout in which this channel resides
178: * @param channelDesc the channel being targeted
179: */
180: public void recordChannelTargeted(IPerson person,
181: UserProfile profile,
182: IUserLayoutChannelDescription channelDesc);
183:
184: }
|