|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.adobe.livecycle.rightsmanagement.client.infomodel.Watermark2Element
public abstract class Watermark2Element
The Watermark2Element
interface defines methods for the creation and manipulation of watermark elements.
Watermark elements can be of type text or pdf.
In addition to the name and description of the watermark element, text Watermark Element
objects must define the text that appears
as the watermark in the documents. The text can be one or more of the following properties:
Watermark Element
objects must specify the watermark PDF document.
The following properties can be set to affect the appearance of the watermark:
The following properties specifies the visibility options:
For information about using this interface as part of creating watermarks using the Document Security Java API, see the Creating a new watermark using the Java API quick start in Programming with Adobe Experience Manager Forms.
Field Summary | |
---|---|
static java.lang.String |
HORIZONTAL_ALIGNMENT_CENTER
Represents center horizontal alignment. |
static java.lang.String |
HORIZONTAL_ALIGNMENT_LEFT
Represents left horizontal alignment. |
static java.lang.String |
HORIZONTAL_ALIGNMENT_RIGHT
Represents right horizontal alignment. |
static java.lang.String |
TYPE_PDF
Represents pdf watermark type |
static java.lang.String |
TYPE_TEXT
Represents text watermark type |
static java.lang.String |
VERTICAL_ALIGNMENT_BOTTOM
Represents bottom vertical alignment. |
static java.lang.String |
VERTICAL_ALIGNMENT_CENTER
Represents center vertical alignment. |
static java.lang.String |
VERTICAL_ALIGNMENT_TOP
Represents top vertical alignment. |
Constructor Summary | |
---|---|
Watermark2Element()
|
Method Summary | |
---|---|
abstract java.awt.Color |
getBGColor()
Retrieves the background color for the watermark element. |
abstract java.lang.String |
getCustomText()
Retrieves the custom text that the watermark element includes. |
abstract java.lang.String |
getDescription()
Retrieves the name of the watermark element. |
abstract java.lang.Integer |
getEndPage()
Retrieves the end page for the watermark element. |
abstract java.awt.Color |
getFGColor()
Retrieves the foreground color for the watermark element. |
abstract java.lang.String |
getFontName()
Retrieves the font name of the watermark element. |
abstract java.lang.Integer |
getFontSize()
Retrieves the font size of the watermark element. |
abstract java.lang.String |
getHorizontalAlignment()
Retrieves the horizontal alignment setting for the watermark element. |
abstract float |
getHorizontalOffset()
Retrieves the horizontal alignment's offset setting for the watermark element. |
abstract java.lang.String |
getId()
Retrieves the identification of the watermark element. |
abstract java.lang.String |
getName()
Retrieves the name of the watermark element element. |
abstract int |
getOpacity()
Retrieves the opacity of the watermark element. |
abstract Document |
getPDFContent()
Retrieves the pdf document which is used as the watermark content for the watermark element. |
abstract int |
getRotation()
Retrieves the rotation of the watermark element. |
abstract int |
getScale()
Retrieves the size of the watermark element font. |
abstract java.lang.Integer |
getStartPage()
Retrieves the start page for the watermark element. |
abstract java.lang.String |
getType()
Retrieves the type of the watermark element. |
abstract java.lang.String |
getVerticalAlignment()
Retrieves the vertical alignment setting for the watermark element. |
abstract float |
getVerticalOffset()
Retrieves the vertical alignment's offset setting for the watermark element. |
abstract boolean |
isBackground()
Retrieves whether the watermark element appears in the background of the document. |
abstract boolean |
isDateIncluded()
Retrieves whether the watermark element includes the date when the associated document is opened. |
abstract boolean |
isDeleted()
Retrieves the state of the watermark element. |
abstract boolean |
isPolicyNameIncluded()
Retrieves whether the watermark element includes the name of the policy applied to the associated document This property is not used when the type of watermark element is TYPE_PDF. |
abstract boolean |
isShowOnPrint()
Retrieves whether the watermark element appears on print. |
abstract boolean |
isShowOnScreen()
Retrieves whether the watermark element appears on screen. |
abstract boolean |
isUserIdIncluded()
Retrieves whether the watermark element includes the user identification of the user who opened the associated document. |
abstract boolean |
isUserNameIncluded()
Retrieves whether the watermark element includes the name of the user who opened the associated document. |
abstract void |
setBackground(boolean background)
Sets whether the watermark element appears in background or foreground of the document. |
abstract void |
setBGColor(java.awt.Color color)
Sets the background color of the watermark element. |
abstract void |
setCustomText(java.lang.String customText)
Sets the custom text that the watermark element includes. |
abstract void |
setDateIncluded(boolean include)
Sets whether the watermark element includes the date when the associated document is opened. |
abstract void |
setDescription(java.lang.String description)
Sets the description of the watermark element |
abstract void |
setEndPage(java.lang.Integer endPage)
Sets the end page option for the watermark element |
abstract void |
setFGColor(java.awt.Color color)
Sets the foreground color of the watermark element. |
abstract void |
setFontName(java.lang.String font)
Sets the font name for the watermark element. |
abstract void |
setFontSize(java.lang.Integer size)
Sets the font size of the watermark element. |
abstract void |
setHorizontalAlignment(java.lang.String alignment)
Sets the horizontal alignment for the watermark element. |
abstract void |
setHorizontalOffset(float offset)
Sets the horizontal alignment's offset for the watermark element. |
abstract void |
setName(java.lang.String name)
Sets the name for the watermark. |
abstract void |
setOpacity(int percent)
Sets the opacity of the watermark element. |
abstract void |
setPDFContent(Document pdfContent,
java.lang.String fileName)
Sets the pdf document which is used as the watermark content for the watermark element. |
abstract void |
setPolicyNameIncluded(boolean include)
Specifies whether the watermark element includes the name of the policy applied to the associated document This property is not used when the type of watermark element is TYPE_PDF. |
abstract void |
setRotation(int degrees)
Sets the rotation of the watermark element. |
abstract void |
setScale(int scale)
Sets the size of the watermark element font. |
abstract void |
setShowOnPrint(boolean showOnPrint)
Sets whether the watermark element appears on print. |
abstract void |
setShowOnScreen(boolean showOnScreen)
Sets whether the watermark element appears on screen. |
abstract void |
setStartPage(java.lang.Integer startPage)
Sets the start page option for the watermark element |
abstract void |
setType(java.lang.String type)
Specifies the type of the watermark element. |
abstract void |
setUserIdIncluded(boolean include)
Specifies whether the watermark element includes the user identification of the user who opened the associated document. |
abstract void |
setUserNameIncluded(boolean include)
Specifies whether the watermark element includes the user name of the user who opened the associated document. |
abstract void |
setVerticalAlignment(java.lang.String alignment)
Sets the vertical alignment for the watermark element. |
abstract void |
setVerticalOffset(float offset)
Sets the vertical alignment's offset for the watermark element. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String HORIZONTAL_ALIGNMENT_LEFT
public static final java.lang.String HORIZONTAL_ALIGNMENT_CENTER
public static final java.lang.String HORIZONTAL_ALIGNMENT_RIGHT
public static final java.lang.String VERTICAL_ALIGNMENT_TOP
public static final java.lang.String VERTICAL_ALIGNMENT_CENTER
public static final java.lang.String VERTICAL_ALIGNMENT_BOTTOM
public static final java.lang.String TYPE_TEXT
public static final java.lang.String TYPE_PDF
Constructor Detail |
---|
public Watermark2Element()
Method Detail |
---|
public abstract void setType(java.lang.String type) throws PDRLException
type
- A java.lang.String
that contains one of the following three values:
TYPE_TEXT
- specifies that the watermark element is of type text.TYPE_PDF
- specifies that the watermark element is of type pdf.PDRLException
- if type
does not contain a valid constant value.public abstract java.lang.String getType()
The constant can be one of the following values:
TYPE_TEXT
TYPE_PDF
public abstract boolean isUserNameIncluded()
public abstract void setUserNameIncluded(boolean include)
include
- A Boolean value of true if the watermark element should include the user name and false if it
should not include the user name.public abstract boolean isUserIdIncluded()
public abstract void setUserIdIncluded(boolean include)
include
- A Boolean value of true if the watermark element should include the user identification, or false
if the user identification is not included.public abstract boolean isPolicyNameIncluded()
public abstract void setPolicyNameIncluded(boolean include)
include
- A Boolean value of true if the watermark element should include the user policy name, or false
if it should not include the policy name.public abstract boolean isDateIncluded()
public abstract void setDateIncluded(boolean include)
include
- A Boolean value of true if the watermark element should include the date and false it
should not include the date.public abstract java.lang.String getCustomText()
public abstract void setCustomText(java.lang.String customText)
customText
- A string value that includes the custom text to include in the watermark element and null
if no custom text should be included.public abstract Document getPDFContent()
public abstract void setPDFContent(Document pdfContent, java.lang.String fileName) throws SDKException
pdfContent
- A pdf document.
the document should be a valid unprotected pdf document.fileName
- (optional)
the file name that will appear in the UI. If null, then we will not show any file name info in the UI.
SDKException
- if pdfContent
does not contain a valid pdf document.public abstract int getOpacity()
public abstract void setOpacity(int percent) throws PDRLException
percent
- An integer that contains the opacity of the watermark element. This value can be between 0
and 100. A value of 100 indicates the watermark element is completely opaque.
A value of 0 indicates the watermark element is completely transparent.
PDRLException
- if percent
is not in the range of valid values.public abstract boolean isBackground()
public abstract void setBackground(boolean background)
background
- A Boolean value of true if the watermark element should appear in the background
and false if the watermark element should appear in the foreground.public abstract int getRotation()
public abstract void setRotation(int degrees) throws PDRLException
degrees
- An integer that specifies the rotation of the watermark element, in degrees. degrees
can be
any integer value between -180 and 180.
PDRLException
- if degrees
is not within the valid range of values.public abstract int getScale()
public abstract void setScale(int scale) throws PDRLException
scale
- An integer that specifies the size of the watermark element font as a percentage of the default size.
scale
can be any integer value between 0 and 100.
PDRLException
- if scale
is not within the valid range of values.public abstract java.lang.String getHorizontalAlignment()
java.lang.String
that contains the constant value that represents the horizontal alignment.
The constant can be one of the following values:
HORIZONTAL_ALIGNMENT_LEFT
HORIZONTAL_ALIGNMENT_CENTER
HORIZONTAL_ALIGNMENT_RIGHT
public abstract float getHorizontalOffset()
public abstract void setHorizontalAlignment(java.lang.String alignment) throws PDRLException
alignment
- A java.lang.String
that contains one of the following three values:
HORIZONTAL_ALIGNMENT_LEFT
- specifies that the watermark element is left-aligned.HORIZONTAL_ALIGNMENT_RIGHT
- specifies that the watermark element is right-aligned.HORIZONTAL_ALIGNMENT_CENTER
- specifies that the watermark element is horizontally centered on the page (the default value).PDRLException
- if alignment
does not contain a valid constant value.public abstract void setHorizontalOffset(float offset) throws PDRLException
offset
- A float that contains the horizontal alignment's offset
PDRLException
- if offset
is greater than or equal to 10000f or lesss than or equal to -10000fpublic abstract java.lang.String getVerticalAlignment()
The constant can be one of the following values:
VERTICAL_ALIGNMENT_TOP
VERTICAL_ALIGNMENT_CENTER
VERTICAL_ALIGNMENT_BOTTOM
public abstract float getVerticalOffset()
public abstract void setVerticalAlignment(java.lang.String alignment) throws PDRLException
alignment
- A string value that specifies one of the following values:
VERTICAL_ALIGNMENT_TOP
- specifies that the watermark element is top-aligned.VERTICAL_ALIGNMENT_BOTTOM
- specifies that the watermark element is bottom-aligned.VERTICAL_ALIGNMENT_CENTER
- specifies that the watermark element is vertically centered on the page (the default value).PDRLException
- if alignment
does not contain a valid constant value.public abstract void setVerticalOffset(float offset) throws PDRLException
offset
- A float that contains the vertical alignment's offset
PDRLException
- if offset
is greater than or equal to 10000f or lesss than or equal to -10000fpublic abstract java.lang.String getName()
java.lang.String
that contains the name of the watermark.public abstract void setName(java.lang.String name) throws PDRLException
name
- A java.lang.String
that contains the name for the watermark element.
name
can have a maximum length of 50 characters.
PDRLException
- if name
is longer than the allowed length.public abstract void setDescription(java.lang.String description) throws PDRLException
description
- A java.lang.String
that contains the description for the watermark element.
description
can have a maximum length of 100 characters.
PDRLException
- if description
is longer than the allowed length.public abstract java.lang.String getDescription()
java.lang.String
that contains the description of the watermark.public abstract boolean isDeleted()
public abstract java.lang.String getId()
Watermark2Element
object represents a watermark that is not registered with the Rights Management service.public abstract void setStartPage(java.lang.Integer startPage) throws PDRLException
startPage
- A java.lang.Integer
that contains the start page number for the watermark element.
startPage
should be in the range 0-9999.
PDRLException
- if startPage
is not in specified range.public abstract java.lang.Integer getStartPage()
java.lang.Integer
that contains the start page number for the watermark element.public abstract void setEndPage(java.lang.Integer endPage) throws PDRLException
endPage
- A java.lang.Integer
that contains the end page number for the watermark element.
endPage
should be in the range -1-9999. -1 means till the end.
PDRLException
- if endPage
is not in specified range.public abstract java.lang.Integer getEndPage()
java.lang.Integer
that contains the end page number for the watermark element.public abstract boolean isShowOnScreen()
public abstract void setShowOnScreen(boolean showOnScreen)
showOnScreen
- A Boolean value of true if the watermark element should appear on screen, and false otherwise.public abstract boolean isShowOnPrint()
public abstract void setShowOnPrint(boolean showOnPrint)
showOnPrint
- A Boolean value of true if the watermark element should appear on print, and false otherwise.public abstract java.lang.Integer getFontSize()
public abstract void setFontSize(java.lang.Integer size) throws PDRLException
size
- An integer that specifies the size of the watermark element font as a percentage of the default size.
size
can be any integer value between 8 and 120.
PDRLException
- if size
is not within the valid range of values.public abstract java.lang.String getFontName()
public abstract void setFontName(java.lang.String font)
font
- A String that specifies the font name for the watermark element.
if font is null or empty string then default values are used for font for the watermark element.public abstract java.awt.Color getFGColor()
public abstract void setFGColor(java.awt.Color color)
color
- A color value that specifies the foreground color for the watermark element.public abstract java.awt.Color getBGColor()
public abstract void setBGColor(java.awt.Color color)
color
- A color value that specifies the background color for the watermark element.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |