Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.workplace.wcm.api
Interface LibraryStyleSheetComponent

All Superinterfaces:
  Document, Editable, EditableItem, EditableLibraryComponent, Hierarchical, Item, LibraryComponent, Localized, WCMApiObject, WorkflowedDocument

    public interface LibraryStyleSheetComponent

extends EditableLibraryComponent

Represents a Style Sheet component that exists in the Component Library.

A `LibraryStyleSheetComponent` can contain one style sheet. The contents of the style sheet file are dealt with as raw byte content. This class provides methods to manipulate the style sheet file and the attributes to use when rendering the component.

note: since `v6.0.0`, a `LibraryComponent` is referred to as a `"Component"`in the Authoring UI.``

See Also:
  `LibraryComponent`

Field Summary
`static int` | `MEDIA_TYPE_ALL` Target style rules for any media-type device
`static int` | `MEDIA_TYPE_AURAL` Target style rules for speech and sound synthesizers
`static int` | `MEDIA_TYPE_BRAILLE` Target style rules for Braille touch-feedback devices
`static int` | `MEDIA_TYPE_HANDHELD` Target style rules for small or handheld devices
`static int` | `MEDIA_TYPE_PRINT` Target style rules for page-by-page use, typically printed on paper
`static int` | `MEDIA_TYPE_PROJECTION` Target style rules for projection using transparent media
`static int` | `MEDIA_TYPE_SCREEN` Target style rules for continuous (non-paged) color computer screens
`static int` | `MEDIA_TYPE_TTY` Target style rules for media that uses a fixed-pitch character grid
`static int` | `MEDIA_TYPE_TV` Target style rules for television-link devices
`static int` | `MEDIA_TYPE_UNSPECIFIED` No style rules have been specified
`static int` | `TYPE_ALTERNATE` Alternate style sheets grouped under a single style name.
`static int` | `TYPE_PERSISTENT` A style sheet that user agents must apply in addition to alternate style sheets.
`static int` | `TYPE_PREFERRED` The authors preferred cascading style sheet, that should be applied unless the user selects an alternate style

Method Summary
`int` | `getMediaType()` The media type of this style-sheet.
`byte[]` | `getStyleSheet()` Returns the contents of the style sheet file contained within this component as a byte array.
`java.lang.String` | `getStyleSheetFileName()` Returns the filename of the style sheet file contained within this component.
`java.lang.String` | `getStyleSheetTitle()` Returns the title of the style sheet.
`int` | `getType()` The type this style sheet.
`void` | `removeStyleSheet()` Removes the style sheet file contained within this component.
`void` | `setMediaType(int mediaType)` Sets the media type of the style sheet.
`void` | `setStyleSheet(java.lang.String styleSheetFileName, byte[] styleSheet)` Sets the style sheet file contained within this component.
`void` | `setStyleSheetTitle(java.lang.String title)` Sets the title of the style sheet.
`void` | `setType(int type)` Sets the type of the style sheet.

Methods inherited from interface com.ibm.workplace.wcm.api.Hierarchical
`getParentId`

Methods inherited from interface com.ibm.workplace.wcm.api.Editable
`addAuthors, addContributorAccessMembers, addDeleteAccessMembers, addEditAccessMembers, addEditorAccessMembers, addHistoryLogEntry, addLiveAccessMembers, addManagerAccessMembers, addMembersForAccess, addOwners, addReadAccessMembers, addUserAccessMembers, isChanged, removeAuthors, removeContributorAccessMembers, removeDeleteAccessMembers, removeEditAccessMembers, removeEditorAccessMembers, removeLiveAccessMembers, removeManagerAccessMembers, removeMembersForAccess, removeOwners, removeReadAccessMembers, removeUserAccessMembers, setContributorAccessInheritance, setDescriptionTextProviderKey, setDescriptionTextProviderName, setEditorAccessInheritance, setInheritance, setManagerAccessInheritance, setPropagation, setTitleTextProviderKey, setTitleTextProviderName, setUserAccessInheritance`

