Class BitstreamResourcePolicyUtils
- java.lang.Object
-
- org.dspace.app.rest.submit.factory.impl.BitstreamResourcePolicyUtils
-
public class BitstreamResourcePolicyUtils extends Object
Utility class to reuse methods related to bitstream resource-policies These methods are applicable in the submission when adding or editing bitstreams, and the resource policies have to be applied
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidfindApplyResourcePolicy(org.dspace.core.Context context, Iterator<org.dspace.submit.model.UploadConfiguration> uploadConfigs, org.dspace.content.Bitstream b, List<UploadBitstreamAccessConditionDTO> newAccessConditions)Based on the given access condition, find the resource policy to apply on the given bitstream This function applies the resource policies.static voidfindApplyResourcePolicy(org.dspace.core.Context context, org.dspace.submit.model.UploadConfiguration uploadConfiguration, org.dspace.content.Bitstream b, String name, String description, Date startDate, Date endDate)Based on the given name, find the resource policy to apply on the given bitstream This function applies the resource policies.
-
-
-
Method Detail
-
findApplyResourcePolicy
public static void findApplyResourcePolicy(org.dspace.core.Context context, Iterator<org.dspace.submit.model.UploadConfiguration> uploadConfigs, org.dspace.content.Bitstream b, List<UploadBitstreamAccessConditionDTO> newAccessConditions) throws SQLException, org.dspace.authorize.AuthorizeException, ParseExceptionBased on the given access condition, find the resource policy to apply on the given bitstream This function applies the resource policies.- Parameters:
context- The relevant DSpace Context.uploadConfigs- The configured UploadConfigurationsb- The applicable bitstream whose policies should be determinednewAccessCondition- The access condition containing the details for the desired policies- Throws:
SQLException- If a database error occursorg.dspace.authorize.AuthorizeException- If the user is not authorizedParseException
-
findApplyResourcePolicy
public static void findApplyResourcePolicy(org.dspace.core.Context context, org.dspace.submit.model.UploadConfiguration uploadConfiguration, org.dspace.content.Bitstream b, String name, String description, Date startDate, Date endDate) throws SQLException, org.dspace.authorize.AuthorizeException, ParseExceptionBased on the given name, find the resource policy to apply on the given bitstream This function applies the resource policies. The description, start date and end date are applied as well- Parameters:
context- The relevant DSpace Context.uploadConfigs- The configured UploadConfigurationsb- The applicable bitstream whose policies should be determinedname- The name of the access condition matching the desired policiesdescription- An optional description for the policiesstartDate- An optional start date for the policiesendDate- An optional end date for the policies- Throws:
SQLException- If a database error occursorg.dspace.authorize.AuthorizeException- If the user is not authorizedParseException
-
-