public static Response createLinksHandler(ParaObject pobj, String id2) {
		try (final Metrics.Context context = Metrics.time(null, RestUtils.class, "links", "create")) {
			if (id2 != null && pobj != null) {
				String linkid = pobj.link(id2);
				if (linkid == null) {
					return getStatusResponse(Response.Status.BAD_REQUEST, "Failed to create link.");
				} else {
					return Response.ok(linkid, MediaType.TEXT_PLAIN_TYPE).build();
				}
			} else {
				return getStatusResponse(Response.Status.BAD_REQUEST, "Parameters 'type' and 'id' are missing.");
			}
		}
	}
public static Response createLinksHandler ( ParaObject pobj , String id2 ) { try ( final Metrics . Context context = Metrics . time ( null , RestUtils . class , "links" , "create" ) ) { if ( id2 != null && pobj != null ) { String linkid = pobj . link ( id2 ) ; if ( linkid == null ) { return getStatusResponse ( Response . Status . BAD_REQUEST , "Failed to create link." ) ; } else { return Response . ok ( linkid , MediaType . TEXT_PLAIN_TYPE ) . build ( ) ; } } else { return getStatusResponse ( Response . Status . BAD_REQUEST , "Parameters 'type' and 'id' are missing." ) ; } } }
Handles requests to link an object to other objects.
@param pobj the object to operate on
@param id2 the id of the second object (optional)
@return a Response