1/*2 * Licensed to the Apache Software Foundation (ASF) under one or more3 * contributor license agreements. See the NOTICE file distributed with4 * this work for additional information regarding copyright ownership.5 * The ASF licenses this file to You under the Apache License, Version 2.06 * (the "License"); you may not use this file except in compliance with7 * the License. You may obtain a copy of the License at8 *9 * http://www.apache.org/licenses/LICENSE-2.010 *11 * Unless required by applicable law or agreed to in writing, software12 * distributed under the License is distributed on an "AS IS" BASIS,13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.14 * See the License for the specific language governing permissions and15 * limitations under the License.16 */17packageorg.apache.jetspeed.security.spi.impl.ldap;
1819import org.apache.jetspeed.security.SecurityException;
2021/***22 * <p>23 * The ldap user principal DAO.24 * </p>25 * 26 * @author <a href="mailto:mike.long@dataline.com">Mike Long </a>, <a27 * href="mailto:dlestrat@apache.org">David Le Strat</a>28 */29publicinterfaceLdapUserPrincipalDaoextendsLdapPrincipalDao30 {
31/***32 * <p>33 * Add a user to a group.34 * </p>35 * 36 * @param userPrincipalUid The user principal.37 * @param groupPrincipalUid The group principal.38 * @throws SecurityException A {@link SecurityException}.39 */40void addGroup(String userPrincipalUid, String groupPrincipalUid) throws SecurityException;
4142/***43 * <p>44 * Remove a user from a group.45 * </p>46 * 47 * @param userPrincipalUid The user principal.48 * @param groupPrincipalUid The group principal.49 * @throws SecurityException A {@link SecurityException}.50 */51void removeGroup(String userPrincipalUid, String groupPrincipalUid) throws SecurityException;
5253/***54 * <p>55 * Add a user to a group.56 * </p>57 * 58 * @param userPrincipalUid The user principal.59 * @param rolePrincipalUid The role principal.60 * @throws SecurityException A {@link SecurityException}.61 */62void addRole(String userPrincipalUid, String rolePrincipalUid) throws SecurityException;
6364/***65 * <p>66 * Remove a user from a group.67 * </p>68 * 69 * @param userPrincipalUid The user principal.70 * @param rolePrincipalUid The role principal.71 * @throws SecurityException A {@link SecurityException}.72 */73void removeRole(String userPrincipalUid, String rolePrincipalUid) throws SecurityException;
747576/***77 * <p>78 * Return an array of the group principal UIDS that belong to a specific user.79 * </p>80 * 81 * @param userPrincipalUid The user principal uid.82 * @return The array of group uids asociated with this user83 * @throws SecurityException A {@link SecurityException}.84 */85 String[] getGroupUidsForUser(String userPrincipalUid) throws SecurityException;
8687/***88 * <p>89 * Return an array of the role principal UIDS that belong to a specific user.90 * </p>91 * 92 * @param userPrincipalUid The user principal uid.93 * @return The array of group uids asociated with this user94 * @throws SecurityException A {@link SecurityException}.95 */96 String[] getRoleUidsForUser(String userPrincipalUid) throws SecurityException;
9798/***99 * <p>100 * Return an array of the user principal uids that belong to a group.101 * </p>102 * 103 * @param groupPrincipalUid The group uid.104 * @return The array of user uids asociated with this group105 * @throws SecurityException A {@link SecurityException}.106 */107 String[] getUserUidsForGroup(String groupPrincipalUid) throws SecurityException;
108109/***110 * <p>111 * Return an array of the user principal uids that belong to a role.112 * </p>113 * 114 * @param rolePrincipalUid The role uid.115 * @return The array of user uids asociated with this group116 * @throws SecurityException A {@link SecurityException}.117 */118 String[] getUserUidsForRole(String rolePrincipalUid) throws SecurityException;
119120/***121 * <p>122 * Return an array of the role principal UIDS that belong to a specific group.123 * </p>124 * 125 * @param groupPrincipalUid The group principal uid.126 * @return The array of role uids asociated with this user127 * @throws SecurityException A {@link SecurityException}.128 */129 String[] getRolesForGroup(String groupPrincipalUid) throws SecurityException;
130131/***132 * <p>133 * Add a role to a group.134 * </p>135 * 136 * @param groupPrincipalUid The group principal.137 * @param rolePrincipalUid The role principal.138 * @throws SecurityException A {@link SecurityException}.139 */140void addRoleToGroup(String groupPrincipalUid, String rolePrincipalUid) throws SecurityException;
141142/***143 * <p>144 * Remove a role from a group.145 * </p>146 * 147 * @param groupPrincipalUid The group principal.148 * @param rolePrincipalUid The role principal.149 * @throws SecurityException A {@link SecurityException}.150 */151void removeRoleFromGroup(String groupPrincipalUid, String rolePrincipalUid) throws SecurityException;
152153154 }