import aafoauth.v2_0.Introspect;
public class TokenPerm extends Persisting<Introspect>{
- private static final List<AAFPermission> NULL_PERMS = new ArrayList<AAFPermission>();
+ private static final List<AAFPermission> NULL_PERMS = new ArrayList<>();
private Introspect introspect;
private List<AAFPermission> perms;
private String scopes;
while((pd = ij.parse(r,pd.reuse())).valid()) {
switch(pd.event) {
case Parse.START_DOC:
- perms = new ArrayList<AAFPermission>();
+ perms = new ArrayList<>();
break;
case Parse.START_ARRAY:
inPerms = "perm".equals(pd.name);
// Gathering object for parsing objects, then creating AAF Permission
private static class PermInfo {
- public String type,instance,action;
+ public String ns,type,instance,action;
public void clear() {
- type=instance=action=null;
+ ns=type=instance=action=null;
}
public void eval(Parsed<State> pd) {
if(pd.hasName()) {
switch(pd.name) {
+ case "ns":
+ ns=pd.sb.toString();
+ break;
case "type":
type=pd.sb.toString();
break;
}
public AAFPermission create() {
if(type!=null && instance!=null && action !=null) {
- return new AAFPermission(type, instance, action);
+ return new AAFPermission(ns,type, instance, action);
} else {
return null;
}