|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ValidityPeriod
The ValidityPeriod
interface provides methods for defining a period of
time that a policy provides principals with access to the documents
that it protects. You can specify the time when the validity period begins, ends, or both.
The validiy period can be expressed using either absolute time values or time values relative to the time that the associated policy is registered.
After you create a ValidyPeriod
object, you can use it to define the
validity period of one or more PolicyEntry
objects.
For information about using this interface as part of creating new policies using the Rights Management Java API,
see the Creating a new policy using the Java API quick start
in Programming with LiveCycle ES4.
Method Summary | |
---|---|
void |
clear()
Removes all settings for the validity period. |
java.util.Date |
getAbsoluteNotAfterDate()
Retrieves the date when the validity period ends. |
java.util.Date |
getAbsoluteNotBeforeDate()
Retrieves the date when the validity period begins. |
int |
getRelativeExpirationDays()
Returns the length of the relative validity period. |
boolean |
isAbsolute()
Returns whether the validity period is relative or absolute. |
void |
setAbsoluteValidityPeriod(java.util.Date notBeforeDate,
java.util.Date notAfterDate)
Sets the validity period using absolute dates. |
void |
setRelativeExpirationDays(int days)
Sets the length of the validity period for policy entries, relative to the time that the associated policies were registered with the Rights Management service. |
Method Detail |
---|
void setRelativeExpirationDays(int days) throws PDRLException
#setAbsoluteValidityPeriod()
method.
If you set the validity period multiple times using either method, the period most recently set takes precedence.
days
- An integer that specifies the number of days that policy entries are valid after the time that the
associated policies were registered with the Rights Management service. The value days
must be a value
between zero and 10000.
PDRLException
- if the specified number of days is not within the valid range.void setAbsoluteValidityPeriod(java.util.Date notBeforeDate, java.util.Date notAfterDate) throws PDRLException
You can also set the validity period using relative dates with #setRelativeExpirationDays()
.
If you set the validity period multiple times using either method, the period most recently set takes precedence.
notBeforeDate
- A java.util.Date
object that defines the beginning of the validity period and null
if the associated policy entry is valid from the time the associated policy is registered with the Rights Management Service.notAfterDate
- A java.util.Date
object that defines the ending of the validity period and null
if the validity period does not end.
PDRLException
- if any of the following conditions are true:
notBeforeDate
and notAfterDate
are null.notBeforeDate
is later than notAfterDate
.notBeforeDate
is earlier than January 1, 1970 00:00:00 GMT. boolean isAbsolute()
int getRelativeExpirationDays()
java.util.Date getAbsoluteNotBeforeDate()
java.util.Date
object that contains the date after which the associated policy entries are valid and null
if no absolute date is set for the beginning of the validity period.java.util.Date getAbsoluteNotAfterDate()
java.util.Date
object that contains the date before which the associated policy entries are valid and null
if no absolute date has been specified for the end of the validity period.void clear()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |