protected MMObjectNode getGroupOrUserNode(Parameters a) { MMObjectNode groupOrUser = getNode(a.getString(PARAMETER_GROUPORUSER)); if (groupOrUser == null) throw new IllegalArgumentException( "There is no node with id '" + a.get(PARAMETER_GROUPORUSER) + "'"); MMObjectBuilder parent = groupOrUser.getBuilder(); MMObjectBuilder userBuilder = Authenticate.getInstance().getUserProvider().getUserBuilder(); if (!(parent instanceof Groups || userBuilder.getClass().isInstance(parent))) { throw new IllegalArgumentException( "Node '" + a.get(PARAMETER_GROUPORUSER) + "' does not represent a group or a user"); } return groupOrUser; }
public String toString(MMObjectNode n) { return n.getStringValue("name"); }