directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject [09/51] [partial] directory-fortress-core git commit: FC-109 - rename rbac package to impl
Date Tue, 02 Jun 2015 18:36:34 GMT
http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/ba64d26a/src/test/java/org/apache/directory/fortress/core/impl/TestUtils.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/core/impl/TestUtils.java b/src/test/java/org/apache/directory/fortress/core/impl/TestUtils.java
new file mode 100755
index 0000000..b97c327
--- /dev/null
+++ b/src/test/java/org/apache/directory/fortress/core/impl/TestUtils.java
@@ -0,0 +1,295 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+package org.apache.directory.fortress.core.impl;
+
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.Set;
+import java.util.StringTokenizer;
+import java.util.TreeSet;
+
+import junit.framework.TestCase;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.directory.fortress.core.util.time.Constraint;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.directory.fortress.core.GlobalIds;
+import org.apache.directory.fortress.core.util.LogUtil;
+
+
+/**
+ * Description of the Class
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class TestUtils extends TestCase
+{
+    private static final String CLS_NM = TestUtils.class.getName();
+    private static final Logger LOG = LoggerFactory.getLogger( CLS_NM );
+
+    /**
+     * Fortress stores complex attribute types within a single attribute in ldap.  Usually a delimiter of ',' is used for string tokenization.
+     * format: {@code name:value}
+     */
+    public static final String DELIMITER_TEST_DATA = ",";
+
+    private static String contextId = GlobalIds.HOME;
+
+
+    public static String getContext()
+    {
+        // This property can be overriden with system property:
+        String tenant = System.getProperty( GlobalIds.TENANT );
+        
+        if ( StringUtils.isNotEmpty( tenant ) && !tenant.equals( "${tenant}" ) )
+        {
+            contextId = tenant;
+        }
+        
+        return contextId;
+    }
+
+
+    public static byte[] readJpegFile( String fileName )
+    {
+        URL fUrl = TestUtils.class.getClassLoader().getResource( fileName );
+        byte[] image = null;
+        try
+        {
+            if ( fUrl != null )
+            {
+                image = FileUtils.readFileToByteArray( new File( fUrl.toURI() ) );
+            }
+        }
+        catch ( URISyntaxException se )
+        {
+            String error = "readJpegFile caught URISyntaxException=" + se;
+            LOG.error( error );
+        }
+        catch ( IOException ioe )
+        {
+            String error = "readJpegFile caught IOException=" + ioe;
+            LOG.error( error );
+        }
+        return image;
+    }
+
+
+    /**
+     * 
+     * @param len
+     */
+    public static void sleep( String len )
+    {
+        try
+        {
+            Integer iSleep = ( Integer.parseInt( len ) * 1000 );
+            //LOG.info(TestUtils.class.getName() + ".sleep for len=" + iSleep);
+            LogUtil.logIt( TestUtils.class.getName() + ".sleep for len=" + iSleep );
+            Thread.currentThread().sleep( iSleep );
+        }
+        catch ( InterruptedException ie )
+        {
+            LOG.warn( TestUtils.class.getName() + ".sleep caught InterruptedException=" + ie.getMessage(), ie );
+        }
+    }
+
+
+    /**
+     *
+     * @param len
+     */
+    public static void sleep( int len )
+    {
+        try
+        {
+            int iSleep = len * 1000;
+            LogUtil.logIt( TestUtils.class.getName() + ".sleep for len=" + iSleep );
+            Thread.currentThread().sleep( iSleep );
+        }
+        catch ( InterruptedException ie )
+        {
+            LOG.warn( TestUtils.class.getName() + ".sleep caught InterruptedException=" + ie.getMessage(), ie );
+        }
+    }
+
+
+    /**
+     *
+     * @param len
+     */
+    public static void sleep( long len )
+    {
+        try
+        {
+            long iSleep = len * 1000;
+            LogUtil.logIt( TestUtils.class.getName() + ".sleep for len=" + iSleep );
+            Thread.currentThread().sleep( iSleep );
+        }
+        catch ( InterruptedException ie )
+        {
+            LOG.warn( TestUtils.class.getName() + ".sleep caught InterruptedException=" + ie.getMessage(), ie );
+        }
+    }
+
+
+    /**
+     *
+     * @param inClass
+     * @param fieldLabel
+     * @return
+     */
+    public static String getDataLabel( Class inClass, String fieldLabel )
+    {
+        String labelValue = null;
+        try
+        {
+            Field field = inClass.getField( fieldLabel );
+            Annotation annotation = field.getAnnotation( MyAnnotation.class );
+            if ( annotation instanceof MyAnnotation )
+            {
+                MyAnnotation myAnnotation = ( MyAnnotation ) annotation;
+                labelValue = myAnnotation.value();
+            }
+        }
+        catch ( NoSuchFieldException e )
+        {
+            System.out.println( "annotation excep=" + e );
+        }
+
+        return labelValue;
+    }
+
+
+    /**
+     *
+     * @param inClass
+     * @param fieldLabel
+     * @return
+     */
+    public static String getTestDataLabels( Class inClass, String fieldLabel )
+    {
+        String fieldName = null;
+        try
+        {
+            //Field field = inClass.getField(fieldLabel);
+            Field field = inClass.getField( "POLICIES_TP1" );
+
+            Annotation annotation = field.getAnnotation( MyAnnotation.class );
+            //Annotation[] annotations = field.getDeclaredAnnotations();
+            if ( annotation instanceof MyAnnotation )
+            {
+                MyAnnotation myAnnotation = ( MyAnnotation ) annotation;
+
+                //System.out.println("name: " + "dd");
+                System.out.println( "*************** name: " + myAnnotation.name() );
+                System.out.println( "*************** value: " + myAnnotation.value() );
+                fieldName = myAnnotation.name();
+            }
+        }
+        catch ( NoSuchFieldException e )
+        {
+            System.out.println( "annotation excep=" + e );
+        }
+
+        return fieldName;
+    }
+
+
+    /**
+     * 
+     * @param srchVal
+     * @return
+     */
+    public static String getSrchValue( String srchVal )
+    {
+        srchVal = srchVal.substring( 0, srchVal.length() - 2 );
+        return srchVal;
+    }
+
+
+    public static String getSrchValue( String srchVal, int length )
+    {
+        srchVal = srchVal.substring( 0, length );
+        return srchVal;
+    }
+
+
+    /**
+     * @param msg
+     * @param c1
+     * @param c2
+     */
+    public static void assertTemporal( String msg, Constraint c1,
+        Constraint c2 )
+    {
+        if(c1.getBeginDate() != null || c2.getBeginDate() != null)
+            assertEquals( msg, c1.getBeginDate(), c2.getBeginDate() );
+        if(c1.getEndDate() != null || c2.getEndDate() != null)
+            assertEquals( msg, c1.getEndDate(), c2.getEndDate() );
+        if(c1.getBeginLockDate() != null || c2.getBeginLockDate() != null)
+            assertEquals( msg, c1.getBeginLockDate(), c2.getBeginLockDate() );
+        if(c1.getEndLockDate() != null || c2.getEndLockDate() != null)
+            assertEquals( msg, c1.getEndLockDate(), c2.getEndLockDate() );
+        assertEquals( msg, c1.getBeginTime(), c2.getBeginTime() );
+        assertEquals( msg, c1.getEndTime(), c2.getEndTime() );
+        assertEquals( msg, c1.getDayMask(), c2.getDayMask() );
+        assertEquals( msg, c1.getTimeout(), c2.getTimeout() );
+    }
+
+
+    /**
+     *
+     * @param szInput
+     * @return
+     */
+    public static Set<String> getSets( String szInput )
+    {
+        Set<String> vSets = new TreeSet<>( String.CASE_INSENSITIVE_ORDER );
+        try
+        {
+            if ( StringUtils.isNotEmpty( szInput ) )
+            {
+                StringTokenizer charSetTkn = new StringTokenizer( szInput, TestUtils.DELIMITER_TEST_DATA );
+                if ( charSetTkn.countTokens() > 0 )
+                {
+                    while ( charSetTkn.hasMoreTokens() )
+                    {
+                        String value = charSetTkn.nextToken();
+                        vSets.add( value );
+                    }
+                }
+            }
+        }
+        catch ( java.lang.ArrayIndexOutOfBoundsException ae )
+        {
+            // ignore
+        }
+        return vSets;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/ba64d26a/src/test/java/org/apache/directory/fortress/core/impl/URA.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/core/impl/URA.java b/src/test/java/org/apache/directory/fortress/core/impl/URA.java
new file mode 100755
index 0000000..1a0c872
--- /dev/null
+++ b/src/test/java/org/apache/directory/fortress/core/impl/URA.java
@@ -0,0 +1,130 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+package org.apache.directory.fortress.core.impl;
+
+
+/**
+ *  Description of the Class
+ *
+ *@author     Shawn McKinney
+ */
+public class URA implements java.io.Serializable, Comparable
+{
+    private String uou;
+    private String urole;
+    private String arole;
+    private boolean canAssign;
+
+
+    @Override
+    public int hashCode()
+    {
+        int result = uou != null ? uou.hashCode() : 0;
+        result = 31 * result + ( urole != null ? urole.hashCode() : 0 );
+        result = 31 * result + ( arole != null ? arole.hashCode() : 0 );
+        result = 31 * result + ( canAssign ? 1 : 0 );
+        return result;
+    }
+
+
+    public URA( String arole, String uou, String urole, boolean canAssign )
+    {
+        this.arole = arole;
+        this.uou = uou;
+        this.urole = urole;
+        this.canAssign = canAssign;
+    }
+
+
+    public int compareTo( Object o )
+    {
+        URA k1 = this;
+        URA k2 = ( URA ) o;
+        String s1 = k1.getUou() + k1.getUrole() + k1.getArole();
+        String s2 = k2.getUou() + k2.getUrole() + k2.getArole();
+        return s1.compareToIgnoreCase( s2 );
+    }
+
+
+    @Override
+    public boolean equals( Object o )
+    {
+        if ( this == o )
+            return true;
+        if ( o == null || getClass() != o.getClass() )
+            return false;
+
+        URA that = ( URA ) o;
+
+        if ( !this.getUou().equalsIgnoreCase( that.getUou() ) )
+            return false;
+        if ( !this.getUrole().equalsIgnoreCase( that.getUrole() ) )
+            return false;
+        return this.getArole().equalsIgnoreCase( that.getArole() );
+    }
+
+
+    public String getUou()
+    {
+        return uou;
+    }
+
+
+    public void setUou( String uou )
+    {
+        this.uou = uou;
+    }
+
+
+    public String getUrole()
+    {
+        return urole;
+    }
+
+
+    public void setUrole( String urole )
+    {
+        this.urole = urole;
+    }
+
+
+    public String getArole()
+    {
+        return arole;
+    }
+
+
+    public void setArole( String arole )
+    {
+        this.arole = arole;
+    }
+
+
+    public boolean isCanAssign()
+    {
+        return canAssign;
+    }
+
+
+    public void setCanAssign( boolean canAssign )
+    {
+        this.canAssign = canAssign;
+    }
+}

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/ba64d26a/src/test/java/org/apache/directory/fortress/core/impl/URATestData.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/core/impl/URATestData.java b/src/test/java/org/apache/directory/fortress/core/impl/URATestData.java
new file mode 100755
index 0000000..f42a4ff
--- /dev/null
+++ b/src/test/java/org/apache/directory/fortress/core/impl/URATestData.java
@@ -0,0 +1,1037 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+package org.apache.directory.fortress.core.impl;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Description of the Class
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class URATestData extends TestCase
+{
+    private static final String CLS_NM = URATestData.class.getName();
+    private static final Logger LOG = LoggerFactory.getLogger( CLS_NM );
+
+    public static final String[][] URA_T1 =
+        {
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "T", /* CAN_ASSIGN COL */
+        },
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "T", /* CAN_ASSIGN COL */
+    },
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin1", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin2", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin3", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin4", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[0] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[1] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[2] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[3] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[0] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[1] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[2] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[3] ),
+                "F", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[4] ),
+                "T", /* CAN_ASSIGN COL */
+},
+            {
+                "oamT2UAdmin5", /* AROLE COL */
+                OrgUnitTestData.getName( OrgUnitTestData.ORGS_USR_TO5[4] ),
+                RoleTestData.getName( RoleTestData.ROLES_TR15_ARBAC[5] ),
+                "F", /* CAN_ASSIGN COL */
+}
+    };
+
+    /**
+    * The Fortress test data for junit uses 2-dimensional arrays.
+    */
+    private final static int AROLE_COL = 0;
+    private final static int UOU_COL = 1;
+    private final static int UROLE_COL = 2;
+    private final static int CAN_ASSIGN_COL = 3;
+
+
+    /**
+     *
+     * @param ura
+     * @return
+     */
+    public static String getArole( String[] ura )
+    {
+        return ura[AROLE_COL];
+    }
+
+
+    /**
+     *
+     * @param ura
+     * @return
+     */
+    public static String getUou( String[] ura )
+    {
+        return ura[UOU_COL];
+    }
+
+
+    /**
+     *
+     * @param ura
+     * @return
+     */
+    public static String getUrole( String[] ura )
+    {
+        return ura[UROLE_COL];
+    }
+
+
+    /**
+     *
+     * @param ura
+     * @return
+     */
+    public static boolean isCanAssign( String[] ura )
+    {
+        boolean isCanAssign = false;
+        if ( StringUtils.isNotEmpty( ura[CAN_ASSIGN_COL] ) && ura[CAN_ASSIGN_COL].equalsIgnoreCase( "T" ) )
+        {
+            isCanAssign = true;
+        }
+        return isCanAssign;
+    }
+
+
+    public static boolean isCanDeassign( String[] ura )
+    {
+        boolean isCanDeassign = false;
+        if ( StringUtils.isNotEmpty( ura[CAN_ASSIGN_COL] ) && ura[CAN_ASSIGN_COL].equalsIgnoreCase( "T" ) )
+        {
+            isCanDeassign = true;
+        }
+        return isCanDeassign;
+    }
+
+
+    public static URA getUra( String[] ura )
+    {
+        return new URA( getArole( ura ), getUou( ura ), getUrole( ura ), isCanAssign( ura ) );
+    }
+
+
+    /**
+     * 
+     * @param uras
+     * @return
+     */
+    public static Map<URA, URA> getURAs( String[][] uras )
+    {
+        Map<URA, URA> listUras = new HashMap<>();
+        for ( String[] szUra : uras )
+        {
+            URA ura = getUra( szUra );
+            listUras.put( ura, ura );
+        }
+        return listUras;
+    }
+}


Mime
View raw message