|
Clearspace API (2.5.29) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface WidgetManager
Centralized management of widgets in the Jive system including creating, retrieving, and deleting
Widget objects.
Widget,
WidgetFrame| Method Summary | |
|---|---|
Widget |
addWidget(String className)
Installs a new class into the list of Widgets for the system. |
WidgetFrame |
addWidgetFrame(WidgetFrameBean widgetFrameBean)
Creates a new WidgetFrame based on the specified WidgetFrameBean. |
void |
addWidgetLayout(JiveObject jiveObject,
WidgetLayout layout)
Creates a new draft WidgetLayout for the specified JiveObject. |
WidgetLayout |
addWidgetLayout(String className)
Installs a new class into the list of WidgetLayouts for the system. |
void |
deleteUserWidgets(User user)
Removes all wigets associated with the given user from the system. |
void |
disableWidgetLayout(long id)
Disables a WidgetLayout in the system: this prevents
users from selecting the layout after a layout has been disabled
but lets existing users of the layout continue to use the layout. |
void |
discardWidgetFrames(JiveObject jiveObject)
Discards the draft WidgetFrames for the specified parent JiveObject. |
void |
discardWidgetLayout(JiveObject jiveObject)
Discards the draft WidgetLayout for the specified parent JiveObject. |
void |
duplicateWidgetFrames(JiveObject sourceObject,
JiveObject destinationObject)
Duplicates the WidgetFrames from the source JiveObject to the destination JiveObject. |
Map<WidgetLayoutDescriptor,WidgetLayout> |
getAvailableWidgetLayouts()
Returns a list of all the WidgetLayouts in the system that have not been
disabled. |
Map<WidgetDescriptor,Widget> |
getAvailableWidgets()
Returns a list of all available Widgets in the system. |
List<Widget> |
getAvailableWidgets(com.jivesoftware.community.widget.WidgetContext widgetContext)
Returns a list of all available Widgets that are enabled
for the given widget context. |
Set<WidgetDescriptor> |
getInstalledWidgets()
Returns the set of all installed widgets. |
Map<Integer,List<WidgetFrame>> |
getPublishedWidgetFrames(JiveObject jiveObject)
Returns the map containing all the published WidgetFrames for the specified parent
JiveObject. |
WidgetLayout |
getPublishedWidgetLayout(JiveObject jiveObject)
Returns the published WidgetLayout for the specified parent
JiveObject. |
Widget |
getWidget(WidgetDescriptor descriptor)
Returns the instanciated widget object for the specified WidgetDescriptor |
WidgetDescriptor |
getWidgetByName(String className)
|
WidgetFrame |
getWidgetFrame(long id)
Returns the WidgetFrame corresponding to the specified widget frame id. |
Map<Integer,List<WidgetFrame>> |
getWidgetFrames(JiveObject object)
Returns the map containing all the draft WidgetFrames for the specified parent JiveObject. |
WidgetLayout |
getWidgetLayout(JiveObject jiveObject)
Returns the draft WidgetLayout for the specified parent
JiveObject. |
WidgetLayout |
getWidgetLayout(long layoutID)
Returns the instantiated widget layout object for the specified layoutID |
WidgetLayout |
getWidgetLayout(WidgetLayoutDescriptor descriptor)
Returns the instantiated widget layout object for the specified WidgetLayoutDescriptor |
WidgetLayoutDescriptor |
getWidgetLayoutByName(String className)
Returns the widget layout descriptor for the given widget layout classname or null if the widget layout doesn't exist. |
Map<WidgetLayoutDescriptor,WidgetLayout> |
getWidgetLayouts()
Returns a list of all the WidgetLayouts in the system. |
void |
publishWidgetFrames(JiveObject jiveObject)
Publishes the WidgetFrames for the specified parent JiveObject. |
void |
publishWidgetLayout(JiveObject jiveObject)
Publishes the WidgetLayout for the specified parent JiveObject. |
void |
removeWidget(long id)
Removes a Widget from the system. |
void |
removeWidgetFrame(WidgetFrame widgetFrame)
Removes the specified WidgetFrame from the system. |
void |
updateWidgetFrameProperties(WidgetFrame widgetFrame)
Updates the properties for the specified WidgetFrame. |
void |
updateWidgetFrames(JiveObject jiveObject,
List<WidgetFrame> widgetFrames)
Updates the list of WidgetFrames. |
| Methods inherited from interface com.jivesoftware.community.JiveManager |
|---|
destroy |
| Method Detail |
|---|
Widget addWidget(String className)
throws UnauthorizedException,
ClassNotFoundException,
WidgetAlreadyExistsException
Widgets for the system. Exceptions are thrown
if you're not a system administrator, the class can't be loaded from the classpath, or the
class isn't an instance of Widget.
className - the fully qualified name of the class to add to the list of available Widgets in the system.
Widget object
UnauthorizedException - if not a system administator.
ClassNotFoundException - if the class could not be loaded.
WidgetAlreadyExistsException - if the widget class already exists.Widget
Widget getWidget(WidgetDescriptor descriptor)
throws ClassNotFoundException
WidgetDescriptor
descriptor - the WidgetDescriptor for the requested Widget
WidgetDescriptor
ClassNotFoundException - if the class could not be loaded.WidgetDescriptor,
WidgetWidgetDescriptor getWidgetByName(String className)
className -
Map<WidgetDescriptor,Widget> getAvailableWidgets()
Widgets in the system.
Widgets in the systemWidgetSet<WidgetDescriptor> getInstalledWidgets()
getAvailableWidgets() is called before the plugin containing the macro was loaded.
List<Widget> getAvailableWidgets(com.jivesoftware.community.widget.WidgetContext widgetContext)
Widgets that are enabled
for the given widget context.
widgetContext - the widgetContext (which itself specifies a type of widget)
to get widgets for.
Widgets that are enabled
for the given widget context.Widget
void removeWidget(long id)
throws UnauthorizedException
Widget from the system.
id - the id of the Widget to remove
UnauthorizedException - if not a system administratorWidget
void deleteUserWidgets(User user)
throws UnauthorizedException
user - the owner of the wigets being deleted.
UnauthorizedException - if not a system administrator or user administratorWidget
WidgetLayout addWidgetLayout(String className)
throws UnauthorizedException,
ClassNotFoundException,
WidgetLayoutAlreadyExistsException
WidgetLayouts for the system. Exceptions are thrown
if you're not a system administrator, the class can't be loaded from the classpath, or the
class isn't an instance of WidgetLayout.
className - the fully qualified name of the class to add to the list of available WidgetLayouts in the system.
WidgetLayout object
UnauthorizedException - if not a system administator.
ClassNotFoundException - if the class could not be loaded.
WidgetLayoutAlreadyExistsException - if the widget layout class already exists.WidgetLayout
WidgetLayout getWidgetLayout(WidgetLayoutDescriptor descriptor)
throws ClassNotFoundException
WidgetLayoutDescriptor
descriptor - the WidgetLayoutDescriptor for the requested WidgetLayout
WidgetLayoutDescriptor
ClassNotFoundException - if the class could not be loaded.WidgetLayoutDescriptor,
WidgetLayout
WidgetLayout getWidgetLayout(long layoutID)
throws ClassNotFoundException
layoutID - the ID for the requested WidgetLayout
ClassNotFoundException - if the class could not be loaded.WidgetLayoutDescriptor,
WidgetLayoutWidgetLayoutDescriptor getWidgetLayoutByName(String className)
className - the classname of the widget layout you need to retrieve.
Map<WidgetLayoutDescriptor,WidgetLayout> getAvailableWidgetLayouts()
WidgetLayouts in the system that have not been
disabled.
WidgetLayouts in the system that have not
been disabled.WidgetLayoutMap<WidgetLayoutDescriptor,WidgetLayout> getWidgetLayouts()
WidgetLayouts in the system.
WidgetLayouts in the systemWidgetLayout
void disableWidgetLayout(long id)
throws UnauthorizedException
WidgetLayout in the system: this prevents
users from selecting the layout after a layout has been disabled
but lets existing users of the layout continue to use the layout.
id - the id of the WidgetLayout to remove
UnauthorizedException - if not a system administratorWidgetLayout
WidgetLayout getPublishedWidgetLayout(JiveObject jiveObject)
throws ClassNotFoundException
WidgetLayout for the specified parent
JiveObject.
jiveObject - the parent JiveObject of the WidgetLayout
WidgetLayout for the specified parent
JiveObject.
ClassNotFoundException - if the class could not be loaded.WidgetLayout,
JiveObject
WidgetLayout getWidgetLayout(JiveObject jiveObject)
throws ClassNotFoundException
WidgetLayout for the specified parent
JiveObject.
jiveObject - the parent JiveObject of the WidgetLayout
WidgetLayout for the specified parent
JiveObject.
ClassNotFoundException - if the class could not be loaded.WidgetLayout,
JiveObject
void addWidgetLayout(JiveObject jiveObject,
WidgetLayout layout)
throws UnauthorizedException
WidgetLayout for the specified JiveObject. The WidgetLayout will not be published until the method publishWidgetLayout(com.jivesoftware.community.JiveObject)
is executed.
jiveObject - the object to add the WidgetLayout tolayout - the layout to add
UnauthorizedException - if not someone who has permission to change the JiveObjectWidgetLayout,
WidgetLayoutDescriptor
void publishWidgetLayout(JiveObject jiveObject)
throws UnauthorizedException
WidgetLayout for the specified parent JiveObject. This method
will remove the existing published WidgetLayout and will publish the draft
WidgetLayout. If no draft WidgetFrame exists or if the WidgetLayout class
could not be loaded, this method will no-op.
jiveObject - the parent JiveObject of the WidgetLayout to publish.
UnauthorizedException - if not someone who has permission to change the JiveObjectWidgetLayout,
Widget,
JiveObject
void discardWidgetLayout(JiveObject jiveObject)
throws UnauthorizedException
WidgetLayout for the specified parent JiveObject. This
method will remove the existing draft WidgetLayout and will replace it with
the published WidgetLayout for the specified parent JiveObject. If the published
WidgetLayout class does not exist, this method will no-op.
jiveObject - the parent JiveObject of the WidgetLayout to discard.
UnauthorizedException - if not someone who has permission to change the JiveObjectWidgetLayout,
JiveObject
WidgetFrame addWidgetFrame(WidgetFrameBean widgetFrameBean)
throws UnauthorizedException
WidgetFrame based on the specified WidgetFrameBean. The WidgetFrame will not be published until the method publishWidgetFrames(com.jivesoftware.community.JiveObject)
is executed. Other WidgetFrames with an index value higher than the specified WidgetFrame will be modified accordingly (incremented).
widgetFrameBean - the bean containing all the required information to create a new
WidgetFrame
WidgetFrame
UnauthorizedException - if not a community or system administratorWidgetFrameBean,
WidgetFrame,
WidgetWidgetFrame getWidgetFrame(long id)
WidgetFrame corresponding to the specified widget frame id.
id - the id of the widget frame to return
WidgetFrame corresponding to the specified widget frame idWidgetFrame,
WidgetMap<Integer,List<WidgetFrame>> getWidgetFrames(JiveObject object)
WidgetFrames for the specified parent JiveObject. The key of the map is the containerID and the value is the list of ordered
WidgetFrames in that container.
object - the parent JiveObject of the WidgetFrames
WidgetFrames for the specified parent JiveObjectWidgetFrame,
Widget,
JiveObject
void updateWidgetFrames(JiveObject jiveObject,
List<WidgetFrame> widgetFrames)
throws UnauthorizedException
WidgetFrames. WidgetFrame properties will not be modified
here, only the container and index of the WidgetFrame in the parent JiveObject. If you need to save the properties for a WidgetFrame, use the method
updateWidgetFrameProperties(WidgetFrame).
jiveObject - the parent jive objectwidgetFrames - the list of WidgetFrames to update.
UnauthorizedException - if not a community or system administratorWidgetFrame
void updateWidgetFrameProperties(WidgetFrame widgetFrame)
throws UnauthorizedException
WidgetFrame. To change the index or
containerID of the WidgetFrameBean, use the method updateWidgetFrames(com.jivesoftware.community.JiveObject, java.util.List).
widgetFrame - the WidgetFrame to update
UnauthorizedException - if not a community or system administratorWidgetFrame
void removeWidgetFrame(WidgetFrame widgetFrame)
throws UnauthorizedException
WidgetFrame from the system. The properties of the WidgetFrame will also be removed, and the index value of all WidgetFrames higher
than the specified WidgetFrame will be modified accordingly (decremented).
widgetFrame - the WidgetFrame to update
UnauthorizedException - if not a community or system administratorWidgetFrameMap<Integer,List<WidgetFrame>> getPublishedWidgetFrames(JiveObject jiveObject)
WidgetFrames for the specified parent
JiveObject. The key of the map is the containerID and the value is the list of
ordered WidgetFrames in that container.
jiveObject - the parent JiveObject of the WidgetFrames
WidgetFrames for the specified parent
JiveObjectWidgetFrame,
Widget,
JiveObject
void publishWidgetFrames(JiveObject jiveObject)
throws UnauthorizedException
WidgetFrames for the specified parent JiveObject. This method
will remove all of the existing published WidgetFrames and will publish the draft
WidgetFrames. If the are no draft WidgetFrames, this method will no-op.
jiveObject - the parent JiveObject of the WidgetFrames to publish.
UnauthorizedException - if not a community or system administratorWidgetFrame,
Widget,
JiveObject
void discardWidgetFrames(JiveObject jiveObject)
throws UnauthorizedException
WidgetFrames for the specified parent JiveObject. This
method will remove all of the existing draft WidgetFrames and will replace them with
the published WidgetFrames for the specified parent JiveObject.
jiveObject - the parent JiveObject of the WidgetFrames to discard.
UnauthorizedException - if not a community or system administratorWidgetFrame,
Widget,
JiveObject
void duplicateWidgetFrames(JiveObject sourceObject,
JiveObject destinationObject)
throws UnauthorizedException
WidgetFrames from the source JiveObject to the destination JiveObject. This method will remove the existing draft WidgetFrames from the
destination JiveObject and will replace them with the published WidgetFrames
from the source JiveObject.
sourceObject - the source JiveObject of the WidgetFrames to copy.destinationObject - the destination JiveObject of the WidgetFrames to
replace.
UnauthorizedException - if not a community or system administratorWidgetFrame,
Widget,
JiveObject
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||