CPD Results
The following document contains the results of PMD's CPD 6.49.0.
Duplications
File |
Project |
Line |
info/magnolia/rest/service/property/v1/PropertyEndpoint.java |
Magnolia REST Services |
154 |
info/magnolia/rest/service/property/v1/PropertyEndpoint.java |
Magnolia REST Services |
215 |
@QueryParam("name") String name,
@QueryParam("value") List<String> valueStrings,
@QueryParam("type") @DefaultValue(PropertyType.TYPENAME_STRING) String typeString,
@QueryParam("multiple") @DefaultValue("false") boolean multiple) throws RepositoryException {
if (!multiple && valueStrings.size() != 1) {
return Response.status(Response.Status.BAD_REQUEST).entity(STATUS_MESSAGE_MULTIPLE_VALUES_GIVEN_BUT_FLAG_IS_FALSE).build();
}
try {
PropertyType.valueFromName(typeString);
} catch (IllegalArgumentException e) {
return Response.status(Response.Status.BAD_REQUEST).entity(e.getMessage()).build();
}
final String parentAbsPath = StringUtils.defaultIfEmpty(parentPath, "/"); |
File |
Project |
Line |
info/magnolia/rest/service/command/v1/CommandEndpoint.java |
Magnolia REST Services |
120 |
info/magnolia/rest/service/command/v2/CommandEndpoint.java |
Magnolia REST Services |
138 |
@Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
@Operation(summary = "Executes a command", description = "Executes a command from the default catalog")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = STATUS_MESSAGE_OK),
@ApiResponse(responseCode = "403", description = STATUS_MESSAGE_FORBIDDEN),
@ApiResponse(responseCode = "404", description = STATUS_MESSAGE_COMMAND_NOT_FOUND),
@ApiResponse(responseCode = "500", description = STATUS_MESSAGE_ERROR_OCCURRED)
})
public Response executeCommand(@PathParam("commandName") String commandName, Map<String, Object> commandMap) throws RepositoryException {
return executeCommand(null, commandName, commandMap);
} |
File |
Project |
Line |
info/magnolia/rest/service/command/v1/CommandEndpoint.java |
Magnolia REST Services |
82 |
info/magnolia/rest/service/command/v2/CommandEndpoint.java |
Magnolia REST Services |
90 |
@Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
@Operation(summary = "Executes a command", description = "Executes a command from a specific catalog")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = STATUS_MESSAGE_OK),
@ApiResponse(responseCode = "403", description = STATUS_MESSAGE_FORBIDDEN),
@ApiResponse(responseCode = "404", description = STATUS_MESSAGE_COMMAND_NOT_FOUND),
@ApiResponse(responseCode = "500", description = STATUS_MESSAGE_ERROR_OCCURRED)
})
public Response executeCommand(
@PathParam("catalogName") String catalogName,
@PathParam("commandName") String commandName,
Map<String, Object> commandMap) throws RepositoryException { |