Examples of IdentityStoreConfigurationMetaDataImpl


Examples of org.jboss.identity.idm.impl.configuration.metadata.IdentityStoreConfigurationMetaDataImpl

      return repoMD;
   }

   private static IdentityStoreConfigurationMetaData createIdentityStoreConfigurationMetaData(IdentityStoreType identityStoreType)
   {
      IdentityStoreConfigurationMetaDataImpl storeMD = new IdentityStoreConfigurationMetaDataImpl();

      storeMD.setId(identityStoreType.getId());
      storeMD.setClassName(identityStoreType.getClazz());

      if (identityStoreType.getExternalConfig() != null)
      {
         storeMD.setExternalConfig(identityStoreType.getExternalConfig().getValue());
      }

      storeMD.setSupportedRelationshipTypes(identityStoreType.getSupportedRelationshipTypes().getRelationshipType());

      if (identityStoreType.getSupportedIdentityObjectTypes() != null &&
         identityStoreType.getSupportedIdentityObjectTypes().getIdentityObjectType() != null)

      {

         for (IdentityObjectTypeType identityObjectTypeType : identityStoreType.getSupportedIdentityObjectTypes().getIdentityObjectType())
         {
            IdentityObjectTypeMetaDataImpl identityObjectTypeMD = new IdentityObjectTypeMetaDataImpl();

            identityObjectTypeMD.setName(identityObjectTypeType.getName());


            // Attributes

            List<IdentityObjectAttributeMetaData> attributes = new LinkedList<IdentityObjectAttributeMetaData>();

            if (identityObjectTypeType.getAttributes() != null &&
               identityObjectTypeType.getAttributes().getAttribute() != null)
            {

               for (AttributeType attributeType : identityObjectTypeType.getAttributes().getAttribute())
               {

                  String readOnly = attributeType.getIsReadOnly();
                  String multivalued = attributeType.getIsMultivalued();
                  String required = attributeType.getIsRequired();

                  IdentityObjectAttributeMetaDataImpl attributeMD = new IdentityObjectAttributeMetaDataImpl(
                     attributeType.getName(),
                     attributeType.getMapping(),
                     attributeType.getType(),
                     (readOnly != null && readOnly.equalsIgnoreCase("true")),
                     (multivalued != null && multivalued.equalsIgnoreCase("true")),
                     (required != null && required.equalsIgnoreCase("true"))
                  );

                  attributes.add(attributeMD);
               }
            }

            identityObjectTypeMD.setAttributes(attributes);

            // Credentials

            List<String> credentials = new LinkedList<String>();

            if (identityObjectTypeType.getCredentials() != null &&
               identityObjectTypeType.getCredentials().getCredentialType() != null)
            {
               for (String credentialType : identityObjectTypeType.getCredentials().getCredentialType())
               {
                  credentials.add(credentialType);
               }
            }

            identityObjectTypeMD.setCredentials(credentials);

            // Relationships

            List<RelationshipMetaData> relationships = new LinkedList<RelationshipMetaData>();

            if (identityObjectTypeType.getRelationships() != null &&
               identityObjectTypeType.getRelationships().getRelationship() != null)
            {
               for (RelationshipType relationshipType : identityObjectTypeType.getRelationships().getRelationship())
               {
                  RelationshipMetaDataImpl relMD = new RelationshipMetaDataImpl();
                  relMD.setIdentityObjectTypeRef(relationshipType.getIdentityObjectTypeRef());
                  relMD.setRelationshipTypeRef(relationshipType.getRelationshipTypeRef());
                  relationships.add(relMD);
               }
            }

            identityObjectTypeMD.setRelationships(relationships);

            // Options

            Map<String, List<String>> options = new HashMap<String, List<String>>();

            if (identityObjectTypeType.getOptions() != null &&
               identityObjectTypeType.getOptions().getOption() != null)
            {

               for (OptionType optionType : identityObjectTypeType.getOptions().getOption())
               {
                  options.put(optionType.getName(), optionType.getValue());
               }
            }
           
            identityObjectTypeMD.setOptions(options);

            storeMD.getSupportedIdentityTypes().add(identityObjectTypeMD);
         }
      }


      Map<String, List<String>> options = new HashMap<String, List<String>>();

      if (identityStoreType.getOptions() != null &&
         identityStoreType.getOptions().getOption() != null)
      {

         for (OptionType optionType : identityStoreType.getOptions().getOption())
         {
            options.put(optionType.getName(), optionType.getValue());
         }
      }
     
      storeMD.setOptions(options);

      return storeMD;
   }
