|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectspcp7.imagegallery.abstractionlayer.util.PropertyDTO
public class PropertyDTO
This class was created to provide a more convenient way to handle properties than the persistent jpa class. All boolean properties will be validated before setting them to always get a valid state. Furthermore we do not want to expose the persistent class to users of the api. Instead of "key" and "value" the German equivalents "schluessel" and "wert" are used, because key and value are often keywords in databases.
| Constructor Summary | |
|---|---|
PropertyDTO()
Deafult constructor. |
|
PropertyDTO(java.lang.String schluessel,
java.lang.String wert)
|
|
| Method Summary | |
|---|---|
java.lang.Boolean |
getBool()
If your property value is a boolean value and you only want boolean values in the "wert" field to be valid this should be true. |
java.lang.Boolean |
getBrowseable()
If the property resembles a path which can be browsed as a hierarchical structure, set this to true. |
java.lang.Boolean |
getDeletable()
Should the property be deletable? |
java.lang.Boolean |
getFolderSelection()
If this is set to true the field "wert" contains a value which must be a folder. |
java.lang.Long |
getId()
The id of the property |
java.lang.Boolean |
getImageSelection()
If this is set to true only images can be selected when using a browseable view. |
java.lang.Boolean |
getNumber()
If the "wert" field of this property contains a number and only numbers should be valid, this will be set to true. |
java.lang.String |
getSchluessel()
This method gets the key of the property. |
java.lang.Boolean |
getUrlSelection()
If the "wert" field should be a http retrievable url and the wert field is set to a ContentFace.getUrl(), set this to true. |
java.lang.Boolean |
getVisible()
|
java.lang.String |
getWert()
This method gets the value of the property. |
void |
setBool(java.lang.Boolean bool)
This field and PropertyModelFace.getNumber()
PropertyModelFace.getBrowseable()
PropertyModelFace.getFolderSelection()
PropertyModelFace.getImageSelection()
PropertyModelFace.getUrlSelection()
must not be set to true at the same time. |
void |
setBrowseable(java.lang.Boolean browseable)
|
void |
setDeletable(java.lang.Boolean deletable)
Set if property should be deletable, or not. |
void |
setFolderSelection(java.lang.Boolean folderSelection)
This field and PropertyModelFace.getNumber()
PropertyModelFace.getBool()
PropertyModelFace.getImageSelection()
PropertyModelFace.getUrlSelection()
must not be set to true at the same time whereas PropertyModelFace.getBrowseable()
should be. |
void |
setId(java.lang.Long id)
Normally this should not be set manually but by the persistence provider. |
void |
setImageSelection(java.lang.Boolean imageSelection)
This field and PropertyModelFace.getNumber()
PropertyModelFace.getBool()
PropertyModelFace.getFolderSelection()
PropertyModelFace.getUrlSelection()
must not be set to true at the same time whereas PropertyModelFace.getBrowseable()
should be. |
void |
setNumber(java.lang.Boolean number)
This field and PropertyModelFace.getBool()
PropertyModelFace.getBrowseable()
PropertyModelFace.getFolderSelection()
PropertyModelFace.getImageSelection()
PropertyModelFace.getUrlSelection()
must not be set to true at the same time. |
void |
setSchluessel(java.lang.String schluessel)
|
void |
setUrlSelection(java.lang.Boolean urlSelection)
|
void |
setVisible(java.lang.Boolean visible)
|
void |
setWert(java.lang.String wert)
|
boolean |
validate()
Attention! |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyDTO(java.lang.String schluessel,
java.lang.String wert)
schluessel - wert - public PropertyDTO()
| Method Detail |
|---|
public boolean validate()
wert and schluessel are not null. The boolean
properties are validated within the setter methods.
validate in interface PropertyModelFacepublic java.lang.Long getId()
PropertyModelFace
getId in interface PropertyModelFacePropertyModelFace.getId()public void setId(java.lang.Long id)
PropertyModelFace
setId in interface PropertyModelFaceid - the id to set.PropertyModelFace.setId(java.lang.Long)public java.lang.Boolean getBool()
PropertyModelFace
getBool in interface PropertyModelFacePropertyModelFace.getBool()public void setBool(java.lang.Boolean bool)
PropertyModelFacePropertyModelFace.getNumber()PropertyModelFace.getBrowseable()PropertyModelFace.getFolderSelection()PropertyModelFace.getImageSelection()PropertyModelFace.getUrlSelection()
setBool in interface PropertyModelFacebool - True if the value(wert) of this property should only
contain Boolean values, false otherwise.PropertyModelFace.setBool(java.lang.Boolean)public java.lang.Boolean getBrowseable()
PropertyModelFace
getBrowseable in interface PropertyModelFacePropertyModelFace.getBrowseable()public void setBrowseable(java.lang.Boolean browseable)
setBrowseable in interface PropertyModelFacebrowseable - True if the property resembles a full, browseable,
absolute path, false otherwise.PropertyModelFace.setBrowseable(java.lang.Boolean)public java.lang.Boolean getDeletable()
PropertyModelFace
getDeletable in interface PropertyModelFacePropertyModelFace.getDeletable()public void setDeletable(java.lang.Boolean deletable)
PropertyModelFace
setDeletable in interface PropertyModelFacedeletable - true if property should be deletable, false otherwise.PropertyModelFace.setDeletable(java.lang.Boolean)public java.lang.String getSchluessel()
PropertyModelFaceContentProviderRegistryFace.getDefaultProperties()
getSchluessel in interface PropertyModelFacePropertyModelFace.getSchluessel()public void setSchluessel(java.lang.String schluessel)
setSchluessel in interface PropertyModelFaceschluessel - The key of this propertyPropertyModelFace.setSchluessel(java.lang.String)public java.lang.String getWert()
PropertyModelFace
getWert in interface PropertyModelFacePropertyModelFace.getWert()public void setWert(java.lang.String wert)
setWert in interface PropertyModelFacewert - The value of this property.PropertyModelFace.setWert(java.lang.String)public java.lang.Boolean getFolderSelection()
PropertyModelFace
getFolderSelection in interface PropertyModelFacePropertyModelFace.getFolderSelection()public void setFolderSelection(java.lang.Boolean folderSelection)
PropertyModelFacePropertyModelFace.getNumber()PropertyModelFace.getBool()PropertyModelFace.getImageSelection()PropertyModelFace.getUrlSelection()PropertyModelFace.getBrowseable()
should be.
setFolderSelection in interface PropertyModelFacePropertyModelFace.setFolderSelection(java.lang.Boolean)public java.lang.Boolean getUrlSelection()
PropertyModelFaceContentFace.getUrl(), set this to true.
getUrlSelection in interface PropertyModelFacePropertyModelFace.getUrlSelection()public void setUrlSelection(java.lang.Boolean urlSelection)
setUrlSelection in interface PropertyModelFaceurlSelection - True if the "wert" field of this property should be a
selectable url.PropertyModelFace.setUrlSelection(java.lang.Boolean)public java.lang.Boolean getImageSelection()
PropertyModelFace
getImageSelection in interface PropertyModelFacePropertyModelFace.getImageSelection()public void setImageSelection(java.lang.Boolean imageSelection)
PropertyModelFacePropertyModelFace.getNumber()PropertyModelFace.getBool()PropertyModelFace.getFolderSelection()PropertyModelFace.getUrlSelection()PropertyModelFace.getBrowseable()
should be.
setImageSelection in interface PropertyModelFaceimageSelection - true if only images should be selectable, false otherwise.PropertyModelFace.setImageSelection(java.lang.Boolean)public java.lang.Boolean getNumber()
PropertyModelFace
getNumber in interface PropertyModelFacePropertyModelFace.getNumber()public void setNumber(java.lang.Boolean number)
PropertyModelFacePropertyModelFace.getBool()PropertyModelFace.getBrowseable()PropertyModelFace.getFolderSelection()PropertyModelFace.getImageSelection()PropertyModelFace.getUrlSelection()
setNumber in interface PropertyModelFacenumber - True if the value(wert) of this property should only
contain Boolean numbers, false otherwise.PropertyModelFace.setNumber(java.lang.Boolean)public java.lang.Boolean getVisible()
getVisible in interface PropertyModelFacePropertyModelFace.getVisible()public void setVisible(java.lang.Boolean visible)
setVisible in interface PropertyModelFacevisible - True if the value should be visible in the gui, false if
it is only used internally.PropertyModelFace.setVisible(java.lang.Boolean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||