Package com.javaeye.jert.domain

Examples of com.javaeye.jert.domain.ReportPermissionGroup


        Group group = userManager.newGroup();
        group.setName("test group");
       
        ReportDefinition reportDefinition = getReportDefintion();
       
        ReportPermissionGroup rpg = service.addReportPermissionToGroup(reportDefinition, group);
        assertEquals(group.getName(), rpg.getGroupName());
        assertEquals(reportDefinition, rpg.getReportDefinition());
       
        service.removeReportPermissionFromGroup(reportDefinition, group);
    }
View Full Code Here


    public ReportPermissionGroup addReportPermissionToGroup(ReportDefinition report, Group group) {
        List reportPermissionGroups = report.getReportPermissionGroups();
       
        for (Iterator iter = reportPermissionGroups.iterator(); iter.hasNext();) {
            ReportPermissionGroup rpg = (ReportPermissionGroup) iter.next();
            if(rpg.getGroupName().equals(group.getName())) {
                return rpg;
            }
        }
       
        ReportPermissionGroup rpg = new ReportPermissionGroup();
        rpg.setGroupName(group.getName());
        report.addReportPermissionGroup(rpg);
        update(report);
        return rpg;
    }
View Full Code Here

        return rpg;
    }

    public void removeReportPermissionFromGroup(ReportDefinition report, Group group) {
        List reportPermissionGroups = report.getReportPermissionGroups();
        ReportPermissionGroup toBeRemoved = null;
        for (Iterator iter = reportPermissionGroups.iterator(); iter.hasNext();) {
            ReportPermissionGroup rpg = (ReportPermissionGroup) iter.next();
            if(rpg.getGroupName().equals(group.getName())) {
                toBeRemoved = rpg;
            }
        }
        if(toBeRemoved != null) {
            report.removeReportPermissionGroup(toBeRemoved);
View Full Code Here

   
    public List findReportPermissionByGroup(Group group) {
        List reportPermissionGroups =  findByNamedQuery("findReportPermissionByGroupName", group.getName());
        List result = new ArrayList();
        for (Iterator iter = reportPermissionGroups.iterator(); iter.hasNext();) {
            ReportPermissionGroup rpg = (ReportPermissionGroup) iter.next();
            result.add(rpg.getReportDefinition());
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of com.javaeye.jert.domain.ReportPermissionGroup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.