|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.core.api.style.Style.Builder
public static final class Style.Builder
A builder which can be used to construct Style
instances.
Enforces the constraints of the StyleContract
.
Method Summary | |
---|---|
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 |
getName()
Returns the name of this style. |
String |
getObjectId()
Return the globally unique object id of this object. |
Long |
getStyleId()
Returns the identifier of this style. |
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 |
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 |
setStyleId(Long styleId)
Sets the styleId 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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 blank
IllegalArgumentException
- 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 values
IllegalArgumentException
- if the given contract is nullpublic Style build()
ModelBuilder
build
in interface ModelBuilder
public Long getStyleId()
StyleContract
getStyleId
in interface StyleContract
public void setStyleId(Long styleId)
styleId
- the styleId 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
blank
IllegalArgumentException
- 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 set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |