All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.agiletec.apsadmin.user.group.helper.GroupActionHelper Maven / Gradle / Ivy

Go to download

Entando Administration Console: an agile, modern and user-centric open source Portal platform.

There is a newer version: 6.2.38
Show newest version
/*
 * Copyright 2015-Present Entando Inc. (http://www.entando.com) All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */
package com.agiletec.apsadmin.user.group.helper;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.agiletec.aps.system.exception.ApsSystemException;
import com.agiletec.aps.system.services.group.Group;
import com.agiletec.aps.system.services.group.GroupUtilizer;
import com.agiletec.aps.util.ApsWebApplicationUtils;
import com.agiletec.apsadmin.system.BaseActionHelper;

/**
 * Classe action helper della gestione Gruppi.
 * @version 1.0
 * @author E.Santoboni
 */
public class GroupActionHelper extends BaseActionHelper implements IGroupActionHelper {

    private static final Logger _logger = LoggerFactory.getLogger(GroupActionHelper.class);
    
    @Override
    public Map> getReferencingObjects(Group group, HttpServletRequest request) throws ApsSystemException {
        Map> references = new HashMap>();
        try {
            String[] defNames = ApsWebApplicationUtils.getWebApplicationContext(request).getBeanNamesForType(GroupUtilizer.class);
            for (int i=0; i utilizers = groupUtilizer.getGroupUtilizers(group.getName());
                    if (utilizers != null && !utilizers.isEmpty()) {
                        //FIXME UNIFORMARE E STUDIARE CHIAVE IDONEA
                        references.put(groupUtilizer.getName()+"Utilizers", utilizers);
                    }
                }
            }
        } catch (Throwable t) {
            throw new ApsSystemException("Errore in getReferencingObjects", t);
        }
        return references;
    }
    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy