private List getList()

in src/main/java/org/apache/directory/fortress/web/model/OUListModel.java [129:161]


    private List<OrgUnit> getList( OrgUnit orgUnit )
    {
        List<OrgUnit> orgUnitList = null;
        if( orgUnit == null || orgUnit.getType() == null )
        {
            throw new RuntimeException( "Orgunit invalid state" );
        }
        try
        {
            String szOrgUnitNm = orgUnit.getName();
            LOG.debug( ".getList orgUnitNm: " + szOrgUnitNm );
            orgUnitList = delReviewMgr.search( orgUnit.getType(), orgUnit.getName() );
            // sort list by name:
            if( CollectionUtils.isNotEmpty( orgUnitList ))
            {
                Collections.sort( ( orgUnitList ), new Comparator<OrgUnit>()
                {
                    @Override
                    public int compare(OrgUnit o1, OrgUnit o2)
                    {
                        return o1.getName().compareToIgnoreCase( o2.getName() );
                    }
                } );
            }
        }
        catch ( SecurityException se )
        {
            String error = ".getList caught SecurityException=" + se;
            throw new RuntimeException( error, se );
        }
        
        return orgUnitList;
    }