|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.rice.krms.api.repository.function.FunctionDefinition.Builder
public static final class FunctionDefinition.Builder
A builder which can be used to construct FunctionDefinition
instances. Enforces the constraints of the FunctionDefinitionContract.
| Method Summary | |
|---|---|
FunctionDefinition |
build()
Returns an instance of the object being built by this builder based on the current state of the builder. |
static FunctionDefinition.Builder |
create(FunctionDefinitionContract contract)
Creates and populates a builder with the data on the given FunctionDefinitionContract. |
static FunctionDefinition.Builder |
create(String namespace,
String name,
String returnType,
String typeId)
Creates a function definition builder with the given required values. |
List<CategoryDefinition.Builder> |
getCategories()
Returns an ordered list of the categories which this function definition requires. |
String |
getDescription()
Returns the description of this function definition. |
String |
getId()
The unique identifier for an object. |
String |
getName()
Returns the name of this function definition. |
String |
getNamespace()
Returns the namespace code of this function definition. |
List<FunctionParameterDefinition.Builder> |
getParameters()
Returns an ordered, immutable list of the parameters which this function definition requires. |
String |
getReturnType()
Returns the type of the return value of the function defined by this function definition. |
String |
getTypeId()
Returns the id of the KrmsTypeDefinition which defines the
actual implementation of this function such that it can be loaded into
the engine and executed. |
Long |
getVersionNumber()
Returns the version number for this object. |
boolean |
isActive()
The active indicator for an object. |
void |
setActive(boolean active)
Sets the active flag for the function definition that will be returned by this builder. |
void |
setCategories(List<CategoryDefinition.Builder> categories)
Sets the category for the function definition that will be returned by this builder. |
void |
setDescription(String description)
Sets the description for the function definition that will be returned by this builder. |
void |
setId(String id)
Sets the id for the function definition that will be returned by this builder. |
void |
setName(String name)
Sets the name for the function definition that will be returned by this builder. |
void |
setNamespace(String namespace)
Sets the namespace code for the function definition that will be returned by this builder. |
void |
setParameters(List<FunctionParameterDefinition.Builder> parameters)
Sets the parameters for the function definition that will be returned by this builder. |
void |
setReturnType(String returnType)
Sets the return type for the function definition that will be returned by this builder. |
void |
setTypeId(String typeId)
Sets the id of the KrmsTypeDefinition which defines the
actual implementation of this function. |
void |
setVersionNumber(Long versionNumber)
Sets the version number for the function definition that will be returned by this builder. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static FunctionDefinition.Builder create(String namespace,
String name,
String returnType,
String typeId)
FunctionDefinition object should be created.
Will default the active flag to true.
namespace - the namespace of the function definition to create, must not be null or blankname - the name of the function definition to create, must not be null or blankreturnType - the return type of the function definition to create, must not be null or blanktypeId - the return type id of the function definition to create, must not be null or blank
IllegalArgumentException - if any of the given arguments is null or blankpublic static FunctionDefinition.Builder create(FunctionDefinitionContract contract)
FunctionDefinitionContract.
This is similar in nature to a "copy constructor" for FunctionDefinition.
contract - an object implementing the FunctionDefinitionContract from which
to copy property values
IllegalArgumentException - if the given contract is nullpublic FunctionDefinition build()
ModelBuilder
build in interface ModelBuilderpublic String getId()
Identifiable
getId in interface Identifiablepublic void setId(String id)
id - the function definition id to setpublic String getNamespace()
FunctionDefinitionContract
getNamespace in interface FunctionDefinitionContractpublic void setNamespace(String namespace)
namespace - the namespace code to set on this builder, must not be null or blank
IllegalArgumentException - if the given namespace is null or blankpublic String getName()
FunctionDefinitionContract
getName in interface FunctionDefinitionContractpublic void setName(String name)
name - the name to set on this builder, must not be null or blank
IllegalArgumentException - if the given name is null or blankpublic String getDescription()
FunctionDefinitionContract
getDescription in interface FunctionDefinitionContractpublic void setDescription(String description)
description - the description to set on this builderpublic String getReturnType()
FunctionDefinitionContract
getReturnType in interface FunctionDefinitionContractpublic void setReturnType(String returnType)
returnType - the returnType to set on this builder, must not be null or blank
IllegalArgumentException - if the given returnType is null or blankpublic String getTypeId()
FunctionDefinitionContractKrmsTypeDefinition which defines the
actual implementation of this function such that it can be loaded into
the engine and executed.
getTypeId in interface FunctionDefinitionContractpublic void setTypeId(String typeId)
KrmsTypeDefinition which defines the
actual implementation of this function. The typeId must not be
null or blank.
typeId - the typeId to set on this builder, must not be null or blank
IllegalArgumentException - if the given typeId is null or blankpublic boolean isActive()
Inactivatable
isActive in interface Inactivatablepublic void setActive(boolean active)
active - the active flag to setpublic Long getVersionNumber()
Versioned
getVersionNumber in interface Versionedpublic void setVersionNumber(Long versionNumber)
In general, this value should not be manually set on the builder,
but rather copied from an existing FunctionDefinitionContract when
invoking create(FunctionDefinitionContract).
versionNumber - the version number to setpublic List<FunctionParameterDefinition.Builder> getParameters()
FunctionDefinitionContract
getParameters in interface FunctionDefinitionContractpublic void setParameters(List<FunctionParameterDefinition.Builder> parameters)
FunctionParameterDefinition
instances that will form the parameters of this function definition. The given list
must not be null.
parameters - a list of builders for the parameters which will be specified on this function definition
IllegalArgumentException - if the given parameters list is nullpublic List<CategoryDefinition.Builder> getCategories()
FunctionDefinitionContract
getCategories in interface FunctionDefinitionContractpublic void setCategories(List<CategoryDefinition.Builder> categories)
CategoryDefinition
instances that will form the categories of this function definition. The given list
must not be null.
categories - a list of builders for the categories which will be specified on this function definition
IllegalArgumentException - if the given categories list is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||