View Full Code Here

Examples of org.jboss.identity.idm.impl.configuration.metadata.IdentityStoreConfigurationMetaDataImpl

      return repoMD;
   }

   private static IdentityStoreConfigurationMetaData createIdentityStoreConfigurationMetaData(IdentityStoreType identityStoreType)
   {
      IdentityStoreConfigurationMetaDataImpl storeMD = new IdentityStoreConfigurationMetaDataImpl();

      storeMD.setId(identityStoreType.getId());
      storeMD.setClassName(identityStoreType.getClazz());

      if (identityStoreType.getExternalConfig() != null)
      {
         storeMD.setExternalConfig(identityStoreType.getExternalConfig().getValue());
      }

      storeMD.setSupportedRelationshipTypes(identityStoreType.getSupportedRelationshipTypes().getRelationshipType());

      if (identityStoreType.getSupportedIdentityObjectTypes() != null &&
         identityStoreType.getSupportedIdentityObjectTypes().getIdentityObjectType() != null)

      {

         for (IdentityObjectTypeType identityObjectTypeType : identityStoreType.getSupportedIdentityObjectTypes().getIdentityObjectType())
         {
            IdentityObjectTypeMetaDataImpl identityObjectTypeMD = new IdentityObjectTypeMetaDataImpl();

            identityObjectTypeMD.setName(identityObjectTypeType.getName());


            // Attributes

            List<IdentityObjectAttributeMetaData> attributes = new LinkedList<IdentityObjectAttributeMetaData>();

            if (identityObjectTypeType.getAttributes() != null &&
               identityObjectTypeType.getAttributes().getAttribute() != null)
            {

               for (AttributeType attributeType : identityObjectTypeType.getAttributes().getAttribute())
               {

                  String readOnly = attributeType.getIsReadOnly();
                  String multivalued = attributeType.getIsMultivalued();
                  String required = attributeType.getIsRequired();

                  IdentityObjectAttributeMetaDataImpl attributeMD = new IdentityObjectAttributeMetaDataImpl(
                     attributeType.getName(),
                     attributeType.getMapping(),
                     attributeType.getType(),
                     (readOnly != null && readOnly.equalsIgnoreCase("true")),
                     (multivalued != null && multivalued.equalsIgnoreCase("true")),
                     (required != null && required.equalsIgnoreCase("true"))
                  );

                  attributes.add(attributeMD);
               }
            }

            identityObjectTypeMD.setAttributes(attributes);

            // Credentials

            List<String> credentials = new LinkedList<String>();

            if (identityObjectTypeType.getCredentials() != null &&
               identityObjectTypeType.getCredentials().getCredentialType() != null)
            {
               for (String credentialType : identityObjectTypeType.getCredentials().getCredentialType())
               {
                  credentials.add(credentialType);
               }
            }

            identityObjectTypeMD.setCredentials(credentials);

            // Relationships

            List<RelationshipMetaData> relationships = new LinkedList<RelationshipMetaData>();

            if (identityObjectTypeType.getRelationships() != null &&
               identityObjectTypeType.getRelationships().getRelationship() != null)
            {
               for (RelationshipType relationshipType : identityObjectTypeType.getRelationships().getRelationship())
               {
                  RelationshipMetaDataImpl relMD = new RelationshipMetaDataImpl();
                  relMD.setIdentityObjectTypeRef(relationshipType.getIdentityObjectTypeRef());
                  relMD.setRelationshipTypeRef(relationshipType.getRelationshipTypeRef());
                  relationships.add(relMD);
               }
            }

            identityObjectTypeMD.setRelationships(relationships);

            // Options

            Map<String, List<String>> options = new HashMap<String, List<String>>();

            if (identityObjectTypeType.getOptions() != null &&
               identityObjectTypeType.getOptions().getOption() != null)
            {

               for (OptionType optionType : identityObjectTypeType.getOptions().getOption())
               {
                  options.put(optionType.getName(), optionType.getValue());
               }
            }
           
            identityObjectTypeMD.setOptions(options);

            storeMD.getSupportedIdentityTypes().add(identityObjectTypeMD);
         }
      }


      Map<String, List<String>> options = new HashMap<String, List<String>>();

      if (identityStoreType.getOptions() != null &&
         identityStoreType.getOptions().getOption() != null)
      {

         for (OptionType optionType : identityStoreType.getOptions().getOption())
         {
            options.put(optionType.getName(), optionType.getValue());
         }
      }
     
      storeMD.setOptions(options);

      return storeMD;
   }
