public class MutabilityAssertor extends Object
Constructor and Description |
---|
MutabilityAssertor() |
Modifier and Type | Method and Description |
---|---|
static <T extends BaseResource> |
imposeConstraints(String[] strict,
T incoming,
T existing)
Impose immutability constraints.
|
static <T extends BaseResource> |
imposeConstraints(String[] strict,
T incoming,
T existing,
String reason,
String detail)
Impose immutability constraints.
|
static <T extends BaseResource> |
validateUpdate(String[] strict,
T incoming,
T existing)
Validate update from an immutability point of view.
|
public static <T extends BaseResource> void validateUpdate(String[] strict, T incoming, T existing)
T
- representation typestrict
- array of strictly immutable field namesincoming
- the incoming representationexisting
- the existing representationjavax.ws.rs.WebApplicationException
- wrapping an appropriate response
iff an immutability constraint has been brokenpublic static <T extends BaseResource> javax.ws.rs.core.Response imposeConstraints(String[] strict, T incoming, T existing)
T
- representation typestrict
- array of strictly immutable field namesincoming
- incoming representationexisting
- existing representationpublic static <T extends BaseResource> javax.ws.rs.core.Response imposeConstraints(String[] strict, T incoming, T existing, String reason, String detail)
T
- representation typestrict
- array of strictly immutable field namesincoming
- incoming representationexisting
- existing representationreason
- the fault reasondetail
- the fault detailCopyright © 2012. All Rights Reserved.