1/*2 * Copyright 2000-2001,2004 The Apache Software Foundation.3 * 4 * Licensed under the Apache License, Version 2.0 (the "License");5 * you may not use this file except in compliance with the License.6 * You may obtain a copy of the License at7 * 8 * http://www.apache.org/licenses/LICENSE-2.09 * 10 * Unless required by applicable law or agreed to in writing, software11 * distributed under the License is distributed on an "AS IS" BASIS,12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13 * See the License for the specific language governing permissions and14 * limitations under the License.15 */1617packageorg.apache.jetspeed.services.profiler;
1819importorg.apache.jetspeed.om.profile.*;
20import org.apache.jetspeed.capability.CapabilityMap;
21import org.apache.turbine.services.Service;
22import org.apache.turbine.util.RunData;
23import org.apache.turbine.util.DynamicURI;
24import org.apache.jetspeed.util.MimeType;
25import java.util.Iterator;
2627/***28 * <P>This interface is a facade for all profile related operations</P>29 *30 * @see org.apache.jetspeed.om.profile.Profile31 * @author <a href="mailto:david@bluesunrise.com">David Sean Taylor</a>32 * @author <a href="mailto:morciuch@apache.org">Mark Orciuch</a>33 * @version $Id: ProfilerService.java,v 1.18 2004/02/23 03:35:24 jford Exp $34 */3536publicinterfaceProfilerServiceextends Service
37 {
3839/*** The name of this service */40public String SERVICE_NAME = "Profiler";
4142/***43 * get the Profile object using the Rundata state and capability map44 * this is the mapping functionality of the profiler45 *46 * @param rundata The rundata object for the current request.47 * @param cm The device capability map.48 * @return A Profile object if found by the manager or null.49 */50publicProfile getProfile(RunData rundata, CapabilityMap cm)
51 throws ProfileException;
5253/***54 * get the Profile object using the Rundata state and capability map55 * this is the mapping functionality of the profiler56 *57 * @param rundata The rundata object for the current request.58 * @return A new Profile object.59 */60publicProfile getProfile(RunData rundata)
61 throws ProfileException;
6263/***64 * get the Profile object using the Rundata state and capability map65 * this is the mapping functionality of the profiler66 *67 * @deprecated Do not use a profiler method based on MimeType68 * @param rundata the rundata object for the current request69 * @return a new Profile object70 */71publicProfile getProfile(RunData data, MimeType mt)
72 throws ProfileException;
7374/***75 * get the Profile object using a profile locator76 *77 * @param locator The locator containing criteria describing the profile.78 * @return a new Profile object79 */80publicProfile getProfile(ProfileLocator locator)
81 throws ProfileException;
8283/***84 * Creates a dynamic URI85 *86 * @param rundata the rundata object for the current request87 * @param locator The description of the profile.88 * @return A new dynamic URI representing all profile parameters from the locator.89 */90public DynamicURI makeDynamicURI( RunData data, ProfileLocator locator )
91 throws ProfileException;
9293/***94 * Creates a new Profile object that can be successfully managed by95 * the current Profiler implementation96 *97 * @return A new Profile object98 */99publicProfile createProfile();
100101/***102 * Creates a new Profile object for a specific locator.103 *104 * @param locator The description of the profile.105 * @return A new Profile object106 */107publicProfile createProfile(ProfileLocator locator);
108109/***110 * Creates a new ProfileLocator object that can be successfully managed by111 * the current Profiler implementation112 *113 * @return A new ProfileLocator object114 */115publicProfileLocator createLocator();
116117/***118 * Create a new profile. The profile parameter's document will be cloned.119 *120 * @param rundata The rundata object for the current request.121 * @param profile The description of the new profile to be created.122 * @return The newly created profile.123 */124publicProfile createProfile( RunData data, Profile profile )
125 throws ProfileException;
126127/*** Create a new profile.128 *129 * @param rundata The rundata object for the current request.130 * @param profile The description of the new profile to be created.131 * @param mt The specific mime type, which is converted to a mediatype.132 * @return The newly created profile.133 */134publicProfile createProfile( RunData data, Profile profile, MimeType mt )
135 throws ProfileException;
136137/*** Create a new profile.138 *139 * @param locator The description of the new profile to be created.140 * @param portlets The PSML tree141 */142publicProfile createProfile(ProfileLocator locator, Portlets portlets)
143 throws ProfileException;
144145/***146 * Removes a profile.147 *148 * @param locator The profile locator criteria.149 */150publicvoid removeProfile( ProfileLocator locator )
151 throws ProfileException;
152153/*** Query for a collection of profiles given a profile locator criteria.154 *155 * @param locator The profile locator criteria.156 * @return The list of profiles matching the locator criteria.157 */158public Iterator query( QueryLocator locator );
159160/***161 * Returns status of role profile merging feature162 *163 * @return True if role profile merging is active164 */165publicboolean useRoleProfileMerging();
166167 }