View Full Code Here

Examples of org.jboss.identity.idm.impl.configuration.metadata.IdentityStoreConfigurationMetaDataImpl

      return repoMD;
   }

   private static IdentityStoreConfigurationMetaData createIdentityStoreConfigurationMetaData(IdentityStoreType identityStoreType)
   {
      IdentityStoreConfigurationMetaDataImpl storeMD = new IdentityStoreConfigurationMetaDataImpl();

      storeMD.setId(identityStoreType.getId());
      storeMD.setClassName(identityStoreType.getClazz());

      if (identityStoreType.getExternalConfig() != null)
      {
         storeMD.setExternalConfig(identityStoreType.getExternalConfig().getValue());
      }

      storeMD.setSupportedRelationshipTypes(identityStoreType.getSupportedRelationshipTypes().getRelationshipType());

      if (identityStoreType.getSupportedIdentityObjectTypes() != null &&
         identityStoreType.getSupportedIdentityObjectTypes().getIdentityObjectType() != null)

      {

         for (IdentityObjectTypeType identityObjectTypeType : identityStoreType.getSupportedIdentityObjectTypes().getIdentityObjectType())
         {
            IdentityObjectTypeMetaDataImpl identityObjectTypeMD = new IdentityObjectTypeMetaDataImpl();

            identityObjectTypeMD.setName(identityObjectTypeType.getName());


            // Attributes

            List<IdentityObjectAttributeMetaData> attributes = new LinkedList<IdentityObjectAttributeMetaData>();

            if (identityObjectTypeType.getAttributes() != null &&
               identityObjectTypeType.getAttributes().getAttribute() != null)
            {

               for (AttributeType attributeType : identityObjectTypeType.getAttributes().getAttribute())
               {

                  String readOnly = attributeType.getIsReadOnly();
                  String multivalued = attributeType.getIsMultivalued();
                  String required = attributeType.getIsRequired();

                  IdentityObjectAttributeMetaDataImpl attributeMD = new IdentityObjectAttributeMetaDataImpl(
                     attributeType.getName(),
                     attributeType.getMapping(),
                     attributeType.getType(),
                     (readOnly != null && readOnly.equalsIgnoreCase("true")),
                     (multivalued != null && multivalued.equalsIgnoreCase("true")),
                     (required != null && required.equalsIgnoreCase("true"))
                  );

                  attributes.add(attributeMD);
               }
            }

            identityObjectTypeMD.setAttributes(attributes);

            // Credentials

            List<String> credentials = new LinkedList<String>();

            if (identityObjectTypeType.getCredentials() != null &&
               identityObjectTypeType.getCredentials().getCredentialType() != null)
            {
               for (String credentialType : identityObjectTypeType.getCredentials().getCredentialType())
               {
                  credentials.add(credentialType);
               }
            }

            identityObjectTypeMD.setCredentials(credentials);

            // Relationships

            List<RelationshipMetaData> relationships = new LinkedList<RelationshipMetaData>();

            if (identityObjectTypeType.getRelationships() != null &&
               identityObjectTypeType.getRelationships().getRelationship() != null)
            {
               for (RelationshipType relationshipType : identityObjectTypeType.getRelationships().getRelationship())
               {
                  RelationshipMetaDataImpl relMD = new RelationshipMetaDataImpl();
                  relMD.setIdentityObjectTypeRef(relationshipType.getIdentityObjectTypeRef());
                  relMD.setRelationshipTypeRef(relationshipType.getRelationshipTypeRef());
                  relationships.add(relMD);
               }
            }

            identityObjectTypeMD.setRelationships(relationships);

            // Options

            Map<String, List<String>> options = new HashMap<String, List<String>>();

            if (identityObjectTypeType.getOptions() != null &&
               identityObjectTypeType.getOptions().getOption() != null)
            {

               for (OptionType optionType : identityObjectTypeType.getOptions().getOption())
               {
                  options.put(optionType.getName(), optionType.getValue());
               }
            }
           
            identityObjectTypeMD.setOptions(options);

            storeMD.getSupportedIdentityTypes().add(identityObjectTypeMD);
         }
      }


      Map<String, List<String>> options = new HashMap<String, List<String>>();

      if (identityStoreType.getOptions() != null &&
         identityStoreType.getOptions().getOption() != null)
      {

         for (OptionType optionType : identityStoreType.getOptions().getOption())
         {
            options.put(optionType.getName(), optionType.getValue());
         }
      }
     
      storeMD.setOptions(options);

      return storeMD;
   }
