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:30 UTC
[3/5] syncope git commit: [SYNCOPE-1289] YAML support provided
[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);
}