Methods inherited from interface com.ibm.workplace.wcm.api.Document
`getAuthors, getContributorAccessMembers, getCreator, getDeleteAccessMembers, getDescription, getDescriptionTextProviderKey, getDescriptionTextProviderName, getEditAccessMembers, getEditorAccessMembers, getHistoryLog, getId, getInheritedContributorAccessMembers, getInheritedEditorAccessMembers, getInheritedManagerAccessMembers, getInheritedUserAccessMembers, getLastModifier, getLiveAccessMembers, getManagerAccessMembers, getMembersForAccess, getMembersForInheritedAccess, getOwnerLibrary, getOwners, getProject, getReadAccessMembers, getSourceWorkspace, getTitle, getTitleTextProviderKey, getTitleTextProviderName, getUserAccessMembers, getVersionCatalog, getVersionStrategy, hasDeleteAccess, hasDeleteAccess, hasEditAccess, hasEditAccess, hasLiveAccess, hasLiveAccess, hasProject, hasReadAccess, hasReadAccess, isContributorAccessInherited, isEditorAccessInherited, isInherited, isManagerAccessInherited, isNew, isPropagated, isUserAccessInherited, isWorkflowed`

Methods inherited from interface com.ibm.workplace.wcm.api.Item
`getCreationDate, getDescription, getIdentity, getModifiedDate, getName, getTitle`

Methods inherited from interface com.ibm.portal.Localized
`getLocales`

