Examples of addPrincipal()


Examples of com.sun.enterprise.deployment.runtime.connector.MapElement.addPrincipal()

      throw new RuntimeException("Cannot set info on null descriptor");
  }
  if (newDescriptor instanceof Principal) {
      Principal principal = (Principal) newDescriptor;
      if (principal.getValue(Principal.CREDENTIAL)==null) {
    descriptor.addPrincipal(principal);
      } else {
    descriptor.setBackendPrincipal(true);
    descriptor.setAttributeValue(MapElement.BACKEND_PRINCIPAL, Principal.USER_NAME, principal.getValue(Principal.USER_NAME));
    descriptor.setAttributeValue(MapElement.BACKEND_PRINCIPAL, Principal.PASSWORD, principal.getValue(Principal.PASSWORD));
    descriptor.setAttributeValue(MapElement.BACKEND_PRINCIPAL, Principal.CREDENTIAL, principal.getValue(Principal.CREDENTIAL));
View Full Code Here

Examples of com.sun.enterprise.deployment.runtime.connector.MapElement.addPrincipal()

      throw new RuntimeException("Cannot set info on null descriptor");
  }
  if (newDescriptor instanceof Principal) {
      Principal principal = (Principal) newDescriptor;
      if (principal.getValue(Principal.CREDENTIAL)==null) {
    descriptor.addPrincipal(principal);
      } else {
    descriptor.setBackendPrincipal(true);
    descriptor.setAttributeValue(MapElement.BACKEND_PRINCIPAL, Principal.USER_NAME, principal.getValue(Principal.USER_NAME));
    descriptor.setAttributeValue(MapElement.BACKEND_PRINCIPAL, Principal.PASSWORD, principal.getValue(Principal.PASSWORD));
    descriptor.setAttributeValue(MapElement.BACKEND_PRINCIPAL, Principal.CREDENTIAL, principal.getValue(Principal.CREDENTIAL));
View Full Code Here

Examples of com.sun.enterprise.tools.common.dd.connector.MapElement.addPrincipal()

            me.setAttributeValue(MapElement.BACKEND_PRINCIPAL, 0, "credential", ""+i); //NOI18N
            for (int j = 0; j < rowCount; j++) {
                Principal p = new Principal();
                p.setAttributeValue("user-name", ""+unameVal); //NOI18N
                unameVal++;
                me.addPrincipal(p);
            }
            rm.addMapElement(me);
           
            //ra.addPropertyElement(true);
            //ra.setAttributeValue(ResourceAdapter.PROPERTY,i,"name",""+i); //NOI18N
View Full Code Here

Examples of org.apache.cocoon.components.repository.PrincipalProvider.addPrincipal()

            principalprovider = (PrincipalProvider)principalproviders.select(principal_provider);

            Principal caller = new Principal(caller_principal_name, caller_principal_password);
            Principal principal = new Principal(principal_name, principal_role, principal_password);

            principalprovider.addPrincipal(caller, principal);
        } catch (ComponentException ce) {
            if (getLogger().isDebugEnabled())
                getLogger().debug("Could not lookup for component.", ce);
            throw new ProcessingException("Could not lookup for component.", ce);
View Full Code Here

Examples of org.apache.jetspeed.security.JetspeedPrincipalManager.addPrincipal()

       
        if (principal == null)
        {
            // principal does not exist yet, create a new one using the principal manager
            principal = principalManager.newPrincipal(entity.getId(), true);
            principalManager.addPrincipal(principal, toAssociations);
            syncAll = true;
        }
        else if (!principal.isMapped())
        {
            logger.debug("Found "+principal.getType().getName()+" principal: "+principal.getName()+" is not mapped therefore not synchronized!");
View Full Code Here

Examples of org.apache.jetspeed.security.JetspeedPrincipalManager.addPrincipal()

                // principal does not exist yet, create it using the Jetspeed
                // principal manager
                updatedPrincipal = principalManager.newPrincipal(entity.getId(), true);
                try
                {
                    principalManager.addPrincipal(updatedPrincipal, null);
                    if (logger.isDebugEnabled()){
                        logger.debug("Adding principal "+updatedPrincipal.getName()+" of type "+updatedPrincipal.getType().getName()+" ...");
                    }
                }
                catch (SecurityException sexp)
View Full Code Here

Examples of org.apache.jetspeed.security.JetspeedPrincipalManager.addPrincipal()

                            for (JSNVPElement elem : jsSecAttrs.getValues())
                            {
                                principal.getSecurityAttributes().getAttribute(elem.getKey(), true).setStringValue(elem.getValue());
                            }
                        }
                        principalManager.addPrincipal(principal, null);
                    }
                   
                    principal = principalManager.getPrincipal(name);
                    refs.getPrincipalMap(typeName).put(name, principal);
                }
View Full Code Here

Examples of org.apache.jetspeed.security.JetspeedPrincipalManager.addPrincipal()

       
        if (principal == null)
        {
            // principal does not exist yet, create a new one using the principal manager
            principal = principalManager.newPrincipal(entity.getId(), true);
            principalManager.addPrincipal(principal, toAssociations);
            syncAll = true;
        }
        else if (!principal.isMapped())
        {
            feedbackLogger.warn("Found {} principal: {} is not mapped therefore not synchronized!", principal.getType().getName(),principal.getName());
View Full Code Here

Examples of org.apache.jetspeed.security.JetspeedPrincipalManager.addPrincipal()

                            for (JSNVPElement elem : jsSecAttrs.getValues())
                            {
                                principal.getSecurityAttributes().getAttribute(elem.getKey(), true).setStringValue(elem.getValue());
                            }
                        }
                        principalManager.addPrincipal(principal, null);
                    }
                   
                    principal = principalManager.getPrincipal(name);
                    refs.getPrincipalMap(typeName).put(name, principal);
                }
View Full Code Here

Examples of org.apache.jetspeed.sso.SSOSite.addPrincipal()

    SSOPrincipal principal = this.getPrincipalForSite(ssoSite, fullPath);
   
    if (principal == null )
    {
        principal = getSSOPrincipal(fullPath);
        ssoSite.addPrincipal(principal);
    }
    else
    {
        // Check if the entry the user likes to update exists already
        Collection remoteForSite = ssoSite.getRemotePrincipals();
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.