Example usage for org.apache.cassandra.auth IResource getParent

List of usage examples for org.apache.cassandra.auth IResource getParent

Introduction

In this page you can find the example usage for org.apache.cassandra.auth IResource getParent.

Prototype

IResource getParent();

Source Link

Document

Gets next resource in the hierarchy.

Usage

From source file:org.wso2.carbon.cassandra.server.CarbonCassandraAuthorizer.java

License:Apache License

private String getResourcePath(IResource resource) {
    String resourcePath = resource.getName();
    IResource parent = null;//w  w  w  .j  a  v a2 s.c om
    while (true) {
        if (resource.hasParent()) {
            parent = resource.getParent();
            resourcePath = parent.getName().concat(File.separator).concat(resourcePath);
            resource = parent;
        } else { //ROOT level
            break;
        }
    }
    return resourcePath;
}