001package org.apache.fulcrum.security.torque.security.turbine; 002/* 003 * Licensed to the Apache Software Foundation (ASF) under one 004 * or more contributor license agreements. See the NOTICE file 005 * distributed with this work for additional information 006 * regarding copyright ownership. The ASF licenses this file 007 * to you under the Apache License, Version 2.0 (the 008 * "License"); you may not use this file except in compliance 009 * with the License. You may obtain a copy of the License at 010 * 011 * http://www.apache.org/licenses/LICENSE-2.0 012 * 013 * Unless required by applicable law or agreed to in writing, 014 * software distributed under the License is distributed on an 015 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 016 * KIND, either express or implied. See the License for the 017 * specific language governing permissions and limitations 018 * under the License. 019 */ 020import java.sql.Connection; 021import java.util.List; 022 023import org.apache.fulcrum.security.model.ACLFactory; 024import org.apache.fulcrum.security.model.turbine.entity.TurbineUserGroupRoleEntity; 025import org.apache.fulcrum.security.torque.peer.TurbineUserGroupRoleModelPeerMapper; 026import org.apache.fulcrum.security.util.DataBackendException; 027import org.apache.torque.TorqueException; 028 029/** 030 * This abstract class extends the user manager to allow for custom OM attached objects (user group role relationships) for ACL. 031 * 032 * Additional Torque Custom Peer contract 033 * 034 * @author <a href="mailto:gk@apache.org">Georg Kallidis</a> 035 * @version $Id:$ 036 */ 037public abstract class TorqueAbstractTurbineTurbineSecurityEntityDefault extends TorqueAbstractTurbineTurbineSecurityEntity 038 implements TurbineUserGroupRoleEntity // not in group and role but already in TurbineUser interface 039{ 040 041 private static final long serialVersionUID = 1L; 042 043 /** 044 * Retrieve attached objects for user: user-group-role relationship(s) 045 * 046 * 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)} 047 * 048 * @param con A database connection 049 * @param lazy if <code>true</code>, fetches objects lazily 050 * @param ugrs The custom TurbineUserGroupRole set 051 * @throws DataBackendException if data connection or user information (table objects) not found 052 * @throws TorqueException 053 */ 054 public abstract <T extends TurbineUserGroupRoleModelPeerMapper> void retrieveAttachedObjects( Connection con, Boolean lazy, List<T> ugrs ) throws DataBackendException, TorqueException; 055 056}