|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectspcp7.imagegallery.view.managedbean.EditBean
public class EditBean
Backing Bean which handles the whole administration of content folders. The ICEFaces counterpart is called "Edit.jspx". This class might be big but in my opinion it is important to keep the functions handling administration together. Administration of content folders in a whole is quite complex and that is why this class is on this scale.
| Constructor Summary | |
|---|---|
EditBean()
Contstructor which initializes the tree, determines the resource bundle and so on. |
|
| Method Summary | |
|---|---|
void |
addContentFolder(javax.faces.event.ActionEvent ae)
JSF callable method fo adding a content folder. |
void |
cancelConfirmationDialog(javax.faces.event.ActionEvent ae)
JSF callable method for disabling the confirmation dialog. |
void |
closeBrowsingPanel(javax.faces.event.ActionEvent e)
JSF callable method for disabling the brwosing panel. |
void |
deleteContentFolder(javax.faces.event.ActionEvent ae)
JSF callable method for deleting a content folder |
void |
deleteProperties(javax.faces.event.ActionEvent ae)
JSF callable method for deleting properties of the currently selected content provider. |
void |
deleteSelectedNode(javax.faces.event.ActionEvent event)
Deletes the selected tree node. |
java.lang.String |
getAddFolder_name()
|
java.util.List<javax.faces.model.SelectItem> |
getAllContentProviders()
|
java.util.ResourceBundle |
getBundle()
|
ContentProviderRegistryFace |
getCpr()
|
ContentFace |
getCurrenContentParent()
|
java.util.List<EditContentWrapper> |
getCurrentBrowsedContent()
|
boolean |
getCurrentBrowsedContentEmpty()
|
java.lang.String |
getCurrentBrowsedPath()
|
java.util.List<PropertyWrapper> |
getCurrentProperties()
|
javax.faces.context.FacesContext |
getFacesContext()
|
javax.swing.tree.DefaultTreeModel |
getModel()
Gets the tree model |
java.lang.String |
getSelectedContentProvider()
|
DynamicNodeUserObject |
getSelectedNodeObject()
Gets the currently selected node, which contains a content folder object. |
java.lang.String |
getSpcp7_start_retrieval_path()
For JSF accessibility. |
boolean |
isShowBrowsingPanel()
|
boolean |
isShowConfirmDeletionPanel()
|
boolean |
isShowFolderDetails()
|
void |
makeConfirmDeletionPanelVisible(javax.faces.event.ActionEvent ae)
Show the confirm deletion panel |
void |
retrieveCurrentBrowsedContent(ContentFace content,
PropertyWrapper appropriateProperty)
Retrieves the current browsed content for the browsing view. |
void |
retrieveCurrentParentContent(PropertyWrapper appropriateProperty)
Retrieves the content of the current and sets currentBrowsedContent using selectedNodeObject,
cpr and bundle for error messages. |
void |
retrieveInitialBrowsedContent(java.lang.String startRetrievalPath,
PropertyWrapper appropriateProperty)
Should be called when starting to browse content from a property. |
void |
setAddFolder_name(java.lang.String addFolder_name)
|
void |
setAllContentProviders(java.util.List<javax.faces.model.SelectItem> allContentProviders)
|
void |
setCurrentBrowsedContent(java.util.List<EditContentWrapper> currentBrowsedContent)
|
void |
setCurrentProperties(java.util.List<PropertyWrapper> currentProperties)
|
void |
setSelectedContentProvider(java.lang.String selectedContentProvider)
|
void |
setSelectedNodeObject(DynamicNodeUserObject selectedNodeObject)
Sets the node which is currently selected. |
void |
setShowConfirmDeletionPanel(boolean showConfirmDeletionPanel)
|
void |
setShowModalPanel(boolean showModalPanel)
|
void |
stateChanged(ContentFolderModelFace source,
java.lang.String contentFolderEventType)
If the event is insert the content folder is added to the current tree. |
void |
unlockSpcp7_start_retrieval_path(javax.faces.event.ActionEvent ae)
|
void |
updateContentFolder(javax.faces.event.ActionEvent ae)
Updates a content folder with content from selectedNodeObject. |
void |
updateContentPath(EditContentWrapper cw)
If a the content of a property has changed via the browsing view this method updates the view and inserts the path of the EditContentWrapper.getContent() into the property in the view. |
void |
updateContentUrl(EditContentWrapper cw)
If a the content of a property has changed via the browsing view this method updates the view and inserts the url of the EditContentWrapper.getContent() into the property in the view. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EditBean()
| Method Detail |
|---|
public void addContentFolder(javax.faces.event.ActionEvent ae)
cpr,addFolder_name
and bundle.
ae - public void cancelConfirmationDialog(javax.faces.event.ActionEvent ae)
ae - showConfirmDeletionPanelpublic void closeBrowsingPanel(javax.faces.event.ActionEvent e)
ae - showBrowsingPanelpublic void deleteContentFolder(javax.faces.event.ActionEvent ae)
ae - public void deleteProperties(javax.faces.event.ActionEvent ae)
ae - public void deleteSelectedNode(javax.faces.event.ActionEvent event)
event - that fired this method#isDeleteDisabled(), isCopyDisabled()public java.lang.String getAddFolder_name()
public java.util.List<javax.faces.model.SelectItem> getAllContentProviders()
public ContentFace getCurrenContentParent()
public java.util.List<EditContentWrapper> getCurrentBrowsedContent()
public java.util.List<PropertyWrapper> getCurrentProperties()
public javax.swing.tree.DefaultTreeModel getModel()
public java.lang.String getSelectedContentProvider()
public DynamicNodeUserObject getSelectedNodeObject()
public boolean isShowConfirmDeletionPanel()
public boolean isShowFolderDetails()
public boolean isShowBrowsingPanel()
public void retrieveCurrentBrowsedContent(ContentFace content,
PropertyWrapper appropriateProperty)
throws NoContentFoundException
selectedNodeObject, currentBrowsedContent,
bundle,currentContentParent.
content - The sub elements of ContentFace.getPath() will be
set as currentBrowsedContent.appropriateProperty - the property which initiated the browsing
NoContentFoundException - if an empty result set was returned. All other Exceptions
are already handled within this method.public void retrieveCurrentParentContent(PropertyWrapper appropriateProperty)
currentBrowsedContent using selectedNodeObject,
cpr and bundle for error messages.
appropriateProperty - the initiating property
public void retrieveInitialBrowsedContent(java.lang.String startRetrievalPath,
PropertyWrapper appropriateProperty)
DefaultProperties.SPCP7_START_RETRIEVAL_PATH as starting
point. Uses selectedNodeObject, bundle, cpr.
startRetrievalPath - appropriateProperty - public void setAddFolder_name(java.lang.String addFolder_name)
addFolder_name - public void setAllContentProviders(java.util.List<javax.faces.model.SelectItem> allContentProviders)
allContentProviders - public void setCurrentBrowsedContent(java.util.List<EditContentWrapper> currentBrowsedContent)
currentBrowsedContent - public void setCurrentProperties(java.util.List<PropertyWrapper> currentProperties)
currentProperties - public void setSelectedContentProvider(java.lang.String selectedContentProvider)
selectedContentProvider - public void setSelectedNodeObject(DynamicNodeUserObject selectedNodeObject)
selectedNodeObject - the new tree nodepublic void setShowConfirmDeletionPanel(boolean showConfirmDeletionPanel)
showConfirmDeletionPanel - public void makeConfirmDeletionPanelVisible(javax.faces.event.ActionEvent ae)
ae - public void setShowModalPanel(boolean showModalPanel)
showModalPanel -
public void stateChanged(ContentFolderModelFace source,
java.lang.String contentFolderEventType)
If the event is insert the content folder is added to the current tree. Actions executed might seem hard but normally only one user at a time should edit, delete or update the same content folder. That is why we focus on presenting and saving a consistent state if more than one user changes the same content folder.
If the event is update the content folders of the current
tree are reinserted overwriting properties which are not yet saved on
user side. This is intended because properties are not costly to edit.
Furthermore it is more important to not allow the user to save an
inconsistent state which could lead to lost update problems etc.
If the event is delete the content folder no matter if
another is editing it will be deleted to always work on a consistent
state.
rootTreeNode and selectedNodeObject.
stateChanged in interface ContentFolderActionListenerFacesource - The content folder which changed.contentFolderEventType - The event type of the content folder. The different event types are defined within ContentFolderEventTypes.ContentFolderActionListenerFace.stateChanged(spcp7.imagegallery.abstractionlayer.face.persistence.ContentFolderModelFace,
java.lang.String)public void updateContentPath(EditContentWrapper cw)
EditContentWrapper.getContent() into the property in the view. To
save the changes updateContentFolder(ActionEvent) must be called
from a JSF page. Uses currentProperties,
selectedNodeObject.
cw - The content wrapper with the path for the view value of
the property of the selectedNodeObject.public void updateContentUrl(EditContentWrapper cw)
EditContentWrapper.getContent() into the property in the view. To
save the changes updateContentFolder(ActionEvent) must be called
from a JSF page. Uses currentProperties,
selectedNodeObject.
cw - The content wrapper with the url for the view value of the
property of the selectedNodeObject.public void updateContentFolder(javax.faces.event.ActionEvent ae)
selectedNodeObject.
Uses currentProperties, selectedNodeObject,
cpr, bundle.
ae - public boolean getCurrentBrowsedContentEmpty()
currentBrowsedContent is empty or null, false
otherwise.public java.lang.String getSpcp7_start_retrieval_path()
DefaultProperties.SPCP7_START_RETRIEVAL_PATHpublic void unlockSpcp7_start_retrieval_path(javax.faces.event.ActionEvent ae)
public java.lang.String getCurrentBrowsedPath()
public ContentProviderRegistryFace getCpr()
public javax.faces.context.FacesContext getFacesContext()
public java.util.ResourceBundle getBundle()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||