Examples of PendingRequest


Examples of fr.imag.adele.apam.impl.PendingRequest

   * Verify if a resolution request has access granted, and update the resolution constraints
   * accordingly
   */
  public void addGrantConstraints(RelToResolve relation) {

    PendingRequest request = PendingRequest.isRetry() ?
        PendingRequest.current() :
        new PendingRequest(CST.apamResolver,relation.getLinkSource(),relation.getRelationDefinition());

    for (OwnedComponentDeclaration ownedDeclaration : getOwned()) {

      GrantDeclaration grant = getCurrentGrant(ownedDeclaration);
      boolean granted = grant == null || match(grant, request);

      /*
       * Add a constraint to avoid that a request be resolved against an owned instance that
       * is not granted to the source of the request
       */
      for (Instance ownedInstance : getOwned(ownedDeclaration)) {
        if (!granted && request.isSatisfiedBy(ownedInstance)) {
          relation.getMngInstanceConstraints().add("(! ("+CST.INSTNAME+" = "+ownedInstance.getName()+"))");
        }
      }
    }

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.