View Full Code Here

Examples of org.jboss.identity.idm.impl.configuration.metadata.IdentityStoreConfigurationMetaDataImpl

      return repoMD;
   }

   private static IdentityStoreConfigurationMetaData createIdentityStoreConfigurationMetaData(IdentityStoreType identityStoreType)
   {
      IdentityStoreConfigurationMetaDataImpl storeMD = new IdentityStoreConfigurationMetaDataImpl();

      storeMD.setId(identityStoreType.getId());
      storeMD.setClassName(identityStoreType.getClazz());

      if (identityStoreType.getExternalConfig() != null)
      {
         storeMD.setExternalConfig(identityStoreType.getExternalConfig().getValue());
      }

      storeMD.setSupportedRelationshipTypes(identityStoreType.getSupportedRelationshipTypes().getRelationshipType());

      if (identityStoreType.getSupportedIdentityObjectTypes() != null &&
         identityStoreType.getSupportedIdentityObjectTypes().getIdentityObjectType() != null)

      {

         for (IdentityObjectTypeType identityObjectTypeType : identityStoreType.getSupportedIdentityObjectTypes().getIdentityObjectType())
         {
            IdentityObjectTypeMetaDataImpl identityObjectTypeMD = new IdentityObjectTypeMetaDataImpl();

            identityObjectTypeMD.setName(identityObjectTypeType.getName());


            // Attributes

            List<IdentityObjectAttributeMetaData> attributes = new LinkedList<IdentityObjectAttributeMetaData>();

            if (identityObjectTypeType.getAttributes() != null &&
               identityObjectTypeType.getAttributes().getAttribute() != null)
            {

               for (AttributeType attributeType : identityObjectTypeType.getAttributes().getAttribute())
               {

                  String readOnly = attributeType.getIsReadOnly();
                  String multivalued = attributeType.getIsMultivalued();
                  String required = attributeType.getIsRequired();
                  String unique = attributeType.getIsUnique();

                  IdentityObjectAttributeMetaDataImpl attributeMD = new IdentityObjectAttributeMetaDataImpl(
                     attributeType.getName(),
                     attributeType.getMapping(),
                     attributeType.getType(),
                     (readOnly != null && readOnly.equalsIgnoreCase("true")),
                     (multivalued != null && multivalued.equalsIgnoreCase("true")),
                     (required != null && required.equalsIgnoreCase("true")),
                     (unique != null && unique.equalsIgnoreCase("true"))
                  );

                  attributes.add(attributeMD);
               }
            }

            identityObjectTypeMD.setAttributes(attributes);

            // Credentials

            List<String> credentials = new LinkedList<String>();

            if (identityObjectTypeType.getCredentials() != null &&
               identityObjectTypeType.getCredentials().getCredentialType() != null)
            {
               for (String credentialType : identityObjectTypeType.getCredentials().getCredentialType())
               {
                  credentials.add(credentialType);
               }
            }

            identityObjectTypeMD.setCredentials(credentials);

            // Relationships

            List<RelationshipMetaData> relationships = new LinkedList<RelationshipMetaData>();

            if (identityObjectTypeType.getRelationships() != null &&
               identityObjectTypeType.getRelationships().getRelationship() != null)
            {
               for (RelationshipType relationshipType : identityObjectTypeType.getRelationships().getRelationship())
               {
                  RelationshipMetaDataImpl relMD = new RelationshipMetaDataImpl();
                  relMD.setIdentityObjectTypeRef(relationshipType.getIdentityObjectTypeRef());
                  relMD.setRelationshipTypeRef(relationshipType.getRelationshipTypeRef());
                  relationships.add(relMD);
               }
            }

            identityObjectTypeMD.setRelationships(relationships);

            // Options

            Map<String, List<String>> options = new HashMap<String, List<String>>();

            if (identityObjectTypeType.getOptions() != null &&
               identityObjectTypeType.getOptions().getOption() != null)
            {

               for (OptionType optionType : identityObjectTypeType.getOptions().getOption())
               {
                  options.put(optionType.getName(), optionType.getValue());
               }
            }
           
            identityObjectTypeMD.setOptions(options);

            storeMD.getSupportedIdentityTypes().add(identityObjectTypeMD);
         }
      }


      Map<String, List<String>> options = new HashMap<String, List<String>>();

      if (identityStoreType.getOptions() != null &&
         identityStoreType.getOptions().getOption() != null)
      {

         for (OptionType optionType : identityStoreType.getOptions().getOption())
         {
            options.put(optionType.getName(), optionType.getValue());
         }
      }
     
      storeMD.setOptions(options);

      return storeMD;
   }
