You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2018/03/30 08:42:28 UTC
[1/5] syncope git commit: [SYNCOPE-1289] YAML support provided
Repository: syncope
Updated Branches:
refs/heads/2_0_X 2a500bf33 -> 3983e2f34
refs/heads/master 32ef855ea -> 7ba765884
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
index ca193e3..9ae3574 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
@@ -37,6 +37,7 @@ import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.apache.cxf.jaxrs.ext.PATCH;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.patch.StatusPatch;
import org.apache.syncope.common.lib.patch.UserPatch;
import org.apache.syncope.common.lib.to.PagedResult;
@@ -49,8 +50,8 @@ import org.apache.syncope.common.rest.api.beans.AnyQuery;
* REST operations for users.
*/
@Api(tags = "Users", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("users")
public interface UserService extends AnyService<UserTO> {
@@ -80,8 +81,8 @@ public interface UserService extends AnyService<UserTO> {
@ApiImplicitParam(name = RESTHeaders.PREFER, paramType = "header", dataType = "string",
value = "Allows the client to specify a preference for the result to be returned from the server",
defaultValue = "return-content", allowableValues = "return-content, return-no-content",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
value = "If 'true', instructs the propagation process not to wait for completion when communicating"
+ " with External Resources with no priority set",
defaultValue = "false", allowEmptyValue = true) })
@@ -91,15 +92,15 @@ public interface UserService extends AnyService<UserTO> {
+ "or empty if 'Prefer: return-no-content' was specified",
response = ProvisioningResult.class, responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "UUID generated for the user created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
- description = "URL of the user created")
- , @ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
+ description = "UUID generated for the user created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "URL of the user created"),
+ @ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
+ "client about the fact that a specified preference was applied") }))
@POST
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(
@NotNull UserTO userTO,
@DefaultValue("true") @QueryParam("storePassword") boolean storePassword);
@@ -114,31 +115,31 @@ public interface UserService extends AnyService<UserTO> {
@ApiImplicitParam(name = RESTHeaders.PREFER, paramType = "header", dataType = "string",
value = "Allows the client to specify a preference for the result to be returned from the server",
defaultValue = "return-content", allowableValues = "return-content, return-no-content",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = HttpHeaders.IF_MATCH, paramType = "header", dataType = "string",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = HttpHeaders.IF_MATCH, paramType = "header", dataType = "string",
value = "When the provided ETag value does not match the latest modification date of the entity, "
+ "an error is reported and the requested operation is not performed.",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
value = "If 'true', instructs the propagation process not to wait for completion when communicating"
+ " with External Resources with no priority set",
defaultValue = "false", allowEmptyValue = true) })
@ApiResponses({
@ApiResponse(code = 200,
message = "User successfully updated enriched with propagation status information, as Entity",
- response = ProvisioningResult.class)
- , @ApiResponse(code = 204,
+ response = ProvisioningResult.class),
+ @ApiResponse(code = 204,
message = "No content if 'Prefer: return-no-content' was specified", responseHeaders =
@ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
- + "client about the fact that a specified preference was applied"))
- , @ApiResponse(code = 412,
+ + "client about the fact that a specified preference was applied")),
+ @ApiResponse(code = 412,
message = "The ETag value provided via the 'If-Match' header does not match the latest modification "
+ "date of the entity") })
@PATCH
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response update(@NotNull UserPatch userPatch);
/**
@@ -151,31 +152,31 @@ public interface UserService extends AnyService<UserTO> {
@ApiImplicitParam(name = RESTHeaders.PREFER, paramType = "header", dataType = "string",
value = "Allows the client to specify a preference for the result to be returned from the server",
defaultValue = "return-content", allowableValues = "return-content, return-no-content",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = HttpHeaders.IF_MATCH, paramType = "header", dataType = "string",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = HttpHeaders.IF_MATCH, paramType = "header", dataType = "string",
value = "When the provided ETag value does not match the latest modification date of the entity, "
+ "an error is reported and the requested operation is not performed.",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
value = "If 'true', instructs the propagation process not to wait for completion when communicating"
+ " with External Resources with no priority set",
defaultValue = "false", allowEmptyValue = true) })
@ApiResponses({
@ApiResponse(code = 200,
message = "User successfully updated enriched with propagation status information, as Entity",
- response = ProvisioningResult.class)
- , @ApiResponse(code = 204,
+ response = ProvisioningResult.class),
+ @ApiResponse(code = 204,
message = "No content if 'Prefer: return-no-content' was specified", responseHeaders =
@ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
- + "client about the fact that a specified preference was applied"))
- , @ApiResponse(code = 412,
+ + "client about the fact that a specified preference was applied")),
+ @ApiResponse(code = 412,
message = "The ETag value provided via the 'If-Match' header does not match the latest modification "
+ "date of the entity") })
@PUT
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response update(@NotNull UserTO userTO);
/**
@@ -188,30 +189,30 @@ public interface UserService extends AnyService<UserTO> {
@ApiImplicitParam(name = RESTHeaders.PREFER, paramType = "header", dataType = "string",
value = "Allows the client to specify a preference for the result to be returned from the server",
defaultValue = "return-content", allowableValues = "return-content, return-no-content",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = HttpHeaders.IF_MATCH, paramType = "header", dataType = "string",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = HttpHeaders.IF_MATCH, paramType = "header", dataType = "string",
value = "When the provided ETag value does not match the latest modification date of the entity, "
+ "an error is reported and the requested operation is not performed.",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
value = "If 'true', instructs the propagation process not to wait for completion when communicating"
+ " with External Resources with no priority set",
defaultValue = "false", allowEmptyValue = true) })
@ApiResponses({
@ApiResponse(code = 200,
message = "User successfully updated enriched with propagation status information, as Entity",
- response = ProvisioningResult.class)
- , @ApiResponse(code = 204,
+ response = ProvisioningResult.class),
+ @ApiResponse(code = 204,
message = "No content if 'Prefer: return-no-content' was specified", responseHeaders =
@ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
- + "client about the fact that a specified preference was applied"))
- , @ApiResponse(code = 412,
+ + "client about the fact that a specified preference was applied")),
+ @ApiResponse(code = 412,
message = "The ETag value provided via the 'If-Match' header does not match the latest modification "
+ "date of the entity") })
@POST
@Path("{key}/status")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response status(@NotNull StatusPatch statusPatch);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserWorkflowService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserWorkflowService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserWorkflowService.java
index e1e7960..3be75ae 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserWorkflowService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserWorkflowService.java
@@ -29,6 +29,7 @@ import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.UserTO;
import org.apache.syncope.common.lib.to.WorkflowFormTO;
@@ -36,8 +37,8 @@ import org.apache.syncope.common.lib.to.WorkflowFormTO;
* REST operations related to user workflow.
*/
@Api(tags = "UserWorkflow", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("userworkflow")
public interface UserWorkflowService extends JAXRSService {
@@ -48,7 +49,7 @@ public interface UserWorkflowService extends JAXRSService {
*/
@GET
@Path("forms")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<WorkflowFormTO> getForms();
/**
@@ -59,7 +60,7 @@ public interface UserWorkflowService extends JAXRSService {
*/
@GET
@Path("forms/{userKey}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
WorkflowFormTO getFormForUser(@NotNull @PathParam("userKey") String userKey);
/**
@@ -70,7 +71,7 @@ public interface UserWorkflowService extends JAXRSService {
*/
@POST
@Path("forms/{taskId}/claim")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
WorkflowFormTO claimForm(@NotNull @PathParam("taskId") String taskId);
/**
@@ -81,8 +82,8 @@ public interface UserWorkflowService extends JAXRSService {
*/
@POST
@Path("forms")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
UserTO submitForm(@NotNull WorkflowFormTO form);
/**
@@ -94,7 +95,7 @@ public interface UserWorkflowService extends JAXRSService {
*/
@POST
@Path("tasks/{taskId}/execute")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
UserTO executeTask(@NotNull @PathParam("taskId") String taskId, @NotNull UserTO userTO);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
index 0da9727..7712de6 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
@@ -33,6 +33,7 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.WorkflowDefinitionTO;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -40,8 +41,8 @@ import org.apache.syncope.common.rest.api.RESTHeaders;
* REST operations for workflow definition.
*/
@Api(tags = "Workflow", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("workflows")
public interface WorkflowService extends JAXRSService {
@@ -53,7 +54,7 @@ public interface WorkflowService extends JAXRSService {
*/
@GET
@Path("{anyType}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<WorkflowDefinitionTO> list(@NotNull @PathParam("anyType") String anyType);
/**
@@ -65,7 +66,7 @@ public interface WorkflowService extends JAXRSService {
*/
@GET
@Path("{anyType}/{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response get(
@NotNull @PathParam("anyType") String anyType,
@NotNull @PathParam("key") String key);
@@ -95,8 +96,8 @@ public interface WorkflowService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
@Path("{anyType}/{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void set(
@NotNull @PathParam("anyType") String anyType,
@NotNull @PathParam("key") String key,
@@ -112,7 +113,7 @@ public interface WorkflowService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{anyType}/{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(
@NotNull @PathParam("anyType") String anyType,
@NotNull @PathParam("key") String key);
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/core/rest-cxf/pom.xml
----------------------------------------------------------------------
diff --git a/core/rest-cxf/pom.xml b/core/rest-cxf/pom.xml
index 9b40030..d442302 100644
--- a/core/rest-cxf/pom.xml
+++ b/core/rest-cxf/pom.xml
@@ -79,6 +79,10 @@ under the License.
<artifactId>jackson-jaxrs-json-provider</artifactId>
</dependency>
<dependency>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-yaml-provider</artifactId>
+ </dependency>
+ <dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-afterburner</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/core/rest-cxf/src/main/resources/restCXFContext.xml
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/resources/restCXFContext.xml b/core/rest-cxf/src/main/resources/restCXFContext.xml
index 667c876..62bce46 100644
--- a/core/rest-cxf/src/main/resources/restCXFContext.xml
+++ b/core/rest-cxf/src/main/resources/restCXFContext.xml
@@ -65,6 +65,8 @@ under the License.
<property name="mapper" ref="jacksonObjectMapper"/>
</bean>
+ <bean id="yamlProvider" class="com.fasterxml.jackson.jaxrs.yaml.JacksonJaxbYAMLProvider"/>
+
<bean id="exceptionMapper" class="org.apache.syncope.core.rest.cxf.RestServiceExceptionMapper"/>
<bean id="validationProvider" class="org.apache.cxf.validation.BeanValidationProvider"/>
@@ -147,6 +149,7 @@ under the License.
<ref bean="dateParamConverterProvider"/>
<ref bean="jaxbProvider"/>
<ref bean="jsonProvider"/>
+ <ref bean="yamlProvider"/>
<ref bean="exceptionMapper"/>
<ref bean="searchContextProvider"/>
<ref bean="addDomainFilter"/>
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
----------------------------------------------------------------------
diff --git a/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java b/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
index 1da1579..8473c74 100644
--- a/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
+++ b/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
@@ -32,6 +32,7 @@ import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.CamelMetrics;
import org.apache.syncope.common.lib.to.CamelRouteTO;
import org.apache.syncope.common.lib.types.AnyTypeKind;
@@ -40,8 +41,8 @@ import org.apache.syncope.common.lib.types.AnyTypeKind;
* REST operations for Camel routes.
*/
@Api(tags = "CamelRoutes", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("camelRoutes")
public interface CamelRouteService extends JAXRSService {
@@ -53,7 +54,7 @@ public interface CamelRouteService extends JAXRSService {
*/
@GET
@Path("{anyTypeKind}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<CamelRouteTO> list(@NotNull @PathParam("anyTypeKind") AnyTypeKind anyTypeKind);
/**
@@ -65,7 +66,7 @@ public interface CamelRouteService extends JAXRSService {
*/
@GET
@Path("{anyTypeKind}/{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
CamelRouteTO read(
@NotNull @PathParam("anyTypeKind") AnyTypeKind anyTypeKind,
@NotNull @PathParam("key") String key);
@@ -80,8 +81,8 @@ public interface CamelRouteService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
@Path("{anyTypeKind}/{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull @PathParam("anyTypeKind") AnyTypeKind anyTypeKind, @NotNull CamelRouteTO route);
/**
@@ -91,7 +92,7 @@ public interface CamelRouteService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@POST
@Path("restartContext")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void restartContext();
/**
@@ -101,6 +102,6 @@ public interface CamelRouteService extends JAXRSService {
*/
@GET
@Path("metrics")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
CamelMetrics metrics();
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
----------------------------------------------------------------------
diff --git a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
index fcf342a..91197df 100644
--- a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
+++ b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
@@ -36,14 +36,15 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.SAML2IdPTO;
/**
* REST operations for SAML 2.0 Identity Providers.
*/
@Api(tags = "SAML2IdP", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("saml2sp/identityProviders")
public interface SAML2IdPService extends JAXRSService {
@@ -63,7 +64,7 @@ public interface SAML2IdPService extends JAXRSService {
* @return list of all defined SAML 2.0 Identity Providers
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<SAML2IdPTO> list();
/**
@@ -74,7 +75,7 @@ public interface SAML2IdPService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
SAML2IdPTO read(@PathParam("key") String key);
/**
@@ -85,7 +86,7 @@ public interface SAML2IdPService extends JAXRSService {
*/
@POST
@Consumes({ MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response importFromMetadata(@NotNull InputStream input);
/**
@@ -97,8 +98,8 @@ public interface SAML2IdPService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull SAML2IdPTO saml2IdpTO);
/**
@@ -110,6 +111,6 @@ public interface SAML2IdPService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
----------------------------------------------------------------------
diff --git a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
index 4d894d0..a0b9a47 100644
--- a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
+++ b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
@@ -30,6 +30,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.SAML2RequestTO;
import org.apache.syncope.common.lib.to.SAML2LoginResponseTO;
import org.apache.syncope.common.lib.to.SAML2ReceivedResponseTO;
@@ -38,8 +39,8 @@ import org.apache.syncope.common.lib.to.SAML2ReceivedResponseTO;
* REST operations for the provided SAML 2.0 Service Provider.
*/
@Api(tags = "SAML2SP", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("saml2sp/serviceProvider")
public interface SAML2SPService extends JAXRSService {
@@ -63,7 +64,7 @@ public interface SAML2SPService extends JAXRSService {
*/
@POST
@Path("loginRequest")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
SAML2RequestTO createLoginRequest(
@QueryParam("spEntityID") String spEntityID,
@QueryParam("idpEntityID") String idpEntityID);
@@ -76,8 +77,8 @@ public interface SAML2SPService extends JAXRSService {
*/
@POST
@Path("loginResponse")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
SAML2LoginResponseTO validateLoginResponse(SAML2ReceivedResponseTO response);
/**
@@ -88,7 +89,7 @@ public interface SAML2SPService extends JAXRSService {
*/
@POST
@Path("logoutRequest")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
SAML2RequestTO createLogoutRequest(@QueryParam("spEntityID") String spEntityID);
/**
@@ -100,7 +101,7 @@ public interface SAML2SPService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@POST
@Path("logoutResponse")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void validateLogoutResponse(SAML2ReceivedResponseTO response);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
----------------------------------------------------------------------
diff --git a/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java b/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
index ced40ad..51e7d19 100644
--- a/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
+++ b/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
@@ -29,14 +29,15 @@ import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.scim.SCIMConf;
/**
* REST operations for SCIM 2.0 configuration.
*/
@Api(tags = "SCIMConf", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("scimv2conf")
public interface SCIMConfService extends JAXRSService {
@@ -46,7 +47,7 @@ public interface SCIMConfService extends JAXRSService {
* @return SCIM configuration
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
SCIMConf get();
/**
@@ -57,7 +58,7 @@ public interface SCIMConfService extends JAXRSService {
@ApiResponses(
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void set(@NotNull SCIMConf conf);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/ext/swagger-ui/pom.xml
----------------------------------------------------------------------
diff --git a/ext/swagger-ui/pom.xml b/ext/swagger-ui/pom.xml
index 1525224..ed131dd 100644
--- a/ext/swagger-ui/pom.xml
+++ b/ext/swagger-ui/pom.xml
@@ -44,10 +44,6 @@ under the License.
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
- <artifactId>jackson-dataformat-yaml</artifactId>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/fit/core-reference/src/main/resources/jboss/restCXFContext.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/resources/jboss/restCXFContext.xml b/fit/core-reference/src/main/resources/jboss/restCXFContext.xml
index d5181c7..1ee6288 100644
--- a/fit/core-reference/src/main/resources/jboss/restCXFContext.xml
+++ b/fit/core-reference/src/main/resources/jboss/restCXFContext.xml
@@ -65,6 +65,8 @@ under the License.
<property name="mapper" ref="jacksonObjectMapper"/>
</bean>
+ <bean id="yamlProvider" class="com.fasterxml.jackson.jaxrs.yaml.JacksonJaxbYAMLProvider"/>
+
<bean id="exceptionMapper" class="org.apache.syncope.core.rest.cxf.RestServiceExceptionMapper"/>
<bean id="validationProvider" class="org.apache.cxf.validation.BeanValidationProvider"/>
@@ -160,6 +162,7 @@ under the License.
<ref bean="dateParamConverterProvider"/>
<ref bean="jaxbProvider"/>
<ref bean="jsonProvider"/>
+ <ref bean="yamlProvider"/>
<ref bean="exceptionMapper"/>
<ref bean="searchContextProvider"/>
<ref bean="addDomainFilter"/>
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index d0945ef..2eebd79 100644
--- a/pom.xml
+++ b/pom.xml
@@ -823,17 +823,6 @@ under the License.
<version>${jackson.version}</version>
</dependency>
<dependency>
- <groupId>com.fasterxml.jackson.datatype</groupId>
- <artifactId>jackson-datatype-joda</artifactId>
- <version>${jackson.version}</version>
- <exclusions>
- <exclusion>
- <groupId>joda-time</groupId>
- <artifactId>joda-time</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
@@ -844,13 +833,13 @@ under the License.
<version>${jackson.version}</version>
</dependency>
<dependency>
- <groupId>com.fasterxml.jackson.module</groupId>
- <artifactId>jackson-module-afterburner</artifactId>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-yaml-provider</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
- <groupId>com.fasterxml.jackson.dataformat</groupId>
- <artifactId>jackson-dataformat-yaml</artifactId>
+ <groupId>com.fasterxml.jackson.module</groupId>
+ <artifactId>jackson-module-afterburner</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
@@ -878,6 +867,17 @@ under the License.
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.datatype</groupId>
+ <artifactId>jackson-datatype-joda</artifactId>
+ <version>${jackson.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>joda-time</groupId>
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/src/main/asciidoc/reference-guide/architecture/core.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/reference-guide/architecture/core.adoc b/src/main/asciidoc/reference-guide/architecture/core.adoc
index d8a4320..67a54cf 100644
--- a/src/main/asciidoc/reference-guide/architecture/core.adoc
+++ b/src/main/asciidoc/reference-guide/architecture/core.adoc
@@ -37,7 +37,7 @@ which enables in-browser access to all the REST endpoints defined.
At a technical level, the RESTful interface is a fully-compliant
https://en.wikipedia.org/wiki/Java_API_for_RESTful_Web_Services[JAX-RS 2.0^] implementation based on
-http://cxf.apache.org[Apache CXF^], natively dealing both with JSON and XML payloads.
+http://cxf.apache.org[Apache CXF^], natively dealing either with JSON, YAML and XML payloads.
More details are available in the dedicated <<restful-services,usage>> section.
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/src/site/xdoc/building.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/building.xml b/src/site/xdoc/building.xml
index 91da18b..3d59a75 100644
--- a/src/site/xdoc/building.xml
+++ b/src/site/xdoc/building.xml
@@ -89,10 +89,12 @@ under the License.
integration tests are run by default; in order to run them all, anyway, a specific build profile is provided.
<source>$ mvn clean verify -Pfull-it,all</source>
- <h4>application/xml</h4>
+ <h4>Other Content-Type values</h4>
By default, integration tests are run using <code>application/json</code> for both <code>Accept</code> and
- <code>Content-Type</code> HTTP headers; it is possible, however, to use <code>application/xml</code>.
+ <code>Content-Type</code> HTTP headers; it is possible, however, to use <code>application/xml</code> or
+ <code>application/yaml</code>.
<source>$ mvn clean verify -DjaxrsContentType=application/xml</source>
+ <source>$ mvn clean verify -DjaxrsContentType=application/yaml</source>
<h4>Debug</h4>
Starts the full environment used by integration tests (with same components available when running new project
[5/5] syncope git commit: [SYNCOPE-1289] YAML support provided
Posted by il...@apache.org.
[SYNCOPE-1289] YAML support provided
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/7ba76588
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/7ba76588
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/7ba76588
Branch: refs/heads/master
Commit: 7ba7658841f8582fd5c5fa7bf77c47914d5e003a
Parents: 32ef855
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Fri Mar 30 09:26:19 2018 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Fri Mar 30 10:42:17 2018 +0200
----------------------------------------------------------------------
.../client/console/SyncopeConsoleSession.java | 3 +-
.../client/lib/SyncopeClientFactoryBean.java | 6 +++-
.../syncope/common/lib/SyncopeConstants.java | 5 +++
.../rest/api/service/AccessTokenService.java | 25 ++++++++-------
.../rest/api/service/AnyObjectService.java | 12 +++----
.../common/rest/api/service/AnyService.java | 29 ++++++++---------
.../rest/api/service/AnyTypeClassService.java | 15 ++++-----
.../common/rest/api/service/AnyTypeService.java | 11 ++++---
.../rest/api/service/ConfigurationService.java | 11 ++++---
.../api/service/ConnectorHistoryService.java | 7 +++--
.../rest/api/service/ConnectorService.java | 29 ++++++++---------
.../common/rest/api/service/DomainService.java | 15 ++++-----
.../rest/api/service/DynRealmService.java | 15 ++++-----
.../rest/api/service/ExecutableService.java | 15 ++++-----
.../common/rest/api/service/GroupService.java | 16 +++++-----
.../common/rest/api/service/LoggerService.java | 17 +++++-----
.../rest/api/service/MailTemplateService.java | 15 ++++-----
.../rest/api/service/NotificationService.java | 19 +++++------
.../common/rest/api/service/PolicyService.java | 15 ++++-----
.../common/rest/api/service/RealmService.java | 15 ++++-----
.../api/service/RelationshipTypeService.java | 15 ++++-----
.../common/rest/api/service/ReportService.java | 17 +++++-----
.../rest/api/service/ReportTemplateService.java | 9 +++---
.../api/service/ResourceHistoryService.java | 7 +++--
.../rest/api/service/ResourceService.java | 33 ++++++++++----------
.../common/rest/api/service/RoleService.java | 19 +++++------
.../common/rest/api/service/SchemaService.java | 15 ++++-----
.../api/service/SecurityQuestionService.java | 19 +++++------
.../common/rest/api/service/SyncopeService.java | 14 ++++-----
.../common/rest/api/service/TaskService.java | 19 +++++------
.../rest/api/service/UserSelfService.java | 26 +++++++--------
.../common/rest/api/service/UserService.java | 16 +++++-----
.../rest/api/service/UserWorkflowService.java | 15 ++++-----
.../rest/api/service/WorkflowService.java | 11 ++++---
core/rest-cxf/pom.xml | 4 +++
.../src/main/resources/restCXFContext.xml | 3 ++
.../rest/api/service/CamelRouteService.java | 13 ++++----
.../rest/api/service/SAML2IdPService.java | 13 ++++----
.../common/rest/api/service/SAML2SPService.java | 13 ++++----
.../rest/api/service/SCIMConfService.java | 7 +++--
ext/swagger-ui/pom.xml | 13 ++++++--
.../src/main/resources/jboss/restCXFContext.xml | 3 ++
pom.xml | 30 +++++++++---------
.../reference-guide/architecture/core.adoc | 2 +-
src/site/xdoc/building.xml | 6 ++--
45 files changed, 348 insertions(+), 289 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
index bbe34cb..8df6ae2 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
@@ -304,8 +304,7 @@ public class SyncopeConsoleSession extends AuthenticatedWebSession {
synchronized (clientFactory) {
SyncopeClientFactoryBean.ContentType preType = clientFactory.getContentType();
- clientFactory.
- setContentType(SyncopeClientFactoryBean.ContentType.fromString(mediaType.toString()));
+ clientFactory.setContentType(SyncopeClientFactoryBean.ContentType.fromString(mediaType.toString()));
service = clientFactory.create(getJWT()).getService(serviceClass);
clientFactory.setContentType(preType);
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClientFactoryBean.java
----------------------------------------------------------------------
diff --git a/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClientFactoryBean.java b/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClientFactoryBean.java
index 8186c4f..d0ee76a 100644
--- a/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClientFactoryBean.java
+++ b/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClientFactoryBean.java
@@ -34,6 +34,7 @@ import org.apache.cxf.ext.logging.LoggingFeature;
import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean;
import org.apache.cxf.jaxrs.provider.JAXBElementProvider;
import org.apache.cxf.staxutils.DocumentDepthProperties;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.policy.PolicyTO;
import org.apache.syncope.common.rest.api.DateParamConverterProvider;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -47,6 +48,7 @@ public class SyncopeClientFactoryBean {
public enum ContentType {
JSON(MediaType.APPLICATION_JSON_TYPE),
+ YAML(SyncopeConstants.APPLICATION_YAML_TYPE),
XML(MediaType.APPLICATION_XML_TYPE);
private final MediaType mediaType;
@@ -60,8 +62,10 @@ public class SyncopeClientFactoryBean {
}
public static ContentType fromString(final String value) {
- return StringUtils.isNotBlank(value) && value.equalsIgnoreCase(XML.getMediaType().toString())
+ return XML.getMediaType().toString().equalsIgnoreCase(value)
? XML
+ : YAML.getMediaType().toString().equalsIgnoreCase(value)
+ ? YAML
: JSON;
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java b/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java
index 8419691..517e775 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java
@@ -21,6 +21,7 @@ package org.apache.syncope.common.lib;
import java.util.Collections;
import java.util.Set;
import java.util.regex.Pattern;
+import javax.ws.rs.core.MediaType;
public final class SyncopeConstants {
@@ -63,6 +64,10 @@ public final class SyncopeConstants {
public static final Pattern UUID_PATTERN = Pattern.compile(UUID_REGEX);
+ public static final String APPLICATION_YAML = "application/yaml";
+
+ public static final MediaType APPLICATION_YAML_TYPE = new MediaType("application", "yaml");
+
private SyncopeConstants() {
// private constructor for utility class
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java
index 2a72028..ff137ab 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java
@@ -35,6 +35,7 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.AccessTokenTO;
import org.apache.syncope.common.lib.to.PagedResult;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -66,7 +67,7 @@ public interface AccessTokenService extends JAXRSService {
})
@POST
@Path("login")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response login();
/**
@@ -88,7 +89,7 @@ public interface AccessTokenService extends JAXRSService {
description = "Expiration of the refreshed JWT") }))
@POST
@Path("refresh")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response refresh();
/**
@@ -100,7 +101,7 @@ public interface AccessTokenService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@POST
@Path("logout")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void logout();
/**
@@ -109,12 +110,12 @@ public interface AccessTokenService extends JAXRSService {
* @param query query conditions
* @return paged list of existing access tokens matching the given query
*/
- @Operation(security = {
- @SecurityRequirement(name = "BasicAuthentication")
- , @SecurityRequirement(name = "Bearer") })
+ @ApiOperation(value = "", authorizations = {
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@GET
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
PagedResult<AccessTokenTO> list(@BeanParam AccessTokenQuery query);
/**
@@ -122,13 +123,13 @@ public interface AccessTokenService extends JAXRSService {
*
* @param key access token key
*/
- @Operation(security = {
- @SecurityRequirement(name = "BasicAuthentication")
- , @SecurityRequirement(name = "Bearer") })
+ @ApiOperation(value = "", authorizations = {
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@ApiResponses(
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyObjectService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyObjectService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyObjectService.java
index d08bd67..b746403 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyObjectService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyObjectService.java
@@ -104,8 +104,8 @@ public interface AnyObjectService extends AnyService<AnyObjectTO> {
description = "Allows the server to inform the "
+ "client about the fact that a specified preference was applied") }))
@POST
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull AnyObjectTO anyObjectTO);
/**
@@ -145,8 +145,8 @@ public interface AnyObjectService extends AnyService<AnyObjectTO> {
+ " date of the entity") })
@PATCH
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response update(@NotNull AnyObjectPatch anyObjectPatch);
/**
@@ -186,7 +186,7 @@ public interface AnyObjectService extends AnyService<AnyObjectTO> {
+ " date of the entity") })
@PUT
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response update(@NotNull AnyObjectTO anyObjectTO);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java
index 3f0f294..47dcdb5 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java
@@ -39,6 +39,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.patch.AssociationPatch;
import org.apache.syncope.common.lib.patch.DeassociationPatch;
import org.apache.syncope.common.lib.to.AnyTO;
@@ -65,7 +66,7 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
*/
@GET
@Path("{key}/{schemaType}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Set<AttrTO> read(@NotNull @PathParam("key") String key, @NotNull @PathParam("schemaType") SchemaType schemaType);
/**
@@ -81,7 +82,7 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
*/
@GET
@Path("{key}/{schemaType}/{schema}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
AttrTO read(
@NotNull @PathParam("key") String key,
@NotNull @PathParam("schemaType") SchemaType schemaType,
@@ -95,7 +96,7 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
TO read(@NotNull @PathParam("key") String key);
/**
@@ -105,7 +106,7 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
* @return paged list of any objects matching the given query
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
PagedResult<TO> search(@BeanParam AnyQuery anyQuery);
/**
@@ -118,8 +119,8 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
*/
@PUT
@Path("{key}/{schemaType}/{schema}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response update(
@NotNull @PathParam("key") String key,
@NotNull @PathParam("schemaType") SchemaType schemaType,
@@ -136,7 +137,7 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}/{schemaType}/{schema}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(
@NotNull @PathParam("key") String key,
@NotNull @PathParam("schemaType") SchemaType schemaType,
@@ -179,7 +180,7 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
+ " date of the entity") })
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response delete(@NotNull @PathParam("key") String key);
/**
@@ -218,8 +219,8 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
+ " date of the entity") })
@POST
@Path("{key}/deassociate/{action}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response deassociate(@NotNull DeassociationPatch patch);
/**
@@ -258,8 +259,8 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
+ " date of the entity") })
@POST
@Path("{key}/associate/{action}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response associate(@NotNull AssociationPatch patch);
/**
@@ -290,7 +291,7 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
+ "client about the fact that a specified preference was applied")) })
@POST
@Path("bulk")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response bulk(@NotNull BulkAction bulkAction);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java
index b3b750a..08a0954 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java
@@ -38,6 +38,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.AnyTypeClassTO;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -57,7 +58,7 @@ public interface AnyTypeClassService extends JAXRSService {
* @return list of all anyTypeClasss.
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<AnyTypeClassTO> list();
/**
@@ -68,7 +69,7 @@ public interface AnyTypeClassService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
AnyTypeClassTO read(@NotNull @PathParam("key") String key);
/**
@@ -87,8 +88,8 @@ public interface AnyTypeClassService extends JAXRSService {
@Schema(type = "string"),
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull AnyTypeClassTO anyTypeClassTO);
/**
@@ -100,8 +101,8 @@ public interface AnyTypeClassService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull AnyTypeClassTO anyTypeClassTO);
/**
@@ -113,6 +114,6 @@ public interface AnyTypeClassService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java
index b40f3c9..8959c38 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java
@@ -38,6 +38,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.AnyTypeTO;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -57,7 +58,7 @@ public interface AnyTypeService extends JAXRSService {
* @return list of all anyTypes.
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<AnyTypeTO> list();
/**
@@ -68,7 +69,7 @@ public interface AnyTypeService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
AnyTypeTO read(@NotNull @PathParam("key") String key);
/**
@@ -87,7 +88,7 @@ public interface AnyTypeService extends JAXRSService {
@Schema(type = "string"),
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull AnyTypeTO anyTypeTO);
/**
@@ -99,7 +100,7 @@ public interface AnyTypeService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull AnyTypeTO anyTypeTO);
/**
@@ -111,6 +112,6 @@ public interface AnyTypeService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
index dec0b29..d449aaa 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
@@ -34,6 +34,7 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.AttrTO;
/**
@@ -61,7 +62,7 @@ public interface ConfigurationService extends JAXRSService {
* @return all configuration parameters
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<AttrTO> list();
/**
@@ -72,7 +73,7 @@ public interface ConfigurationService extends JAXRSService {
*/
@GET
@Path("{schema}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
AttrTO get(@NotNull @PathParam("schema") String schema);
/**
@@ -84,8 +85,8 @@ public interface ConfigurationService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
@Path("{schema}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void set(@NotNull AttrTO value);
/**
@@ -97,6 +98,6 @@ public interface ConfigurationService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{schema}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("schema") String schema);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java
index 4d5c3a6..465ce63 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java
@@ -32,6 +32,7 @@ import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.ConnInstanceHistoryConfTO;
/**
@@ -52,7 +53,7 @@ public interface ConnectorHistoryService extends JAXRSService {
*/
@GET
@Path("{connectorKey}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<ConnInstanceHistoryConfTO> list(@NotNull @PathParam("connectorKey") String connectorKey);
/**
@@ -64,7 +65,7 @@ public interface ConnectorHistoryService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@POST
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void restore(@NotNull @PathParam("key") String key);
/**
@@ -76,6 +77,6 @@ public interface ConnectorHistoryService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
index 6e79963..087020a 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
@@ -40,6 +40,7 @@ import javax.ws.rs.QueryParam;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.ConnBundleTO;
import org.apache.syncope.common.lib.to.ConnIdObjectClassTO;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
@@ -63,7 +64,7 @@ public interface ConnectorService extends JAXRSService {
*/
@GET
@Path("bundles")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<ConnBundleTO> getBundles(@QueryParam("lang") String lang);
/**
@@ -78,8 +79,8 @@ public interface ConnectorService extends JAXRSService {
*/
@POST
@Path("{key}/supportedObjectClasses")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<ConnIdObjectClassTO> buildObjectClassInfo(
@NotNull ConnInstanceTO connInstanceTO,
@QueryParam("includeSpecial") @DefaultValue("false") boolean includeSpecial);
@@ -94,7 +95,7 @@ public interface ConnectorService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
ConnInstanceTO read(@NotNull @PathParam("key") String key, @QueryParam("lang") String lang);
/**
@@ -107,7 +108,7 @@ public interface ConnectorService extends JAXRSService {
*/
@GET
@Path("byResource/{resourceName}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
ConnInstanceTO readByResource(
@NotNull @PathParam("resourceName") String resourceName, @QueryParam("lang") String lang);
@@ -119,7 +120,7 @@ public interface ConnectorService extends JAXRSService {
* @return list of all connector instances with property keys in the matching language
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<ConnInstanceTO> list(@QueryParam("lang") String lang);
/**
@@ -138,8 +139,8 @@ public interface ConnectorService extends JAXRSService {
@Schema(type = "string"),
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull ConnInstanceTO connInstanceTO);
/**
@@ -151,8 +152,8 @@ public interface ConnectorService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull ConnInstanceTO connInstanceTO);
/**
@@ -164,7 +165,7 @@ public interface ConnectorService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
/**
@@ -176,8 +177,8 @@ public interface ConnectorService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@POST
@Path("check")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void check(@NotNull ConnInstanceTO connInstanceTO);
/**
@@ -187,6 +188,6 @@ public interface ConnectorService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@POST
@Path("reload")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void reload();
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java
index 7da4922..744bf1a 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java
@@ -38,6 +38,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.DomainTO;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -57,7 +58,7 @@ public interface DomainService extends JAXRSService {
* @return list of all domains.
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<DomainTO> list();
/**
@@ -68,7 +69,7 @@ public interface DomainService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
DomainTO read(@NotNull @PathParam("key") String key);
/**
@@ -87,8 +88,8 @@ public interface DomainService extends JAXRSService {
@Schema(type = "string"),
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull DomainTO domainTO);
/**
@@ -100,8 +101,8 @@ public interface DomainService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull DomainTO domainTO);
/**
@@ -113,6 +114,6 @@ public interface DomainService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java
index 920282b..61b90fe 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java
@@ -38,6 +38,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.DynRealmTO;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -57,7 +58,7 @@ public interface DynRealmService extends JAXRSService {
* @return list of all dynamic realms.
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<DynRealmTO> list();
/**
@@ -68,7 +69,7 @@ public interface DynRealmService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
DynRealmTO read(@NotNull @PathParam("key") String key);
/**
@@ -87,8 +88,8 @@ public interface DynRealmService extends JAXRSService {
@Schema(type = "string"),
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull DynRealmTO dynDynRealmTO);
/**
@@ -100,8 +101,8 @@ public interface DynRealmService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull DynRealmTO dynDynRealmTO);
/**
@@ -113,7 +114,7 @@ public interface DynRealmService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ExecutableService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ExecutableService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ExecutableService.java
index 16bc38f..caeb2bf 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ExecutableService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ExecutableService.java
@@ -33,6 +33,7 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.BulkActionResult;
import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.JobTO;
@@ -52,7 +53,7 @@ public interface ExecutableService extends JAXRSService {
*/
@GET
@Path("{key}/executions")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
PagedResult<ExecTO> listExecutions(@BeanParam ExecQuery query);
/**
@@ -63,7 +64,7 @@ public interface ExecutableService extends JAXRSService {
*/
@GET
@Path("executions/recent")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<ExecTO> listRecentExecutions(@Min(1) @QueryParam(JAXRSService.PARAM_MAX) @DefaultValue("25") int max);
/**
@@ -75,7 +76,7 @@ public interface ExecutableService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("executions/{executionKey}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void deleteExecution(@NotNull @PathParam("executionKey") String executionKey);
/**
@@ -86,7 +87,7 @@ public interface ExecutableService extends JAXRSService {
*/
@DELETE
@Path("{key}/executions")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
BulkActionResult deleteExecutions(@BeanParam BulkExecDeleteQuery query);
/**
@@ -97,7 +98,7 @@ public interface ExecutableService extends JAXRSService {
*/
@POST
@Path("{key}/execute")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
ExecTO execute(@BeanParam ExecuteQuery query);
/**
@@ -108,7 +109,7 @@ public interface ExecutableService extends JAXRSService {
*/
@GET
@Path("jobs/{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
JobTO getJob(@PathParam("key") String key);
/**
@@ -118,7 +119,7 @@ public interface ExecutableService extends JAXRSService {
*/
@GET
@Path("jobs")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<JobTO> listJobs();
/**
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/GroupService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/GroupService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/GroupService.java
index 39f37ad..487ab68 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/GroupService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/GroupService.java
@@ -108,8 +108,8 @@ public interface GroupService extends AnyService<GroupTO> {
description = "Allows the server to inform the "
+ "client about the fact that a specified preference was applied") }))
@POST
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull GroupTO groupTO);
/**
@@ -149,8 +149,8 @@ public interface GroupService extends AnyService<GroupTO> {
+ " date of the entity") })
@PATCH
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response update(@NotNull GroupPatch groupPatch);
/**
@@ -190,8 +190,8 @@ public interface GroupService extends AnyService<GroupTO> {
+ " date of the entity") })
@PUT
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response update(@NotNull GroupTO groupTO);
/**
@@ -201,7 +201,7 @@ public interface GroupService extends AnyService<GroupTO> {
*/
@GET
@Path("own")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<GroupTO> own();
/**
@@ -213,7 +213,7 @@ public interface GroupService extends AnyService<GroupTO> {
*/
@POST
@Path("{key}/members/{actionType}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
ExecTO bulkMembersAction(
@NotNull @PathParam("key") String key,
@NotNull @PathParam("actionType") BulkMembersActionType actionType);
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
index 5d040f3..d465fe0 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
@@ -33,6 +33,7 @@ import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.log.EventCategoryTO;
import org.apache.syncope.common.lib.log.LogAppender;
import org.apache.syncope.common.lib.log.LogStatementTO;
@@ -56,7 +57,7 @@ public interface LoggerService extends JAXRSService {
*/
@GET
@Path("memoryAppenders")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<LogAppender> memoryAppenders();
/**
@@ -67,7 +68,7 @@ public interface LoggerService extends JAXRSService {
*/
@GET
@Path("memoryAppenders/{memoryAppender}/lastLogStatements")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<LogStatementTO> getLastLogStatements(@NotNull @PathParam("memoryAppender") String memoryAppender);
/**
@@ -77,7 +78,7 @@ public interface LoggerService extends JAXRSService {
*/
@GET
@Path("events")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<EventCategoryTO> events();
/**
@@ -89,7 +90,7 @@ public interface LoggerService extends JAXRSService {
*/
@GET
@Path("{type}/{name}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
LoggerTO read(@NotNull @PathParam("type") LoggerType type, @NotNull @PathParam("name") final String name);
/**
@@ -100,7 +101,7 @@ public interface LoggerService extends JAXRSService {
*/
@GET
@Path("{type}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<LoggerTO> list(@NotNull @PathParam("type") LoggerType type);
/**
@@ -113,8 +114,8 @@ public interface LoggerService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
@Path("{type}/{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull @PathParam("type") LoggerType type, @NotNull LoggerTO logger);
/**
@@ -127,7 +128,7 @@ public interface LoggerService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{type}/{name}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("type") LoggerType type, @NotNull @PathParam("name") String name);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java
index 1453872..ce90335 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java
@@ -39,6 +39,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.MailTemplateTO;
import org.apache.syncope.common.lib.types.MailTemplateFormat;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -59,7 +60,7 @@ public interface MailTemplateService extends JAXRSService {
* @return list of all mail templates.
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<MailTemplateTO> list();
/**
@@ -78,8 +79,8 @@ public interface MailTemplateService extends JAXRSService {
@Schema(type = "string"),
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull MailTemplateTO mailTemplateTO);
/**
@@ -90,7 +91,7 @@ public interface MailTemplateService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
MailTemplateTO read(@NotNull @PathParam("key") String key);
/**
@@ -102,7 +103,7 @@ public interface MailTemplateService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
/**
@@ -129,7 +130,7 @@ public interface MailTemplateService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
@Path("{key}/{format}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void setFormat(
@NotNull @PathParam("key") String key,
@NotNull @PathParam("format") MailTemplateFormat format,
@@ -145,7 +146,7 @@ public interface MailTemplateService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}/{format}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void removeFormat(
@NotNull @PathParam("key") String key,
@NotNull @PathParam("format") MailTemplateFormat format);
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
index b000f42..f5c4aea 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
@@ -39,6 +39,7 @@ import javax.ws.rs.QueryParam;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.JobTO;
import org.apache.syncope.common.lib.to.NotificationTO;
import org.apache.syncope.common.lib.types.JobAction;
@@ -62,7 +63,7 @@ public interface NotificationService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
NotificationTO read(@NotNull @PathParam("key") String key);
/**
@@ -71,7 +72,7 @@ public interface NotificationService extends JAXRSService {
* @return list of all notifications.
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<NotificationTO> list();
/**
@@ -90,8 +91,8 @@ public interface NotificationService extends JAXRSService {
@Schema(type = "string"),
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull NotificationTO notificationTO);
/**
@@ -103,8 +104,8 @@ public interface NotificationService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull NotificationTO notificationTO);
/**
@@ -116,7 +117,7 @@ public interface NotificationService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
/**
@@ -126,7 +127,7 @@ public interface NotificationService extends JAXRSService {
*/
@GET
@Path("job")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
JobTO getJob();
/**
@@ -138,6 +139,6 @@ public interface NotificationService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@POST
@Path("job")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void actionJob(@QueryParam("action") JobAction action);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
index 5e84118..6cbda50 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
@@ -38,6 +38,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.policy.PolicyTO;
import org.apache.syncope.common.lib.types.PolicyType;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -62,7 +63,7 @@ public interface PolicyService extends JAXRSService {
*/
@GET
@Path("{type}/{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
<T extends PolicyTO> T read(@NotNull @PathParam("type") PolicyType type, @NotNull @PathParam("key") String key);
/**
@@ -74,7 +75,7 @@ public interface PolicyService extends JAXRSService {
*/
@GET
@Path("{type}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
<T extends PolicyTO> List<T> list(@NotNull @PathParam("type") PolicyType type);
/**
@@ -95,8 +96,8 @@ public interface PolicyService extends JAXRSService {
description = "URL of the entity created") }))
@POST
@Path("{type}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull @PathParam("type") PolicyType type, @NotNull PolicyTO policyTO);
/**
@@ -109,8 +110,8 @@ public interface PolicyService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
@Path("{type}/{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull @PathParam("type") PolicyType type, @NotNull PolicyTO policyTO);
/**
@@ -123,7 +124,7 @@ public interface PolicyService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{type}/{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("type") PolicyType type, @NotNull @PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RealmService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RealmService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RealmService.java
index a9e8ff3..becde0f 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RealmService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RealmService.java
@@ -41,6 +41,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.ProvisioningResult;
import org.apache.syncope.common.lib.to.RealmTO;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -61,7 +62,7 @@ public interface RealmService extends JAXRSService {
* @return list of all realms.
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<RealmTO> list();
/**
@@ -72,7 +73,7 @@ public interface RealmService extends JAXRSService {
*/
@GET
@Path("{fullPath:.*}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<RealmTO> list(@NotNull @PathParam("fullPath") String fullPath);
/**
@@ -111,8 +112,8 @@ public interface RealmService extends JAXRSService {
+ "client about the fact that a specified preference was applied") }))
@POST
@Path("{parentPath:.*}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull @PathParam("parentPath") String parentPath, @NotNull RealmTO realmTO);
/**
@@ -144,8 +145,8 @@ public interface RealmService extends JAXRSService {
+ "client about the fact that a specified preference was applied")) })
@PUT
@Path("{fullPath:.*}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response update(@NotNull RealmTO realmTO);
/**
@@ -177,6 +178,6 @@ public interface RealmService extends JAXRSService {
+ "client about the fact that a specified preference was applied")) })
@DELETE
@Path("{fullPath:.*}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response delete(@NotNull @PathParam("fullPath") String fullPath);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java
index 78764ca..33de6b2 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java
@@ -38,6 +38,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.RelationshipTypeTO;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -57,7 +58,7 @@ public interface RelationshipTypeService extends JAXRSService {
* @return list of all relationshipTypes.
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<RelationshipTypeTO> list();
/**
@@ -68,7 +69,7 @@ public interface RelationshipTypeService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
RelationshipTypeTO read(@NotNull @PathParam("key") String key);
/**
@@ -87,8 +88,8 @@ public interface RelationshipTypeService extends JAXRSService {
@Schema(type = "string"),
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull RelationshipTypeTO relationshipTypeTO);
/**
@@ -100,8 +101,8 @@ public interface RelationshipTypeService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull RelationshipTypeTO relationshipTypeTO);
/**
@@ -113,6 +114,6 @@ public interface RelationshipTypeService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
index 0f8726f..e276541 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
@@ -39,6 +39,7 @@ import javax.ws.rs.QueryParam;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.ReportTO;
import org.apache.syncope.common.lib.types.ReportExecExportFormat;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -61,7 +62,7 @@ public interface ReportService extends ExecutableService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
ReportTO read(@NotNull @PathParam("key") String key);
/**
@@ -70,7 +71,7 @@ public interface ReportService extends ExecutableService {
* @return paged list of existing reports matching the given query
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<ReportTO> list();
/**
@@ -89,8 +90,8 @@ public interface ReportService extends ExecutableService {
@Schema(type = "string"),
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull ReportTO reportTO);
/**
@@ -102,8 +103,8 @@ public interface ReportService extends ExecutableService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull ReportTO reportTO);
/**
@@ -115,7 +116,7 @@ public interface ReportService extends ExecutableService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
/**
@@ -127,7 +128,7 @@ public interface ReportService extends ExecutableService {
*/
@GET
@Path("executions/{executionKey}/stream")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response exportExecutionResult(
@NotNull @PathParam("executionKey") String executionKey,
@QueryParam("format") ReportExecExportFormat fmt);
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java
index 37b2889..e69f46f 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java
@@ -39,6 +39,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.ReportTemplateTO;
import org.apache.syncope.common.lib.types.ReportTemplateFormat;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -59,7 +60,7 @@ public interface ReportTemplateService extends JAXRSService {
* @return list of all report templates.
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<ReportTemplateTO> list();
/**
@@ -78,7 +79,7 @@ public interface ReportTemplateService extends JAXRSService {
@Schema(type = "string"),
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull ReportTemplateTO reportTemplateTO);
/**
@@ -89,7 +90,7 @@ public interface ReportTemplateService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
ReportTemplateTO read(@NotNull @PathParam("key") String key);
/**
@@ -101,7 +102,7 @@ public interface ReportTemplateService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
/**
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java
index 01f569a..9785bb0 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java
@@ -32,6 +32,7 @@ import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.ResourceHistoryConfTO;
/**
@@ -52,7 +53,7 @@ public interface ResourceHistoryService extends JAXRSService {
*/
@GET
@Path("{resourceKey}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<ResourceHistoryConfTO> list(@NotNull @PathParam("resourceKey") String resourceKey);
/**
@@ -64,7 +65,7 @@ public interface ResourceHistoryService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@POST
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void restore(@NotNull @PathParam("key") String key);
/**
@@ -76,6 +77,6 @@ public interface ResourceHistoryService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
}
[3/5] syncope git commit: [SYNCOPE-1289] YAML support provided
Posted by il...@apache.org.
[SYNCOPE-1289] YAML support provided
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/3983e2f3
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/3983e2f3
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/3983e2f3
Branch: refs/heads/2_0_X
Commit: 3983e2f34a61a9b17edd9c7f23617d8ab28f5bf2
Parents: 2a500bf
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Fri Mar 30 09:26:19 2018 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Fri Mar 30 09:26:19 2018 +0200
----------------------------------------------------------------------
.../client/console/SyncopeConsoleSession.java | 3 +-
.../client/lib/SyncopeClientFactoryBean.java | 8 +-
.../syncope/common/lib/SyncopeConstants.java | 5 ++
.../rest/api/service/AccessTokenService.java | 33 ++++----
.../rest/api/service/AnyObjectService.java | 61 +++++++-------
.../common/rest/api/service/AnyService.java | 85 ++++++++++----------
.../rest/api/service/AnyTypeClassService.java | 23 +++---
.../common/rest/api/service/AnyTypeService.java | 19 ++---
.../rest/api/service/ConfigurationService.java | 15 ++--
.../api/service/ConnectorHistoryService.java | 11 +--
.../rest/api/service/ConnectorService.java | 37 ++++-----
.../common/rest/api/service/DomainService.java | 23 +++---
.../rest/api/service/DynRealmService.java | 23 +++---
.../rest/api/service/ExecutableService.java | 15 ++--
.../common/rest/api/service/GroupService.java | 65 +++++++--------
.../common/rest/api/service/JAXRSService.java | 4 +-
.../common/rest/api/service/LoggerService.java | 21 ++---
.../rest/api/service/MailTemplateService.java | 23 +++---
.../rest/api/service/NotificationService.java | 27 ++++---
.../common/rest/api/service/PolicyService.java | 23 +++---
.../common/rest/api/service/RealmService.java | 47 +++++------
.../api/service/RelationshipTypeService.java | 23 +++---
.../common/rest/api/service/ReportService.java | 25 +++---
.../rest/api/service/ReportTemplateService.java | 17 ++--
.../api/service/ResourceHistoryService.java | 11 +--
.../rest/api/service/ResourceService.java | 41 +++++-----
.../common/rest/api/service/RoleService.java | 27 ++++---
.../common/rest/api/service/SchemaService.java | 23 +++---
.../api/service/SecurityQuestionService.java | 27 ++++---
.../common/rest/api/service/SyncopeService.java | 18 ++---
.../common/rest/api/service/TaskService.java | 27 ++++---
.../rest/api/service/UserSelfService.java | 74 ++++++++---------
.../common/rest/api/service/UserService.java | 81 ++++++++++---------
.../rest/api/service/UserWorkflowService.java | 19 ++---
.../rest/api/service/WorkflowService.java | 15 ++--
core/rest-cxf/pom.xml | 4 +
.../src/main/resources/restCXFContext.xml | 3 +
.../rest/api/service/CamelRouteService.java | 17 ++--
.../rest/api/service/SAML2IdPService.java | 17 ++--
.../common/rest/api/service/SAML2SPService.java | 17 ++--
.../rest/api/service/SCIMConfService.java | 11 +--
ext/swagger-ui/pom.xml | 4 -
.../src/main/resources/jboss/restCXFContext.xml | 3 +
pom.xml | 30 +++----
.../reference-guide/architecture/core.adoc | 2 +-
src/site/xdoc/building.xml | 6 +-
46 files changed, 581 insertions(+), 532 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
index 747e141..9f7c634 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
@@ -312,8 +312,7 @@ public class SyncopeConsoleSession extends AuthenticatedWebSession {
synchronized (clientFactory) {
SyncopeClientFactoryBean.ContentType preType = clientFactory.getContentType();
- clientFactory.
- setContentType(SyncopeClientFactoryBean.ContentType.fromString(mediaType.toString()));
+ clientFactory.setContentType(SyncopeClientFactoryBean.ContentType.fromString(mediaType.toString()));
service = clientFactory.create(getJWT()).getService(serviceClass);
clientFactory.setContentType(preType);
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClientFactoryBean.java
----------------------------------------------------------------------
diff --git a/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClientFactoryBean.java b/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClientFactoryBean.java
index 58f9e99..0c3dfaf 100644
--- a/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClientFactoryBean.java
+++ b/client/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClientFactoryBean.java
@@ -34,6 +34,7 @@ import org.apache.cxf.feature.LoggingFeature;
import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean;
import org.apache.cxf.jaxrs.provider.JAXBElementProvider;
import org.apache.cxf.staxutils.DocumentDepthProperties;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.policy.PolicyTO;
import org.apache.syncope.common.rest.api.DateParamConverterProvider;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -47,6 +48,7 @@ public class SyncopeClientFactoryBean {
public enum ContentType {
JSON(MediaType.APPLICATION_JSON_TYPE),
+ YAML(SyncopeConstants.APPLICATION_YAML_TYPE),
XML(MediaType.APPLICATION_XML_TYPE);
private final MediaType mediaType;
@@ -60,8 +62,10 @@ public class SyncopeClientFactoryBean {
}
public static ContentType fromString(final String value) {
- return StringUtils.isNotBlank(value) && value.equalsIgnoreCase(XML.getMediaType().toString())
+ return XML.getMediaType().toString().equalsIgnoreCase(value)
? XML
+ : YAML.getMediaType().toString().equalsIgnoreCase(value)
+ ? YAML
: JSON;
}
}
@@ -263,7 +267,7 @@ public class SyncopeClientFactoryBean {
*
* @param jwt value received after login, in the {@link RESTHeaders#TOKEN} response header
* @return client instance which will be passing the provided value in the
- * {@link javax.ws.rs.core.HttpHeaders#AUTHORIZATION}
+ * {@link javax.ws.rs.core.HttpHeaders#AUTHORIZATION}
* request header
*/
public SyncopeClient create(final String jwt) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java b/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java
index 9ce9b06..3ef043c 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/SyncopeConstants.java
@@ -21,6 +21,7 @@ package org.apache.syncope.common.lib;
import java.util.Collections;
import java.util.Set;
import java.util.regex.Pattern;
+import javax.ws.rs.core.MediaType;
public final class SyncopeConstants {
@@ -63,6 +64,10 @@ public final class SyncopeConstants {
public static final Pattern UUID_PATTERN = Pattern.compile(UUID_REGEX);
+ public static final String APPLICATION_YAML = "application/yaml";
+
+ public static final MediaType APPLICATION_YAML_TYPE = new MediaType("application", "yaml");
+
private SyncopeConstants() {
// private constructor for utility class
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java
index b9a4b76..aaffa9b 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java
@@ -34,6 +34,7 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.AccessTokenTO;
import org.apache.syncope.common.lib.to.PagedResult;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -58,13 +59,13 @@ public interface AccessTokenService extends JAXRSService {
@ApiResponse(code = 204,
message = "JWT successfully generated", responseHeaders = {
@ResponseHeader(name = RESTHeaders.TOKEN, response = String.class,
- description = "Generated JWT")
- , @ResponseHeader(name = RESTHeaders.TOKEN_EXPIRE, response = String.class,
- description = "Expiration of the generated JWT") })
- , @ApiResponse(code = 401, message = "Invalid username or password") })
+ description = "Generated JWT"),
+ @ResponseHeader(name = RESTHeaders.TOKEN_EXPIRE, response = String.class,
+ description = "Expiration of the generated JWT") }),
+ @ApiResponse(code = 401, message = "Invalid username or password") })
@POST
@Path("login")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response login();
/**
@@ -79,12 +80,12 @@ public interface AccessTokenService extends JAXRSService {
@ApiResponse(code = 204,
message = "JWT successfully refreshed", responseHeaders = {
@ResponseHeader(name = RESTHeaders.TOKEN, response = String.class,
- description = "Generated JWT")
- , @ResponseHeader(name = RESTHeaders.TOKEN_EXPIRE, response = String.class,
+ description = "Generated JWT"),
+ @ResponseHeader(name = RESTHeaders.TOKEN_EXPIRE, response = String.class,
description = "Expiration of the refreshed JWT") }))
@POST
@Path("refresh")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response refresh();
/**
@@ -96,7 +97,7 @@ public interface AccessTokenService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@POST
@Path("logout")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void logout();
/**
@@ -106,11 +107,11 @@ public interface AccessTokenService extends JAXRSService {
* @return paged list of existing access tokens matching the given query
*/
@ApiOperation(value = "", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@GET
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
PagedResult<AccessTokenTO> list(@BeanParam AccessTokenQuery query);
/**
@@ -119,12 +120,12 @@ public interface AccessTokenService extends JAXRSService {
* @param key access token key
*/
@ApiOperation(value = "", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@ApiResponses(
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyObjectService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyObjectService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyObjectService.java
index 5a88467..617bd8e 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyObjectService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyObjectService.java
@@ -35,6 +35,7 @@ import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.apache.cxf.jaxrs.ext.PATCH;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.patch.AnyObjectPatch;
import org.apache.syncope.common.lib.to.AnyObjectTO;
import org.apache.syncope.common.lib.to.PagedResult;
@@ -46,8 +47,8 @@ import org.apache.syncope.common.rest.api.beans.AnyQuery;
* REST operations for anyObjects.
*/
@Api(tags = "AnyObjects", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("anyObjects")
public interface AnyObjectService extends AnyService<AnyObjectTO> {
@@ -76,8 +77,8 @@ public interface AnyObjectService extends AnyService<AnyObjectTO> {
@ApiImplicitParam(name = RESTHeaders.PREFER, paramType = "header", dataType = "string",
value = "Allows the client to specify a preference for the result to be returned from the server",
defaultValue = "return-content", allowableValues = "return-content, return-no-content",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
value = "If 'true', instructs the propagation process not to wait for completion when communicating"
+ " with External Resources with no priority set",
defaultValue = "false", allowEmptyValue = true) })
@@ -87,15 +88,15 @@ public interface AnyObjectService extends AnyService<AnyObjectTO> {
+ "or empty if 'Prefer: return-no-content' was specified",
response = ProvisioningResult.class, responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "UUID generated for the any object created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
- description = "URL of the any object created")
- , @ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
+ description = "UUID generated for the any object created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "URL of the any object created"),
+ @ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
+ "client about the fact that a specified preference was applied") }))
@POST
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull AnyObjectTO anyObjectTO);
/**
@@ -108,31 +109,31 @@ public interface AnyObjectService extends AnyService<AnyObjectTO> {
@ApiImplicitParam(name = RESTHeaders.PREFER, paramType = "header", dataType = "string",
value = "Allows the client to specify a preference for the result to be returned from the server",
defaultValue = "return-content", allowableValues = "return-content, return-no-content",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = HttpHeaders.IF_MATCH, paramType = "header", dataType = "string",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = HttpHeaders.IF_MATCH, paramType = "header", dataType = "string",
value = "When the provided ETag value does not match the latest modification date of the entity, "
+ "an error is reported and the requested operation is not performed.",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
value = "If 'true', instructs the propagation process not to wait for completion when communicating"
+ " with External Resources with no priority set",
defaultValue = "false", allowEmptyValue = true) })
@ApiResponses({
@ApiResponse(code = 200,
message = "Any object successfully updated enriched with propagation status information, as Entity",
- response = ProvisioningResult.class)
- , @ApiResponse(code = 204,
+ response = ProvisioningResult.class),
+ @ApiResponse(code = 204,
message = "No content if 'Prefer: return-no-content' was specified", responseHeaders =
@ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
- + "client about the fact that a specified preference was applied"))
- , @ApiResponse(code = 412,
+ + "client about the fact that a specified preference was applied")),
+ @ApiResponse(code = 412,
message = "The ETag value provided via the 'If-Match' header does not match the latest modification "
+ "date of the entity") })
@PATCH
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response update(@NotNull AnyObjectPatch anyObjectPatch);
/**
@@ -145,30 +146,30 @@ public interface AnyObjectService extends AnyService<AnyObjectTO> {
@ApiImplicitParam(name = RESTHeaders.PREFER, paramType = "header", dataType = "string",
value = "Allows the client to specify a preference for the result to be returned from the server",
defaultValue = "return-content", allowableValues = "return-content, return-no-content",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = HttpHeaders.IF_MATCH, paramType = "header", dataType = "string",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = HttpHeaders.IF_MATCH, paramType = "header", dataType = "string",
value = "When the provided ETag value does not match the latest modification date of the entity, "
+ "an error is reported and the requested operation is not performed.",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
value = "If 'true', instructs the propagation process not to wait for completion when communicating"
+ " with External Resources with no priority set",
defaultValue = "false", allowEmptyValue = true) })
@ApiResponses({
@ApiResponse(code = 200,
message = "Any object successfully updated enriched with propagation status information, as Entity",
- response = ProvisioningResult.class)
- , @ApiResponse(code = 204,
+ response = ProvisioningResult.class),
+ @ApiResponse(code = 204,
message = "No content if 'Prefer: return-no-content' was specified", responseHeaders =
@ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
- + "client about the fact that a specified preference was applied"))
- , @ApiResponse(code = 412,
+ + "client about the fact that a specified preference was applied")),
+ @ApiResponse(code = 412,
message = "The ETag value provided via the 'If-Match' header does not match the latest modification "
+ "date of the entity") })
@PUT
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response update(@NotNull AnyObjectTO anyObjectTO);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java
index 44b89f5..5acd64b 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java
@@ -37,6 +37,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.patch.AssociationPatch;
import org.apache.syncope.common.lib.patch.DeassociationPatch;
import org.apache.syncope.common.lib.to.AnyTO;
@@ -63,7 +64,7 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
*/
@GET
@Path("{key}/{schemaType}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Set<AttrTO> read(@NotNull @PathParam("key") String key, @NotNull @PathParam("schemaType") SchemaType schemaType);
/**
@@ -79,7 +80,7 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
*/
@GET
@Path("{key}/{schemaType}/{schema}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
AttrTO read(
@NotNull @PathParam("key") String key,
@NotNull @PathParam("schemaType") SchemaType schemaType,
@@ -93,7 +94,7 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
TO read(@NotNull @PathParam("key") String key);
/**
@@ -103,7 +104,7 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
* @return paged list of any objects matching the given query
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
PagedResult<TO> search(@BeanParam AnyQuery anyQuery);
/**
@@ -116,8 +117,8 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
*/
@PUT
@Path("{key}/{schemaType}/{schema}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response update(
@NotNull @PathParam("key") String key,
@NotNull @PathParam("schemaType") SchemaType schemaType,
@@ -134,7 +135,7 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}/{schemaType}/{schema}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(
@NotNull @PathParam("key") String key,
@NotNull @PathParam("schemaType") SchemaType schemaType,
@@ -150,12 +151,12 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
@ApiImplicitParam(name = RESTHeaders.PREFER, paramType = "header", dataType = "string",
value = "Allows the client to specify a preference for the result to be returned from the server",
defaultValue = "return-content", allowableValues = "return-content, return-no-content",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = HttpHeaders.IF_MATCH, paramType = "header", dataType = "string",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = HttpHeaders.IF_MATCH, paramType = "header", dataType = "string",
value = "When the provided ETag value does not match the latest modification date of the entity, "
+ "an error is reported and the requested operation is not performed.",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
value = "If 'true', instructs the propagation process not to wait for completion when communicating"
+ " with External Resources with no priority set",
defaultValue = "false", allowEmptyValue = true) })
@@ -163,18 +164,18 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
@ApiResponse(code = 200,
message = "User, Group or Any Object successfully deleted enriched with propagation status information,"
+ " as Entity",
- response = ProvisioningResult.class)
- , @ApiResponse(code = 204,
+ response = ProvisioningResult.class),
+ @ApiResponse(code = 204,
message = "No content if 'Prefer: return-no-content' was specified", responseHeaders =
@ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
- + "client about the fact that a specified preference was applied"))
- , @ApiResponse(code = 412,
+ + "client about the fact that a specified preference was applied")),
+ @ApiResponse(code = 412,
message = "The ETag value provided via the 'If-Match' header does not match the latest modification "
+ "date of the entity") })
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response delete(@NotNull @PathParam("key") String key);
/**
@@ -187,29 +188,29 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
@ApiImplicitParam(name = RESTHeaders.PREFER, paramType = "header", dataType = "string",
value = "Allows the client to specify a preference for the result to be returned from the server",
defaultValue = "return-content", allowableValues = "return-content, return-no-content",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = HttpHeaders.IF_MATCH, paramType = "header", dataType = "string",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = HttpHeaders.IF_MATCH, paramType = "header", dataType = "string",
value = "When the provided ETag value does not match the latest modification date of the entity, "
+ "an error is reported and the requested operation is not performed.",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
value = "If 'true', instructs the propagation process not to wait for completion when communicating"
+ " with External Resources with no priority set",
defaultValue = "false", allowEmptyValue = true) })
@ApiResponses({
- @ApiResponse(code = 200, message = "Bulk action result", response = BulkActionResult.class)
- , @ApiResponse(code = 204,
+ @ApiResponse(code = 200, message = "Bulk action result", response = BulkActionResult.class),
+ @ApiResponse(code = 204,
message = "No content if 'Prefer: return-no-content' was specified", responseHeaders =
@ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
- + "client about the fact that a specified preference was applied"))
- , @ApiResponse(code = 412,
+ + "client about the fact that a specified preference was applied")),
+ @ApiResponse(code = 412,
message = "The ETag value provided via the 'If-Match' header does not match the latest modification "
+ "date of the entity") })
@POST
@Path("{key}/deassociate/{action}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response deassociate(@NotNull DeassociationPatch patch);
/**
@@ -222,29 +223,29 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
@ApiImplicitParam(name = RESTHeaders.PREFER, paramType = "header", dataType = "string",
value = "Allows the client to specify a preference for the result to be returned from the server",
defaultValue = "return-content", allowableValues = "return-content, return-no-content",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = HttpHeaders.IF_MATCH, paramType = "header", dataType = "string",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = HttpHeaders.IF_MATCH, paramType = "header", dataType = "string",
value = "When the provided ETag value does not match the latest modification date of the entity, "
+ "an error is reported and the requested operation is not performed.",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
value = "If 'true', instructs the propagation process not to wait for completion when communicating"
+ " with External Resources with no priority set",
defaultValue = "false", allowEmptyValue = true) })
@ApiResponses({
- @ApiResponse(code = 200, message = "Bulk action result", response = BulkActionResult.class)
- , @ApiResponse(code = 204,
+ @ApiResponse(code = 200, message = "Bulk action result", response = BulkActionResult.class),
+ @ApiResponse(code = 204,
message = "No content if 'Prefer: return-no-content' was specified", responseHeaders =
@ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
- + "client about the fact that a specified preference was applied"))
- , @ApiResponse(code = 412,
+ + "client about the fact that a specified preference was applied")),
+ @ApiResponse(code = 412,
message = "The ETag value provided via the 'If-Match' header does not match the latest modification "
+ "date of the entity") })
@POST
@Path("{key}/associate/{action}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response associate(@NotNull AssociationPatch patch);
/**
@@ -257,21 +258,21 @@ public interface AnyService<TO extends AnyTO> extends JAXRSService {
@ApiImplicitParam(name = RESTHeaders.PREFER, paramType = "header", dataType = "string",
value = "Allows the client to specify a preference for the result to be returned from the server",
defaultValue = "return-content", allowableValues = "return-content, return-no-content",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
value = "If 'true', instructs the propagation process not to wait for completion when communicating"
+ " with External Resources with no priority set",
defaultValue = "false", allowEmptyValue = true) })
@ApiResponses({
- @ApiResponse(code = 200, message = "Bulk action result", response = BulkActionResult.class)
- , @ApiResponse(code = 204,
+ @ApiResponse(code = 200, message = "Bulk action result", response = BulkActionResult.class),
+ @ApiResponse(code = 204,
message = "No content if 'Prefer: return-no-content' was specified", responseHeaders =
@ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
+ "client about the fact that a specified preference was applied")) })
@POST
@Path("bulk")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response bulk(@NotNull BulkAction bulkAction);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java
index 0fa17c4..77d95ba 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java
@@ -36,6 +36,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.AnyTypeClassTO;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -43,8 +44,8 @@ import org.apache.syncope.common.rest.api.RESTHeaders;
* REST operations for any type classes.
*/
@Api(tags = "AnyTypeClasses", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("anyTypeClasses")
public interface AnyTypeClassService extends JAXRSService {
@@ -54,7 +55,7 @@ public interface AnyTypeClassService extends JAXRSService {
* @return list of all anyTypeClasss.
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<AnyTypeClassTO> list();
/**
@@ -65,7 +66,7 @@ public interface AnyTypeClassService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
AnyTypeClassTO read(@NotNull @PathParam("key") String key);
/**
@@ -78,12 +79,12 @@ public interface AnyTypeClassService extends JAXRSService {
@ApiResponse(code = 201,
message = "AnyTypeClass successfully created", responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "Key value for the entity created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "Key value for the entity created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull AnyTypeClassTO anyTypeClassTO);
/**
@@ -95,8 +96,8 @@ public interface AnyTypeClassService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull AnyTypeClassTO anyTypeClassTO);
/**
@@ -108,6 +109,6 @@ public interface AnyTypeClassService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java
index 1ded784..d1aba9d 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java
@@ -36,6 +36,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.AnyTypeTO;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -43,8 +44,8 @@ import org.apache.syncope.common.rest.api.RESTHeaders;
* REST operations for any types.
*/
@Api(tags = "AnyTypes", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("anyTypes")
public interface AnyTypeService extends JAXRSService {
@@ -54,7 +55,7 @@ public interface AnyTypeService extends JAXRSService {
* @return list of all anyTypes.
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<AnyTypeTO> list();
/**
@@ -65,7 +66,7 @@ public interface AnyTypeService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
AnyTypeTO read(@NotNull @PathParam("key") String key);
/**
@@ -78,11 +79,11 @@ public interface AnyTypeService extends JAXRSService {
@ApiResponse(code = 201,
message = "AnyType successfully created", responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "Key value for the entity created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "Key value for the entity created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull AnyTypeTO anyTypeTO);
/**
@@ -94,7 +95,7 @@ public interface AnyTypeService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull AnyTypeTO anyTypeTO);
/**
@@ -106,6 +107,6 @@ public interface AnyTypeService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
index 3355575..5996e0a 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
@@ -33,14 +33,15 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.AttrTO;
/**
* REST operations for configuration.
*/
@Api(tags = "Configuration", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("configurations")
public interface ConfigurationService extends JAXRSService {
@@ -59,7 +60,7 @@ public interface ConfigurationService extends JAXRSService {
* @return all configuration parameters
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<AttrTO> list();
/**
@@ -70,7 +71,7 @@ public interface ConfigurationService extends JAXRSService {
*/
@GET
@Path("{schema}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
AttrTO get(@NotNull @PathParam("schema") String schema);
/**
@@ -82,8 +83,8 @@ public interface ConfigurationService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
@Path("{schema}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void set(@NotNull AttrTO value);
/**
@@ -95,6 +96,6 @@ public interface ConfigurationService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{schema}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("schema") String schema);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java
index bcfa1dc..a1ad5d4 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java
@@ -31,14 +31,15 @@ import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.ConnInstanceHistoryConfTO;
/**
* REST operations for connector configuration versioning.
*/
@Api(tags = "ConnectorHistory", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("connectorsHistory")
public interface ConnectorHistoryService extends JAXRSService {
@@ -50,7 +51,7 @@ public interface ConnectorHistoryService extends JAXRSService {
*/
@GET
@Path("{connectorKey}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<ConnInstanceHistoryConfTO> list(@NotNull @PathParam("connectorKey") String connectorKey);
/**
@@ -62,7 +63,7 @@ public interface ConnectorHistoryService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@POST
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void restore(@NotNull @PathParam("key") String key);
/**
@@ -74,6 +75,6 @@ public interface ConnectorHistoryService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
index 82e1040..c74c231 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
@@ -38,6 +38,7 @@ import javax.ws.rs.QueryParam;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.ConnBundleTO;
import org.apache.syncope.common.lib.to.ConnIdObjectClassTO;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
@@ -47,8 +48,8 @@ import org.apache.syncope.common.rest.api.RESTHeaders;
* REST operations for connector bundles and instances.
*/
@Api(tags = "Connectors", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("connectors")
public interface ConnectorService extends JAXRSService {
@@ -60,7 +61,7 @@ public interface ConnectorService extends JAXRSService {
*/
@GET
@Path("bundles")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<ConnBundleTO> getBundles(@QueryParam("lang") String lang);
/**
@@ -75,8 +76,8 @@ public interface ConnectorService extends JAXRSService {
*/
@POST
@Path("{key}/supportedObjectClasses")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<ConnIdObjectClassTO> buildObjectClassInfo(
@NotNull ConnInstanceTO connInstanceTO,
@QueryParam("includeSpecial") @DefaultValue("false") boolean includeSpecial);
@@ -91,7 +92,7 @@ public interface ConnectorService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
ConnInstanceTO read(@NotNull @PathParam("key") String key, @QueryParam("lang") String lang);
/**
@@ -104,7 +105,7 @@ public interface ConnectorService extends JAXRSService {
*/
@GET
@Path("byResource/{resourceName}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
ConnInstanceTO readByResource(
@NotNull @PathParam("resourceName") String resourceName, @QueryParam("lang") String lang);
@@ -116,7 +117,7 @@ public interface ConnectorService extends JAXRSService {
* @return list of all connector instances with property keys in the matching language
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<ConnInstanceTO> list(@QueryParam("lang") String lang);
/**
@@ -129,12 +130,12 @@ public interface ConnectorService extends JAXRSService {
@ApiResponse(code = 201,
message = "ConnInstance successfully created", responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "UUID generated for the entity created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "UUID generated for the entity created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull ConnInstanceTO connInstanceTO);
/**
@@ -146,8 +147,8 @@ public interface ConnectorService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull ConnInstanceTO connInstanceTO);
/**
@@ -159,7 +160,7 @@ public interface ConnectorService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
/**
@@ -171,8 +172,8 @@ public interface ConnectorService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@POST
@Path("check")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void check(@NotNull ConnInstanceTO connInstanceTO);
/**
@@ -182,6 +183,6 @@ public interface ConnectorService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@POST
@Path("reload")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void reload();
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java
index 58a0045..c58604c 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java
@@ -36,6 +36,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.DomainTO;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -43,8 +44,8 @@ import org.apache.syncope.common.rest.api.RESTHeaders;
* REST operations for domains.
*/
@Api(tags = "Domains", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("domains")
public interface DomainService extends JAXRSService {
@@ -54,7 +55,7 @@ public interface DomainService extends JAXRSService {
* @return list of all domains.
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<DomainTO> list();
/**
@@ -65,7 +66,7 @@ public interface DomainService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
DomainTO read(@NotNull @PathParam("key") String key);
/**
@@ -78,12 +79,12 @@ public interface DomainService extends JAXRSService {
@ApiResponse(code = 201,
message = "Domain successfully created", responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "Key value for the entity created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "Key value for the entity created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull DomainTO domainTO);
/**
@@ -95,8 +96,8 @@ public interface DomainService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull DomainTO domainTO);
/**
@@ -108,6 +109,6 @@ public interface DomainService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java
index 3bb0cef..471a57f 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java
@@ -36,6 +36,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.DynRealmTO;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -43,8 +44,8 @@ import org.apache.syncope.common.rest.api.RESTHeaders;
* REST operations for dynamic realms.
*/
@Api(tags = "DynamicRealms", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("dynRealms")
public interface DynRealmService extends JAXRSService {
@@ -54,7 +55,7 @@ public interface DynRealmService extends JAXRSService {
* @return list of all dynamic realms.
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<DynRealmTO> list();
/**
@@ -65,7 +66,7 @@ public interface DynRealmService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
DynRealmTO read(@NotNull @PathParam("key") String key);
/**
@@ -78,12 +79,12 @@ public interface DynRealmService extends JAXRSService {
@ApiResponse(code = 201,
message = "DynRealm successfully created", responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "Key value for the entity created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "Key value for the entity created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull DynRealmTO dynDynRealmTO);
/**
@@ -95,8 +96,8 @@ public interface DynRealmService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull DynRealmTO dynDynRealmTO);
/**
@@ -108,7 +109,7 @@ public interface DynRealmService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ExecutableService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ExecutableService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ExecutableService.java
index 37301bd..4aee4fe 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ExecutableService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ExecutableService.java
@@ -33,6 +33,7 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.BulkActionResult;
import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.JobTO;
@@ -52,7 +53,7 @@ public interface ExecutableService extends JAXRSService {
*/
@GET
@Path("{key}/executions")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
PagedResult<ExecTO> listExecutions(@BeanParam ExecQuery query);
/**
@@ -63,7 +64,7 @@ public interface ExecutableService extends JAXRSService {
*/
@GET
@Path("executions/recent")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<ExecTO> listRecentExecutions(@Min(1) @QueryParam(JAXRSService.PARAM_MAX) @DefaultValue("25") int max);
/**
@@ -75,7 +76,7 @@ public interface ExecutableService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("executions/{executionKey}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void deleteExecution(@NotNull @PathParam("executionKey") String executionKey);
/**
@@ -86,7 +87,7 @@ public interface ExecutableService extends JAXRSService {
*/
@DELETE
@Path("{key}/executions")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
BulkActionResult deleteExecutions(@BeanParam BulkExecDeleteQuery query);
/**
@@ -97,7 +98,7 @@ public interface ExecutableService extends JAXRSService {
*/
@POST
@Path("{key}/execute")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
ExecTO execute(@BeanParam ExecuteQuery query);
/**
@@ -108,7 +109,7 @@ public interface ExecutableService extends JAXRSService {
*/
@GET
@Path("jobs/{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
JobTO getJob(@PathParam("key") String key);
/**
@@ -118,7 +119,7 @@ public interface ExecutableService extends JAXRSService {
*/
@GET
@Path("jobs")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<JobTO> listJobs();
/**
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/GroupService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/GroupService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/GroupService.java
index a67f744..b597974 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/GroupService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/GroupService.java
@@ -38,6 +38,7 @@ import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.apache.cxf.jaxrs.ext.PATCH;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.patch.GroupPatch;
import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.GroupTO;
@@ -51,8 +52,8 @@ import org.apache.syncope.common.rest.api.beans.AnyQuery;
* REST operations for groups.
*/
@Api(tags = "Groups", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("groups")
public interface GroupService extends AnyService<GroupTO> {
@@ -81,8 +82,8 @@ public interface GroupService extends AnyService<GroupTO> {
@ApiImplicitParam(name = RESTHeaders.PREFER, paramType = "header", dataType = "string",
value = "Allows the client to specify a preference for the result to be returned from the server",
defaultValue = "return-content", allowableValues = "return-content, return-no-content",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
value = "If 'true', instructs the propagation process not to wait for completion when communicating"
+ " with External Resources with no priority set",
defaultValue = "false", allowEmptyValue = true) })
@@ -92,15 +93,15 @@ public interface GroupService extends AnyService<GroupTO> {
+ "or empty if 'Prefer: return-no-content' was specified",
response = ProvisioningResult.class, responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "UUID generated for the group created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
- description = "URL of the group created")
- , @ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
+ description = "UUID generated for the group created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "URL of the group created"),
+ @ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
+ "client about the fact that a specified preference was applied") }))
@POST
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull GroupTO groupTO);
/**
@@ -113,31 +114,31 @@ public interface GroupService extends AnyService<GroupTO> {
@ApiImplicitParam(name = RESTHeaders.PREFER, paramType = "header", dataType = "string",
value = "Allows the client to specify a preference for the result to be returned from the server",
defaultValue = "return-content", allowableValues = "return-content, return-no-content",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = HttpHeaders.IF_MATCH, paramType = "header", dataType = "string",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = HttpHeaders.IF_MATCH, paramType = "header", dataType = "string",
value = "When the provided ETag value does not match the latest modification date of the entity, "
+ "an error is reported and the requested operation is not performed.",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
value = "If 'true', instructs the propagation process not to wait for completion when communicating"
+ " with External Resources with no priority set",
defaultValue = "false", allowEmptyValue = true) })
@ApiResponses({
@ApiResponse(code = 200,
message = "Group successfully updated enriched with propagation status information, as Entity",
- response = ProvisioningResult.class)
- , @ApiResponse(code = 204,
+ response = ProvisioningResult.class),
+ @ApiResponse(code = 204,
message = "No content if 'Prefer: return-no-content' was specified", responseHeaders =
@ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
- + "client about the fact that a specified preference was applied"))
- , @ApiResponse(code = 412,
+ + "client about the fact that a specified preference was applied")),
+ @ApiResponse(code = 412,
message = "The ETag value provided via the 'If-Match' header does not match the latest modification "
+ "date of the entity") })
@PATCH
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response update(@NotNull GroupPatch groupPatch);
/**
@@ -150,31 +151,31 @@ public interface GroupService extends AnyService<GroupTO> {
@ApiImplicitParam(name = RESTHeaders.PREFER, paramType = "header", dataType = "string",
value = "Allows the client to specify a preference for the result to be returned from the server",
defaultValue = "return-content", allowableValues = "return-content, return-no-content",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = HttpHeaders.IF_MATCH, paramType = "header", dataType = "string",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = HttpHeaders.IF_MATCH, paramType = "header", dataType = "string",
value = "When the provided ETag value does not match the latest modification date of the entity, "
+ "an error is reported and the requested operation is not performed.",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
value = "If 'true', instructs the propagation process not to wait for completion when communicating"
+ " with External Resources with no priority set",
defaultValue = "false", allowEmptyValue = true) })
@ApiResponses({
@ApiResponse(code = 200,
message = "Group successfully updated enriched with propagation status information, as Entity",
- response = ProvisioningResult.class)
- , @ApiResponse(code = 204,
+ response = ProvisioningResult.class),
+ @ApiResponse(code = 204,
message = "No content if 'Prefer: return-no-content' was specified", responseHeaders =
@ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
- + "client about the fact that a specified preference was applied"))
- , @ApiResponse(code = 412,
+ + "client about the fact that a specified preference was applied")),
+ @ApiResponse(code = 412,
message = "The ETag value provided via the 'If-Match' header does not match the latest modification "
+ "date of the entity") })
@PUT
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response update(@NotNull GroupTO groupTO);
/**
@@ -184,7 +185,7 @@ public interface GroupService extends AnyService<GroupTO> {
*/
@GET
@Path("own")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<GroupTO> own();
/**
@@ -196,7 +197,7 @@ public interface GroupService extends AnyService<GroupTO> {
*/
@POST
@Path("{key}/members/{actionType}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
ExecTO bulkMembersAction(
@NotNull @PathParam("key") String key,
@NotNull @PathParam("actionType") BulkMembersActionType actionType);
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/JAXRSService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/JAXRSService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/JAXRSService.java
index f074995..9e81a11 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/JAXRSService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/JAXRSService.java
@@ -31,8 +31,8 @@ import org.apache.syncope.common.rest.api.RESTHeaders;
response = ErrorTO.class,
responseHeaders = {
@ResponseHeader(name = RESTHeaders.ERROR_CODE, response = String.class,
- description = "Error code")
- , @ResponseHeader(name = RESTHeaders.ERROR_INFO, response = String.class,
+ description = "Error code"),
+ @ResponseHeader(name = RESTHeaders.ERROR_INFO, response = String.class,
description = "Error message") })
)
public interface JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
index 77e5b62..f9305de 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
@@ -32,6 +32,7 @@ import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.log.EventCategoryTO;
import org.apache.syncope.common.lib.log.LogAppender;
import org.apache.syncope.common.lib.log.LogStatementTO;
@@ -42,8 +43,8 @@ import org.apache.syncope.common.lib.types.LoggerType;
* REST operations for logging and auditing.
*/
@Api(tags = "Loggers", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("loggers")
public interface LoggerService extends JAXRSService {
@@ -54,7 +55,7 @@ public interface LoggerService extends JAXRSService {
*/
@GET
@Path("memoryAppenders")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<LogAppender> memoryAppenders();
/**
@@ -65,7 +66,7 @@ public interface LoggerService extends JAXRSService {
*/
@GET
@Path("memoryAppenders/{memoryAppender}/lastLogStatements")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<LogStatementTO> getLastLogStatements(@NotNull @PathParam("memoryAppender") String memoryAppender);
/**
@@ -75,7 +76,7 @@ public interface LoggerService extends JAXRSService {
*/
@GET
@Path("events")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<EventCategoryTO> events();
/**
@@ -87,7 +88,7 @@ public interface LoggerService extends JAXRSService {
*/
@GET
@Path("{type}/{name}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
LoggerTO read(@NotNull @PathParam("type") LoggerType type, @NotNull @PathParam("name") final String name);
/**
@@ -98,7 +99,7 @@ public interface LoggerService extends JAXRSService {
*/
@GET
@Path("{type}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<LoggerTO> list(@NotNull @PathParam("type") LoggerType type);
/**
@@ -111,8 +112,8 @@ public interface LoggerService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
@Path("{type}/{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull @PathParam("type") LoggerType type, @NotNull LoggerTO logger);
/**
@@ -125,7 +126,7 @@ public interface LoggerService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{type}/{name}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("type") LoggerType type, @NotNull @PathParam("name") String name);
}
[4/5] syncope git commit: [SYNCOPE-1289] YAML support provided
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
index b20c61b..0caa400 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
@@ -39,6 +39,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.patch.ResourceDeassociationPatch;
import org.apache.syncope.common.lib.to.BulkActionResult;
import org.apache.syncope.common.lib.to.ConnObjectTO;
@@ -67,7 +68,7 @@ public interface ResourceService extends JAXRSService {
*/
@GET
@Path("{key}/{anyTypeKey}/{anyKey}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
ConnObjectTO readConnObject(
@NotNull @PathParam("key") String key,
@NotNull @PathParam("anyTypeKey") String anyTypeKey,
@@ -84,7 +85,7 @@ public interface ResourceService extends JAXRSService {
*/
@GET
@Path("{key}/{anyTypeKey}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
PagedConnObjectTOResult listConnObjects(
@NotNull @PathParam("key") String key,
@NotNull @PathParam("anyTypeKey") String anyTypeKey,
@@ -98,7 +99,7 @@ public interface ResourceService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
ResourceTO read(@NotNull @PathParam("key") String key);
/**
@@ -107,7 +108,7 @@ public interface ResourceService extends JAXRSService {
* @return list of all resources
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<ResourceTO> list();
/**
@@ -126,8 +127,8 @@ public interface ResourceService extends JAXRSService {
@Schema(type = "string"),
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull ResourceTO resourceTO);
/**
@@ -139,8 +140,8 @@ public interface ResourceService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull ResourceTO resourceTO);
/**
@@ -154,7 +155,7 @@ public interface ResourceService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@POST
@Path("{key}/{anyTypeKey}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void setLatestSyncToken(
@NotNull @PathParam("key") String key,
@NotNull @PathParam("anyTypeKey") String anyTypeKey);
@@ -169,7 +170,7 @@ public interface ResourceService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}/{anyTypeKey}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void removeSyncToken(
@NotNull @PathParam("key") String key,
@NotNull @PathParam("anyTypeKey") String anyTypeKey);
@@ -183,8 +184,8 @@ public interface ResourceService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
/**
@@ -196,8 +197,8 @@ public interface ResourceService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@POST
@Path("check")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void check(@NotNull ResourceTO resourceTO);
/**
@@ -208,7 +209,7 @@ public interface ResourceService extends JAXRSService {
*/
@POST
@Path("{key}/bulkDeassociation/{anyTypeKey}/{action}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
BulkActionResult bulkDeassociation(@NotNull ResourceDeassociationPatch patch);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
index b57b0a4..24a6167 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
@@ -39,6 +39,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.RoleTO;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -58,7 +59,7 @@ public interface RoleService extends JAXRSService {
* @return list of all roles.
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<RoleTO> list();
/**
@@ -69,7 +70,7 @@ public interface RoleService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
RoleTO read(@NotNull @PathParam("key") String key);
/**
@@ -88,8 +89,8 @@ public interface RoleService extends JAXRSService {
@Schema(type = "string"),
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull RoleTO roleTO);
/**
@@ -101,8 +102,8 @@ public interface RoleService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull RoleTO roleTO);
/**
@@ -114,7 +115,7 @@ public interface RoleService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
/**
@@ -139,7 +140,7 @@ public interface RoleService extends JAXRSService {
@PUT
@Path("{key}/consoleLayout")
@Consumes({ MediaType.APPLICATION_JSON })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void setConsoleLayoutInfo(@NotNull @PathParam("key") String key, InputStream consoleLayoutInfoIn);
/**
@@ -151,6 +152,6 @@ public interface RoleService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}/consoleLayout")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void removeConsoleLayoutInfo(@NotNull @PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
index a1f983b..4d5c67b 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
@@ -39,6 +39,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.SchemaTO;
import org.apache.syncope.common.lib.types.SchemaType;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -64,7 +65,7 @@ public interface SchemaService extends JAXRSService {
*/
@GET
@Path("{type}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
<T extends SchemaTO> List<T> search(@BeanParam SchemaQuery query);
/**
@@ -77,7 +78,7 @@ public interface SchemaService extends JAXRSService {
*/
@GET
@Path("{type}/{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
<T extends SchemaTO> T read(
@NotNull @PathParam("type") SchemaType type, @NotNull @PathParam("key") String key);
@@ -99,8 +100,8 @@ public interface SchemaService extends JAXRSService {
description = "URL of the entity created") }))
@POST
@Path("{type}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull @PathParam("type") SchemaType type, @NotNull SchemaTO schemaTO);
/**
@@ -113,8 +114,8 @@ public interface SchemaService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
@Path("{type}/{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull @PathParam("type") SchemaType type, @NotNull SchemaTO schemaTO);
/**
@@ -127,6 +128,6 @@ public interface SchemaService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{type}/{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("type") SchemaType type, @NotNull @PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
index 681921b..92e138b 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
@@ -38,6 +38,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.SecurityQuestionTO;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -57,7 +58,7 @@ public interface SecurityQuestionService extends JAXRSService {
* @return list of all security questions
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<SecurityQuestionTO> list();
/**
@@ -68,7 +69,7 @@ public interface SecurityQuestionService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
SecurityQuestionTO read(@NotNull @PathParam("key") String key);
/**
@@ -87,8 +88,8 @@ public interface SecurityQuestionService extends JAXRSService {
@Schema(type = "string"),
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull SecurityQuestionTO securityQuestionTO);
/**
@@ -100,8 +101,8 @@ public interface SecurityQuestionService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull SecurityQuestionTO securityQuestionTO);
/**
@@ -113,7 +114,7 @@ public interface SecurityQuestionService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
/**
@@ -124,7 +125,7 @@ public interface SecurityQuestionService extends JAXRSService {
*/
@GET
@Path("byUser/{username}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
SecurityQuestionTO readByUser(@NotNull @PathParam("username") String username);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SyncopeService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SyncopeService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SyncopeService.java
index 5bbf86b..a37fdb3 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SyncopeService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SyncopeService.java
@@ -31,6 +31,7 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.info.NumbersInfo;
import org.apache.syncope.common.lib.info.SystemInfo;
import org.apache.syncope.common.lib.info.PlatformInfo;
@@ -57,7 +58,7 @@ public interface SyncopeService extends JAXRSService {
*/
@GET
@Path("/platform")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
PlatformInfo platform();
/**
@@ -67,7 +68,7 @@ public interface SyncopeService extends JAXRSService {
*/
@GET
@Path("/system")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
SystemInfo system();
/** *
@@ -77,7 +78,7 @@ public interface SyncopeService extends JAXRSService {
*/
@GET
@Path("/numbers")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
NumbersInfo numbers();
/**
@@ -93,7 +94,7 @@ public interface SyncopeService extends JAXRSService {
*/
@POST
@Path("/assignableGroups/{realm:.*}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
PagedResult<GroupTO> searchAssignableGroups(
@NotNull @PathParam("realm") String realm,
@QueryParam("term") String term,
@@ -108,7 +109,6 @@ public interface SyncopeService extends JAXRSService {
*/
@GET
@Path("/userTypeExtension/{groupName}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- TypeExtensionTO readUserTypeExtension(
- @NotNull @PathParam("groupName") String groupName);
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ TypeExtensionTO readUserTypeExtension(@NotNull @PathParam("groupName") String groupName);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
index 5e6bf34..810aecb 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
@@ -40,6 +40,7 @@ import javax.ws.rs.QueryParam;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.TaskTO;
import org.apache.syncope.common.lib.to.BulkAction;
import org.apache.syncope.common.lib.to.BulkActionResult;
@@ -70,7 +71,7 @@ public interface TaskService extends ExecutableService {
*/
@GET
@Path("{type}/{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
<T extends TaskTO> T read(
@NotNull @PathParam("type") TaskType type,
@NotNull @PathParam("key") String key,
@@ -85,7 +86,7 @@ public interface TaskService extends ExecutableService {
*/
@GET
@Path("{type}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
<T extends TaskTO> PagedResult<T> search(@BeanParam TaskQuery query);
/**
@@ -106,8 +107,8 @@ public interface TaskService extends ExecutableService {
description = "URL of the entity created") }))
@POST
@Path("{type}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull @PathParam("type") TaskType type, @NotNull SchedTaskTO taskTO);
/**
@@ -120,8 +121,8 @@ public interface TaskService extends ExecutableService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
@Path("{type}/{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull @PathParam("type") TaskType type, @NotNull SchedTaskTO taskTO);
/**
@@ -134,7 +135,7 @@ public interface TaskService extends ExecutableService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{type}/{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("type") TaskType type, @NotNull @PathParam("key") String key);
/**
@@ -145,7 +146,7 @@ public interface TaskService extends ExecutableService {
*/
@POST
@Path("bulk")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
BulkActionResult bulk(@NotNull BulkAction bulkAction);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
index 8b4db6f..b261486 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
@@ -76,7 +76,7 @@ public interface UserSelfService extends JAXRSService {
description = "List of entitlements owned by the calling user")
}))
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response read();
/**
@@ -109,8 +109,8 @@ public interface UserSelfService extends JAXRSService {
description = "Allows the server to inform the "
+ "client about the fact that a specified preference was applied") }))
@POST
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull UserTO userTO,
@DefaultValue("true") @QueryParam("storePassword") boolean storePassword);
@@ -141,8 +141,8 @@ public interface UserSelfService extends JAXRSService {
+ "client about the fact that a specified preference was applied")) })
@PATCH
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response update(@NotNull UserPatch patch);
/**
@@ -172,8 +172,8 @@ public interface UserSelfService extends JAXRSService {
+ "client about the fact that a specified preference was applied")) })
@PUT
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response update(@NotNull UserTO user);
/**
@@ -203,8 +203,8 @@ public interface UserSelfService extends JAXRSService {
+ "client about the fact that a specified preference was applied")) })
@POST
@Path("{key}/status")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response status(@NotNull StatusPatch statusPatch);
/**
@@ -216,7 +216,7 @@ public interface UserSelfService extends JAXRSService {
@SecurityRequirement(name = "BasicAuthentication"),
@SecurityRequirement(name = "Bearer") })
@DELETE
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response delete();
/**
@@ -231,7 +231,7 @@ public interface UserSelfService extends JAXRSService {
@SecurityRequirement(name = "Bearer") })
@POST
@Path("changePassword")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response changePassword(String password);
/**
@@ -246,7 +246,7 @@ public interface UserSelfService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@POST
@Path("requestPasswordReset")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void requestPasswordReset(@NotNull @QueryParam("username") String username, String securityAnswer);
/**
@@ -262,6 +262,6 @@ public interface UserSelfService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@POST
@Path("confirmPasswordReset")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void confirmPasswordReset(@NotNull @QueryParam("token") String token, String password);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
index 7a52fa5..db60d7a 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
@@ -107,8 +107,8 @@ public interface UserService extends AnyService<UserTO> {
description = "Allows the server to inform the "
+ "client about the fact that a specified preference was applied") }))
@POST
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(
@NotNull UserTO userTO,
@DefaultValue("true") @QueryParam("storePassword") boolean storePassword);
@@ -150,8 +150,8 @@ public interface UserService extends AnyService<UserTO> {
+ " date of the entity") })
@PATCH
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response update(@NotNull UserPatch userPatch);
/**
@@ -192,8 +192,8 @@ public interface UserService extends AnyService<UserTO> {
+ " date of the entity") })
@PUT
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response update(@NotNull UserTO userTO);
/**
@@ -234,7 +234,7 @@ public interface UserService extends AnyService<UserTO> {
+ " date of the entity") })
@POST
@Path("{key}/status")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response status(@NotNull StatusPatch statusPatch);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserWorkflowService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserWorkflowService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserWorkflowService.java
index 350542b..808d710 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserWorkflowService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserWorkflowService.java
@@ -30,6 +30,7 @@ import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.UserTO;
import org.apache.syncope.common.lib.to.WorkflowFormTO;
@@ -50,7 +51,7 @@ public interface UserWorkflowService extends JAXRSService {
*/
@GET
@Path("forms")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<WorkflowFormTO> getForms();
/**
@@ -61,7 +62,7 @@ public interface UserWorkflowService extends JAXRSService {
*/
@GET
@Path("forms/{userKey}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
WorkflowFormTO getFormForUser(@NotNull @PathParam("userKey") String userKey);
/**
@@ -72,7 +73,7 @@ public interface UserWorkflowService extends JAXRSService {
*/
@POST
@Path("forms/{taskId}/claim")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
WorkflowFormTO claimForm(@NotNull @PathParam("taskId") String taskId);
/**
@@ -83,8 +84,8 @@ public interface UserWorkflowService extends JAXRSService {
*/
@POST
@Path("forms")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
UserTO submitForm(@NotNull WorkflowFormTO form);
/**
@@ -96,7 +97,7 @@ public interface UserWorkflowService extends JAXRSService {
*/
@POST
@Path("tasks/{taskId}/execute")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
UserTO executeTask(@NotNull @PathParam("taskId") String taskId, @NotNull UserTO userTO);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
index 316009d..6500e41 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
@@ -34,6 +34,7 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.WorkflowDefinitionTO;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -55,7 +56,7 @@ public interface WorkflowService extends JAXRSService {
*/
@GET
@Path("{anyType}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<WorkflowDefinitionTO> list(@NotNull @PathParam("anyType") String anyType);
/**
@@ -67,7 +68,7 @@ public interface WorkflowService extends JAXRSService {
*/
@GET
@Path("{anyType}/{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response get(
@NotNull @PathParam("anyType") String anyType,
@NotNull @PathParam("key") String key);
@@ -97,8 +98,8 @@ public interface WorkflowService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
@Path("{anyType}/{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void set(
@NotNull @PathParam("anyType") String anyType,
@NotNull @PathParam("key") String key,
@@ -114,7 +115,7 @@ public interface WorkflowService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{anyType}/{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(
@NotNull @PathParam("anyType") String anyType,
@NotNull @PathParam("key") String key);
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/core/rest-cxf/pom.xml
----------------------------------------------------------------------
diff --git a/core/rest-cxf/pom.xml b/core/rest-cxf/pom.xml
index 1ba05a7..79dea7a 100644
--- a/core/rest-cxf/pom.xml
+++ b/core/rest-cxf/pom.xml
@@ -79,6 +79,10 @@ under the License.
<artifactId>jackson-jaxrs-json-provider</artifactId>
</dependency>
<dependency>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-yaml-provider</artifactId>
+ </dependency>
+ <dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-afterburner</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/core/rest-cxf/src/main/resources/restCXFContext.xml
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/resources/restCXFContext.xml b/core/rest-cxf/src/main/resources/restCXFContext.xml
index 74368b0..571add9 100644
--- a/core/rest-cxf/src/main/resources/restCXFContext.xml
+++ b/core/rest-cxf/src/main/resources/restCXFContext.xml
@@ -65,6 +65,8 @@ under the License.
<property name="mapper" ref="jacksonObjectMapper"/>
</bean>
+ <bean id="yamlProvider" class="com.fasterxml.jackson.jaxrs.yaml.JacksonJaxbYAMLProvider"/>
+
<bean id="exceptionMapper" class="org.apache.syncope.core.rest.cxf.RestServiceExceptionMapper"/>
<bean id="validationProvider" class="org.apache.cxf.validation.BeanValidationProvider"/>
@@ -155,6 +157,7 @@ under the License.
<ref bean="dateParamConverterProvider"/>
<ref bean="jaxbProvider"/>
<ref bean="jsonProvider"/>
+ <ref bean="yamlProvider"/>
<ref bean="exceptionMapper"/>
<ref bean="searchContextProvider"/>
<ref bean="addDomainFilter"/>
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
----------------------------------------------------------------------
diff --git a/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java b/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
index 2d53b88..2bf15f3 100644
--- a/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
+++ b/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
@@ -33,6 +33,7 @@ import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.CamelMetrics;
import org.apache.syncope.common.lib.to.CamelRouteTO;
import org.apache.syncope.common.lib.types.AnyTypeKind;
@@ -55,7 +56,7 @@ public interface CamelRouteService extends JAXRSService {
*/
@GET
@Path("{anyTypeKind}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<CamelRouteTO> list(@NotNull @PathParam("anyTypeKind") AnyTypeKind anyTypeKind);
/**
@@ -67,7 +68,7 @@ public interface CamelRouteService extends JAXRSService {
*/
@GET
@Path("{anyTypeKind}/{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
CamelRouteTO read(
@NotNull @PathParam("anyTypeKind") AnyTypeKind anyTypeKind,
@NotNull @PathParam("key") String key);
@@ -82,8 +83,8 @@ public interface CamelRouteService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
@Path("{anyTypeKind}/{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull @PathParam("anyTypeKind") AnyTypeKind anyTypeKind, @NotNull CamelRouteTO route);
/**
@@ -93,7 +94,7 @@ public interface CamelRouteService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@POST
@Path("restartContext")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void restartContext();
/**
@@ -103,6 +104,6 @@ public interface CamelRouteService extends JAXRSService {
*/
@GET
@Path("metrics")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
CamelMetrics metrics();
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
----------------------------------------------------------------------
diff --git a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
index 3123808..e7c4850 100644
--- a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
+++ b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
@@ -37,6 +37,7 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.SAML2IdPTO;
/**
@@ -65,7 +66,7 @@ public interface SAML2IdPService extends JAXRSService {
* @return list of all defined SAML 2.0 Identity Providers
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<SAML2IdPTO> list();
/**
@@ -76,7 +77,7 @@ public interface SAML2IdPService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
SAML2IdPTO read(@PathParam("key") String key);
/**
@@ -87,7 +88,7 @@ public interface SAML2IdPService extends JAXRSService {
*/
@POST
@Consumes({ MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response importFromMetadata(@NotNull InputStream input);
/**
@@ -99,8 +100,8 @@ public interface SAML2IdPService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull SAML2IdPTO saml2IdpTO);
/**
@@ -112,6 +113,6 @@ public interface SAML2IdPService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
----------------------------------------------------------------------
diff --git a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
index 3cfbbc2..c54a339 100644
--- a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
+++ b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
@@ -31,6 +31,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.SAML2RequestTO;
import org.apache.syncope.common.lib.to.SAML2LoginResponseTO;
import org.apache.syncope.common.lib.to.SAML2ReceivedResponseTO;
@@ -65,7 +66,7 @@ public interface SAML2SPService extends JAXRSService {
*/
@POST
@Path("loginRequest")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
SAML2RequestTO createLoginRequest(
@QueryParam("spEntityID") String spEntityID,
@QueryParam("idpEntityID") String idpEntityID);
@@ -78,8 +79,8 @@ public interface SAML2SPService extends JAXRSService {
*/
@POST
@Path("loginResponse")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
SAML2LoginResponseTO validateLoginResponse(SAML2ReceivedResponseTO response);
/**
@@ -90,7 +91,7 @@ public interface SAML2SPService extends JAXRSService {
*/
@POST
@Path("logoutRequest")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
SAML2RequestTO createLogoutRequest(@QueryParam("spEntityID") String spEntityID);
/**
@@ -102,7 +103,7 @@ public interface SAML2SPService extends JAXRSService {
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@POST
@Path("logoutResponse")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void validateLogoutResponse(SAML2ReceivedResponseTO response);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
----------------------------------------------------------------------
diff --git a/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java b/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
index 353ea34..5e3e4ec 100644
--- a/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
+++ b/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
@@ -30,6 +30,7 @@ import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.scim.SCIMConf;
/**
@@ -48,7 +49,7 @@ public interface SCIMConfService extends JAXRSService {
* @return SCIM configuration
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
SCIMConf get();
/**
@@ -59,7 +60,7 @@ public interface SCIMConfService extends JAXRSService {
@ApiResponses(
@ApiResponse(responseCode = "204", description = "Operation was successful"))
@PUT
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void set(@NotNull SCIMConf conf);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/ext/swagger-ui/pom.xml
----------------------------------------------------------------------
diff --git a/ext/swagger-ui/pom.xml b/ext/swagger-ui/pom.xml
index d4226ec..4cc31ea 100644
--- a/ext/swagger-ui/pom.xml
+++ b/ext/swagger-ui/pom.xml
@@ -40,9 +40,18 @@ under the License.
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
- <artifactId>jackson-dataformat-yaml</artifactId>
+ <artifactId>jackson-dataformat-xml</artifactId>
</dependency>
-
+ <dependency>
+ <groupId>com.fasterxml.jackson.datatype</groupId>
+ <artifactId>jackson-datatype-joda</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ </dependency>
+
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/fit/core-reference/src/main/resources/jboss/restCXFContext.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/resources/jboss/restCXFContext.xml b/fit/core-reference/src/main/resources/jboss/restCXFContext.xml
index 6d24b66..3120c81 100644
--- a/fit/core-reference/src/main/resources/jboss/restCXFContext.xml
+++ b/fit/core-reference/src/main/resources/jboss/restCXFContext.xml
@@ -65,6 +65,8 @@ under the License.
<property name="mapper" ref="jacksonObjectMapper"/>
</bean>
+ <bean id="yamlProvider" class="com.fasterxml.jackson.jaxrs.yaml.JacksonJaxbYAMLProvider"/>
+
<bean id="exceptionMapper" class="org.apache.syncope.core.rest.cxf.RestServiceExceptionMapper"/>
<bean id="validationProvider" class="org.apache.cxf.validation.BeanValidationProvider"/>
@@ -169,6 +171,7 @@ under the License.
<ref bean="dateParamConverterProvider"/>
<ref bean="jaxbProvider"/>
<ref bean="jsonProvider"/>
+ <ref bean="yamlProvider"/>
<ref bean="exceptionMapper"/>
<ref bean="searchContextProvider"/>
<ref bean="addDomainFilter"/>
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 492dd78..d08a94a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -767,17 +767,6 @@ under the License.
<version>${jackson.version}</version>
</dependency>
<dependency>
- <groupId>com.fasterxml.jackson.datatype</groupId>
- <artifactId>jackson-datatype-joda</artifactId>
- <version>${jackson.version}</version>
- <exclusions>
- <exclusion>
- <groupId>joda-time</groupId>
- <artifactId>joda-time</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
@@ -788,13 +777,13 @@ under the License.
<version>${jackson.version}</version>
</dependency>
<dependency>
- <groupId>com.fasterxml.jackson.module</groupId>
- <artifactId>jackson-module-afterburner</artifactId>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-yaml-provider</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
- <groupId>com.fasterxml.jackson.dataformat</groupId>
- <artifactId>jackson-dataformat-yaml</artifactId>
+ <groupId>com.fasterxml.jackson.module</groupId>
+ <artifactId>jackson-module-afterburner</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
@@ -822,6 +811,17 @@ under the License.
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.datatype</groupId>
+ <artifactId>jackson-datatype-joda</artifactId>
+ <version>${jackson.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>joda-time</groupId>
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/src/main/asciidoc/reference-guide/architecture/core.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/reference-guide/architecture/core.adoc b/src/main/asciidoc/reference-guide/architecture/core.adoc
index 32ad164..33a7035 100644
--- a/src/main/asciidoc/reference-guide/architecture/core.adoc
+++ b/src/main/asciidoc/reference-guide/architecture/core.adoc
@@ -37,7 +37,7 @@ which enables in-browser access to all the REST endpoints defined.
At a technical level, the RESTful interface is a fully-compliant
https://en.wikipedia.org/wiki/Java_API_for_RESTful_Web_Services[JAX-RS 2.0^] implementation based on
-http://cxf.apache.org[Apache CXF^], natively dealing both with JSON and XML payloads.
+http://cxf.apache.org[Apache CXF^], natively dealing either with JSON, YAML and XML payloads.
More details are available in the dedicated <<restful-services,usage>> section.
http://git-wip-us.apache.org/repos/asf/syncope/blob/7ba76588/src/site/xdoc/building.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/building.xml b/src/site/xdoc/building.xml
index 2c63fcd..cef7d28 100644
--- a/src/site/xdoc/building.xml
+++ b/src/site/xdoc/building.xml
@@ -89,10 +89,12 @@ under the License.
integration tests are run by default; in order to run them all, anyway, a specific build profile is provided.
<source>$ mvn clean verify -Pfull-it,all</source>
- <h4>application/xml</h4>
+ <h4>Other Content-Type values</h4>
By default, integration tests are run using <code>application/json</code> for both <code>Accept</code> and
- <code>Content-Type</code> HTTP headers; it is possible, however, to use <code>application/xml</code>.
+ <code>Content-Type</code> HTTP headers; it is possible, however, to use <code>application/xml</code> or
+ <code>application/yaml</code>.
<source>$ mvn clean verify -DjaxrsContentType=application/xml</source>
+ <source>$ mvn clean verify -DjaxrsContentType=application/yaml</source>
<h4>Debug</h4>
Starts the full environment used by integration tests (with same components available when running new project
[2/5] syncope git commit: [SYNCOPE-1289] YAML support provided
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java
index a942001..79768a9 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java
@@ -37,6 +37,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.MailTemplateTO;
import org.apache.syncope.common.lib.types.MailTemplateFormat;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -45,8 +46,8 @@ import org.apache.syncope.common.rest.api.RESTHeaders;
* REST operations for mail templates.
*/
@Api(tags = "MailTemplates", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("mailTemplates")
public interface MailTemplateService extends JAXRSService {
@@ -56,7 +57,7 @@ public interface MailTemplateService extends JAXRSService {
* @return list of all mail templates.
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<MailTemplateTO> list();
/**
@@ -69,12 +70,12 @@ public interface MailTemplateService extends JAXRSService {
@ApiResponse(code = 201,
message = "MailTemplate successfully created", responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "Key value for the entity created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "Key value for the entity created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull MailTemplateTO mailTemplateTO);
/**
@@ -85,7 +86,7 @@ public interface MailTemplateService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
MailTemplateTO read(@NotNull @PathParam("key") String key);
/**
@@ -97,7 +98,7 @@ public interface MailTemplateService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
/**
@@ -124,7 +125,7 @@ public interface MailTemplateService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
@Path("{key}/{format}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void setFormat(
@NotNull @PathParam("key") String key,
@NotNull @PathParam("format") MailTemplateFormat format,
@@ -140,7 +141,7 @@ public interface MailTemplateService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}/{format}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void removeFormat(
@NotNull @PathParam("key") String key,
@NotNull @PathParam("format") MailTemplateFormat format);
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
index 5015f7e..74e33cc 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
@@ -37,6 +37,7 @@ import javax.ws.rs.QueryParam;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.JobTO;
import org.apache.syncope.common.lib.to.NotificationTO;
import org.apache.syncope.common.lib.types.JobAction;
@@ -46,8 +47,8 @@ import org.apache.syncope.common.rest.api.RESTHeaders;
* REST operations for notifications.
*/
@Api(tags = "Notifications", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("notifications")
public interface NotificationService extends JAXRSService {
@@ -60,7 +61,7 @@ public interface NotificationService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
NotificationTO read(@NotNull @PathParam("key") String key);
/**
@@ -69,7 +70,7 @@ public interface NotificationService extends JAXRSService {
* @return list of all notifications.
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<NotificationTO> list();
/**
@@ -82,12 +83,12 @@ public interface NotificationService extends JAXRSService {
@ApiResponse(code = 201,
message = "Notification successfully created", responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "UUID generated for the entity created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "UUID generated for the entity created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull NotificationTO notificationTO);
/**
@@ -99,8 +100,8 @@ public interface NotificationService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull NotificationTO notificationTO);
/**
@@ -112,7 +113,7 @@ public interface NotificationService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
/**
@@ -122,7 +123,7 @@ public interface NotificationService extends JAXRSService {
*/
@GET
@Path("job")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
JobTO getJob();
/**
@@ -134,6 +135,6 @@ public interface NotificationService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@POST
@Path("job")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void actionJob(@QueryParam("action") JobAction action);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
index def5145..c2d604b 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
@@ -36,6 +36,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.policy.PolicyTO;
import org.apache.syncope.common.lib.types.PolicyType;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -44,8 +45,8 @@ import org.apache.syncope.common.rest.api.RESTHeaders;
* REST operations for policies.
*/
@Api(tags = "Policies", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("policies")
public interface PolicyService extends JAXRSService {
@@ -59,7 +60,7 @@ public interface PolicyService extends JAXRSService {
*/
@GET
@Path("{type}/{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
<T extends PolicyTO> T read(@NotNull @PathParam("type") PolicyType type, @NotNull @PathParam("key") String key);
/**
@@ -71,7 +72,7 @@ public interface PolicyService extends JAXRSService {
*/
@GET
@Path("{type}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
<T extends PolicyTO> List<T> list(@NotNull @PathParam("type") PolicyType type);
/**
@@ -85,13 +86,13 @@ public interface PolicyService extends JAXRSService {
@ApiResponse(code = 201,
message = "Policy successfully created", responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "UUID generated for the entity created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "UUID generated for the entity created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
description = "URL of the entity created") }))
@POST
@Path("{type}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull @PathParam("type") PolicyType type, @NotNull PolicyTO policyTO);
/**
@@ -104,8 +105,8 @@ public interface PolicyService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
@Path("{type}/{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull @PathParam("type") PolicyType type, @NotNull PolicyTO policyTO);
/**
@@ -118,7 +119,7 @@ public interface PolicyService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{type}/{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("type") PolicyType type, @NotNull @PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RealmService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RealmService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RealmService.java
index 4e0751e..0aafcc2 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RealmService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RealmService.java
@@ -38,6 +38,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.ProvisioningResult;
import org.apache.syncope.common.lib.to.RealmTO;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -46,8 +47,8 @@ import org.apache.syncope.common.rest.api.RESTHeaders;
* REST operations for realms.
*/
@Api(tags = "Realms", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("realms")
public interface RealmService extends JAXRSService {
@@ -57,7 +58,7 @@ public interface RealmService extends JAXRSService {
* @return list of all realms.
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<RealmTO> list();
/**
@@ -68,7 +69,7 @@ public interface RealmService extends JAXRSService {
*/
@GET
@Path("{fullPath:.*}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<RealmTO> list(@NotNull @PathParam("fullPath") String fullPath);
/**
@@ -83,8 +84,8 @@ public interface RealmService extends JAXRSService {
@ApiImplicitParam(name = RESTHeaders.PREFER, paramType = "header", dataType = "string",
value = "Allows the client to specify a preference for the result to be returned from the server",
defaultValue = "return-content", allowableValues = "return-content, return-no-content",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
value = "If 'true', instructs the propagation process not to wait for completion when communicating"
+ " with External Resources with no priority set",
defaultValue = "false", allowEmptyValue = true) })
@@ -94,16 +95,16 @@ public interface RealmService extends JAXRSService {
+ "or empty if 'Prefer: return-no-content' was specified",
response = ProvisioningResult.class, responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "UUID generated for the realm created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
- description = "URL of the realm created")
- , @ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
+ description = "UUID generated for the realm created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "URL of the realm created"),
+ @ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
+ "client about the fact that a specified preference was applied") }))
@POST
@Path("{parentPath:.*}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull @PathParam("parentPath") String parentPath, @NotNull RealmTO realmTO);
/**
@@ -116,24 +117,24 @@ public interface RealmService extends JAXRSService {
@ApiImplicitParam(name = RESTHeaders.PREFER, paramType = "header", dataType = "string",
value = "Allows the client to specify a preference for the result to be returned from the server",
defaultValue = "return-content", allowableValues = "return-content, return-no-content",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
value = "If 'true', instructs the propagation process not to wait for completion when communicating"
+ " with External Resources with no priority set",
defaultValue = "false", allowEmptyValue = true) })
@ApiResponses({
@ApiResponse(code = 200,
message = "Realm successfully updated enriched with propagation status information, as Entity",
- response = ProvisioningResult.class)
- , @ApiResponse(code = 204,
+ response = ProvisioningResult.class),
+ @ApiResponse(code = 204,
message = "No content if 'Prefer: return-no-content' was specified", responseHeaders =
@ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
+ "client about the fact that a specified preference was applied")) })
@PUT
@Path("{fullPath:.*}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response update(@NotNull RealmTO realmTO);
/**
@@ -146,22 +147,22 @@ public interface RealmService extends JAXRSService {
@ApiImplicitParam(name = RESTHeaders.PREFER, paramType = "header", dataType = "string",
value = "Allows the client to specify a preference for the result to be returned from the server",
defaultValue = "return-content", allowableValues = "return-content, return-no-content",
- allowEmptyValue = true)
- , @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
+ allowEmptyValue = true),
+ @ApiImplicitParam(name = RESTHeaders.NULL_PRIORITY_ASYNC, paramType = "header", dataType = "boolean",
value = "If 'true', instructs the propagation process not to wait for completion when communicating"
+ " with External Resources with no priority set",
defaultValue = "false", allowEmptyValue = true) })
@ApiResponses({
@ApiResponse(code = 200,
message = "Realm successfully deleted enriched with propagation status information, as Entity",
- response = ProvisioningResult.class)
- , @ApiResponse(code = 204,
+ response = ProvisioningResult.class),
+ @ApiResponse(code = 204,
message = "No content if 'Prefer: return-no-content' was specified", responseHeaders =
@ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
+ "client about the fact that a specified preference was applied")) })
@DELETE
@Path("{fullPath:.*}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response delete(@NotNull @PathParam("fullPath") String fullPath);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java
index db20a97..2cadb77 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java
@@ -36,6 +36,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.RelationshipTypeTO;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -43,8 +44,8 @@ import org.apache.syncope.common.rest.api.RESTHeaders;
* REST operations for relationship types.
*/
@Api(tags = "RelationshipTypes", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("relationshipTypes")
public interface RelationshipTypeService extends JAXRSService {
@@ -54,7 +55,7 @@ public interface RelationshipTypeService extends JAXRSService {
* @return list of all relationshipTypes.
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<RelationshipTypeTO> list();
/**
@@ -65,7 +66,7 @@ public interface RelationshipTypeService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
RelationshipTypeTO read(@NotNull @PathParam("key") String key);
/**
@@ -78,12 +79,12 @@ public interface RelationshipTypeService extends JAXRSService {
@ApiResponse(code = 201,
message = "RelationshipType successfully created", responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "Key value for the entity created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "Key value for the entity created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull RelationshipTypeTO relationshipTypeTO);
/**
@@ -95,8 +96,8 @@ public interface RelationshipTypeService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull RelationshipTypeTO relationshipTypeTO);
/**
@@ -108,6 +109,6 @@ public interface RelationshipTypeService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
index a07ef24..5bab18e 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
@@ -37,6 +37,7 @@ import javax.ws.rs.QueryParam;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.ReportTO;
import org.apache.syncope.common.lib.types.ReportExecExportFormat;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -45,8 +46,8 @@ import org.apache.syncope.common.rest.api.RESTHeaders;
* REST operations for reports.
*/
@Api(tags = "Reports", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("reports")
public interface ReportService extends ExecutableService {
@@ -58,7 +59,7 @@ public interface ReportService extends ExecutableService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
ReportTO read(@NotNull @PathParam("key") String key);
/**
@@ -67,7 +68,7 @@ public interface ReportService extends ExecutableService {
* @return paged list of existing reports matching the given query
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<ReportTO> list();
/**
@@ -80,12 +81,12 @@ public interface ReportService extends ExecutableService {
@ApiResponse(code = 201,
message = "Report successfully created", responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "UUID generated for the entity created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "UUID generated for the entity created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull ReportTO reportTO);
/**
@@ -97,8 +98,8 @@ public interface ReportService extends ExecutableService {
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull ReportTO reportTO);
/**
@@ -110,7 +111,7 @@ public interface ReportService extends ExecutableService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
/**
@@ -122,7 +123,7 @@ public interface ReportService extends ExecutableService {
*/
@GET
@Path("executions/{executionKey}/stream")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response exportExecutionResult(
@NotNull @PathParam("executionKey") String executionKey,
@QueryParam("format") ReportExecExportFormat fmt);
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java
index da81fa2..8364447 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java
@@ -37,6 +37,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.ReportTemplateTO;
import org.apache.syncope.common.lib.types.ReportTemplateFormat;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -45,8 +46,8 @@ import org.apache.syncope.common.rest.api.RESTHeaders;
* REST operations for report templates.
*/
@Api(tags = "ReportTemplates", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("reportTemplates")
public interface ReportTemplateService extends JAXRSService {
@@ -56,7 +57,7 @@ public interface ReportTemplateService extends JAXRSService {
* @return list of all report templates.
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<ReportTemplateTO> list();
/**
@@ -69,11 +70,11 @@ public interface ReportTemplateService extends JAXRSService {
@ApiResponse(code = 201,
message = "ReportTemplate successfully created", responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "Key value for the entity created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "Key value for the entity created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull ReportTemplateTO reportTemplateTO);
/**
@@ -84,7 +85,7 @@ public interface ReportTemplateService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
ReportTemplateTO read(@NotNull @PathParam("key") String key);
/**
@@ -96,7 +97,7 @@ public interface ReportTemplateService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
/**
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java
index 76e38df..6a83961 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java
@@ -31,14 +31,15 @@ import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.ResourceHistoryConfTO;
/**
* REST operations for resource configuration versioning.
*/
@Api(tags = "ResourceHistory", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("resourcesHistory")
public interface ResourceHistoryService extends JAXRSService {
@@ -50,7 +51,7 @@ public interface ResourceHistoryService extends JAXRSService {
*/
@GET
@Path("{resourceKey}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<ResourceHistoryConfTO> list(@NotNull @PathParam("resourceKey") String resourceKey);
/**
@@ -62,7 +63,7 @@ public interface ResourceHistoryService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@POST
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void restore(@NotNull @PathParam("key") String key);
/**
@@ -74,6 +75,6 @@ public interface ResourceHistoryService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
index 758947f..1f2da67 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
@@ -37,6 +37,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.patch.ResourceDeassociationPatch;
import org.apache.syncope.common.lib.to.BulkActionResult;
import org.apache.syncope.common.lib.to.ConnObjectTO;
@@ -49,8 +50,8 @@ import org.apache.syncope.common.rest.api.beans.ConnObjectTOListQuery;
* REST operations for external resources.
*/
@Api(tags = "Resources", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("resources")
public interface ResourceService extends JAXRSService {
@@ -64,7 +65,7 @@ public interface ResourceService extends JAXRSService {
*/
@GET
@Path("{key}/{anyTypeKey}/{anyKey}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
ConnObjectTO readConnObject(
@NotNull @PathParam("key") String key,
@NotNull @PathParam("anyTypeKey") String anyTypeKey,
@@ -81,7 +82,7 @@ public interface ResourceService extends JAXRSService {
*/
@GET
@Path("{key}/{anyTypeKey}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
PagedConnObjectTOResult listConnObjects(
@NotNull @PathParam("key") String key,
@NotNull @PathParam("anyTypeKey") String anyTypeKey,
@@ -95,7 +96,7 @@ public interface ResourceService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
ResourceTO read(@NotNull @PathParam("key") String key);
/**
@@ -104,7 +105,7 @@ public interface ResourceService extends JAXRSService {
* @return list of all resources
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<ResourceTO> list();
/**
@@ -117,12 +118,12 @@ public interface ResourceService extends JAXRSService {
@ApiResponse(code = 201,
message = "Resource successfully created", responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "Key value for the entity created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "Key value for the entity created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull ResourceTO resourceTO);
/**
@@ -134,8 +135,8 @@ public interface ResourceService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull ResourceTO resourceTO);
/**
@@ -149,7 +150,7 @@ public interface ResourceService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@POST
@Path("{key}/{anyTypeKey}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void setLatestSyncToken(
@NotNull @PathParam("key") String key,
@NotNull @PathParam("anyTypeKey") String anyTypeKey);
@@ -164,7 +165,7 @@ public interface ResourceService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}/{anyTypeKey}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void removeSyncToken(
@NotNull @PathParam("key") String key,
@NotNull @PathParam("anyTypeKey") String anyTypeKey);
@@ -178,8 +179,8 @@ public interface ResourceService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
/**
@@ -191,8 +192,8 @@ public interface ResourceService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@POST
@Path("check")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void check(@NotNull ResourceTO resourceTO);
/**
@@ -203,7 +204,7 @@ public interface ResourceService extends JAXRSService {
*/
@POST
@Path("{key}/bulkDeassociation/{anyTypeKey}/{action}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
BulkActionResult bulkDeassociation(@NotNull ResourceDeassociationPatch patch);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
index fe65840..ec6439f 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
@@ -37,6 +37,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.RoleTO;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -44,8 +45,8 @@ import org.apache.syncope.common.rest.api.RESTHeaders;
* REST operations for roles.
*/
@Api(tags = "Roles", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("roles")
public interface RoleService extends JAXRSService {
@@ -55,7 +56,7 @@ public interface RoleService extends JAXRSService {
* @return list of all roles.
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<RoleTO> list();
/**
@@ -66,7 +67,7 @@ public interface RoleService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
RoleTO read(@NotNull @PathParam("key") String key);
/**
@@ -79,12 +80,12 @@ public interface RoleService extends JAXRSService {
@ApiResponse(code = 201,
message = "Role successfully created", responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "Key value for the entity created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "Key value for the entity created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull RoleTO roleTO);
/**
@@ -96,8 +97,8 @@ public interface RoleService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull RoleTO roleTO);
/**
@@ -109,7 +110,7 @@ public interface RoleService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
/**
@@ -134,7 +135,7 @@ public interface RoleService extends JAXRSService {
@PUT
@Path("{key}/consoleLayout")
@Consumes({ MediaType.APPLICATION_JSON })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void setConsoleLayoutInfo(@NotNull @PathParam("key") String key, InputStream consoleLayoutInfoIn);
/**
@@ -146,6 +147,6 @@ public interface RoleService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}/consoleLayout")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void removeConsoleLayoutInfo(@NotNull @PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
index d8bf9dc..f1f8ae1 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
@@ -37,6 +37,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.SchemaTO;
import org.apache.syncope.common.lib.types.SchemaType;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -46,8 +47,8 @@ import org.apache.syncope.common.rest.api.beans.SchemaQuery;
* REST operations for attribute schemas.
*/
@Api(tags = "Schemas", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("schemas")
public interface SchemaService extends JAXRSService {
@@ -61,7 +62,7 @@ public interface SchemaService extends JAXRSService {
*/
@GET
@Path("{type}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
<T extends SchemaTO> List<T> search(@BeanParam SchemaQuery query);
/**
@@ -74,7 +75,7 @@ public interface SchemaService extends JAXRSService {
*/
@GET
@Path("{type}/{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
<T extends SchemaTO> T read(
@NotNull @PathParam("type") SchemaType type, @NotNull @PathParam("key") String key);
@@ -89,13 +90,13 @@ public interface SchemaService extends JAXRSService {
@ApiResponse(code = 201,
message = "Schema successfully created", responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "Key value for the entity created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "Key value for the entity created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
description = "URL of the entity created") }))
@POST
@Path("{type}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull @PathParam("type") SchemaType type, @NotNull SchemaTO schemaTO);
/**
@@ -108,8 +109,8 @@ public interface SchemaService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
@Path("{type}/{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull @PathParam("type") SchemaType type, @NotNull SchemaTO schemaTO);
/**
@@ -122,6 +123,6 @@ public interface SchemaService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{type}/{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("type") SchemaType type, @NotNull @PathParam("key") String key);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
index b19f07f..64f3980 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
@@ -36,6 +36,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.SecurityQuestionTO;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -43,8 +44,8 @@ import org.apache.syncope.common.rest.api.RESTHeaders;
* REST operations for configuration.
*/
@Api(tags = "SecurityQuestions", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("securityQuestions")
public interface SecurityQuestionService extends JAXRSService {
@@ -54,7 +55,7 @@ public interface SecurityQuestionService extends JAXRSService {
* @return list of all security questions
*/
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
List<SecurityQuestionTO> list();
/**
@@ -65,7 +66,7 @@ public interface SecurityQuestionService extends JAXRSService {
*/
@GET
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
SecurityQuestionTO read(@NotNull @PathParam("key") String key);
/**
@@ -78,12 +79,12 @@ public interface SecurityQuestionService extends JAXRSService {
@ApiResponse(code = 201,
message = "SecurityQuestion successfully created", responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "UUID generated for the entity created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "UUID generated for the entity created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
description = "URL of the entity created") }))
@POST
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull SecurityQuestionTO securityQuestionTO);
/**
@@ -95,8 +96,8 @@ public interface SecurityQuestionService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
@Path("{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull SecurityQuestionTO securityQuestionTO);
/**
@@ -108,7 +109,7 @@ public interface SecurityQuestionService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
/**
@@ -119,7 +120,7 @@ public interface SecurityQuestionService extends JAXRSService {
*/
@GET
@Path("byUser/{username}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
SecurityQuestionTO readByUser(@NotNull @PathParam("username") String username);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SyncopeService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SyncopeService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SyncopeService.java
index 53d4bec..818f36d 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SyncopeService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SyncopeService.java
@@ -30,6 +30,7 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.info.NumbersInfo;
import org.apache.syncope.common.lib.info.SystemInfo;
import org.apache.syncope.common.lib.info.PlatformInfo;
@@ -41,8 +42,8 @@ import org.apache.syncope.common.lib.to.TypeExtensionTO;
* General info about this Apache Syncope deployment.
*/
@Api(tags = "Syncope", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("")
public interface SyncopeService extends JAXRSService {
@@ -55,7 +56,7 @@ public interface SyncopeService extends JAXRSService {
*/
@GET
@Path("/platform")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
PlatformInfo platform();
/**
@@ -65,7 +66,7 @@ public interface SyncopeService extends JAXRSService {
*/
@GET
@Path("/system")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
SystemInfo system();
/** *
@@ -75,7 +76,7 @@ public interface SyncopeService extends JAXRSService {
*/
@GET
@Path("/numbers")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
NumbersInfo numbers();
/**
@@ -91,7 +92,7 @@ public interface SyncopeService extends JAXRSService {
*/
@POST
@Path("/assignableGroups/{realm:.*}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
PagedResult<GroupTO> searchAssignableGroups(
@NotNull @PathParam("realm") String realm,
@QueryParam("term") String term,
@@ -106,7 +107,6 @@ public interface SyncopeService extends JAXRSService {
*/
@GET
@Path("/userTypeExtension/{groupName}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- TypeExtensionTO readUserTypeExtension(
- @NotNull @PathParam("groupName") String groupName);
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ TypeExtensionTO readUserTypeExtension(@NotNull @PathParam("groupName") String groupName);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
index 740d961..b883518 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
@@ -38,6 +38,7 @@ import javax.ws.rs.QueryParam;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.TaskTO;
import org.apache.syncope.common.lib.to.BulkAction;
import org.apache.syncope.common.lib.to.BulkActionResult;
@@ -51,8 +52,8 @@ import org.apache.syncope.common.rest.api.beans.TaskQuery;
* REST operations for tasks.
*/
@Api(tags = "Tasks", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@Path("tasks")
public interface TaskService extends ExecutableService {
@@ -67,7 +68,7 @@ public interface TaskService extends ExecutableService {
*/
@GET
@Path("{type}/{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
<T extends TaskTO> T read(
@NotNull @PathParam("type") TaskType type,
@NotNull @PathParam("key") String key,
@@ -82,7 +83,7 @@ public interface TaskService extends ExecutableService {
*/
@GET
@Path("{type}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
<T extends TaskTO> PagedResult<T> search(@BeanParam TaskQuery query);
/**
@@ -96,13 +97,13 @@ public interface TaskService extends ExecutableService {
@ApiResponse(code = 201,
message = "Task successfully created", responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "UUID generated for the entity created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "UUID generated for the entity created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
description = "URL of the entity created") }))
@POST
@Path("{type}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull @PathParam("type") TaskType type, @NotNull SchedTaskTO taskTO);
/**
@@ -115,8 +116,8 @@ public interface TaskService extends ExecutableService {
@ApiResponse(code = 204, message = "Operation was successful"))
@PUT
@Path("{type}/{key}")
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void update(@NotNull @PathParam("type") TaskType type, @NotNull SchedTaskTO taskTO);
/**
@@ -129,7 +130,7 @@ public interface TaskService extends ExecutableService {
@ApiResponse(code = 204, message = "Operation was successful"))
@DELETE
@Path("{type}/{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("type") TaskType type, @NotNull @PathParam("key") String key);
/**
@@ -140,7 +141,7 @@ public interface TaskService extends ExecutableService {
*/
@POST
@Path("bulk")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
BulkActionResult bulk(@NotNull BulkAction bulkAction);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/3983e2f3/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
index 3ac6cf5..c2f8e27 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
@@ -40,6 +40,7 @@ import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.apache.cxf.jaxrs.ext.PATCH;
+import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.patch.StatusPatch;
import org.apache.syncope.common.lib.patch.UserPatch;
import org.apache.syncope.common.lib.to.ProvisioningResult;
@@ -59,19 +60,18 @@ public interface UserSelfService extends JAXRSService {
* @return calling user data, including own UUID and entitlements
*/
@ApiOperation(value = "", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@ApiResponses(
@ApiResponse(code = 200, message = "Calling user data, including own UUID and entitlements",
response = UserTO.class, responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "UUID of the calling user")
- ,
+ description = "UUID of the calling user"),
@ResponseHeader(name = RESTHeaders.OWNED_ENTITLEMENTS, response = String.class,
description = "List of entitlements owned by the calling user")
}))
@GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response read();
/**
@@ -93,15 +93,15 @@ public interface UserSelfService extends JAXRSService {
+ "or empty if 'Prefer: return-no-content' was specified",
response = ProvisioningResult.class, responseHeaders = {
@ResponseHeader(name = RESTHeaders.RESOURCE_KEY, response = String.class,
- description = "UUID generated for the user created")
- , @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
- description = "URL of the user created")
- , @ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
+ description = "UUID generated for the user created"),
+ @ResponseHeader(name = HttpHeaders.LOCATION, response = String.class,
+ description = "URL of the user created"),
+ @ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
+ "client about the fact that a specified preference was applied") }))
@POST
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response create(@NotNull UserTO userTO,
@DefaultValue("true") @QueryParam("storePassword") boolean storePassword);
@@ -112,8 +112,8 @@ public interface UserSelfService extends JAXRSService {
* @return Response object featuring the updated user
*/
@ApiOperation(value = "", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@ApiImplicitParams(
@ApiImplicitParam(name = RESTHeaders.PREFER, paramType = "header", dataType = "string",
value = "Allows the client to specify a preference for the result to be returned from the server",
@@ -122,16 +122,16 @@ public interface UserSelfService extends JAXRSService {
@ApiResponses({
@ApiResponse(code = 200,
message = "User successfully updated enriched with propagation status information, as Entity",
- response = ProvisioningResult.class)
- , @ApiResponse(code = 204,
+ response = ProvisioningResult.class),
+ @ApiResponse(code = 204,
message = "No content if 'Prefer: return-no-content' was specified", responseHeaders =
@ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
+ "client about the fact that a specified preference was applied")) })
@PATCH
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response update(@NotNull UserPatch patch);
/**
@@ -141,8 +141,8 @@ public interface UserSelfService extends JAXRSService {
* @return Response object featuring the updated user
*/
@ApiOperation(value = "", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@ApiImplicitParams(
@ApiImplicitParam(name = RESTHeaders.PREFER, paramType = "header", dataType = "string",
value = "Allows the client to specify a preference for the result to be returned from the server",
@@ -151,16 +151,16 @@ public interface UserSelfService extends JAXRSService {
@ApiResponses({
@ApiResponse(code = 200,
message = "User successfully updated enriched with propagation status information, as Entity",
- response = ProvisioningResult.class)
- , @ApiResponse(code = 204,
+ response = ProvisioningResult.class),
+ @ApiResponse(code = 204,
message = "No content if 'Prefer: return-no-content' was specified", responseHeaders =
@ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
+ "client about the fact that a specified preference was applied")) })
@PUT
@Path("{key}")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response update(@NotNull UserTO user);
/**
@@ -170,8 +170,8 @@ public interface UserSelfService extends JAXRSService {
* @return Response object featuring the updated user enriched with propagation status information
*/
@ApiOperation(value = "", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@ApiImplicitParams(
@ApiImplicitParam(name = RESTHeaders.PREFER, paramType = "header", dataType = "string",
value = "Allows the client to specify a preference for the result to be returned from the server",
@@ -180,16 +180,16 @@ public interface UserSelfService extends JAXRSService {
@ApiResponses({
@ApiResponse(code = 200,
message = "User successfully updated enriched with propagation status information, as Entity",
- response = ProvisioningResult.class)
- , @ApiResponse(code = 204,
+ response = ProvisioningResult.class),
+ @ApiResponse(code = 204,
message = "No content if 'Prefer: return-no-content' was specified", responseHeaders =
@ResponseHeader(name = RESTHeaders.PREFERENCE_APPLIED, response = String.class,
description = "Allows the server to inform the "
+ "client about the fact that a specified preference was applied")) })
@POST
@Path("{key}/status")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Consumes({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response status(@NotNull StatusPatch statusPatch);
/**
@@ -198,10 +198,10 @@ public interface UserSelfService extends JAXRSService {
* @return Response object featuring the deleted user
*/
@ApiOperation(value = "", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@DELETE
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response delete();
/**
@@ -212,11 +212,11 @@ public interface UserSelfService extends JAXRSService {
* @return Response object featuring the updated user
*/
@ApiOperation(value = "", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Authorization(value = "BasicAuthentication"),
+ @Authorization(value = "Bearer") })
@POST
@Path("changePassword")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
Response changePassword(String password);
/**
@@ -231,7 +231,7 @@ public interface UserSelfService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@POST
@Path("requestPasswordReset")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void requestPasswordReset(@NotNull @QueryParam("username") String username, String securityAnswer);
/**
@@ -247,6 +247,6 @@ public interface UserSelfService extends JAXRSService {
@ApiResponse(code = 204, message = "Operation was successful"))
@POST
@Path("confirmPasswordReset")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, SyncopeConstants.APPLICATION_YAML, MediaType.APPLICATION_XML })
void confirmPasswordReset(@NotNull @QueryParam("token") String token, String password);
}