pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.site
Class ViewTypes

java.lang.Object
  extended by org.torweg.pulse.site.ViewTypes
All Implemented Interfaces:
java.io.Serializable

public class ViewTypes
extends java.lang.Object
implements java.io.Serializable

is a collection of different Views which are assigned to a Content in a specific Bundle.

A ViewTypes is nothing more than a datastructure with absolutely no further functions.

For an explanation of the different types of Views stored in the ViewTypes see the method documentation below.

Version:
$Revision: 1396 $
Author:
Thomas Weber, Daniel Dietz
See Also:
Serialized Form

Nested Class Summary
static class ViewTypes.Types
          an enumeration of the different types.
 
Constructor Summary
ViewTypes()
          constructs a new ViewTypes.
 
Method Summary
 void addStandardView(View view)
          adds a View to the ViewTypes standard Views.
 View getCreateView()
           
 View getDefaultView()
          returns the default View of the ViewTypes.
 View getDeleteView()
           
 View getEditView()
           
 View getExpandEditView()
           
 View getExpandView()
           
 View getMoveView()
           
 View getNodeCreateContentView()
           
 View getSaveView()
           
 java.util.Set<View> getStandardViews()
          returns the standard Views of the ViewTypes.
 View getViewByType(java.lang.String type)
          returns a View by type.
static View initView(java.lang.Class<? extends View> clazz, Content content)
          returns an intitialised View of the given class for the given Content.
 void setCreateView(View view)
           
 void setDefaultView(View view)
          sets the default View of the ViewTypes.
 void setDeleteView(View view)
           
 void setEditView(View view)
           
 void setExpandEditView(View view)
           
 void setExpandView(View view)
           
 void setMoveView(View view)
           
 void setNodeCreateContentView(View view)
           
 void setSaveView(View view)
           
 void setStandardViews(java.util.Collection<View> v)
          sets the standard Views of the ViewType including the default View, if already set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewTypes

public ViewTypes()
constructs a new ViewTypes.

Method Detail

getDefaultView

public final View getDefaultView()
returns the default View of the ViewTypes.

Returns:
the default View of the ViewTypes

setDefaultView

public final void setDefaultView(View view)
sets the default View of the ViewTypes.

Parameters:
view - the default View to be set

setCreateView

public final void setCreateView(View view)
Parameters:
view - the create View to be set

getCreateView

public final View getCreateView()
Returns:
the create View

setSaveView

public final void setSaveView(View view)
Parameters:
view - the save View to be set

getSaveView

public final View getSaveView()
Returns:
the save View

setEditView

public final void setEditView(View view)
Parameters:
view - the edit View to be set

getEditView

public final View getEditView()
Returns:
the edit View

setMoveView

public final void setMoveView(View view)
Parameters:
view - the move View to be set

getMoveView

public final View getMoveView()
Returns:
the move View

setDeleteView

public final void setDeleteView(View view)
Parameters:
view - the delete View to be set

getDeleteView

public final View getDeleteView()
Returns:
the delete View

setNodeCreateContentView

public final void setNodeCreateContentView(View view)
Parameters:
view - the nodeCreateContentView View to be set

getNodeCreateContentView

public final View getNodeCreateContentView()
Returns:
the nodeCreateContent View

setExpandEditView

public final void setExpandEditView(View view)
Parameters:
view - the expandEditView View to be set

getExpandEditView

public final View getExpandEditView()
Returns:
the expandEditView View

setExpandView

public final void setExpandView(View view)
Parameters:
view - the expandView View to be set

getExpandView

public final View getExpandView()
Returns:
the expandView View

getViewByType

public final View getViewByType(java.lang.String type)
returns a View by type.

Parameters:
type - the requested type
Returns:
a View by type if exists, null otherwise.

getStandardViews

public final java.util.Set<View> getStandardViews()
returns the standard Views of the ViewTypes.

The standard Views comprise all non administrative Views, i.e. all Views except the editor View and the manager View.

Returns:
the standard Views of the ViewTypes

setStandardViews

public final void setStandardViews(java.util.Collection<View> v)
sets the standard Views of the ViewType including the default View, if already set.

If no standard View is set, the first View in the Collection will become the standard View.

Parameters:
v - The standardViews to set.

addStandardView

public final void addStandardView(View view)
adds a View to the ViewTypes standard Views.

Parameters:
view - the standard View to be added

initView

public static final View initView(java.lang.Class<? extends View> clazz, Content content)
returns an intitialised View of the given class for the given Content.

Parameters:
clazz - the Class to be initialised
content - the Content to be used for initialisation
Returns:
an intitialised View of the given class for the given Content