mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
D4CRIS-338 change resource name for accesscondition to resourcepolicy
This commit is contained in:
@@ -24,7 +24,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
*/
|
||||
public class ResourcePolicyRest extends BaseObjectRest<Integer> {
|
||||
|
||||
public static final String NAME = "accessCondition";
|
||||
public static final String NAME = "resourcePolicy";
|
||||
public static final String CATEGORY = DirectlyAddressableRestModel.AUTHORIZATION;
|
||||
|
||||
private String name;
|
||||
|
@@ -17,10 +17,10 @@ import org.dspace.app.rest.exception.PaginationException;
|
||||
import org.dspace.app.rest.exception.RepositoryNotFoundException;
|
||||
import org.dspace.app.rest.model.AuthorityRest;
|
||||
import org.dspace.app.rest.model.CommunityRest;
|
||||
import org.dspace.app.rest.model.DirectlyAddressableRestModel;
|
||||
import org.dspace.app.rest.model.LinkRest;
|
||||
import org.dspace.app.rest.model.LinksRest;
|
||||
import org.dspace.app.rest.model.MetadataFieldRest;
|
||||
import org.dspace.app.rest.model.DirectlyAddressableRestModel;
|
||||
import org.dspace.app.rest.model.ResourcePolicyRest;
|
||||
import org.dspace.app.rest.model.hateoas.DSpaceResource;
|
||||
import org.dspace.app.rest.repository.DSpaceRestRepository;
|
||||
import org.dspace.app.rest.repository.LinkRestRepository;
|
||||
@@ -100,6 +100,9 @@ public class Utils {
|
||||
if (modelPlural.equals("authorities")) {
|
||||
return AuthorityRest.NAME;
|
||||
}
|
||||
if (modelPlural.equals("resourcePolicies")) {
|
||||
return ResourcePolicyRest.NAME;
|
||||
}
|
||||
return modelPlural.replaceAll("s$", "");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user