com.ibm.workplace.wcm.api
Interface LibraryDateComponent
- All Superinterfaces:
- Document, Editable, EditableItem, EditableLibraryComponent, Hierarchical, Item, LibraryComponent, Localized, WCMApiObject, WorkflowedDocument
public interface LibraryDateComponent
- extends EditableLibraryComponent
Represents a Date component.
A LibraryDateComponent
is a LibraryComponent
and
must be stored as a separate entity in the repository.
A LibraryDateComponent
can contain a date and time. This interface provides
methods to retrieve and set the date and time contained within this component.
note: since v6.0.0
, a LibraryDateComponent
is
referred to as a "Date and Time Component" in the Authoring UI.
- See Also:
LibraryComponent
Field Summary |
static int |
TYPE_DATE
Type constant indicating that the Date returned from this LibraryDateComponent
will be formatted to only show the date. |
static int |
TYPE_TIME
Type constant indicating that the Date returned from this LibraryDateComponent
will be formatted to only show the time. |
static int |
TYPE_TIME_AND_DATE
Type constant indicating that the Date returned from this LibraryDateComponent
will be formatted to show the date and time. |
Method Summary |
java.util.Date |
getDate()
Returns the date and time contained in this component as a Date . |
int |
getDateType()
Returns the formatting type set in this LibraryDateComponent . |
void |
setDate(java.util.Date date)
Sets the date and time contained in this DateComponent as a Date . |
void |
setDateType(int dateType)
Sets the formatting type for this LibraryDateComponent . |
Methods inherited from interface com.ibm.workplace.wcm.api.Editable |
addAuthors, addCategoryIds, addContributorAccessMembers, addDeleteAccessMembers, addEditAccessMembers, addEditorAccessMembers, addHistoryLogEntry, addLiveAccessMembers, addManagerAccessMembers, addMembersForAccess, addOwners, addReadAccessMembers, addUserAccessMembers, isChanged, removeAuthors, removeCategoryIds, removeContributorAccessMembers, removeDeleteAccessMembers, removeEditAccessMembers, removeEditorAccessMembers, removeLiveAccessMembers, removeManagerAccessMembers, removeMembersForAccess, removeOwners, removeReadAccessMembers, removeUserAccessMembers, setContributorAccessInheritance, setDescriptionTextProviderKey, setDescriptionTextProviderName, setEditorAccessInheritance, setInheritance, setKeywords, setManagerAccessInheritance, setPropagation, setTitleTextProviderKey, setTitleTextProviderName, setUserAccessInheritance |
Methods inherited from interface com.ibm.workplace.wcm.api.Document |
getAuthors, getCategoryIds, getContributorAccessMembers, getCreator, getDeleteAccessMembers, getDescription, getDescriptionTextProviderKey, getDescriptionTextProviderName, getEditAccessMembers, getEditorAccessMembers, getHistoryLog, getId, getInheritedContributorAccessMembers, getInheritedEditorAccessMembers, getInheritedManagerAccessMembers, getInheritedUserAccessMembers, getKeywords, getLastModifier, getLiveAccessMembers, getManagerAccessMembers, getMembersForAccess, getMembersForInheritedAccess, getOwnerLibrary, getOwners, getProject, getReadAccessMembers, getSourceWorkspace, getTitle, getTitleTextProviderKey, getTitleTextProviderName, getUserAccessMembers, getVersionCatalog, getVersionStrategy, hasDeleteAccess, hasDeleteAccess, hasEditAccess, hasEditAccess, hasLiveAccess, hasLiveAccess, hasProfile, hasProject, hasReadAccess, hasReadAccess, isContributorAccessInherited, isEditorAccessInherited, isInherited, isManagerAccessInherited, isNew, isPropagated, isUserAccessInherited, isWorkflowed |
Methods inherited from interface com.ibm.workplace.wcm.api.WorkflowedDocument |
addAdditionalViewers, addApprovers, approve, cancelDraftDocument, clearApprovers, createDraftDocument, decline, decline, getAdditionalViewers, getCurrentApprovers, getDateEnteredStage, getEffectiveDate, getExpiryDate, getGeneralDateOne, getGeneralDateTwo, getPendingWorkflowStatus, getPublishedDate, getPublishedId, getWorkflowId, getWorkflowStageId, getWorkflowStatus, hasApproverAccess, hasApproverAccess, hasDraft, isDraft, isDraftOfPublishedDocument, isExpired, isPublished, isWorkflowMovingBackward, nextWorkflowStage, nextWorkflowStage, nextWorkflowStage, previousWorkflowStage, previousWorkflowStage, removeAdditionalViewers, removeApprovers, restartWorkflow, setEffectiveDate, setExpiryDate, setGeneralDateOne, setGeneralDateTwo, setWorkflowId, setWorkflowId |
TYPE_TIME_AND_DATE
static final int TYPE_TIME_AND_DATE
- Type constant indicating that the
Date
returned from this LibraryDateComponent
will be formatted to show the date and time.
- See Also:
- Constant Field Values
TYPE_DATE
static final int TYPE_DATE
- Type constant indicating that the
Date
returned from this LibraryDateComponent
will be formatted to only show the date.
- See Also:
- Constant Field Values
TYPE_TIME
static final int TYPE_TIME
- Type constant indicating that the
Date
returned from this LibraryDateComponent
will be formatted to only show the time.
- See Also:
- Constant Field Values
getDate
java.util.Date getDate()
- Returns the date and time contained in this component as a
Date
.
Returns null
if the Date is not set.
- Returns:
- the date and time
setDate
void setDate(java.util.Date date)
throws com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- Sets the date and time contained in this
DateComponent
as a Date
.
Note. This method replaces any existing date and time in this component.
- Parameters:
date
- the date and time
- Throws:
com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- if the string argument is null
or the
date and time could not be set
getDateType
int getDateType()
- Returns the formatting type set in this
LibraryDateComponent
.
Returns the default value LibraryDateComponent.TYPE_TIME_AND_DATE
if the new
date type has been set.
- Returns:
- the date formatting type
setDateType
void setDateType(int dateType)
throws com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- Sets the formatting type for this
LibraryDateComponent
.
Valid values are:
- TYPE_TIME - Date format type to show the time
- TYPE_DATE - Date format type to show the date
- TYPE_TIME_AND_DATE - Date format type to show the date and time
- Parameters:
dateType
- the date formatting type to be set
- Throws:
com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- if an invalid date formatting type was passed in