public interface TypeService extends ContextSensitiveSingletonService, com.appiancorp.type.ExtendedDataTypeProvider
Modifier and Type | Field and Description |
---|---|
static boolean |
cast$UPDATES |
static java.lang.Integer |
DEACTIVATE_ALREADY_DEACTIVATED
Result code indicating that a type could not be deactivated because it is already
deactivated.
|
static java.lang.Integer |
DEACTIVATE_INVALID
Result code indicating that deactivation of a type could not occur because the
type does not exist.
|
static java.lang.Integer |
DEACTIVATE_NOT_ALLOWED
Result code indicating that deactivation of a type was not allowed.
|
static java.lang.Integer |
DEACTIVATE_SUCCESS
Result code indicating that deactivation of a type was successful.
|
static boolean |
deactivateTypes$UPDATES |
static boolean |
delete$UPDATES |
static boolean |
getDatatypeProperties$UPDATES |
static boolean |
getDirectlyReferencedTypes$UPDATES |
static boolean |
getInstanceProperties$UPDATES |
static boolean |
getInstancePropertyTypesRecursive$UPDATES |
static boolean |
getReferencedTypes$UPDATES |
static boolean |
getSystemTypes$UPDATES |
static boolean |
getSystemTypesByParent$UPDATES |
static boolean |
getType$UPDATES |
static boolean |
getTypeByExternalTypeId$UPDATES |
static boolean |
getTypeByQualifiedName$UPDATES |
static boolean |
getTypeByQualifiedNames$UPDATES |
static boolean |
getTypes$UPDATES |
static boolean |
getTypeSafe$UPDATES |
static boolean |
getTypesByNamespace$UPDATES |
static boolean |
getTypesByParentFilteredPaging$UPDATES |
static boolean |
getTypesByParentPaging$UPDATES |
static boolean |
getTypesFilteredPaging$UPDATES |
static boolean |
getTypesPaging$UPDATES |
static boolean |
getWSDLTypes$UPDATES |
static boolean |
insert$UPDATES |
static int |
LISTS_FILTER_ALL
Filter all lists.
|
static int |
LISTS_FILTER_NON_EXPLICIT
Filter all lists except explicitly created lists (ie. lists created via 'xsd:list'
in XSD).
|
static int |
LISTS_NO_FILTERING
Do not do any filtering of lists.
|
static boolean |
select$UPDATES |
static boolean |
setVisibilityForType$UPDATES |
static boolean |
setVisibilityForTypes$UPDATES |
static boolean |
suggest$UPDATES |
static boolean |
update$UPDATES |
CONFIGURE_METHOD_NAME
Modifier and Type | Method and Description |
---|---|
TypedValue |
cast(java.lang.Long toTypeId,
TypedValue value)
Cast a TypedValue to another type, if possible, returning the new TypedValue.
|
ResultList |
deactivateTypes(java.lang.Long[] typeIds)
Deactivates each of the specified types, if possible.
|
TypedValue |
delete(TypedValue data,
TypedValue[] indices)
Delete a value at indices from data.
|
DatatypeProperties |
getDatatypeProperties(java.lang.Long typeId)
Get DatatypeProperties from server.
|
java.util.List<Datatype> |
getDirectlyReferencedTypes(java.lang.Long... typeIds)
Returns a list containing all datatypes directly referenced by the
given datatypes.
|
NamedTypedValue[] |
getInstanceProperties(java.lang.Long typeId)
Gets the instance properties for the given type
|
java.util.Set<java.lang.Long> |
getInstancePropertyTypesRecursive(java.lang.Long typeId_)
Returns a Set containing all type ids (as java.lang.Long objects)
referenced by the given type.
|
java.util.List<Datatype> |
getReferencedTypes(java.lang.Long typeId_)
Returns a list containing the given datatype and all datatypes
referenced by it.
|
java.util.List<Datatype> |
getReferencedTypes(java.lang.Long[] typeIds_)
Returns a list containing the given datatypes and all datatypes referenced
by them.
|
Datatype[] |
getSystemTypes()
Retrieves all system datatypes.
|
Datatype[] |
getSystemTypesByParent(TypedValue parent)
Deprecated.
Use
getSystemTypes() . |
Datatype |
getType(java.lang.Long typeId)
Get Datatype from server.
|
Datatype |
getTypeByExternalTypeId(java.lang.String externalTypeId)
Gets the datatype corresponding to an external type id.
|
Datatype |
getTypeByExternalTypeId(java.lang.String externalTypeId,
TypedValue parent)
Deprecated.
|
Datatype |
getTypeByQualifiedName(javax.xml.namespace.QName qName_)
Gets the current version of a type, given a QName.
|
Datatype |
getTypeByQualifiedName(javax.xml.namespace.QName qName_,
TypedValue parent_)
Deprecated.
|
Datatype[] |
getTypeByQualifiedNames(javax.xml.namespace.QName[] qName_)
Gets the current version of a list of types, given a list of QName.
|
Datatype[] |
getTypeByQualifiedNames(javax.xml.namespace.QName[] qName_,
TypedValue parent_)
Deprecated.
|
Datatype[] |
getTypes(java.lang.Long[] typeIds_)
Get datatypes from the server.
|
Datatype |
getTypeSafe(java.lang.Long typeId)
Deprecated.
use
getType(Long) instead. |
Datatype[] |
getTypesByNamespace(java.lang.String namespace)
Retrieves an array of datatypes with the given namespace.
|
Datatype[] |
getTypesByNamespace(java.lang.String namespace,
TypedValue parent)
Deprecated.
|
ResultPage |
getTypesByParentFilteredPaging(TypedValue parent,
int excludeFlags,
int listsFilteringMode,
int startIndex,
int batchSize,
java.lang.Integer sortProperty,
java.lang.Integer sortOrder)
Deprecated.
|
ResultPage |
getTypesByParentPaging(TypedValue parent,
int startIndex,
int batchSize,
java.lang.Integer sortProperty,
java.lang.Integer sortOrder)
Deprecated.
|
ResultPage |
getTypesFilteredPaging(int excludeFlags,
int listsFilteringMode,
int startIndex,
int batchSize,
java.lang.Integer sortProperty,
java.lang.Integer sortOrder)
Retrieves all the datatypes allowing custom filtering.
|
ResultPage |
getTypesFilteredPaging(int excludeFlags,
int listsFilteringMode,
java.lang.Long[] foundationTypes,
int startIndex,
int batchSize,
java.lang.Integer sortProperty,
java.lang.Integer sortOrder)
Retrieves all the datatypes allowing custom filtering.
|
ResultPage |
getTypesPaging(int startIndex,
int batchSize,
java.lang.Integer sortProperty,
java.lang.Integer sortOrder)
Retrieves all the datatypes.
|
java.lang.Long[] |
getWSDLTypes()
Gets WSDL type ids and their dependents.
|
TypedValue |
insert(TypedValue data,
TypedValue[] indices,
TypedValue insertValue)
Insert a value at indices into data.
|
TypedValue |
select(TypedValue data,
TypedValue[] indices)
Select an item of data from a TypedValue by indices.
|
void |
setVisibilityForType(java.lang.Long typeId_,
boolean visible_)
Sets the visibility for a type.
|
void |
setVisibilityForTypes(java.lang.Long[] typeIds_,
boolean visible_)
Sets the visibility for an array of types.
|
java.lang.String |
suggest(java.lang.String query_,
int maxItems_,
SuggestParam[] params_,
java.lang.Boolean groupResults_)
Queries for content and returns a JSON formatted string to be used by autocomplete.
|
java.lang.String |
suggest(java.lang.String query_,
int maxItems_,
SuggestParam[] params_,
java.lang.Boolean groupResults_,
java.lang.Long[] allowList)
Queries for content and returns a JSON formatted string to be used by autocomplete.
|
TypedValue |
update(TypedValue data,
TypedValue[] indices,
TypedValue assignValue)
Update a value at indices from data.
|
configureContextSensitiveSingletonService
static final java.lang.Integer DEACTIVATE_SUCCESS
static final java.lang.Integer DEACTIVATE_INVALID
static final java.lang.Integer DEACTIVATE_NOT_ALLOWED
static final java.lang.Integer DEACTIVATE_ALREADY_DEACTIVATED
static final int LISTS_NO_FILTERING
static final int LISTS_FILTER_NON_EXPLICIT
static final int LISTS_FILTER_ALL
static final boolean getType$UPDATES
static final boolean getTypeSafe$UPDATES
static final boolean getTypes$UPDATES
static final boolean getDatatypeProperties$UPDATES
static final boolean getInstanceProperties$UPDATES
static final boolean getTypesByNamespace$UPDATES
static final boolean getTypesPaging$UPDATES
static final boolean getTypesByParentPaging$UPDATES
static final boolean getTypesFilteredPaging$UPDATES
static final boolean getTypesByParentFilteredPaging$UPDATES
static final boolean getSystemTypes$UPDATES
static final boolean getSystemTypesByParent$UPDATES
static final boolean setVisibilityForType$UPDATES
static final boolean setVisibilityForTypes$UPDATES
static final boolean suggest$UPDATES
static final boolean getInstancePropertyTypesRecursive$UPDATES
static final boolean getReferencedTypes$UPDATES
static final boolean getTypeByQualifiedName$UPDATES
static final boolean getTypeByQualifiedNames$UPDATES
static final boolean cast$UPDATES
static final boolean select$UPDATES
static final boolean update$UPDATES
static final boolean delete$UPDATES
static final boolean insert$UPDATES
static final boolean deactivateTypes$UPDATES
static final boolean getTypeByExternalTypeId$UPDATES
static final boolean getWSDLTypes$UPDATES
static final boolean getDirectlyReferencedTypes$UPDATES
Datatype getType(java.lang.Long typeId) throws InvalidTypeException
getType
in interface com.appiancorp.type.DataTypeProvider
getType
in interface com.appiancorp.type.ExtendedDataTypeProvider
typeId
- InvalidTypeException
- if there is no type with that id.@Deprecated Datatype getTypeSafe(java.lang.Long typeId)
getType(Long)
instead.getType(Long)
when the typeId
has been validatedgetTypeSafe
in interface com.appiancorp.type.DataTypeProvider
getTypeSafe
in interface com.appiancorp.type.ExtendedDataTypeProvider
typeId
- java.lang.IllegalArgumentException
- if there is no type with that id.Datatype[] getTypes(java.lang.Long[] typeIds_) throws InvalidTypeException
getTypes
in interface com.appiancorp.type.ExtendedDataTypeProvider
typeIds_
- InvalidTypeException
- if any of the types do not existDatatypeProperties getDatatypeProperties(java.lang.Long typeId) throws InvalidTypeException
getDatatypeProperties
in interface com.appiancorp.type.ExtendedDataTypeProvider
typeId
- InvalidTypeException
- if there is no type with that id.NamedTypedValue[] getInstanceProperties(java.lang.Long typeId) throws InvalidTypeException
typeId
- a type idInvalidTypeException
- if the type does not existDatatype[] getTypesByNamespace(java.lang.String namespace)
namespace
- the namespace in which the datatype resides@Deprecated Datatype[] getTypesByNamespace(java.lang.String namespace, TypedValue parent)
getTypesByNamespace(String)
.namespace
- the namespace in which the datatype residesparent
- the parent of the datatype, or null for all datatypesResultPage getTypesPaging(int startIndex, int batchSize, java.lang.Integer sortProperty, java.lang.Integer sortOrder)
startIndex
- The index into the collection of total results at
which to start. Negative numbers are treated as zeros.batchSize
- The number of results to return.
Use Constants.COUNT_ALL
to return the entire collection, but this is STRONGLY discouraged.sortProperty
- The property by which the results will be sorted.
This is one of the SORT_BY_XXX
constants located in
Datatype
sortOrder
- the order in which to sort the results. This is either
Constants.SORT_ORDER_ASCENDING
or
Constants.SORT_ORDER_DESCENDING
ResultPage
containing Datatype
objects.@Deprecated ResultPage getTypesByParentPaging(TypedValue parent, int startIndex, int batchSize, java.lang.Integer sortProperty, java.lang.Integer sortOrder)
getTypesPaging(int, int, Integer, Integer)
.parent
- The parent of the datatype, or null for all datatypes.startIndex
- The index into the collection of total results at
which to start. Negative numbers are treated as zeros.batchSize
- The number of results to return.
Use Constants.COUNT_ALL
to return the entire collection, but this is STRONGLY discouraged.sortProperty
- The property by which the results will be sorted.
This is one of the SORT_BY_XXX
constants located in
Datatype
sortOrder
- the order in which to sort the results. This is either
Constants.SORT_ORDER_ASCENDING
or
Constants.SORT_ORDER_DESCENDING
ResultPage
containing Datatype
objects.ResultPage getTypesFilteredPaging(int excludeFlags, int listsFilteringMode, int startIndex, int batchSize, java.lang.Integer sortProperty, java.lang.Integer sortOrder)
getTypesPaging(int, int, java.lang.Integer, java.lang.Integer)
. Specifying other values for excludeFlags and
listsFilteringMode allows doing additional filtering on the data; for example, to
retrieve all types that are not hidden and not lists, call:
getTypesFilteredPaging(Datatype.FLAG_HIDDEN, true, ...)excludeFlags
- A mask (such as Datatype.FLAG_SYSTEM | Datatype.FLAG_HIDDEN)
allowing datatypes with particular flags to be filtered out. Pass in 0 to
not do any flag-based filtering.listsFilteringMode
- One of the LISTS_XXX constants of this interfacestartIndex
- The index into the collection of total results at which to
start. Negative numbers are treated as zeros.batchSize
- The number of results to return. Use
Constants.COUNT_ALL
to return the
entire collection, but this is STRONGLY discouraged.sortProperty
- The property by which the results will be sorted. This is one
of the SORT_BY_XXX
constants located in Datatype
sortOrder
- the order in which to sort the results. This is either
Constants.SORT_ORDER_ASCENDING
or
Constants.SORT_ORDER_DESCENDING
ResultPage
containing Datatype
objects.ResultPage getTypesFilteredPaging(int excludeFlags, int listsFilteringMode, java.lang.Long[] foundationTypes, int startIndex, int batchSize, java.lang.Integer sortProperty, java.lang.Integer sortOrder)
In addition, a list of datatypes can be provided in order to constrain the resulting list of types to those that have a foundation contained in the given list.
excludeFlags
- A mask (such as Datatype.FLAG_SYSTEM | Datatype.FLAG_HIDDEN)
allowing datatypes with particular flags to be filtered out. Pass in 0 to
not do any flag-based filtering.listsFilteringMode
- One of the LISTS_XXX constants of this interfacefoundationTypes
- The list of types returned will all satisfy the constraint that their foundation types will be listed in this array.startIndex
- The index into the collection of total results at which to
start. Negative numbers are treated as zeros.batchSize
- The number of results to return. Use
Constants.COUNT_ALL
to return the
entire collection, but this is STRONGLY discouraged.sortProperty
- The property by which the results will be sorted. This is one
of the SORT_BY_XXX
constants located in Datatype
sortOrder
- the order in which to sort the results. This is either
Constants.SORT_ORDER_ASCENDING
or
Constants.SORT_ORDER_DESCENDING
ResultPage
containing Datatype
objects.@Deprecated ResultPage getTypesByParentFilteredPaging(TypedValue parent, int excludeFlags, int listsFilteringMode, int startIndex, int batchSize, java.lang.Integer sortProperty, java.lang.Integer sortOrder)
getTypesFilteredPaging(int, int, int, int, Integer, Integer)
.getTypesByParentPaging(com.appiancorp.suiteapi.type.TypedValue, int, int, java.lang.Integer, java.lang.Integer)
. Specifying other values for excludeFlags and
listsFilteringMode allows doing additional filtering on the data; for example, to
retrieve all types that are not hidden and not lists, call:
getTypesByParentFilteredPaging(null, Datatype.FLAG_HIDDEN, true, ...)parent
- The parent of the datatype, or null for all datatypes.excludeFlags
- A mask (such as Datatype.FLAG_SYSTEM | Datatype.FLAG_HIDDEN)
allowing datatypes with particular flags to be filtered out. Pass in 0 to
not do any flag-based filtering.listsFilteringMode
- One of the LISTS_XXX constants of this interfacestartIndex
- The index into the collection of total results at which to
start. Negative numbers are treated as zeros.batchSize
- The number of results to return. Use
Constants.COUNT_ALL
to return the
entire collection, but this is STRONGLY discouraged.sortProperty
- The property by which the results will be sorted. This is one
of the SORT_BY_XXX
constants located in Datatype
sortOrder
- the order in which to sort the results. This is either
Constants.SORT_ORDER_ASCENDING
or
Constants.SORT_ORDER_DESCENDING
ResultPage
containing Datatype
objects.Datatype[] getSystemTypes()
@Deprecated Datatype[] getSystemTypesByParent(TypedValue parent)
getSystemTypes()
.parent
- The parent of the datatype, or null for all datatypesvoid setVisibilityForType(java.lang.Long typeId_, boolean visible_) throws InvalidTypeException
DataTypeProperties.FLAG_HIDDEN
flag will be removed) and
if the type is temporary, then it will be made permanent (the
DataTypeProperties.FLAG_TEMPORARY
flag will be removed). If the visible_ parameter
is false, the type will be made hidden.
This method is not safe for clustered appservers due to Datatype caching; another
communication mechanism must be used to communicate this information to the
other clustered appservers' Datatype caches.typeIds_
- the types to modifyvisible_
- whether or not to make the types visibleInvalidTypeException
- if any of the types do not existvoid setVisibilityForTypes(java.lang.Long[] typeIds_, boolean visible_) throws InvalidTypeException
DataTypeProperties.FLAG_HIDDEN
flag will be
removed) and any temporary types will be made permanent (the
DataTypeProperties.FLAG_TEMPORARY
flag will be removed). If the visible_ parameter
is false, all types will be made hidden.
This method is not safe for clustered appservers due to Datatype caching; another
communication mechanism must be used to communicate this information to the
other clustered appservers' Datatype caches.typeIds_
- the types to modifyvisible_
- whether or not to make the types visibleInvalidTypeException
- if any of the types do not existjava.lang.String suggest(java.lang.String query_, int maxItems_, SuggestParam[] params_, java.lang.Boolean groupResults_)
query_
- querymaxItems_
- max number of items to returnparams_
- list of information on what is being suggested and what format the results should be in. valid types are rules.groupResults_
- if specifying more than one SuggestParam, would you like to group the results by type, or mixed together and
sorted? Default is true. If grouped, order of types matches the order of the suggestParams passed in.java.lang.String suggest(java.lang.String query_, int maxItems_, SuggestParam[] params_, java.lang.Boolean groupResults_, java.lang.Long[] allowList)
query_
- querymaxItems_
- max number of items to returnparams_
- list of information on what is being suggested and what format the results should be in. valid types are rules.groupResults_
- if specifying more than one SuggestParam, would you like to group the results by type, or mixed together and
sorted? Default is true. If grouped, order of types matches the order of the suggestParams passed in.allowList
- list of IDs that will be automatically added to returned results, filtered by query. Ignored if null or empty.java.util.Set<java.lang.Long> getInstancePropertyTypesRecursive(java.lang.Long typeId_) throws InvalidTypeException
typeId_
- The type for which we want all referenced typesInvalidTypeException
java.util.List<Datatype> getReferencedTypes(java.lang.Long typeId_) throws InvalidTypeException
typeId_
- the target datatype idInvalidTypeException
java.util.List<Datatype> getReferencedTypes(java.lang.Long[] typeIds_) throws InvalidTypeException
typeId_
- the target datatype idsInvalidTypeException
Datatype getTypeByQualifiedName(javax.xml.namespace.QName qName_)
getTypeByQualifiedName
in interface com.appiancorp.type.ExtendedDataTypeProvider
qName_
- The QName that identifies the type. The namespaceURI and localPart must be
set. Prefix is ignored.@Deprecated Datatype getTypeByQualifiedName(javax.xml.namespace.QName qName_, TypedValue parent_)
getTypeByQualifiedName(QName)
.qName_
- The QName that identifies the type. The namespaceURI and localPart must be
set. Prefix is ignored.parent
- the parent of the datatype, or null for all datatypesDatatype[] getTypeByQualifiedNames(javax.xml.namespace.QName[] qName_)
getTypeByQualifiedNames
in interface com.appiancorp.type.ExtendedDataTypeProvider
qName_
- The QName list that identifies the types. For each element the namespaceURI and localPart must be
set. Prefix is ignored.@Deprecated Datatype[] getTypeByQualifiedNames(javax.xml.namespace.QName[] qName_, TypedValue parent_)
getTypeByQualifiedNames(QName[])
.qName_
- The QName that identifies the type. The namespaceURI and localPart must be
set. Prefix is ignored.parent
- the parent of the datatypes, or null for all datatypesTypedValue cast(java.lang.Long toTypeId, TypedValue value)
toTypeId
- value
- java.lang.ClassCastException
- if the cast is invalidTypedValue select(TypedValue data, TypedValue[] indices)
data
- Data from which the value is selected.indices
- Typically, indices will be either integer (based at 1) for
lists, list of integer (based at 1) for lists, or string for records.
Each successive index digs deeper into records.TypedValue update(TypedValue data, TypedValue[] indices, TypedValue assignValue)
data
- Data from which the value is selected.indices
- Typically, indices will be either integer (based at 1) for
lists, list of integer (based at 1) for lists, or string for records.
Each successive index digs deeper into records.assignValue
- TypedValue delete(TypedValue data, TypedValue[] indices)
data
- Data from which the value is deleted.indices
- Typically, indices will be either integer (based at 1) for
lists, list of integer (based at 1) for lists, or string for records.
Each successive index digs deeper into records.TypedValue insert(TypedValue data, TypedValue[] indices, TypedValue insertValue)
data
- Data into which the value is selected.indices
- Typically, indices will be either integer (based at 1) for
lists, list of integer (based at 1) for lists, or string for records. The
insertion point is before the index.
Each successive index digs deeper into records.insertValue
- ResultList deactivateTypes(java.lang.Long[] typeIds) throws PrivilegeException
DataTypeProperties.FLAG_DEACTIVATED
is added for the type. The
type's qualified name (returned by DatatypeProperties.getQualifiedName()
) will have
its local part modified to "[OriginalLocalPart]^n" where 'n' is the next number in
the sequence of deleted types with the same qualified name. If the local part is
blank, no change will be made. If not blank, the type's name (returned by
DatatypeProperties.getName()
) will be modified to "[OriginalTypeName]^n" where 'n'
is the same value as that appended to the local part of the qualified name. Except
for invalid and system types passed in, the list type of each specified type will
be deactivated as well.typeIds
- the types to deactivateResultList
.
ResultList.getResultCodes()
will return the result codes
corresponding to the type ids passed in, followed by the codes
corresponding to automatic deactivations (ie. lists). The DEACTIVATE_XXX
constants of this interface make up the possible result codes. Result.getResults()
will return a Datatype[]
of the same length as the result
codes. The value at each index will be either the up-to-date
Datatype
or null for invalid type ids.PrivilegeException
- if the user does not have sufficient privileges to
deactivate types. Only system administrators can deactivate types.Datatype getTypeByExternalTypeId(java.lang.String externalTypeId)
getTypeByExternalTypeId
in interface com.appiancorp.type.ExtendedDataTypeProvider
externalTypeId
- the external type id that identifies the type. It cannot be null.java.lang.Long[] getWSDLTypes()
@Deprecated Datatype getTypeByExternalTypeId(java.lang.String externalTypeId, TypedValue parent)
getTypeByExternalTypeId(String)
.externalTypeId
- the external type id that identifies the type. It cannot be null.parent
- the parent of the datatype, or null for all datatypesjava.util.List<Datatype> getDirectlyReferencedTypes(java.lang.Long... typeIds)
getDirectlyReferencedTypes
in interface com.appiancorp.type.ExtendedDataTypeProvider
typeIds
- target datatypesCopyright © 2003-2024 Appian Corporation. All Rights Reserved.