public class Palette extends Identity implements XMLable, java.io.Serializable
PaletteItem
, and the activity class schema
the node represents is stored as an ActivityClassSchema
PaletteItem
,
PaletteCategory
,
ActivityClassSchema
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
Palette.Descriptor
A name/id object that can be used by the UI
|
DEFAULT_BUFFER_SIZE
Constructor and Description |
---|
Palette() |
Palette(Palette palette)
Creates a new Palette as a deep copy of a given one.
|
Modifier and Type | Method and Description |
---|---|
void |
addActivityClassSchema(ActivityClassSchema acs)
Adds an
ActivityClassSchema to the existing schemas for this palette. |
void |
addItem(PaletteItem paletteItem)
Adds a
PaletteItem to the existing items for this palette. |
boolean |
containsPaletteItem(PaletteItem paletteItem)
Returns
true if this palette contains the specified PaletteItem . |
java.lang.Long |
getCategory()
Returns the palette's category
|
PaletteItem[] |
getItems()
Returns the
PaletteItem s on the palette |
ActivityClassSchema[] |
getSchemas()
Returns the activity class schemas associated with the palette
|
boolean |
isEnabled() |
boolean |
isSystem()
Whether the palette is provided by the system or is a custom one.
|
void |
removePaletteItem(PaletteItem paletteItemToRemove)
Removes the provided
PaletteItem from the palette. |
void |
removePaletteItems(java.util.List<PaletteItem> paletteItemsToRemove)
Removes the provided
PaletteItem s from the palette. |
void |
setCategory(java.lang.Long category_)
Sets the palette's category
|
void |
setEnabled(boolean enabled) |
void |
setItems(PaletteItem[] items)
Sets the items in the palette.
|
void |
setSchemas(ActivityClassSchema[] newSchemas)
Sets the activity class schemas to be associated with this palette (removing the existing
ones).
|
void |
setSystem(boolean system)
Sets the palette's system property which marks it as a system-provided palette.
|
java.lang.String |
toXML()
Converts the palette to XML and returns it as as string
|
void |
toXML(java.lang.StringBuilder buffer)
Converts the palette to XML and stores it in a StringBuffer
|
equals, getId, getName, getUuid, hashCode, setId, setName, setUuid, toString
public boolean isEnabled()
public void setEnabled(boolean enabled)
public boolean isSystem()
public void setSystem(boolean system)
system
- whether the palette is provided by the system or is a custom one.public java.lang.Long getCategory()
public void setCategory(java.lang.Long category_)
category_
- the ID of the category in which to place this palettepublic PaletteItem[] getItems()
PaletteItem
s on the paletteArray
containing the PaletteItem
s on this palettepublic void setItems(PaletteItem[] items)
items_
- the PaletteItem
s to place in this palettepublic ActivityClassSchema[] getSchemas()
ActivityClassSchema
s associated with the palettepublic void setSchemas(ActivityClassSchema[] newSchemas)
PaletteItem
in the palette
then it will not be added.newSchemas
- The ActivityClassSchema
s to be associated with this palette.public void addActivityClassSchema(ActivityClassSchema acs)
ActivityClassSchema
to the existing schemas for this palette.
If the schema is not mapped to an existing PaletteItem
in the palette then it will not
be added.
If the schema already exists in the palette then it will not overwrite the existing one.acs
- the schema to add to the listpublic void addItem(PaletteItem paletteItem)
PaletteItem
to the existing items for this palette.
If the palette already contains a PaletteItem
with the same name
then the existing PaletteItem
is replaced with this new one.paletteItem
- The PaletteItem
to add to the palettepublic void removePaletteItem(PaletteItem paletteItemToRemove)
PaletteItem
from the palette. The ActivityClassSchema
associated with the palette item is also removed.paletteItemToRemove
- The palette item to removepublic void removePaletteItems(java.util.List<PaletteItem> paletteItemsToRemove)
PaletteItem
s from the palette. The ActivityClassSchema
s
associated with the palette items are also removed.paletteItemsToRemove
- The list of palette items to removepublic boolean containsPaletteItem(PaletteItem paletteItem)
true
if this palette contains the specified PaletteItem
.
Specifically, returns true
if there is a PaletteItem
with the
same name as the one of the provided PaletteItem
.paletteItem
- PaletteItem
to look fortrue
if there is a PaletteItem
with the given PaletteItem
's namepublic java.lang.String toXML()
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.