Examples of MappingContext


Examples of org.jboss.security.mapping.MappingContext

/* 347 */     userRoles = copyGroups(userRoles, subjectRoles);
/*     */
/* 354 */     if ((subjectRoles != userRoles) || (emptyContextRoles))
/*     */     {
/* 356 */       MappingManager mm = sc.getMappingManager();
/* 357 */       MappingContext mc = mm.getMappingContext(Group.class);
/* 358 */       Group mappedUserRoles = userRoles;
/* 359 */       if (mc != null)
/*     */       {
/* 361 */         Map contextMap = new HashMap();
/* 362 */         contextMap.put("Roles", userRoles);
/* 363 */         contextMap.put("Principal", principal);
/*     */
/* 365 */         contextMap.put("deploymentPrincipalRolesMap", SecurityRolesAssociation.getSecurityRoles());
/*     */
/* 369 */         contextMap.put("PrincipalsSet", subject.getPrincipals());
/* 370 */         if (this.trace)
/* 371 */           log.trace("Roles before mapping:" + userRoles);
/* 372 */         mc.performMapping(contextMap, userRoles);
/* 373 */         mappedUserRoles = (Group)mc.getMappingResult().getMappedObject();
/* 374 */         if (this.trace)
/* 375 */           log.trace("Roles after mapping:" + userRoles);
/*     */       }
/* 377 */       sc.getData().put("Roles", mappedUserRoles);
/*     */     }
View Full Code Here

Examples of org.jboss.security.mapping.MappingContext

/*     */     }
/*  76 */     if (aPolicy == null) {
/*  77 */       throw new IllegalStateException("Application Policy is null for the security domain:" + this.securityDomain);
/*     */     }
/*  79 */     MappingInfo rmi = null;
/*  80 */     MappingContext mc = null;
/*  81 */     if (mappingType == Group.class)
/*     */     {
/*  83 */       rmi = aPolicy.getRoleMappingInfo();
/*     */     }
/*  85 */     else if (mappingType == Principal.class)
/*     */     {
/*  87 */       rmi = aPolicy.getPrincipalMappingInfo();
/*     */     }
/*     */
/*  90 */     if (rmi != null)
/*     */     {
/*  92 */       MappingModuleEntry[] mpe = rmi.getMappingModuleEntry();
/*  93 */       ArrayList al = new ArrayList();
/*     */
/*  95 */       for (int i = 0; i < mpe.length; i++)
/*     */       {
/*  97 */         MappingProvider mp = getMappingProvider(mpe[i]);
/*  98 */         if (mp != null)
/*  99 */           al.add(mp);
/*     */       }
/* 101 */       mc = new MappingContext(al);
/*     */     }
/*     */
/* 104 */     return mc;
/*     */   }
View Full Code Here

Examples of org.springframework.data.mapping.context.MappingContext

  }

  @Test
  public void shouldReturnMappingContextWithWhichItWasInitialized() {
    // given
    MappingContext mappingContext = new SimpleElasticsearchMappingContext();
    MappingElasticsearchConverter converter = new MappingElasticsearchConverter(mappingContext);
    // then
    assertThat(converter.getMappingContext(), is(notNullValue()));
    assertThat(converter.getMappingContext(), is(sameInstance(mappingContext)));
  }
View Full Code Here

Examples of org.springframework.data.mapping.context.MappingContext

        @RelatedTo TestRelationship test;
    }

    @Test(expected = MappingException.class)
    public void testFailInvalidRelatedTo() throws Exception {
        MappingContext context = new Neo4jMappingContext();
        context.getPersistentEntity(TestEntityRelatedTo.class);
    }
View Full Code Here

Examples of org.springframework.data.mapping.context.MappingContext

        MappingContext context = new Neo4jMappingContext();
        context.getPersistentEntity(TestEntityRelatedTo.class);
    }
    @Test(expected = MappingException.class)
    public void testFailInvalidRelatedToVia() throws Exception {
        MappingContext context = new Neo4jMappingContext();
        context.getPersistentEntity(TestEntityRelatedToVia.class);
    }
View Full Code Here

Examples of org.uengine.contexts.MappingContext

   
    Connection con = null;

    IDAO dao = ConnectiveDAO.createDAOImpl(instance.getProcessTransactionContext(), null, IDAO.class);

    MappingContext mappingContext = getMappingContext();

    //Using DAO
/*    for(int i=0; i<mappingContext.getMappingElements().length; i++){
      ParameterContext paramContext = mappingContext.getMappingElements()[i];
      String tableAndFieldName = paramContext.getArgument().getText();
View Full Code Here

Examples of org.uengine.contexts.MappingContext

   
    if (Activity.STATUS_READY.equals(status) ||
        Activity.STATUS_RUNNING.equals(status) ||
        Activity.STATUS_TIMEOUT.equals(status)) {
     
      MappingContext mappingContext = getMappingContext();
      ParameterContext[] params = mappingContext.getMappingElements();//getVariableBindings();
     
      if(params != null && instance != null){
        //String script = "";
        String objName = null;
        Serializable objValue = null;
View Full Code Here

Examples of org.uengine.contexts.MappingContext

    public void setMappingContext(MappingContext mappingContext) {
      this.mappingContext = mappingContext;
    }
   
  protected void executeActivity(ProcessInstance instance) throws Exception {
    MappingContext mc= getMappingContext();
    if(mc !=null){
      ParameterContext[] params = mc.getMappingElements();
      for (int i = 0; i < params.length; i++) {
        ParameterContext param = params[i];
       
        String srcVariableName = null;
        String targetFieldName = param.getArgument().getText();
View Full Code Here

Examples of org.uengine.contexts.MappingContext

    if(valueMap==null && officeDocInst.getFilePath()!=null){
      officeDocInst.loadValueMap();
      mappedResult = officeDocInst.getValueMap();
    }
   
    MappingContext mappingContext = getMappingContext();
   
    ParameterContext[] params = mappingContext.getMappingElements();//getVariableBindings();
    if(params!=null && instance!=null){
      //String script = "";
      String objName = null;
      Serializable objValue = null;
      for (int i = 0; i < params.length; i++) {
View Full Code Here

Examples of org.uengine.contexts.MappingContext

     }
    
     ParameterContext[] result = new ParameterContext[mappingContexts.size()];
     mappingContexts.toArray(result);
    
     MappingContext mc = new MappingContext();
     mc.setMappingElements(result);
    
     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.