Examples of MappingContext


Examples of org.apache.hadoop.hbase.hbql.mapping.MappingContext

                && !(stmt instanceof ConnectionStatement)
                && !(stmt instanceof NonConnectionStatement))
                throw new HBqlException("Unsupported statement type: " + stmt.getClass().getSimpleName() + " - " + sql);

            if (stmt instanceof MappingContext) {
                final MappingContext mappingContext = (MappingContext)stmt;
                mappingContext.setResultAccessor(new HRecordResultAccessor(mappingContext));
            }

            return stmt;
        }
        catch (ParseException e) {
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.mapping.MappingContext

    public boolean apply(final T obj) {

        try {
            if (!this.isInitialized()) {
                final ReflectionMapping mapping = ReflectionMapping.getReflectionMapping(obj);
                final MappingContext mappingContext = new MappingContext(mapping);
                this.expressionTree = ParserUtil.parseWhereExpression(this.query, mappingContext);
                this.applyParameters(this.getExpressionTree());
                this.initialized.set(true);
            }
View Full Code Here

Examples of org.jboss.errai.marshalling.rebind.api.MappingContext

  public void generate() {
    classStructureBuilder = implement(MarshallerFactory.class);

    Context classContext = classStructureBuilder.getClassDefinition().getContext();
    mappingContext = new MappingContext(classContext, classStructureBuilder.getClassDefinition(),
            classStructureBuilder);

    loadMarshallers();

    MetaClass javaUtilMap = MetaClassFactory.get(
View Full Code Here

Examples of org.jboss.security.mapping.MappingContext

       * and the subject roles are not the same
       */
      if(subjectRoles != userRoles || emptyContextRoles)
      {
         MappingManager mm = sc.getMappingManager();
         MappingContext mc = mm.getMappingContext(Group.class);
         Group mappedUserRoles = userRoles;
         if(mc != null)
         {
            Map contextMap = new HashMap();
            contextMap.put(SecurityConstants.ROLES_IDENTIFIER, userRoles);
            contextMap.put(SecurityConstants.PRINCIPAL_IDENTIFIER, principal);
            //Append any deployment role->principals configuration done by the user
            contextMap.put(SecurityConstants.DEPLOYMENT_PRINCIPAL_ROLES_MAP,
                  SecurityRolesAssociation.getSecurityRoles());
           
            //Append the principals also
            contextMap.put(SecurityConstants.PRINCIPALS_SET_IDENTIFIER, subject.getPrincipals());
            if(trace)
               log.trace("Roles before mapping:"+ userRoles);
            mc.performMapping(contextMap, userRoles);
            mappedUserRoles = (Group) mc.getMappingResult().getMappedObject();
            if(trace)
               log.trace("Roles after mapping:"+ userRoles);
         }
         sc.getData().put(ROLES_IDENTIFIER, mappedUserRoles);
      }
View Full Code Here

Examples of org.jboss.security.mapping.MappingContext

      }
      if(aPolicy == null )
         throw new IllegalStateException("Application Policy is null for the security domain:"
               + securityDomain);
      MappingInfo rmi = null;
      MappingContext mc = null;
      if(mappingType == Group.class)
      {
         rmi = aPolicy.getRoleMappingInfo();
         if(rmi != null)
         {
            MappingModuleEntry[] mpe = rmi.getMappingModuleEntry();
            ArrayList<MappingProvider> al = new ArrayList<MappingProvider>();
           
            for(int i = 0 ; i < mpe.length; i++)
            {
               MappingProvider mp = getMappingProvider(mpe[i]);
               if(mp != null)
                  al.add(mp);
            }
            mc = new MappingContext(al);
         }
      }
         return mc;
   }
View Full Code Here

Examples of org.jboss.security.mapping.MappingContext

      }
      if(aPolicy == null )
         throw new IllegalStateException("Application Policy is null for the security domain:"
               + securityDomain);
      MappingInfo rmi = null;
      MappingContext mc = null;
      if(mappingType == Group.class)
      {
         rmi = aPolicy.getRoleMappingInfo();         
      }
      else if(mappingType == Principal.class)
      {
         rmi = aPolicy.getPrincipalMappingInfo()
      }
     
      if(rmi != null)
      {
         MappingModuleEntry[] mpe = rmi.getMappingModuleEntry();
         ArrayList<MappingProvider> al = new ArrayList<MappingProvider>();
        
         for(int i = 0 ; i < mpe.length; i++)
         {
            MappingProvider mp = getMappingProvider(mpe[i]);
            if(mp != null)
               al.add(mp);
         }
         mc = new MappingContext(al);
      }
     
      return mc;
   }
View Full Code Here

Examples of org.jboss.security.mapping.MappingContext

       * allow mapping rules be applied only if the SC roles
       * and the subject roles are not the same
       */
      if(subjectRoles != userRoles || emptyContextRoles)
      {
         MappingContext mc = sc.getMappingManager().getMappingContext(Group.class);
         if(mc != null)
         {
            Map contextMap = new HashMap();
            contextMap.put(SecurityConstants.ROLES_IDENTIFIER, userRoles);
            contextMap.put(SecurityConstants.PRINCIPAL_IDENTIFIER, principal);
            //Append any deployment role->principals configuration done by the user
            contextMap.put(SecurityConstants.DEPLOYMENT_PRINCIPAL_ROLES_MAP,
                  SecurityRolesAssociation.getSecurityRoles());
           
            //Append the principals also
            contextMap.put(SecurityConstants.PRINCIPALS_SET_IDENTIFIER, subject.getPrincipals());
            if(trace)
               log.trace("Roles before mapping:"+ userRoles);
            mc.performMapping(contextMap, userRoles);
            if(trace)
               log.trace("Roles after mapping:"+ userRoles);
         }
         sc.getData().put(ROLES_IDENTIFIER, userRoles);
      }
View Full Code Here

Examples of org.jboss.security.mapping.MappingContext

       * and the subject roles are not the same
       */
      if(subjectRoles != userRoles || emptyContextRoles)
      {
         MappingManager mm = sc.getMappingManager();
         MappingContext mc = mm.getMappingContext(Group.class);
         Group mappedUserRoles = userRoles;
         if(mc != null)
         {
            Map contextMap = new HashMap();
            contextMap.put(SecurityConstants.ROLES_IDENTIFIER, userRoles);
            contextMap.put(SecurityConstants.PRINCIPAL_IDENTIFIER, principal);
            //Append any deployment role->principals configuration done by the user
            contextMap.put(SecurityConstants.DEPLOYMENT_PRINCIPAL_ROLES_MAP,
                  SecurityRolesAssociation.getSecurityRoles());
           
            //Append the principals also
            contextMap.put(SecurityConstants.PRINCIPALS_SET_IDENTIFIER, subject.getPrincipals());
            if(trace)
               log.trace("Roles before mapping:"+ userRoles);
            mc.performMapping(contextMap, userRoles);
            mappedUserRoles = (Group) mc.getMappingResult().getMappedObject();
            if(trace)
               log.trace("Roles after mapping:"+ userRoles);
         }
         sc.getData().put(ROLES_IDENTIFIER, mappedUserRoles);
      }
View Full Code Here

Examples of org.jboss.security.mapping.MappingContext

       * and the subject roles are not the same
       */
      if(subjectRoles != userRoles || emptyContextRoles)
      {
         MappingManager mm = sc.getMappingManager();
         MappingContext mc = mm.getMappingContext(Group.class);
         if(mc != null)
         {
            Map contextMap = new HashMap();
            contextMap.put(SecurityConstants.ROLES_IDENTIFIER, userRoles);
            contextMap.put(SecurityConstants.PRINCIPAL_IDENTIFIER, principal);
            //Append any deployment role->principals configuration done by the user
            contextMap.put(SecurityConstants.DEPLOYMENT_PRINCIPAL_ROLES_MAP,
                  SecurityRolesAssociation.getSecurityRoles());
           
            //Append the principals also
            contextMap.put(SecurityConstants.PRINCIPALS_SET_IDENTIFIER, subject.getPrincipals());
            if(trace)
               log.trace("Roles before mapping:"+ userRoles);
            mc.performMapping(contextMap, userRoles);
            if(trace)
               log.trace("Roles after mapping:"+ userRoles);
         }
         sc.getData().put(ROLES_IDENTIFIER, userRoles);
      }
View Full Code Here

Examples of org.jboss.security.mapping.MappingContext

      }
      if(aPolicy == null )
         throw new IllegalStateException("Application Policy is null for the security domain:"
               + securityDomain);
      MappingInfo rmi = null;
      MappingContext mc = null;
      if(mappingType == Group.class)
      {
         rmi = aPolicy.getRoleMappingInfo();
         if(rmi != null)
         {
            MappingModuleEntry[] mpe = rmi.getMappingModuleEntry();
            ArrayList<MappingProvider> al = new ArrayList<MappingProvider>();
           
            for(int i = 0 ; i < mpe.length; i++)
            {
               MappingProvider mp = getMappingProvider(mpe[i]);
               if(mp != null)
                  al.add(mp);
            }
            mc = new MappingContext(al);
         }
      }
         return mc;
   }
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.