public static final class Style.Builder extends Object implements StyleContract, ModelBuilder, Serializable
Style
instances.
Enforces the constraints of the StyleContract
.Modifier and Type | Method and Description |
---|---|
Style |
build()
Returns an instance of the object being built by this builder based
on the current state of the builder.
|
static Style.Builder |
create(String name)
Creates a style builder with the given required values.
|
static Style.Builder |
create(StyleContract contract)
Creates a populates a builder with the data on the given StyleContract.
|
String |
getId()
The unique identifier for an object.
|
String |
getName()
Returns the name of this style.
|
String |
getObjectId()
Return the globally unique object id of this object.
|
Long |
getVersionNumber()
Returns the version number for this object.
|
String |
getXmlContent()
Returns the XML definition of this style as a String.
|
boolean |
isActive()
The active indicator for an object.
|
void |
setActive(boolean active)
Sets the active flag for the style that will be returned by this
builder.
|
void |
setId(String id)
Sets the id for the style that will be returned by this builder.
|
void |
setName(String name)
Sets the name for the style that will be returned by this builder.
|
void |
setObjectId(String objectId)
Sets the globally unique object ID for the style that will be
returned by this builder.
|
void |
setVersionNumber(Long versionNumber)
Sets the version number for the style that will be returned by this
builder.
|
void |
setXmlContent(String xmlContent)
Sets the XML content for the style that will be returned by this
builder.
|
public static Style.Builder create(String name)
Style
object should be created.
Will default the active flag to true.
name
- the name of the style to create, must not be null or blankIllegalArgumentException
- if the given name is null or blankpublic static Style.Builder create(StyleContract contract)
contract
- an object implementing the StyleContract from which
to copy property valuesIllegalArgumentException
- if the given contract is nullpublic Style build()
ModelBuilder
build
in interface ModelBuilder
public String getId()
Identifiable
getId
in interface Identifiable
public void setId(String id)
id
- the id to setpublic String getName()
StyleContract
getName
in interface StyleContract
public void setName(String name)
name
- the name to set on this builder, must not be null or
blankIllegalArgumentException
- if the given name is null or blankpublic String getXmlContent()
StyleContract
getXmlContent
in interface StyleContract
public void setXmlContent(String xmlContent)
xmlContent
- the xmlContent to set on this builderpublic boolean isActive()
Inactivatable
isActive
in interface Inactivatable
public void setActive(boolean active)
active
- the active flag to setpublic Long getVersionNumber()
Versioned
getVersionNumber
in interface Versioned
public void setVersionNumber(Long versionNumber)
In general, this value should not be manually set on the builder,
but rather copied from an existing StyleContract
when
invoking create(StyleContract)
.
versionNumber
- the version number to setpublic String getObjectId()
GloballyUnique
getObjectId
in interface GloballyUnique
public void setObjectId(String objectId)
In general, this value should not be manually set on the builder,
but rather copied from an existing StyleContract
when
invoking create(StyleContract)
.
objectId
- the object ID to setCopyright © 2005–2016 The Kuali Foundation. All rights reserved.