Codota Logo
IdentityObjectAttribute
Code IndexAdd Codota to your IDE (free)

How to use
IdentityObjectAttribute
in
org.jboss.identity.idm.spi.model

Best Java code snippets using org.jboss.identity.idm.spi.model.IdentityObjectAttribute (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: org.jboss.identity.idm/idm-hibernate

public IdentityObject findIdentityObjectByUniqueAttribute(IdentityStoreInvocationContext invocationCtx, IdentityObjectType identityObjectType, IdentityObjectAttribute attribute) throws IdentityException
{
 if (attribute == null)
 {
   throw new IllegalArgumentException("attribute is null");
 }
 checkIOType(identityObjectType);
 String attrMappedName = resolveAttributeStoreMapping(identityObjectType, attribute.getName());
 HibernateIdentityObjectType hiot = getHibernateIdentityObjectType(invocationCtx, identityObjectType);
 Session session = getHibernateSession(invocationCtx);
 Query q = session.createQuery("select a from HibernateIdentityObjectTextAttribute a where a.identityObject.identityType = :identityType " +
   "and a.name like :attributeName and :value = any elements(a.values)");
 Set attrValues = new HashSet();
 attrValues.addAll(attribute.getValues());
  List<HibernateIdentityObjectAttribute> attrs = (List<HibernateIdentityObjectAttribute>)
   q.setParameter("identityType", hiot)
    .setParameter("attributeName", attrMappedName)
    .setParameter("value", attribute.getValue()).list();
 if (attrs.size() == 0)
 {
   return null;
 }
 if (attrs.size() > 1)
 {
   throw new IdentityException("Illegal state - more than one IdentityObject with the same unique attribute value: " + attribute);
 }
 return attrs.get(0).getIdentityObject();
}
origin: org.jboss.identity.idm/idm-core

public SimpleAttribute(IdentityObjectAttribute attribute)
{
 this.name = attribute.getName();
 this.values.addAll(attribute.getValues());
}
origin: org.jboss.identity.idm/idm-hibernate

String name = resolveAttributeStoreMapping(identity.getIdentityType(), attribute.getName());
mappedAttributes.put(name, attribute);
if (mdMap == null || !mdMap.containsKey(attribute.getName()))
    "' option if needed. Attribute name: " + attribute.getName());
IdentityObjectAttributeMetaData amd = mdMap.get(attribute.getName());
 if (!amd.isMultivalued() && attribute.getSize() > 1)
   throw new IdentityException("Cannot assigned multiply values to single valued attribute: " + attribute.getName());
   throw new IdentityException("Cannot update readonly attribute: " + attribute.getName());
    throw new IdentityException("Unique attribute '" + attribute.getName() + " value already set for identityObject: " +
    checkIdentity);
 for (Object value : attribute.getValues())
      + attribute.getName() + " / " + value);
      + attribute.getName() + " / " + value);
IdentityObjectAttributeMetaData amd = mdMap.get(attribute.getName());
    for (Object value : attribute.getValues())
    for (Object value : attribute.getValues())
origin: org.jboss.identity.idm/idm-core

 if (supportedAttrs.contains(entry.getName()))
for (IdentityObjectAttribute entry : leftAttrs)
 if (!supportedAttrs.contains(entry.getName()))
    "Attribute name: " + entry.getName());
origin: org.jboss.identity.idm/idm-hibernate

String name = resolveAttributeStoreMapping(identity.getIdentityType(), attribute.getName());
mappedAttributes.put(name, attribute);
if ((mdMap == null || !mdMap.containsKey(attribute.getName())) &&
 !isAllowNotDefinedAttributes)
   "' option if needed. Attribute name: " + attribute.getName());
 amd = mdMap.get(attribute.getName());
 if (!amd.isMultivalued() && attribute.getSize() > 1)
   throw new IdentityException("Cannot add multiply values to single valued attribute: " + attribute.getName());
   throw new IdentityException("Cannot add readonly attribute: " + attribute.getName());
    throw new IdentityException("Unique attribute '" + attribute.getName() + " value already set for identityObject: " +
    checkIdentity);
 for (Object value : attribute.getValues())
      + attribute.getName() + " / " + value);
      + attribute.getName() + " / " + value);
IdentityObjectAttributeMetaData amd = mdMap != null ? mdMap.get(attribute.getName()) : null;
    for (Object value : attribute.getValues())
origin: org.jboss.identity.idm/idm-core

public IdentityObject findIdentityObjectByUniqueAttribute(IdentityStoreInvocationContext invocationCtx, IdentityObjectType identityObjectType, IdentityObjectAttribute attribute) throws IdentityException
{
 List<String> filteredAttrs = new LinkedList<String>();
 List<String> leftAttrs = new LinkedList<String>();
 IdentityStore toStore = resolveIdentityStore(identityObjectType);
 IdentityStoreInvocationContext targetCtx = resolveInvocationContext(toStore, invocationCtx);
 // Put supported attrs to the main store
 if (toStore != defaultAttributeStore)
 {
   Set<String> supportedAttrs = toStore.getSupportedAttributeNames(targetCtx, identityObjectType);
   if (supportedAttrs.contains(attribute.getName()))
   {
    return toStore.findIdentityObjectByUniqueAttribute(targetCtx, identityObjectType, attribute);
   }
 }
 IdentityStoreInvocationContext defaultCtx = resolveInvocationContext(defaultAttributeStore, invocationCtx);
 if (isAllowNotDefinedAttributes())
 {
   defaultAttributeStore.findIdentityObjectByUniqueAttribute(defaultCtx, identityObjectType, attribute);
 }
 else
 {
   Set<String> supportedAttrs = defaultAttributeStore.getSupportedAttributeNames(defaultCtx, identityObjectType);
   if (supportedAttrs.contains(attribute.getName()))
   {
    return toStore.findIdentityObjectByUniqueAttribute(defaultCtx, identityObjectType, attribute);
   }
 }
 return null;
}
origin: org.jboss.identity.idm/idm-core

if (supportedAttrs.contains(entry.getName()))
if (!supportedAttrs.contains(entry.getName()))
   "Attribute name: " + entry.getName());
org.jboss.identity.idm.spi.modelIdentityObjectAttribute

Most used methods

  • getName
  • getValues
  • getSize
  • getValue

Popular in Java

  • Creating JSON documents from java classes using gson
  • getExternalFilesDir (Context)
  • startActivity (Activity)
  • getContentResolver (Context)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now