public class AppianTypeCache extends java.lang.Object implements JSONCacheable, XMLable, java.io.Serializable
addAppianType(java.lang.Integer, java.lang.Long)
. After
the primary keys have been added, one can call populate(com.appiancorp.services.ServiceContext)
to fetch the display
names. Once the cache has been populated,display names can be retrieved through the
getDisplayName(java.lang.Long, java.lang.Integer)
and getDisplayNames(java.lang.Long[], java.lang.Integer)
methods.Modifier and Type | Field and Description |
---|---|
static java.lang.Integer |
AT_COMMUNITIES
Appian type constant for communities
|
static java.lang.Integer |
AT_CONTENT
Appian type constant for content
|
static java.lang.Integer |
AT_CONTENT_CONSTANT
Appian type constant for content
|
static java.lang.Integer |
AT_DOCS
Appian type constant for documents
|
static java.lang.Integer |
AT_EMAIL_ADDRESSES
Appian type constant for email addresses
|
static java.lang.Integer |
AT_EVENTS |
static java.lang.Integer |
AT_FOLDERS
Appian type constant for folders
|
static java.lang.Integer |
AT_FORUMS
Appian type constant for forums
|
static java.lang.Integer |
AT_GROUPS
Appian type constant for groups
|
static java.lang.Integer |
AT_KCS
Appian type constant for knowledge centers
|
static java.lang.Integer |
AT_MESSAGES
Appian type constant for messages
|
static java.lang.Integer |
AT_PAGES
Appian type constant for pages
|
static java.lang.Integer |
AT_PROCESS_MODELS
Appian type constant for process models
|
static java.lang.Integer |
AT_PROCESSES
Appian type constant for processes
|
static java.lang.Integer |
AT_PROCESSMODEL_FOLDER
Appian type constant for process model folders
|
static java.lang.Integer |
AT_THREADS
Appian type constant for threads
|
static java.lang.Integer |
AT_USERS
Appian type constant for users
|
hiddenAttributes$TRANSIENT
DEFAULT_BUFFER_SIZE
Constructor and Description |
---|
AppianTypeCache() |
Modifier and Type | Method and Description |
---|---|
void |
addAppianType(java.lang.Integer type_,
java.lang.Long id_)
Adds the primary key of the given Appian type to the table of Appian-typed objects.
|
void |
addAppianType(java.lang.Integer type_,
java.lang.String id_)
Adds a String primary key of the given Appian type to the table of Appian-typed
objects.
|
void |
addAppianTypeOrTypes(int type_,
boolean isMultiple_,
java.lang.Object value_) |
void |
addAppianTypes(java.lang.Integer type_,
java.lang.Long[] ids_) |
void |
addAppianTypes(java.lang.Integer type_,
java.lang.String[] ids_)
Adds String primary keys to the cache for the given type.
|
java.lang.String[] |
getAllDisplayNames(java.util.Locale l_) |
static java.lang.Integer |
getAtcTypeForTypedVariableType(int type_)
Utility method to retrieve the cache key for the given TypedVariable type.
|
java.lang.String |
getDisplayName(LocalObject lo_,
java.lang.Integer type_) |
java.lang.String |
getDisplayName(java.lang.Long id_,
java.lang.Integer type_)
Fetches the display name for the integer primary key of the given type.
|
java.lang.String |
getDisplayName(java.lang.String id_,
java.lang.Integer type_)
Fetches the display name for the string primary key of the given type.
|
java.lang.String[] |
getDisplayNames(LocalObject[] los_,
java.lang.Integer type_) |
java.lang.String[] |
getDisplayNames(java.lang.Long[] ids_,
java.lang.Integer type_)
Fetches the display names for the integer primary keys of the given type.
|
java.lang.String[] |
getDisplayNames(java.lang.Object id_,
java.lang.Integer type_) |
java.lang.String[] |
getDisplayNames(java.lang.Object id_,
java.lang.Integer type_,
boolean isMultiple) |
java.lang.String[] |
getDisplayNames(java.lang.String[] ids_,
java.lang.Integer type_)
Fetches the display names for the string primary keys of the given type.
|
java.util.Map |
getFullMap() |
java.util.HashSet |
getHiddenAttributes()
Returns the set of attributes (properties) that should not be included in
the JSON representation of the object.
|
boolean |
getInvalidReferences()
Adds multiple instances of the given Appian type to the table of Appian-typed
objects.
|
java.util.Map |
getMap(java.lang.Integer key_)
Retreives the map of ids to display names for the given key.
|
java.lang.Integer[] |
getPopulatedTypes()
Retrieves the keys for the Appian types for which this cache has entries.
|
com.appiancorp.process.design.validation.Errors |
populate(ServiceContext sc)
Uses the given user to populate the display names.
|
com.appiancorp.process.design.validation.Errors |
populate(ServiceContext sc,
boolean includeCurrentUser_) |
void |
setDisplayName(java.lang.Integer type_,
java.lang.Long id_,
java.lang.String display_) |
void |
setDisplayName(java.lang.Integer type_,
java.lang.String id_,
java.lang.String display_) |
java.lang.String |
toXML()
Generates an XML representation of this object (including all
child objects).
|
void |
toXML(java.lang.StringBuilder buffer_)
Appends an XML representation of this object (including all
child objects) to the given buffer.
|
public static final java.lang.Integer AT_USERS
public static final java.lang.Integer AT_GROUPS
public static final java.lang.Integer AT_FOLDERS
public static final java.lang.Integer AT_DOCS
public static final java.lang.Integer AT_PAGES
public static final java.lang.Integer AT_FORUMS
public static final java.lang.Integer AT_THREADS
public static final java.lang.Integer AT_MESSAGES
public static final java.lang.Integer AT_KCS
public static final java.lang.Integer AT_CONTENT
public static final java.lang.Integer AT_CONTENT_CONSTANT
public static final java.lang.Integer AT_EMAIL_ADDRESSES
public static final java.lang.Integer AT_PROCESS_MODELS
public static final java.lang.Integer AT_PROCESSES
public static final java.lang.Integer AT_COMMUNITIES
public static final java.lang.Integer AT_EVENTS
public static final java.lang.Integer AT_PROCESSMODEL_FOLDER
public java.util.HashSet getHiddenAttributes()
JSONable
getHiddenAttributes
in interface JSONable
public java.lang.String toXML()
XMLable
StringBuilder
and call
toXML( StringBuilder )
on it.public void toXML(java.lang.StringBuilder buffer_)
XMLable
public boolean getInvalidReferences()
type_
- one of the AT_XXX constantsids_
- an array of integer primary keys of Appian objectspublic void addAppianTypes(java.lang.Integer type_, java.lang.Long[] ids_)
public void setDisplayName(java.lang.Integer type_, java.lang.Long id_, java.lang.String display_)
public void setDisplayName(java.lang.Integer type_, java.lang.String id_, java.lang.String display_)
public void addAppianType(java.lang.Integer type_, java.lang.Long id_)
type_
- one of the AT_XXX constantsid_
- an integer primary key of an Appian objectpublic void addAppianTypes(java.lang.Integer type_, java.lang.String[] ids_)
type_
- one of the AT_XXX constantsids_
- array of String primary keyspublic void addAppianType(java.lang.Integer type_, java.lang.String id_)
type_
- one of the AT_XXX constantsid_
- a String primary key of an Appian objectpublic void addAppianTypeOrTypes(int type_, boolean isMultiple_, java.lang.Object value_)
public java.lang.Integer[] getPopulatedTypes()
public com.appiancorp.process.design.validation.Errors populate(ServiceContext sc)
public com.appiancorp.process.design.validation.Errors populate(ServiceContext sc, boolean includeCurrentUser_)
public static java.lang.Integer getAtcTypeForTypedVariableType(int type_)
type_
- one of the constants from TypedVariablejava.lang.IllegalArgumentException
- if type_is not a valid type.TypedVariable
public java.lang.String[] getAllDisplayNames(java.util.Locale l_)
public java.lang.String getDisplayName(java.lang.Long id_, java.lang.Integer type_)
id_
- an integer primary keytype_
- one of the AT_XXX constants indicating an Appian typenull
if no scuh object exists (or the display name
has not been retrieved).public java.lang.String[] getDisplayNames(java.lang.Long[] ids_, java.lang.Integer type_)
null
will
correspond to any primary key for which there is no display name in the cache.ids_
- an array of integer primary keystype_
- one of the AT_XXX constants indicating an Appian typepublic java.lang.String getDisplayName(java.lang.String id_, java.lang.Integer type_)
id_
- a String primary keytype_
- one of the AT_XXX constants indicating an Appian typenull
if no scuh object exists (or the display name
has not been retrieved).public java.lang.String[] getDisplayNames(java.lang.String[] ids_, java.lang.Integer type_)
null
will
correspond to any primary key for which there is no display name in the cache.ids_
- an array of String primary keystype_
- one of the AT_XXX constants indicating an Appian typepublic java.lang.String getDisplayName(LocalObject lo_, java.lang.Integer type_)
public java.lang.String[] getDisplayNames(LocalObject[] los_, java.lang.Integer type_)
public java.lang.String[] getDisplayNames(java.lang.Object id_, java.lang.Integer type_)
public java.lang.String[] getDisplayNames(java.lang.Object id_, java.lang.Integer type_, boolean isMultiple)
public java.util.Map getMap(java.lang.Integer key_)
key_
- one of the AT_XXX constantspublic java.util.Map getFullMap()
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.