Skip to content

Commit

Permalink
Move client and server logic out of scim-common and into respective m…
Browse files Browse the repository at this point in the history
…odules

* Moved scim-tools-common to scim-tools

NOTE: It's possible that the custom error handling classes that live in common could be replaced with similar classes in scim-spec-protocol & scim-spec-schema
  • Loading branch information
bdemers committed Jul 26, 2022
1 parent 26452c4 commit b7f6e69
Show file tree
Hide file tree
Showing 35 changed files with 43 additions and 412 deletions.
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Copyright 2018-Present The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).

Files located in scim-common-ws/src/main/java/org/apache/directory/scim/ws/common/ were copied
Files located in scim-client/src/main/java/org/apache/directory/scim/client/rest/ were copied
from https://github.com/PennState/commons-jaxrs and retain the original copyright.

14 changes: 1 addition & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,11 @@
</properties>

<modules>
<module>scim-common-ws</module>
<module>scim-client</module>
<module>scim-server</module>
<module>scim-spec</module>
<module>scim-tools</module>
<module>scim-compliance</module>
<module>scim-common</module>
<module>scim-coverage</module>
</modules>

Expand All @@ -66,7 +64,7 @@
<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>

Expand Down Expand Up @@ -119,16 +117,6 @@
<artifactId>scim-spec-schema</artifactId>
<version>2.23-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.directory.scim</groupId>
<artifactId>scim-common</artifactId>
<version>2.23-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.directory.scim</groupId>
<artifactId>scim-common-ws</artifactId>
<version>2.23-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.directory.scim</groupId>
<artifactId>scim-tools-common</artifactId>
Expand Down
8 changes: 0 additions & 8 deletions scim-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.directory.scim</groupId>
<artifactId>scim-common</artifactId>
</dependency>
<dependency>
<groupId>org.apache.directory.scim</groupId>
<artifactId>scim-common-ws</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.directory.scim.ws.common.exception;
package org.apache.directory.scim.client.rest;

import jakarta.ws.rs.ProcessingException;
import jakarta.ws.rs.core.Response;
import org.apache.directory.scim.ws.common.ErrorMessage;

