001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package org.apache.jetspeed.sso;
019:
020: import java.util.Collection;
021: import java.sql.Timestamp;
022:
023: import org.apache.jetspeed.security.om.InternalUserPrincipal;
024:
025: /**
026: */
027: public interface SSOPrincipal {
028:
029: /**
030: * addRemotePrincipal()
031: * @param principal
032: * Adds remote principal to the main (logged in) principal
033: */
034: public void addRemotePrincipal(InternalUserPrincipal principal);
035:
036: /**
037: * <p>
038: * Getter for the principal id.
039: * </p>
040: *
041: * @return The principal id.
042: */
043: long getPrincipalId();
044:
045: /**
046: * <p>
047: * Setter for the principal id.
048: * </p>
049: *
050: * @param principalId The principal id.
051: */
052: void setPrincipalId(long principalId);
053:
054: /**
055: * <p>
056: * Getter for the principal classname.
057: * </p>
058: *
059: * @return The principal classname.
060: */
061: String getClassname();
062:
063: /**
064: * <p>
065: * Setter for the principal classname.
066: * </p>
067: *
068: * @param classname The principal classname.
069: */
070: void setClassname(String classname);
071:
072: /**
073: * <p>
074: * Getter for isMappingOnly.
075: * </p>
076: *
077: * @return The isMappingOnly.
078: */
079: boolean isMappingOnly();
080:
081: /**
082: * <p>
083: * Setter for isMappingOnly.
084: * </p>
085: *
086: * @param isMappingOnly The isMappingOnly.
087: */
088: void setMappingOnly(boolean isMappingOnly);
089:
090: /**
091: * <p>
092: * Getter for the principal full path.
093: * </p>
094: * <p>
095: * The full path allows to retrieve the principal preferences from the
096: * preferences services.
097: * </p>
098: *
099: * @return The principal full path.
100: */
101: String getFullPath();
102:
103: /**
104: * <p>
105: * Setter for the principal name.
106: * </p>
107: * <p>
108: * The full path allows to retrieve the principal preferences from the
109: * preferences services.
110: * </p>
111: *
112: * @param fullPath The principal full path.
113: */
114: void setFullPath(String fullPath);
115:
116: /**
117: * <p>
118: * Getter for the principal permissions.
119: * </p>
120: *
121: * @return The principal permissions.
122: */
123: Collection getPermissions();
124:
125: /**
126: * <p>
127: * Setter for the principal permissions.
128: * </p>
129: *
130: * @param permissions The principal permissions.
131: */
132: void setPermissions(Collection permissions);
133:
134: /**
135: * <p>
136: * Getter for creation date.
137: * </p>
138: *
139: * @return The creation date.
140: */
141: Timestamp getCreationDate();
142:
143: /**
144: * <p>
145: * Setter for the creation date.
146: * </p>
147: *
148: * @param creationDate The creation date.
149: */
150: void setCreationDate(Timestamp creationDate);
151:
152: /**
153: * <p>
154: * Getter for the modified date.
155: * </p>
156: *
157: * @return The modified date.
158: */
159: Timestamp getModifiedDate();
160:
161: /**
162: * <p>
163: * Setter for the modified date.
164: * </p>
165: *
166: * @param modifiedDate The modified date.
167: */
168: void setModifiedDate(Timestamp modifiedDate);
169:
170: /**
171: * <p>Getter for the enabled state</p>
172: * @return true if enabled
173: */
174: boolean isEnabled();
175:
176: /**
177: * Setter for the enabled state</p>
178: * @param enabled The enabled state
179: */
180: void setEnabled(boolean enabled);
181:
182: /**
183: * Getter for the remotePrincipals.
184: */
185: public Collection getRemotePrincipals();
186:
187: /**
188: * Setter for the remotePrincipals
189: */
190: public void setRemotePrincipals(Collection remotePrincipals);
191:
192: /**
193: * Getter for the siteID.
194: */
195: public int getSiteID();
196:
197: /**
198: * Setter for thesiteID
199: */
200: public void setSiteID(int siteID);
201: }
|