You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by we...@apache.org on 2004/07/16 21:31:05 UTC
cvs commit: jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security PermissionManager.java SecurityProvider.java UserManager.java RoleManager.java UserPrincipal.java User.java GroupManager.java GroupPrincipal.java BasePrincipal.java SecurityException.java package.html RolePrincipal.java Group.java Role.java
weaver 2004/07/16 12:31:05
Added: jetspeed-api/src/java/org/apache/jetspeed/security
PermissionManager.java SecurityProvider.java
UserManager.java RoleManager.java
UserPrincipal.java User.java GroupManager.java
GroupPrincipal.java BasePrincipal.java
SecurityException.java package.html
RolePrincipal.java Group.java Role.java
Removed: components/security/src/java/org/apache/jetspeed/security
Role.java UserPrincipal.java GroupPrincipal.java
BasePrincipal.java SecurityException.java User.java
GroupManager.java package.html UserManager.java
SecurityProvider.java RolePrincipal.java
PermissionManager.java RoleManager.java Group.java
Log:
security interfaces moved to jetspeed-api
Revision Changes Path
1.1 jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/PermissionManager.java
Index: PermissionManager.java
===================================================================
/* Copyright 2004 Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.security;
import java.security.Permission;
import java.security.Permissions;
import java.security.Principal;
import java.util.Collection;
/**
* <p>Describe the interface for managing {@link Permission} and permission
* association to {@link Principal}. Permissions are used to manage Principals
* access entitlement on specified resources.</p>
* <p>For instance:</p>
* <pre><code>
* grant principal o.a.j.security.UserPrincipal "theUserPrincipal"
* {
* permission o.a.j.security.PortletPermission "myportlet", "view,edit,minimize,maximize";
* };
* </code><pre>
* @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
*/
public interface PermissionManager
{
/**
* <p>Gets the {@link Permissions} given a {@link Principal}.
* @param principal The principal.
* @return The permissions.
*/
Permissions getPermissions(Principal principal);
/**
* <p>Gets the {@link Permissions} given a collection
* of {@link Principal}.
* @param principals A collection of principal.
* @return The permissions.
*/
Permissions getPermissions(Collection principals);
/**
* <p>Remove all instances of a given permission.</p>
* @param permission The permission to remove.
* @throws Throws a security exception.
*/
void removePermission(Permission permission) throws SecurityException;
/**
* <p>Remove all permissions for a given principal.</p>
* @param principal The principal.
* @throws Throws a security exception.
*/
void removePermissions(Principal principal) throws SecurityException;
/**
* <p>Grant a {@link Permission} to a given {@link Principal}.
* @param principal The principal.
* @param permission The permission.
* @throws Throws a security exception if the principal does not exist.
*/
void grantPermission(Principal principal, Permission permission) throws SecurityException;
/**
* <p>Revoke a {@link Permission} from a given {@link Principal}.
* @param principal The principal.
* @param permission The permission.
* @throws Throws a security exception.
*/
void revokePermission(Principal principal, Permission permission) throws SecurityException;
}
1.1 jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/SecurityProvider.java
Index: SecurityProvider.java
===================================================================
/* Copyright 2004 Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.security;
/**
* <p>Utility component used to configure the security component.</p>
*
* @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
*/
public interface SecurityProvider
{
/**
* <p>Getter for the {@link UserManager}.</p>
* @return The UserManager.
*/
UserManager getUserManager();
}
1.1 jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/UserManager.java
Index: UserManager.java
===================================================================
/* Copyright 2004 Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.security;
import java.util.Iterator;
/**
* <p>Describes the interface for managing users and provides access
* to the {@link User}.</p>
* @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
*/
public interface UserManager
{
/**
* <p>Authenticate a user.</p>
* @param username The user name.
* @param password The user password.
* @return Whether or not a user is authenticated.
*/
boolean authenticate(String username, String password);
/**
* <p>Add a new user provided a username and password.</p>
* @param username The user name.
* @param password The password.
* @throws Throws a security exception.
*/
void addUser(String username, String password) throws SecurityException;
/**
* <p>Remove a user. If there is a {@link java.util.prefs.Preferences} node
* for profile properties associated to this user, it will be removed as well.</p>
* <p>{@link java.security.Permission} for this user will be removed as well.</p>
* @param username The user name.
* @throws Throws a security exception.
*/
void removeUser(String username) throws SecurityException;
/**
* <p>Whether or not a user exists.</p>
* @param username The user name.
* @return Whether or not a user exists.
*/
boolean userExists(String username);
/**
* <p>Get a {@link User} for a given username.</p>
* @param username The username.
* @return The {@link User}.
* @throws Throws a security exception if the user cannot be found.
*/
User getUser(String username) throws SecurityException;
/**
* <p>An iterator of {@link User} finding users matching the
* corresponding filter criteria.</p>
* @param filter The filter used to retrieve matching users.
* @return The Iterator of {@link User}.
*/
Iterator getUsers(String filter);
/**
* <p>Set the user password.</p>
* @param username The user name.
* @param password The password.
* @throws Throws a security exception.
* TODO This method should be changed to support multiple credentials.
*/
void setPassword(String username, String password) throws SecurityException;
}
1.1 jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/RoleManager.java
Index: RoleManager.java
===================================================================
/* Copyright 2004 Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.security;
import java.util.Collection;
/**
* <p>Describes the service interface for managing roles.</p>
* <p>Role hierarchy elements are being returned as a {@link Role}
* collection. The backing implementation must appropriately map
* the role hierarchy to a preferences sub-tree.</p>
* <p>The convention {principal}.{subprincipal} has been chosen to name
* roles hierachies in order to support declarative security. Implementation
* follow the conventions enforced by the preferences API.</p>
* @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
*/
public interface RoleManager
{
/**
* <p>Add a new role.</p>
* <p>Role principal names are expressed as {principal}.{subprincipal} where
* "." is the separator expressing the hierarchical nature of a role.</p>
* <p>Role principal path names are stored leveraging the {@link Preferences}
* api. Roles will be stored under /role/theGroupName/theGroupNameChild
* when given the full path name theRoleName.theRoleNameChild.
* @param roleFullPathName The role name full path
* (e.g. theRoleName.theRoleNameChild).
* @throws Throws a security exception if the role already exists.
*/
void addRole(String roleFullPathName) throws SecurityException;
/**
* <p>Remove a given role and all the children of that role.</p>
* <p>Role principal names are expressed as {principal}.{subprincipal} where
* "." is the separator expressing the hierarchical nature of a role.</p>
* <p>Role principal path names are stored leveraging the {@link Preferences}
* api. Roles will be stored under /role/theGroupName/theGroupNameChild
* when given the full path name theRoleName.theRoleNameChild.
* @param roleFullPathName The role name full path
* (e.g. theRoleName.theRoleNameChild).
* @throws Throws a security exception.
*/
void removeRole(String roleFullPathName) throws SecurityException;
/**
* <p>Whether or not a role exists.</p>
* @param roleFullPathName The role name full path
* (e.g. theRoleName.theRoleNameChild).
* @return Whether or not a role exists.
*/
boolean roleExists(String roleFullPathName);
/**
* <p>Get a role {@link Role} for a given role full path name.
* @param roleFullPathName The role name full path
* (e.g. theRoleName.theRoleNameChild).
* @return The {@link Preferences} node.
* @throws Throws a security exception if the role does not exist.
*/
Role getRole(String roleFullPathName) throws SecurityException;
/**
* <p>A collection of {@link Role} for all the roles
* associated to a specific user.</p>
* @param username The user name.
* @return A Collection of {@link Role}.
* @throws Throws a security exception if the user does not exist.
*/
Collection getRolesForUser(String username) throws SecurityException;
/**
* <p>A collection of {@link User} for all the users
* in a specific role.</p>
* @param roleFullPathName The role name full path
* (e.g. theRoleName.theRoleNameChild).
* @return A Collection of {@link User}.
* @throws Throws a security exception if the role does not exist.
*/
Collection getUsersInRole(String roleFullPathName) throws SecurityException;
/**
* <p>A collection of {@link Role} for all the roles
* associated to a specific group.</p>
* @param groupFullPathName The group full path
* (e.g. theGroupName.theGroupChildName).
* @return A Collection of {@link Role}.
* @throws Throws a security exception if the group does not exist.
*/
Collection getRolesForGroup(String groupFullPathName) throws SecurityException;
/**
* <p>A collection of {@link Group} for all the groups
* in a specific role.</p>
* @param roleFullPathName The role full path
* (e.g. theRoleName.theRoleChildName)..
* @return A Collection of {@link Group}.
* @throws Throws a security exception if the role does not exist.
*/
Collection getGroupsInRole(String roleFullPathName) throws SecurityException;
/**
* <p>Add a role to a user.</p>
* @param username The user name.
* @param roleFullPathName The role name full path
* (e.g. theRoleName.theRoleChildName).
* @throws Throws a security exception if the role or the user do not exist.
*/
void addRoleToUser(String username, String roleFullPathName) throws SecurityException;
/**
* <p>Remove a user from a role.</p>
* @param username The user name.
* @param roleFullPathName The role name full path relative to the
* /role node (e.g. /theRoleName/theRoleChildName).
* @throws Throws a security exception.
*/
void removeRoleFromUser(String username, String roleFullPathName) throws SecurityException;
/**
* <p>Whether or not a user is in a role.</p>
* @param username The user name.
* @param roleFullPathName The role name full path
* (e.g. theRoleName.theRoleChildName).
* @return Whether or not a user is in a role.
* @throws Throws a security exception if the role or the user does not exist.
*/
boolean isUserInRole(String username, String roleFullPathName) throws SecurityException;
/**
* <p>Add a role to a group.</p>
* @param roleFullPathName The role name full path
* (e.g. theRoleName.theRoleChildName).
* @param groupFullPathName The group name full path
* (e.g. theGroupName.theGroupChildName).
* @throws Throws a security exception.
*/
void addRoleToGroup(String roleFullPathName, String groupFullPathName) throws SecurityException;
/**
* <p>Remove a role from a group.</p>
* @param roleFullPathName The role name full path
* (e.g. theRoleName.theRoleChildName).
* @param groupFullPathName The group name full path
* (e.g. theGroupName.theGroupChildName).
* @throws Throws a security exception.
*/
void removeRoleFromGroup(String roleFullPathName, String groupFullPathName) throws SecurityException;
/**
* <p>Whether or not a role is in a group.</p>
* @param groupFullPathName The group name full path
* (e.g. theGroupName.theGroupChildName).
* @param roleFullPathName The role name full path
* (e.g. theRoleName.theRoleChildName).
* @return Whether or not a role is in a group.
* @throws Throws a security exception if the role or the group does not exist.
*/
boolean isGroupInRole(String groupFullPathName, String roleFullPathName) throws SecurityException;
}
1.1 jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/UserPrincipal.java
Index: UserPrincipal.java
===================================================================
/* Copyright 2004 Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.security;
/**
* <p>The user principal.</p>
* @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
* @version $Id: UserPrincipal.java,v 1.1 2004/07/16 19:31:05 weaver Exp $
*/
public interface UserPrincipal extends BasePrincipal
{
}
1.1 jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/User.java
Index: User.java
===================================================================
/* Copyright 2004 Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.security;
import java.util.prefs.Preferences;
import javax.security.auth.Subject;
/**
* <p>A user made of a {@link Subject} and the user {@link Preferences}.</p>
* @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
*/
public interface User
{
/**
* <p>Getter for the user {@link Subject} populated with the
* application principals.</p>
* @return The {@link Subject}.
*/
Subject getSubject();
/**
* <p>Setter for the user {@link Subject} populated with the
* application principals.</p>
* @param subject The {@link Subject}.
*/
void setSubject(Subject subject);
/**
* <p>Getter for the user {@link Preferences} node, providing access to the
* user preferences properties.</p>
* @return The {@link Preferences}.
*/
Preferences getPreferences();
/**
* <p>Setter for the user {@link Preferences} node, providing access to the
* user preferences properties.</p>
* @param preferences The {@link Preferences}.
*/
void setPreferences(Preferences preferences);
}
1.1 jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/GroupManager.java
Index: GroupManager.java
===================================================================
/* Copyright 2004 Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.security;
import java.util.Collection;
/**
* <p>Describes the service interface for managing groups.</p>
* <p>Group hierarchy elements are being returned as a {@link Group}
* collection. The backing implementation must appropriately map
* the group hierarchy to a preferences sub-tree.</p>
* <p>The convention {principal}.{subprincipal} has been chosen to name
* groups hierachies. Implementation follow the conventions enforced
* by the Preferences API.</p>
* @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
*/
public interface GroupManager
{
/**
* <p>Add a new group.</p>
* <p>Group principal names are expressed as {principal}.{subprincipal} where
* "." is the separator expressing the hierarchical nature of a group.</p>
* <p>Group principal path names are stored leveraging the {@link Preferences}
* api. Groups will be stored under /group/theGroupName/theGroupNameChild
* when given the full path name theGroupName.theGroupNameChild.
* @param groupFullPathName The group name full path
* (e.g. theGroupName.theGroupNameChild).
* @throws Throws a security exception.
*/
void addGroup(String groupFullPathName) throws SecurityException;
/**
* <p>Remove a group.</p>
* <p>Group principal names are expressed as {principal}.{subprincipal} where
* "." is the separator expressing the hierarchical nature of a group.</p>
* <p>Group principal path names are stored leveraging the {@link Preferences}
* api. Groups will be stored under /group/theGroupName/theGroupNameChild
* when given the full path name theGroupName.theGroupNameChild.
* @param groupFullPathName The group name full path
* (e.g. theGroupName.theGroupNameChild)
* @throws Throws a security exception.
*/
void removeGroup(String groupFullPathName) throws SecurityException;
/**
* <p>Whether or not a group exists.</p>
* @param groupFullPathName The group name full path
* (e.g. theGroupName.theGroupNameChild)
* @return Whether or not a group exists.
*/
boolean groupExists(String groupFullPathName);
/**
* <p>Get a group {@link Group} for a given group full path name.
* @param groupFullPathName The group name full path
* (e.g. theGroupName.theGroupChildName).
* @return The {@link Preferences} node.
* @throws Throws security exception if the group does not exist.
*/
Group getGroup(String groupFullPathName) throws SecurityException;
/**
* <p>A collection of {@link Group} for all the groups
* associated to a specific user.
* @param username The user name.
* @return A collection of {@link Group}.
* @throws Throws security exception if the user does not exist.
*/
Collection getGroupsForUser(String username) throws SecurityException;
/**
* <p>A collection of {@link User} for a specific group.</p>
* @param groupFullPathName The group name full path
* (e.g. theGroupName.theGroupChildName).
* @return A collection of {@link User}.
* @throws Throws security exception if the group does not exist.
*/
Collection getUsersInGroup(String groupFullPathName) throws SecurityException;
/**
* <p>Add a user to a group.</p>
* @param username The user name.
* @param groupFullPathName The group name full path
* (e.g. theGroupName.theGroupChildName).
* @throws Throws a security exception.
*/
void addUserToGroup(String username, String groupFullPathName) throws SecurityException;
/**
* <p>Remove a user from a group.</p>
* @param username The user name.
* @param groupFullPathName The group name full path
* (e.g. theGroupName.theGroupChildName).
* @throws Throws a security exception.
*/
void removeUserFromGroup(String username, String groupFullPathName) throws SecurityException;
/**
* <p>Whether or not a user is in a group.</p>
* @param username The user name.
* @param groupFullPathName The group name full path
* (e.g. theGroupName.theGroupChildName).
* @return Whether or not a user is in a group.
* @throws Throws security exception if the user or group does not exist.
*/
boolean isUserInGroup(String username, String groupFullPathName) throws SecurityException;
}
1.1 jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/GroupPrincipal.java
Index: GroupPrincipal.java
===================================================================
/* Copyright 2004 Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.security;
/**
* <p>The group principal.</p>
* @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
* @version $Id: GroupPrincipal.java,v 1.1 2004/07/16 19:31:05 weaver Exp $
*/
public interface GroupPrincipal extends BasePrincipal
{
}
1.1 jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/BasePrincipal.java
Index: BasePrincipal.java
===================================================================
/* Copyright 2004 Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.security;
import java.io.Serializable;
import java.security.Principal;
/**
* <p>The base principal.</p>
* @author <a href="mailto:taylor@apache.org">David Taylor</a>, <a href="mailto:dlestrat@apache.org">David Le Strat</a>
*/
public interface BasePrincipal extends Principal, Serializable
{
/**
* <p>Provides the principal full path prepending PREFS_{PRINCPAL}_ROOT if not prepended.</p>
* @return The principal full path.
*/
String getFullPath();
}
1.1 jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/SecurityException.java
Index: SecurityException.java
===================================================================
/* Copyright 2004 Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.security;
import org.apache.jetspeed.exception.JetspeedException;
/**
* <p>Exception throwns by members of the security service.</p>
*
* @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
*/
public class SecurityException extends JetspeedException
{
/** <p>Principal does not exist exception message.</p> */
public static final String PRINCIPAL_DOES_NOT_EXIST = "The principal does not exist.";
/** <p>User principal already exists exception message.</p> */
public static final String USER_ALREADY_EXISTS = "The user already exists.";
/** <p>User principal does not exist exception message.</p> */
public static final String USER_DOES_NOT_EXIST = "The user does not exist.";
/** <p>Role principal already exists exception message.</p> */
public static final String ROLE_ALREADY_EXISTS = "The role already exists.";
/** <p>Role principal does not exist exception message.</p> */
public static final String ROLE_DOES_NOT_EXIST = "The role does not exist.";
/** <p>Group principal already exists exception message.</p> */
public static final String GROUP_ALREADY_EXISTS = "The group already exists.";
/** <p>Group principal does not exist exception message.</p> */
public static final String GROUP_DOES_NOT_EXIST = "The group does not exist.";
/**
* <p>Default Constructor.</p>
*/
public SecurityException()
{
super();
}
/**
* <p>Constructor with exception message.</p>
* @param message The exception message.
*/
public SecurityException(String message)
{
super(message);
}
/**
* <p>Constructor with nested exception.</p>
* @param nested Nested exception.
*/
public SecurityException(Throwable nested)
{
super(nested);
}
/**
* <p>Constructor with exception message and nested exception.</p>
* @param msg The exception message.
* @param nested Nested exception.
*/
public SecurityException(String msg, Throwable nested)
{
super(msg, nested);
}
}
1.1 jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/package.html
Index: package.html
===================================================================
<html>
<head>
<title>org.apache.jetspeed.security.auth</title>
</head>
<body>
<p>Jetspeed security service interfaces.</p>
</body>
</html>
1.1 jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/RolePrincipal.java
Index: RolePrincipal.java
===================================================================
/* Copyright 2004 Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.security;
/**
* <p>The role principal.</p>
* @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
* @version $Id: RolePrincipal.java,v 1.1 2004/07/16 19:31:05 weaver Exp $
*/
public interface RolePrincipal extends BasePrincipal
{
}
1.1 jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/Group.java
Index: Group.java
===================================================================
/* Copyright 2004 Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.security;
import java.util.prefs.Preferences;
/**
* <p>A group made of a {@link GroupPrincipal} and the group {@link Preferences}.</p>
* @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
*/
public interface Group
{
/**
* <p>Getter for the group {@link GroupPrincipal}.</p>
* @return The {@link GroupPrincipal}.
*/
GroupPrincipal getPrincipal();
/**
* <p>Setter for the group {@link GroupPrincipal}.</p>
* @param groupPrincipal The {@link GroupPrincipal}.
*/
void setPrincipal(GroupPrincipal groupPrincipal);
/**
* <p>Getter for the group {@link Preferences} node, providing access to the
* group preferences properties.</p>
* @return The {@link Preferences}.
*/
Preferences getPreferences();
/**
* <p>Setter for the group {@link Preferences} node, providing access to the
* group preferences properties.</p>
* @param preferences The {@link Preferences}.
*/
void setPreferences(Preferences preferences);
}
1.1 jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/Role.java
Index: Role.java
===================================================================
/* Copyright 2004 Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.security;
import java.util.prefs.Preferences;
/**
* <p>A role made of a {@link RolePrincipal} and the role {@link Preferences}.</p>
* @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
*/
public interface Role
{
/**
* <p>Getter for the role {@link RolePrincipal}.</p>
* @return The {@link RolePrincipal}.
*/
RolePrincipal getPrincipal();
/**
* <p>Setter for the role {@link RolePrincipal}.</p>
* @param rolePrincipal The {@link RolePrincipal}.
*/
void setPrincipal(RolePrincipal rolePrincipal);
/**
* <p>Getter for the role {@link Preferences} node, providing access to the
* role preferences properties.</p>
* @return The {@link Preferences}.
*/
Preferences getPreferences();
/**
* <p>Setter for the role {@link Preferences} node, providing access to the
* role preferences properties.</p>
* @param preferences The {@link Preferences}.
*/
void setPreferences(Preferences preferences);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org