@Named(value="storyEditorBean") @SessionScoped public class StoryEditorBean extends Object implements Serializable
| Constructor and Description |
|---|
StoryEditorBean() |
| Modifier and Type | Method and Description |
|---|---|
String |
createNew()
Prepares the form for creating a new story.
|
List<es.uvigo.esei.microstories.domain.types.GenreType> |
getAvailableGenres()
Returns a list of available genres.
|
List<es.uvigo.esei.microstories.domain.types.ThemeType> |
getAvailableThemes()
Returns a list of available themes.
|
String |
getContent() |
int |
getMaxContentLength()
Returns the maximum content length based on the selected genre.
|
es.uvigo.esei.microstories.domain.types.GenreType |
getSelectedGenre() |
List<es.uvigo.esei.microstories.domain.types.ThemeType> |
getSelectedThemes() |
Long |
getStoryId() |
String |
getTitle() |
void |
init()
Initializes the bean for creating a new story or editing an existing one.
|
boolean |
isEditMode() |
boolean |
isPublished() |
boolean |
isReadOnly()
Checks if the form is in read-only mode (published story).
|
void |
resetForm()
Resets the form to create a new story.
|
String |
save()
Creates a new story or updates an existing one.
|
void |
setContent(String content) |
void |
setEditMode(boolean editMode) |
void |
setPublished(boolean published) |
void |
setSelectedGenre(es.uvigo.esei.microstories.domain.types.GenreType selectedGenre) |
void |
setSelectedThemes(List<es.uvigo.esei.microstories.domain.types.ThemeType> selectedThemes) |
void |
setStoryId(Long storyId) |
void |
setTitle(String title) |
public void init()
public void resetForm()
public String save()
public String createNew()
public int getMaxContentLength()
public List<es.uvigo.esei.microstories.domain.types.GenreType> getAvailableGenres()
public List<es.uvigo.esei.microstories.domain.types.ThemeType> getAvailableThemes()
public boolean isReadOnly()
public Long getStoryId()
public void setStoryId(Long storyId)
public String getTitle()
public void setTitle(String title)
public es.uvigo.esei.microstories.domain.types.GenreType getSelectedGenre()
public void setSelectedGenre(es.uvigo.esei.microstories.domain.types.GenreType selectedGenre)
public List<es.uvigo.esei.microstories.domain.types.ThemeType> getSelectedThemes()
public void setSelectedThemes(List<es.uvigo.esei.microstories.domain.types.ThemeType> selectedThemes)
public String getContent()
public void setContent(String content)
public boolean isEditMode()
public void setEditMode(boolean editMode)
public boolean isPublished()
public void setPublished(boolean published)
Copyright © 2025. All rights reserved.