Skip to content

Commit

Permalink
Deprecated COPY and MOVE operations (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbpennel authored and Andrew Woods committed Nov 28, 2018
1 parent 88c704a commit 1374484
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/main/java/org/fcrepo/client/CopyBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@

/**
* Builds a request to copy a resource (and its subtree) to a new location
*
*
* @author bbpennel
* @deprecated the COPY method is not supported by the Fedora 1.0 specification
*/
@Deprecated
public class CopyBuilder extends MoveBuilder {

/**
* Instantiate builder
*
*
* @param sourceUrl uri of the resource
* @param destinationUrl uri for the new path for the moved resource
* @param client the client
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/org/fcrepo/client/FcrepoClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,23 +166,27 @@ public DeleteBuilder delete(final URI url) {
}

/**
* Make a MOVE request to copy a resource (and its subtree) to a new location.
* Make a COPY request to copy a resource (and its subtree) to a new location.
*
* @param source url of the resource to copy
* @param destination url of the location for the copy
* @return a copy request builder object
* @deprecated the COPY method is not supported by the Fedora 1.0 specification
*/
@Deprecated
public CopyBuilder copy(final URI source, final URI destination) {
return new CopyBuilder(source, destination, this);
}

/**
* Make a COPY request to move a resource (and its subtree) to a new location.
* Make a MOVE request to move a resource (and its subtree) to a new location.
*
* @param source url of the resource to move
* @param destination url of the new location for the resource
* @return a move request builder object
* @deprecated the MOVE method is not supported by the Fedora 1.0 specification
*/
@Deprecated
public MoveBuilder move(final URI source, final URI destination) {
return new MoveBuilder(source, destination, this);
}
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/org/fcrepo/client/MoveBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@

/**
* Builds a request to move a resource (and its subtree) to a new location
*
*
* @author bbpennel
* @deprecated the MOVE method is not supported by the Fedora 1.0 specification
*/
@Deprecated
public class MoveBuilder extends RequestBuilder {

/**
* Instantiate builder
*
*
* @param sourceUrl uri of the resource
* @param destinationUrl uri for the new path for the moved resource
* @param client the client
Expand Down
1 change: 1 addition & 0 deletions src/test/java/org/fcrepo/client/MoveBuilderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
/**
* @author bbpennel
*/
@SuppressWarnings("deprecation")
@RunWith(MockitoJUnitRunner.class)
public class MoveBuilderTest {

Expand Down

0 comments on commit 1374484

Please sign in to comment.