Methods inherited from interface com.ibm.workplace.wcm.api.EditableItem
`setDescription, setName, setTitle`

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`

Field Detail

### TYPE_PREFERRED

    static final int TYPE_PREFERRED

  The authors preferred cascading style sheet, that should be applied unless the user selects an alternate style

  See Also:
    Constant Field Values

### TYPE_ALTERNATE

    static final int TYPE_ALTERNATE

  Alternate style sheets grouped under a single style name.

  See Also:
    Constant Field Values

### TYPE_PERSISTENT

    static final int TYPE_PERSISTENT

  A style sheet that user agents must apply in addition to alternate style sheets.

  See Also:
    Constant Field Values

### MEDIA_TYPE_UNSPECIFIED

    static final int MEDIA_TYPE_UNSPECIFIED

  No style rules have been specified

  See Also:
    Constant Field Values

### MEDIA_TYPE_AURAL

    static final int MEDIA_TYPE_AURAL

  Target style rules for speech and sound synthesizers

  See Also:
    Constant Field Values

### MEDIA_TYPE_BRAILLE

    static final int MEDIA_TYPE_BRAILLE

  Target style rules for Braille touch-feedback devices

  See Also:
    Constant Field Values

### MEDIA_TYPE_HANDHELD

    static final int MEDIA_TYPE_HANDHELD

  Target style rules for small or handheld devices

  See Also:
    Constant Field Values

### MEDIA_TYPE_PRINT

    static final int MEDIA_TYPE_PRINT

  Target style rules for page-by-page use, typically printed on paper

  See Also:
    Constant Field Values

### MEDIA_TYPE_PROJECTION

    static final int MEDIA_TYPE_PROJECTION

  Target style rules for projection using transparent media

  See Also:
    Constant Field Values

### MEDIA_TYPE_SCREEN

    static final int MEDIA_TYPE_SCREEN

  Target style rules for continuous (non-paged) color computer screens

  See Also:
    Constant Field Values

### MEDIA_TYPE_TTY

    static final int MEDIA_TYPE_TTY

  Target style rules for media that uses a fixed-pitch character grid

  See Also:
    Constant Field Values

### MEDIA_TYPE_TV

    static final int MEDIA_TYPE_TV

  Target style rules for television-link devices

  See Also:
    Constant Field Values

### MEDIA_TYPE_ALL

    static final int MEDIA_TYPE_ALL

  Target style rules for any media-type device

  See Also:
    Constant Field Values

Method Detail

### getStyleSheet

    byte[] getStyleSheet()
                         throws AuthorizationException,
                                PropertyRetrievalException

  Returns the contents of the style sheet file contained within this component as a byte array.

  Returns an empty byte array if a style sheet file has not been specified or the byte content could not be retrieved.

  Returns:
    the style sheet file content as a byte array
  Throws:
    `AuthorizationException` - if the user does not have access to the style sheet
    `PropertyRetrievalException` - if the style sheet cannot be retrieved

### getStyleSheetFileName

    java.lang.String getStyleSheetFileName()
                                           throws AuthorizationException,
                                                  PropertyRetrievalException

  Returns the filename of the style sheet file contained within this component.

  Returns `null` if an style sheet file has not been set.

  Returns:
    the filename of the style sheet
  Throws:
    `AuthorizationException` - if the user does not have access to the style sheet
    `PropertyRetrievalException` - if the style sheet cannot be retrieved

### setStyleSheet

    void setStyleSheet(java.lang.String styleSheetFileName,
                       byte[] styleSheet)
                       throws OperationFailedException

  Sets the style sheet file contained within this component.

  This method does not accept `null` arguments. Passing a `null` argument into this method will result in a `NullPointerException`.

  Parameters:
    `styleSheetFileName` - the filename of the style sheet file
    `styleSheet` - the content of the style sheet file as a byte array
  Throws:
    `java.lang.NullPointerException` - if either of the arguments style sheetFileName or style sheet are null
    `com.ibm.workplace.wcm.api.exceptions.OperationFailedException` - if the style sheet file could not be set
    `OperationFailedException`

### removeStyleSheet

    void removeStyleSheet()
                          throws OperationFailedException

  Removes the style sheet file contained within this component.

  Throws:
    `OperationFailedException` - if an error occurred removing the file.

### setType

    void setType(int type)
                 throws OperationFailedException

  Sets the type of the style sheet.
  Valid values are:
  - TYPE_PREFERRED - Preferred style sheet
  - TYPE_ALTERNATE - Alternate style sheet
  - TYPE_PERSISTENT - Persistent style sheet

  Parameters:
    `type` - an integer specifying the type of the style sheet
  Throws:
    `OperationFailedException` - if the int argument is not a valid style sheet type

### getType

    int getType()

  The type this style sheet.

  If the method `setMediaType()` had never been called the medit type will default to `MEDIA_TYPE_UNSPECIFIED`

  Returns:
    the media type of the style sheet

### setMediaType

    void setMediaType(int mediaType)
                      throws OperationFailedException

  Sets the media type of the style sheet.
  Valid values are:
  - MEDIA_TYPE_UNSPECIFIED - Unspecified
  - MEDIA_TYPE_AURAL - Aural (speech synthesizers)
  - MEDIA_TYPE_BRAILLE - Braille (tactile Braille feedback devices)
  - MEDIA_TYPE_HANDHELD - Handheld (handheld devices)
  - MEDIA_TYPE_PRINT - Print (printed, paged, preview docs)
  - MEDIA_TYPE_PROJECTION - Projection (projectors)
  - MEDIA_TYPE_SCREEN - Screen (non-paged computer screens)
  - MEDIA_TYPE_TTY - TTY (teletypes, terminals)
  - MEDIA_TYPE_TV - TV (television type devices)
  - MEDIA_TYPE_ALL - All

  Parameters:
    `mediaType` - an integer specifying the media type of the style sheet
  Throws:
    `OperationFailedException` - if the int argument is not a valid media type

### getMediaType

    int getMediaType()

  The media type of this style-sheet.

  If the method `setMediaType()` had never been called the media type will default to `MEDIA_TYPE_UNSPECIFIED`

  Returns:
    the media type of the style sheet

### setStyleSheetTitle

    void setStyleSheetTitle(java.lang.String title)

  Sets the title of the style sheet.

  If a `null` argument is passed in to this method `getStyleSheetTitle()` will return `null`.

  Parameters:
    `title` - the title

### getStyleSheetTitle

    java.lang.String getStyleSheetTitle()

  Returns the title of the style sheet.

  Returns `null` if a title has not been set.

  Returns:
    the title of the style sheet

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD