KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > om > profile > ProfileLocator


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 at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * 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 and
14  * limitations under the License.
15  */

16
17 package org.apache.jetspeed.om.profile;
18
19 import org.apache.jetspeed.om.security.JetspeedUser;
20 import org.apache.jetspeed.om.security.Role;
21 import org.apache.jetspeed.om.security.Group;
22
23 import java.io.Serializable JavaDoc;
24 /**
25  * Interface definition for a Profile Locator.
26  * Locators are used by the profiler to describe the parameters used to locate
27  * a resource in the persistent configuration store.
28  *
29  *
30  * @author <a HREF="mailto:taylor@apache.org">David Sean Taylor</a>
31  * @version $Id: ProfileLocator.java,v 1.10 2004/02/23 03:05:01 jford Exp $
32 */

33
34 public interface ProfileLocator extends Serializable JavaDoc, Cloneable JavaDoc
35 {
36     /*
37      * populates this profile locator from a given path in the format:
38      *
39      * user/<name>/media-type/<mediaType>/language/<language>
40      * /country/<country>/<page>/page
41      *
42      * group/ ""
43      * role/ ""
44      *
45      * @param path The formatted profiler path string.
46      */

47     public void createFromPath(String JavaDoc path);
48
49     /*
50      * Gets the unique profile locator id, which is a combination of the params
51      * This ID must follow the one of the 4 sequences below:
52      *
53      * <username>/<mediaType>/<language>/<country>/<page>
54      * <group>/<mediaType>/<language>/<country>/<page>
55      * <role>/<mediaType>/<language>/<country>/<page>
56      *
57      * @return The profile locator id
58      */

59     public String JavaDoc getId();
60
61     /*
62      * Gets the unique profile locator path, which is a combination of the params
63      * This Path must follow the one of the 4 sequences below:
64      *
65     * user/<name>/media-type/<mediaType>/language/<language>
66     * /country/<country>/<page>/page
67     *
68     * group/ ""
69     * role/ ""
70      *
71      * @return The profile locator path
72      */

73     public String JavaDoc getPath();
74
75     /*
76      * Gets the resource name parameter for this profile.
77      *
78      * @return The resource name parameter for this profile.
79      */

80     String JavaDoc getName();
81
82     /*
83      * Sets the resource name parameter for this profile.
84      *
85      * @param name The resource name parameter for this profile.
86      */

87     void setName(String JavaDoc name);
88
89     /*
90      * Gets the media type parameter for this profile.
91      * Media types are values such as html, wml, xml ...
92      *
93      * @return The media type parameter for this profile.
94      */

95     public String JavaDoc getMediaType();
96
97     /*
98      * Sets the media type parameter for this profile.
99      * Media types are values such as html, wml, xml ...
100      *
101      * @param mediaType The media type parameter for this profile.
102      */

103     public void setMediaType(String JavaDoc mediaType);
104
105     /*
106      * Gets the language parameter for this profile.
107      * Language values are ISO-639 standard language abbreviations
108      * en, fr, de, ...
109      *
110      * @return The language parameter for this profile.
111      */

112     public String JavaDoc getLanguage();
113
114     /*
115      * Sets the language parameter for this profile.
116      * Language values are ISO-639 standard language abbreviations
117      * en, fr, de, ...
118      *
119      * @param language The language parameter for this profile.
120      */

121     public void setLanguage(String JavaDoc language);
122
123     /*
124      * Gets the country code parameter for this profile.
125      * Country code values are ISO-3166 standard country code abbreviations.
126      * GB, US, FR, CA, DE, ...
127      *
128      * @return The country code parameter for this profile.
129      */

130     public String JavaDoc getCountry();
131
132     /*
133      * Sets the country code parameter for this profile.
134      * Country code values are ISO-3166 standard country code abbreviations.
135      * GB, US, FR, CA, DE, ...
136      *
137      * @param country The country code parameter for this profile.
138      */

139     public void setCountry(String JavaDoc country);
140
141     /*
142      * Gets the user parameter for this profile.
143      *
144      * @return The user parameter for this profile.
145      */

146     public JetspeedUser getUser();
147
148     public String JavaDoc getUserName();
149
150     /*
151      * Sets the user parameter for this profile.
152      *
153      * @param user The user parameter for this profile.
154      */

155     public void setUser(JetspeedUser user);
156
157     /*
158      * Gets the anonymous user flag for this profile.
159      *
160      * @return True if this profile is anonymous.
161      */

162     public boolean getAnonymous();
163
164     /*
165      * Sets the user parameter as the anonymous user
166      *
167      * @param anonymous True indicates this is an anonymous user.
168      */

169     public void setAnonymous(boolean anonymous);
170
171     /*
172      * Gets the role parameter for this profile.
173      *
174      * @return The role parameter for this profile.
175      */

176     public Role getRole();
177
178     public String JavaDoc getRoleName();
179
180
181     /*
182      * Sets the role parameter for this profile.
183      *
184      * @param role The role parameter for this profile.
185      */

186     public void setRole( Role role );
187
188     public void setRoleByName(String JavaDoc roleName);
189
190     /*
191      * Gets the group parameter for this profile.
192      *
193      * @return The group parameter for this profile.
194      */

195     public Group getGroup();
196
197     public String JavaDoc getGroupName();
198
199     /*
200      * Sets the group parameter for this profile.
201      *
202      * @param group The group parameter for this profile.
203      */

204     public void setGroup( Group group );
205
206     public void setGroupByName( String JavaDoc groupName );
207
208     /**
209      * @see Object#clone
210      * @return an instance copy of this object
211      */

212     public Object JavaDoc clone() throws java.lang.CloneNotSupportedException JavaDoc;
213
214 }
215
Popular Tags