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: package org.apache.jetspeed.security.spi.impl.ldap;
018:
019: import javax.naming.NamingException;
020: import javax.naming.directory.SearchControls;
021:
022: public interface LdapMembershipDao {
023:
024: public abstract String[] searchGroupMemberShipByGroup(
025: final String userPrincipalUid, SearchControls cons)
026: throws NamingException;
027:
028: public abstract String[] searchGroupMemberShipByUser(
029: final String userPrincipalUid, SearchControls cons)
030: throws NamingException;
031:
032: public abstract String[] searchRoleMemberShipByRole(
033: final String userPrincipalUid, SearchControls cons)
034: throws NamingException;
035:
036: public abstract String[] searchRoleMemberShipByUser(
037: final String userPrincipalUid, SearchControls cons)
038: throws NamingException;
039:
040: /**
041: * <p>
042: * Search user by group using the GroupMembershipAttribute.
043: * </p>
044: *
045: * @param groupPrincipalUid
046: * @param cons
047: * @return
048: * @throws NamingException A {@link NamingException}.
049: */
050: public abstract String[] searchUsersFromGroupByGroup(
051: final String groupPrincipalUid, SearchControls cons)
052: throws NamingException;
053:
054: /**
055: * <p>
056: * Search user by group using the UserGroupMembershipAttribute.
057: * </p>
058: *
059: * @param groupPrincipalUid
060: * @param cons
061: * @return
062: * @throws NamingException A {@link NamingException}.
063: */
064: public abstract String[] searchUsersFromGroupByUser(
065: final String groupPrincipalUid, SearchControls cons)
066: throws NamingException;
067:
068: /**
069: * <p>
070: * Search user by role using the RoleMembershipAttribute.
071: * </p>
072: *
073: * @param groupPrincipalUid
074: * @param cons
075: * @return
076: * @throws NamingException A {@link NamingException}.
077: */
078: public abstract String[] searchUsersFromRoleByRole(
079: final String rolePrincipalUid, SearchControls cons)
080: throws NamingException;
081:
082: /**
083: * <p>
084: * Search user by role using the UserRoleMembershipAttribute.
085: * </p>
086: *
087: * @param groupPrincipalUid
088: * @param cons
089: * @return
090: * @throws NamingException A {@link NamingException}.
091: */
092: public abstract String[] searchUsersFromRoleByUser(
093: final String groupPrincipalUid, SearchControls cons)
094: throws NamingException;
095:
096: public abstract String[] searchRolesFromGroupByGroup(
097: final String groupPrincipalUid, SearchControls cons)
098: throws NamingException;
099:
100: public abstract String[] searchRolesFromGroupByRole(
101: final String groupPrincipalUid, SearchControls cons)
102: throws NamingException;
103:
104: }
|