Package org.dspace.submit.model
Class AccessConditionOption
- java.lang.Object
-
- org.dspace.submit.model.AccessConditionOption
-
public class AccessConditionOption extends Object
This class represents an option available in the submission upload section to set permission on a file. An option is defined by a name such as "open access", "embargo", "restricted access", etc. and some optional attributes to better clarify the constraints and input available to the user. For instance an embargo option could allow to set a start date not longer than 3 years, etc- Author:
- Luigi Andrea Pascarelli (luigiandrea.pascarelli at 4science.it)
-
-
Constructor Summary
Constructors Constructor Description AccessConditionOption()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateResourcePolicy(Context context, Bitstream b, String name, String description, Date startDate, Date endDate)Create a new resource policy for a bitstreamStringgetEndDateLimit()Explanation see:endDateLimitStringgetGroupName()BooleangetHasEndDate()BooleangetHasStartDate()StringgetName()StringgetStartDateLimit()Explanation see:startDateLimitvoidsetEndDateLimit(String endDateLimit)voidsetGroupName(String groupName)voidsetHasEndDate(Boolean hasEndDate)voidsetHasStartDate(Boolean hasStartDate)voidsetName(String type)voidsetStartDateLimit(String startDateLimit)
-
-
-
Method Detail
-
getName
public String getName()
-
setName
public void setName(String type)
-
getGroupName
public String getGroupName()
-
setGroupName
public void setGroupName(String groupName)
-
getHasStartDate
public Boolean getHasStartDate()
-
setHasStartDate
public void setHasStartDate(Boolean hasStartDate)
-
getHasEndDate
public Boolean getHasEndDate()
-
setHasEndDate
public void setHasEndDate(Boolean hasEndDate)
-
getStartDateLimit
public String getStartDateLimit()
Explanation see:startDateLimit- Returns:
- startDateLimit
-
setStartDateLimit
public void setStartDateLimit(String startDateLimit)
-
getEndDateLimit
public String getEndDateLimit()
Explanation see:endDateLimit- Returns:
- endDateLimit
-
setEndDateLimit
public void setEndDateLimit(String endDateLimit)
-
createResourcePolicy
public void createResourcePolicy(Context context, Bitstream b, String name, String description, Date startDate, Date endDate) throws SQLException, AuthorizeException, ParseException
Create a new resource policy for a bitstream- Parameters:
context- DSpace contextb- bitstream for which resource policy is createdname- name of the resource policydescription- description of the resource policystartDate- start date of the resource policy. IfgetHasStartDate()returns false, startDate should be null. Otherwise startDate may not be null.endDate- end date of the resource policy. IfgetHasEndDate()returns false, endDate should be null. Otherwise endDate may not be null.- Throws:
SQLExceptionAuthorizeExceptionParseException
-
-