Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Creative commons Attribution-NonCommercial license. http://creativecommons.org/licenses/by-nc/2.5/au/deed.en_GB NO WARRANTY IS GIVEN OR IMPLIED, USE AT YOUR OWN RISK.
 
 package base.jee.api.cassandra;
 
import base.Query;
import static base.jee.api.cassandra.util.Log.log;
public class GetPersonRoles extends Query<PersonRole> {
	private CassandraAPI api;
	private User user;
	private UUID personUuid;
	public GetPersonRoles(CassandraAPI apiUser userUUID personUuidthrows PermissionException {
		if(api == null) {
			throw new IllegalArgumentException("Invalid parameter: api");
		}
		if(personUuid == null) {
			throw new IllegalArgumentException("Invalid parameter: personUuid");
		}
		if(user == null || !user.isAuthenticated()) {
			throw new PermissionException(getClass().getSimpleName(), user"Requires authenticated user."null);
		}
		this. = api;
		this. = user;
		this. = personUuid;
	}
	public GetPersonRoles() {
	}
		return new GetPersonRoles(
				(CassandraAPI)parameters.get("api"),
				(User)parameters.get("user"),
				UUID.fromString(((String)parameters.get("personId"))));
	}
	public List<PersonRoleexecute() throws IOException {
		List<PersonRoleresults = new LinkedList<>();
			log(s"WARN""Permission denied invoking: " + GetPersonRoles.class.getSimpleName() + " " + getJsonParameters());
			throw new IllegalStateException("You do not have permission to manage roles");
		}
				"select resource, uid, role "+
						"from role " +
						"where person_uuid=? allow filtering");
		for(Row r : s.execute(p.bind())) {
			results.add(new PersonRole(r.getString(0), r.getString(1), r.getString(2)));
		}
		return results;
	}
		return "{" +
				"\"requesting.person\":" + .getPersonUuid() + "," +
				"\"person\":" +  + "" +
				"}";
	}
New to GrepCode? Check out our FAQ X