Package com.esri.gpt.server.assertion.components

Examples of com.esri.gpt.server.assertion.components.AsnAuthorizer


   */
  public void handle(AsnContext context) throws Exception {
       
    // initialize
    AsnOperation operation = context.getOperation();
    AsnAuthorizer authorizer = context.getAuthorizer();
    String subjectPfx = operation.getSubject().getURNPrefix();
    String predicate = operation.getPredicate().getURN();
   
    // query comments
    if (subjectPfx.endsWith(":assertionid") &&
        predicate.equals("urn:esri:geoportal:comment:query")) {
      Assertion assertion = this.getIndexAdapter().loadAssertionById(context,true);
      authorizer.authorizeQuery(context);
      AsnAssertionRenderer renderer = new AsnAssertionRenderer();
      AsnProperty prop = renderer.makeProperty(context,assertion);
      context.getOperationResponse().generateResponse(context,prop);
       
    } else if (subjectPfx.endsWith(":resourceid") &&
        predicate.equals("urn:esri:geoportal:comment:query")) {  
      authorizer.authorizeQuery(context);
      this.query(context);
       
    } else {
      throw new AsnInvalidOperationException();
    }
View Full Code Here


   */
  public void handle(AsnContext context) throws Exception {
       
    // initialize
    AsnOperation operation = context.getOperation();
    AsnAuthorizer authorizer = context.getAuthorizer();
    String predicate = operation.getPredicate().getURN();
   
    // query ratings for a resource
    if (predicate.equals("urn:esri:geoportal:rating:query")) {
      if (!operation.getSubject().isType(AsnConstants.SUBJECT_PREFIX_RESOURCEID)) {
        throw new AsnInvalidOperationException();
      }
      authorizer.authorizeQuery(context);
      this.query(context);
    }
  }
View Full Code Here

TOP

Related Classes of com.esri.gpt.server.assertion.components.AsnAuthorizer

Copyright © 2018 www.massapicom. 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.