View Full Code Here

Examples of org.picketlink.idm.impl.configuration.metadata.IdentityStoreConfigurationMetaDataImpl

            IdentityStoreConfiguration config = (IdentityStoreConfiguration) manager
                    .getReference(storeBean, IdentityStoreConfiguration.class,
                            manager.createCreationalContext(storeBean));

            if (config.isConfigured()) {
                IdentityStoreConfigurationMetaDataImpl storeConfig = new IdentityStoreConfigurationMetaDataImpl();
                config.configure(storeConfig);
                stores.add(storeConfig);

                if (defaultStoreId == null && storeConfig.getId() != null) {
                    defaultStoreId = storeConfig.getId();
                }
            }
        }

        ((IdentityConfigurationMetaDataImpl) metadata).setIdentityStores(stores);
View Full Code Here

Examples of org.picketlink.idm.impl.configuration.metadata.IdentityStoreConfigurationMetaDataImpl

            .getReference(storeBean, IdentityStoreConfiguration.class,
                  manager.createCreationalContext(storeBean));
        
         if (config.isConfigured())
         {
            IdentityStoreConfigurationMetaDataImpl storeConfig = new IdentityStoreConfigurationMetaDataImpl();
            config.configure(storeConfig);
            stores.add(storeConfig);
        
            if (defaultStoreId == null && storeConfig.getId() != null)
            {
               defaultStoreId = storeConfig.getId();
            }
         }
      }    
     
      metadata.setIdentityStores(stores);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.