/** * Creates a new <code>grant</code> element * @return the new created instance of <code>PermissionType<PermissionsType<T>></code> */ public PermissionType<PermissionsType<T>> createGrant() { return new PermissionTypeImpl<PermissionsType<T>>(this, "grant", childNode); }
/** * Returns all <code>grant</code> elements * @return list of <code>grant</code> */ public List<PermissionType<PermissionsType<T>>> getAllGrant() { List<PermissionType<PermissionsType<T>>> list = new ArrayList<PermissionType<PermissionsType<T>>>(); List<Node> nodeList = childNode.get("grant"); for(Node node: nodeList) { PermissionType<PermissionsType<T>> type = new PermissionTypeImpl<PermissionsType<T>>(this, "grant", childNode, node); list.add(type); } return list; }
/** * If not already created, a new <code>grant</code> element will be created and returned. * Otherwise, the first existing <code>grant</code> element will be returned. * @return the instance defined for the element <code>grant</code> */ public PermissionType<PermissionsType<T>> getOrCreateGrant() { List<Node> nodeList = childNode.get("grant"); if (nodeList != null && nodeList.size() > 0) { return new PermissionTypeImpl<PermissionsType<T>>(this, "grant", childNode, nodeList.get(0)); } return createGrant(); }