Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2015 JBoss Inc
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.apiman.gateway.engine.policies.config;

A single authorization rule consisting of a verb, path pattern, and role name.

Author(s):
eric.wittmann@redhat.com
public class AuthorizationRule {
    private String verb;
    private String pathPattern;
    private String role;

    
Constructor.
    public AuthorizationRule() {
    }

    

Returns:
the verb
    public String getVerb() {
        return ;
    }

    

Parameters:
verb the verb to set
    public void setVerb(String verb) {
        this. = verb;
    }

    

Returns:
the pathPattern
    public String getPathPattern() {
        return ;
    }

    

Parameters:
pathPattern the pathPattern to set
    public void setPathPattern(String pathPattern) {
        this. = pathPattern;
    }

    

Returns:
the role
    public String getRole() {
        return ;
    }

    

Parameters:
role the role to set
    public void setRole(String role) {
        this. = role;
    }

    
    @Override
    public boolean equals(Object obj) {
        AuthorizationRule rule2 = (AuthorizationRuleobj;
        return this.getVerb().equals(rule2.getVerb()) && this.getPathPattern().equals(rule2.getPathPattern())
                && this.getRole().equals(rule2.getRole());
    }
New to GrepCode? Check out our FAQ X