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.security;
 
All roles a specific person has against a specific resource.
public class ResourceRole implements QueryResult {
	private Person person;
	private UUID personUuid;
	private List<Stringroles;
	public ResourceRole(Person personResourceUid resource) {
		this. = person.getUuid();
		this. = person;
		this. = resource;
		this. = new LinkedList<String>();
	}
	public Person getPerson() {
		return ;
	}
	public UUID getPersonUuid() {
		return ;
	}
	public ResourceUid getResource() {
		return ;
	}
	public List<StringgetRoles() {
		return ;
	}
	public void addRole(String role) {
		.add(role);
	}
	public String toString() {
		return toJson();
	}
	@SuppressWarnings("unchecked")
	public String toJson() {
		return "{" +
				"\"person\":\"" +  + "\"," +
				"\"resource\":" + .toJson() + "," +
				"\"roles\":" + Json.toJson((List<Object>)(List<?>)) + "" +
				"}";
	}
New to GrepCode? Check out our FAQ X