directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1529463 - in /directory/escimo/branches/json-schema-experiment/ldap/src/main: java/org/apache/directory/scim/ldap/LdapSchemaMapper.java resources/escimo-ldap-mapping.xml
Date Sat, 05 Oct 2013 14:38:16 GMT
Author: kayyagari
Date: Sat Oct  5 14:38:16 2013
New Revision: 1529463

URL: http://svn.apache.org/r1529463
Log:
o removed the "type" definition from multivalued attributes (this should be handled by an
attribute handler when needed)
o added objectclasses to the group resource definition

Modified:
    directory/escimo/branches/json-schema-experiment/ldap/src/main/java/org/apache/directory/scim/ldap/LdapSchemaMapper.java
    directory/escimo/branches/json-schema-experiment/ldap/src/main/resources/escimo-ldap-mapping.xml

Modified: directory/escimo/branches/json-schema-experiment/ldap/src/main/java/org/apache/directory/scim/ldap/LdapSchemaMapper.java
URL: http://svn.apache.org/viewvc/directory/escimo/branches/json-schema-experiment/ldap/src/main/java/org/apache/directory/scim/ldap/LdapSchemaMapper.java?rev=1529463&r1=1529462&r2=1529463&view=diff
==============================================================================
--- directory/escimo/branches/json-schema-experiment/ldap/src/main/java/org/apache/directory/scim/ldap/LdapSchemaMapper.java
(original)
+++ directory/escimo/branches/json-schema-experiment/ldap/src/main/java/org/apache/directory/scim/ldap/LdapSchemaMapper.java
Sat Oct  5 14:38:16 2013
@@ -42,7 +42,6 @@ import org.apache.directory.scim.ldap.sc
 import org.apache.directory.scim.ldap.schema.ResourceSchema;
 import org.apache.directory.scim.ldap.schema.SimpleType;
 import org.apache.directory.scim.ldap.schema.SimpleTypeGroup;
-import org.apache.directory.scim.ldap.schema.TypedType;
 import org.apache.directory.scim.ldap.schema.UserSchema;
 import org.dom4j.Document;
 import org.dom4j.DocumentHelper;
@@ -301,40 +300,6 @@ public class LdapSchemaMapper implements
                 }
 
             }
-            else
-            {
-                List<Element> lstElmTypes = elmMultiVal.elements( "type" );
-
-                List<TypedType> lstTypes = new ArrayList<TypedType>();
-
-                for ( Element elmType : lstElmTypes )
-                {
-                    Element elmTypeAtGroup = elmType.element( "at-group" );
-                    SimpleTypeGroup stg = parseAtGroup( elmTypeAtGroup, uri );
-
-                    boolean show = getShowVal( elmType );
-
-                    String primary = elmType.attributeValue( "primary" );
-
-                    if ( Strings.isEmpty( primary ) )
-                    {
-                        primary = "false";
-                    }
-
-                    String typeName = elmType.attributeValue( "name" );
-
-                    if ( Strings.isEmpty( typeName ) )
-                    {
-                        throw new IllegalArgumentException( "name is missing in the type
element " + elmType.asXML() );
-                    }
-
-                    TypedType tt = new TypedType( uri, typeName, show, stg, 
-                        Boolean.parseBoolean( primary ) );
-                    lstTypes.add( tt );
-                }
-
-                ct = new MultiValType( uri, name, showMultiVal, lstTypes, baseDn, filter
);
-            }
             
             String handlerRef = elmMultiVal.attributeValue( "handlerRef" );
             

Modified: directory/escimo/branches/json-schema-experiment/ldap/src/main/resources/escimo-ldap-mapping.xml
URL: http://svn.apache.org/viewvc/directory/escimo/branches/json-schema-experiment/ldap/src/main/resources/escimo-ldap-mapping.xml?rev=1529463&r1=1529462&r2=1529463&view=diff
==============================================================================
--- directory/escimo/branches/json-schema-experiment/ldap/src/main/resources/escimo-ldap-mapping.xml
(original)
+++ directory/escimo/branches/json-schema-experiment/ldap/src/main/resources/escimo-ldap-mapping.xml
Sat Oct  5 14:38:16 2013
@@ -27,48 +27,35 @@
         </complex-attribute>
 
         <multival-attribute name="emails">
-            <type name="work" primary="true">
-                <at-group>
-                    <attribute name="value" mappedTo="mail" />
-                </at-group>
-            </type>
+            <at-group>
+                <attribute name="value" mappedTo="mail" />
+            </at-group>
         </multival-attribute>
 
         <multival-attribute name="phoneNumbers">
-            <type name="work" primary="true">
-                <at-group>
-                    <attribute name="value" mappedTo="telephoneNumber" />
-                </at-group>
-            </type>
-            <type name="home" primary="false">
-                <at-group>
-                    <attribute name="value" mappedTo="homePhone" />
-                </at-group>
-            </type>
+            <at-group>
+                <attribute name="value" mappedTo="telephoneNumber" />
+            </at-group>
         </multival-attribute>
 
         <multival-attribute name="ims">
         </multival-attribute>
 
         <multival-attribute name="photos" handlerRef="photosHandler">
-            <type name="photo" primary="true">
-                <at-group>
-                    <attribute name="value" mappedTo="jpegPhoto" />
-                </at-group>
-            </type>
+            <at-group>
+                <attribute name="value" mappedTo="jpegPhoto" />
+            </at-group>
         </multival-attribute>
 
         <multival-attribute name="addresses">
-            <type name="work" primary="true">
-                <at-group>
-                    <attribute name="streetAddress" mappedTo="street" />
-                    <attribute name="locality" mappedTo="l" />
-                    <attribute name="region" mappedTo="region" />
-                    <attribute name="postalCode" mappedTo="postalCode" />
-                    <attribute name="country" mappedTo="" />
-                    <formatted format="$streetAddress $locality" />
-                </at-group>
-            </type>
+            <at-group>
+                <attribute name="streetAddress" mappedTo="street" />
+                <attribute name="locality" mappedTo="l" />
+                <attribute name="region" mappedTo="region" />
+                <attribute name="postalCode" mappedTo="postalCode" />
+                <attribute name="country" mappedTo="" />
+                <formatted format="$streetAddress $locality" />
+            </at-group>
         </multival-attribute>
 
         <multival-attribute name="groups" baseDn="ou=system"
@@ -122,6 +109,10 @@
 
     <groupType baseDn="" filter="(objectClass = inetOrgPerson)">
         <schemaRef id="group" />
+        <objectClasses>
+         <objectClass>groupOfNames</objectClass>
+         <objectClass>groupOfUniqueNames</objectClass>
+        </objectClasses>
     </groupType>
 
     <atHandlers>



Mime
View raw message