public class BackingStoreChangedException extends Exception {
private static final long serialVersionUID = 7360783673606191576L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.directory.scim.ws.common.exception;
package org.apache.directory.scim.client.rest;

public class BadUrlException extends RuntimeException {
private static final long serialVersionUID = 7360783673606191577L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@
import org.apache.directory.scim.spec.protocol.search.Filter;
import org.apache.directory.scim.spec.protocol.search.SortOrder;
import org.apache.directory.scim.spec.resources.ScimResource;
import org.apache.directory.scim.ws.common.RestCall;
import org.apache.directory.scim.ws.common.RestClientUtil;
import org.apache.directory.scim.ws.common.exception.RestClientException;

public abstract class BaseScimClient<T extends ScimResource> implements AutoCloseable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.directory.scim.ws.common.exception;
package org.apache.directory.scim.client.rest;

import jakarta.ws.rs.ProcessingException;
import jakarta.ws.rs.core.Response;
import org.apache.directory.scim.ws.common.ErrorMessage;

public class ConflictingDataException extends Exception {
private static final long serialVersionUID = 7360783673606191577L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.directory.scim.ws.common;
package org.apache.directory.scim.client.rest;

import java.net.URL;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.directory.scim.ws.common;
package org.apache.directory.scim.client.rest;

import jakarta.ws.rs.core.Response.Status;
import jakarta.xml.bind.annotation.XmlAccessType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@

import org.apache.directory.scim.spec.protocol.ResourceTypesResource;
import org.apache.directory.scim.spec.schema.ResourceType;
import org.apache.directory.scim.ws.common.RestClientUtil;
import org.apache.directory.scim.ws.common.exception.BackingStoreChangedException;
import org.apache.directory.scim.ws.common.exception.ConflictingDataException;
import org.apache.directory.scim.ws.common.exception.RestClientException;
import org.apache.directory.scim.ws.common.exception.RestServerException;
import org.apache.directory.scim.ws.common.exception.ServiceAuthException;

public class ResourceTypesClient implements AutoCloseable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.directory.scim.ws.common;
package org.apache.directory.scim.client.rest;

import jakarta.ws.rs.client.Invocation;
import jakarta.ws.rs.core.Response;
import org.apache.directory.scim.ws.common.exception.RestClientException;

/**
* Corresponds to {@link java.util.function.Function} but specific to REST calls.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.directory.scim.ws.common.exception;
package org.apache.directory.scim.client.rest;

/*
* The Pennsylvania State University © 2016
Expand All @@ -35,7 +35,6 @@

import jakarta.ws.rs.ProcessingException;
import jakarta.ws.rs.core.Response;
import org.apache.directory.scim.ws.common.ErrorMessage;

public class RestClientException extends Exception {
private static final long serialVersionUID = 7360783673606191577L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.directory.scim.ws.common;
package org.apache.directory.scim.client.rest;

import java.util.Optional;
import java.util.function.Consumer;
Expand All @@ -26,12 +26,6 @@
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.Response.Status;
import jakarta.ws.rs.core.Response.Status.Family;
import org.apache.directory.scim.ws.common.exception.BackingStoreChangedException;
import org.apache.directory.scim.ws.common.exception.BadUrlException;
import org.apache.directory.scim.ws.common.exception.ConflictingDataException;
import org.apache.directory.scim.ws.common.exception.RestClientException;
import org.apache.directory.scim.ws.common.exception.RestServerException;
import org.apache.directory.scim.ws.common.exception.ServiceAuthException;

public final class RestClientUtil {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.directory.scim.ws.common.exception;
package org.apache.directory.scim.client.rest;

import jakarta.ws.rs.core.Response;
import org.apache.directory.scim.ws.common.ErrorMessage;

public class RestServerException extends RuntimeException {
private static final long serialVersionUID = 7360783673606191577L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

import org.apache.directory.scim.spec.protocol.data.ListResponse;
import org.apache.directory.scim.spec.resources.ScimGroup;
import org.apache.directory.scim.ws.common.RestCall;

public class ScimGroupClient extends BaseScimClient<ScimGroup> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
import org.apache.directory.scim.spec.protocol.data.PatchRequest;
import org.apache.directory.scim.spec.protocol.exception.ScimException;
import org.apache.directory.scim.spec.resources.ScimUser;
import org.apache.directory.scim.ws.common.RestCall;
import org.apache.directory.scim.ws.common.exception.RestClientException;

// purposefully does not extend BaseScimClient, has a different utility than other clients

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

import org.apache.directory.scim.spec.protocol.data.ListResponse;
import org.apache.directory.scim.spec.resources.ScimUser;
import org.apache.directory.scim.ws.common.RestCall;

public class ScimUserClient extends BaseScimClient<ScimUser> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.directory.scim.ws.common.exception;
package org.apache.directory.scim.client.rest;

import jakarta.ws.rs.core.Response;
import org.apache.directory.scim.ws.common.ErrorMessage;

public class ServiceAuthException extends Exception {
private static final long serialVersionUID = 7360783673606191577L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.directory.scim.ws.common;
package org.apache.directory.scim.client.rest;

import jakarta.ws.rs.core.Response.Status;
import jakarta.xml.bind.annotation.adapters.XmlAdapter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import jakarta.ws.rs.core.MediaType;

import org.apache.directory.scim.client.rest.ScimGroupClient;
import org.apache.directory.scim.ws.common.RestCall;
import org.apache.directory.scim.client.rest.RestCall;

public class Version1ScimGroupClient extends ScimGroupClient {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import jakarta.ws.rs.core.MediaType;

import org.apache.directory.scim.client.rest.ScimUserClient;
import org.apache.directory.scim.ws.common.RestCall;
import org.apache.directory.scim.client.rest.RestCall;

public class Version1ScimUserClient extends ScimUserClient {

Expand Down
72 changes: 0 additions & 72 deletions scim-common-ws/pom.xml

This file was deleted.

41 changes: 0 additions & 41 deletions scim-common/pom.xml

This file was deleted.

Loading

0 comments on commit b7f6e69

Please sign in to comment.