/** * Check if act as Restful child via parent destroy method * * @return true if act as Restful child via parent destroy method, false otherwise */ public boolean isRestfulRelatedDestroy() { return "DELETE".equalsIgnoreCase(httpMethod) && isParentChildPath(); }
/** * Check if act as Restful index to retrieve child via parent method * * @return true if act as Restful index to child via parent, false otherwise */ public boolean isRestfulIndexRelated() { return "GET".equals(httpMethod) && isParentChildPath() ; }
/** * Check if act as Restful child via parent create method * * @return true if act as Restful child via parent create method, false otherwise */ public boolean isRestfulRelatedCreate() { return "POST".equalsIgnoreCase(httpMethod) && isParentChildPath() ; }
/** * Check if act as Restful child via parent update method * * @return true if act as Restful child via parent update method, false otherwise */ public boolean isRestfulRelatedUpdate() { return Arrays.asList("PUT", "PATCH").contains(httpMethod.toUpperCase()) && isParentChildPath() ; }
/** * Check if act as Restful destroy method * * @return true if act as Restful destroy method, false otherwise */ public boolean isRestfulDestroy() { return "DELETE".equalsIgnoreCase(httpMethod) && !isRelatedToManyPath() && !isParentChildPath(); }
public boolean isRelationPath() { return isParentChildPath() || isRelatedToManyPath(); }