View Javadoc
1   package org.apache.fulcrum.security.torque.security.turbine;
2   /*
3    * Licensed to the Apache Software Foundation (ASF) under one
4    * or more contributor license agreements.  See the NOTICE file
5    * distributed with this work for additional information
6    * regarding copyright ownership.  The ASF licenses this file
7    * to you under the Apache License, Version 2.0 (the
8    * "License"); you may not use this file except in compliance
9    * with the License.  You may obtain a copy of the License at
10   *
11   *   http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing,
14   * software distributed under the License is distributed on an
15   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16   * KIND, either express or implied.  See the License for the
17   * specific language governing permissions and limitations
18   * under the License.
19   */
20  import java.sql.Connection;
21  import java.util.List;
22  
23  import org.apache.fulcrum.security.model.ACLFactory;
24  import org.apache.fulcrum.security.model.turbine.entity.TurbineUserGroupRoleEntity;
25  import org.apache.fulcrum.security.torque.peer.TurbineUserGroupRoleModelPeerMapper;
26  import org.apache.fulcrum.security.util.DataBackendException;
27  import org.apache.torque.TorqueException;
28  
29  /**
30   * This abstract class extends the user manager to allow for custom OM attached objects (user group role relationships) for ACL.
31   * 
32   * Additional Torque Custom Peer contract
33   *
34   * @author <a href="mailto:gk@apache.org">Georg Kallidis</a>
35   * @version $Id:$
36   */
37  public abstract class TorqueAbstractTurbineTurbineSecurityEntityDefault extends TorqueAbstractTurbineTurbineSecurityEntity
38      implements TurbineUserGroupRoleEntity // not in group and role but already in TurbineUser interface 
39  {
40      
41      private static final long serialVersionUID = 1L;
42     
43      /**
44       * Retrieve attached objects for user: user-group-role relationship(s)
45       * 
46       * This method is required if custom peers is activated for (user) manager, to allow the custom group/role in {@link ACLFactory#getAccessControlList(org.apache.fulcrum.security.entity.User)}
47       * 
48       * @param con A database connection
49       * @param lazy if <code>true</code>, fetches objects lazily
50       * @param ugrs The custom TurbineUserGroupRole set
51       * @throws DataBackendException if data connection or user information (table objects) not found
52       * @throws TorqueException 
53       */
54      public abstract <T extends TurbineUserGroupRoleModelPeerMapper> void retrieveAttachedObjects( Connection con, Boolean lazy, List<T> ugrs ) throws DataBackendException, TorqueException;
55     
56  }