agave-systems/systems-core/src/main/java/org/iplantc/service/systems/model/SystemRole.java
/**
	 * Serializes this object to a {@link JsonNode} for
	 * manipulation and serialization.
	 * @param system
	 * @return
	 */
Serializes this object to a  JsonNode for
manipulation and serialization.
@param system
@return
Serializes this object to a JsonNode for manipulation and serialization . @param system @return
@JsonValue
	public ObjectNode toJsonNode(RemoteSystem system) {
		ObjectMapper mapper = new ObjectMapper();
		ObjectNode json = mapper.createObjectNode()
			.put("username", username)
			.put("role", role.name());
		ObjectNode hypermedia = json.putObject("_links");
		hypermedia.putObject("self")
	        	  .put("href", TenancyHelper.resolveURLToCurrentTenant(Settings.IPLANT_SYSTEM_SERVICE) + system.getSystemId() + "/roles/" + username);
	    hypermedia.putObject("parent")    	
	        	  .put("href", TenancyHelper.resolveURLToCurrentTenant(Settings.IPLANT_SYSTEM_SERVICE) + system.getSystemId());
	    hypermedia.putObject("profile")
	        	  .put("href", TenancyHelper.resolveURLToCurrentTenant(Settings.IPLANT_PROFILE_SERVICE) + username);
		return json;
	}
@ JsonValue public ObjectNode toJsonNode ( RemoteSystem system ) { ObjectMapper mapper = new ObjectMapper ( ) ; ObjectNode json = mapper . createObjectNode ( ) . put ( "username" , username ) . put ( "role" , role . name ( ) ) ; ObjectNode hypermedia = json . putObject ( "_links" ) ; hypermedia . putObject ( "self" ) . put ( "href" , TenancyHelper . resolveURLToCurrentTenant ( Settings . IPLANT_SYSTEM_SERVICE ) + system . getSystemId ( ) + "/roles/" + username ) ; hypermedia . putObject ( "parent" ) . put ( "href" , TenancyHelper . resolveURLToCurrentTenant ( Settings . IPLANT_SYSTEM_SERVICE ) + system . getSystemId ( ) ) ; hypermedia . putObject ( "profile" ) . put ( "href" , TenancyHelper . resolveURLToCurrentTenant ( Settings . IPLANT_PROFILE_SERVICE ) + username ) ; return json ; }
Serializes this object to a {@link JsonNode} for
 manipulation and serialization.
Serializes this object to a { @link JsonNode } for manipulation and serialization .