public Response getResponse(int code) { for (Response result : getResponses()) { if (code == result.getCode()) { return result; } } return null; }
public void addSections(Collection<String> sections) { if (sections == null) { return; } for (String section : sections) { addSection(section); } }
@Override public boolean apply(Response response) { return response.getCode() == code; } });
private void addSectionsToProperties(Set<String> processedRepresentations, Contract contract) { for (Property property : properties) { Representation representation = contract.getRepresentation(property.getType()); if (representation != null && !processedRepresentations.contains(representation.getName())) { representation.addSections(sections); processedRepresentations.add(representation.getName()); representation.addSectionsToProperties(processedRepresentations, contract); } } } }
public void addProduces(List<String> produces) { if (produces == null) { return; } for (String mediaType : produces) { addProduces(mediaType); } }
public void addConsumes(List<String> consumes) { if (consumes == null) { return; } for (String mediaType : consumes) { addConsumes(mediaType); } }
public void addSections(Collection<String> sections) { if (sections == null) { return; } for (String section : sections) { addSection(section); } } }
private void addSectionsToProperties(Set<String> processedRepresentations, Contract contract) { for (Property property : properties) { Representation representation = contract.getRepresentation(property.getType()); if (representation != null && !processedRepresentations.contains(representation.getName())) { representation.addSections(sections); processedRepresentations.add(representation.getName()); representation.addSectionsToProperties(processedRepresentations, contract); } } } }
public Response getResponse(int code) { for (Response result : getResponses()) { if (code == result.getCode()) { return result; } } return null; }
public void addSections(Collection<String> sections) { if (sections == null) { return; } for (String section : sections) { addSection(section); } }
@Override public boolean apply(Response response) { return response.getCode() == code; } });
public void addProduces(List<String> produces) { if (produces == null) { return; } for (String mediaType : produces) { addProduces(mediaType); } }
public void addConsumes(List<String> consumes) { if (consumes == null) { return; } for (String mediaType : consumes) { addConsumes(mediaType); } }
private void addSectionsToProperties(Set<String> processedRepresentations, Contract contract) { for (Property property : properties) { Representation representation = contract.getRepresentation(property.getType()); if (representation != null && !processedRepresentations.contains(representation.getName())) { representation.addSections(sections); processedRepresentations.add(representation.getName()); representation.addSectionsToProperties(processedRepresentations, contract); } } } }
public Response getResponse(int code) { for (Response result : getResponses()) { if (code == result.getCode()) { return result; } } return null; }
public void addSections(Collection<String> sections) { if (sections == null) { return; } for (String section : sections) { addSection(section); } }
@Override public boolean apply(Response response) { return response.getCode() == code; } });
public void addProduces(List<String> produces) { if (produces == null) { return; } for (String mediaType : produces) { addProduces(mediaType); } }
private void addSectionsToProperties(Set<String> processedRepresentations, Contract contract) { for (Property property : properties) { Representation representation = contract.getRepresentation(property.getType()); if (representation != null && !processedRepresentations.contains(representation.getName())) { representation.addSections(sections); processedRepresentations.add(representation.getName()); representation.addSectionsToProperties(processedRepresentations, contract); } } } }
public Response getResponse(int code) { for (Response result : getResponses()) { if (code == result.getCode()) { return result; } } return null; }