|
Clearspace API (1.7.0) 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(java.lang.String className)
Installs a new class into the list of Widgets for the system. |
com.jivesoftware.community.widget.WidgetFrame |
addWidgetFrame(com.jivesoftware.community.widget.WidgetFrameBean widgetFrameBean)
Creates a new WidgetFrame based on the specified WidgetFrameBean. |
void |
copyWidgetFrames(JiveObject sourceObject,
JiveObject destinationObject)
Copies the WidgetFrames from the source JiveObject to the destination JiveObject. |
void |
discardWidgetFrames(JiveObject jiveObject)
Discards the draft WidgetFrames for the specified parent JiveObject. |
java.util.Map<com.jivesoftware.community.widget.WidgetDescriptor,Widget> |
getAvailableWidgets()
Returns a list of all available Widgets in the system |
java.util.Map<java.lang.Integer,java.util.List<com.jivesoftware.community.widget.WidgetFrame>> |
getPublishedWidgetFrames(JiveObject jiveObject)
Returns the map containing all the published WidgetFrames for the specified parent
JiveObject. |
Widget |
getWidget(com.jivesoftware.community.widget.WidgetDescriptor descriptor)
Returns the instanciated widget object for the specified WidgetDescriptor |
com.jivesoftware.community.widget.WidgetFrame |
getWidgetFrame(long id)
Returns the WidgetFrame corresponding to the specified widget frame id. |
java.util.Map<java.lang.Integer,java.util.List<com.jivesoftware.community.widget.WidgetFrame>> |
getWidgetFrames(JiveObject object)
Returns the map containing all the draft WidgetFrames for the specified parent JiveObject. |
void |
publishWidgetFrames(JiveObject jiveObject)
Publishes the WidgetFrames for the specified parent JiveObject. |
void |
removeWidget(long id)
Removes a Widget from the system. |
void |
removeWidgetFrame(com.jivesoftware.community.widget.WidgetFrame widgetFrame)
Removes the specified WidgetFrame from the system. |
void |
updateWidgetFrameProperties(com.jivesoftware.community.widget.WidgetFrame widgetFrame)
Updates the properties for the specified WidgetFrame. |
void |
updateWidgetFrames(JiveObject jiveObject,
java.util.List<com.jivesoftware.community.widget.WidgetFrame> widgetFrames)
Updates the list of WidgetFrames. |
| Methods inherited from interface com.jivesoftware.community.JiveManager |
|---|
destroy, initialize |
| Method Detail |
|---|
Widget addWidget(java.lang.String className)
throws UnauthorizedException,
java.lang.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.
java.lang.ClassNotFoundException - if the class could not be loaded.
WidgetAlreadyExistsException - if the widget class already exists.Widget
Widget getWidget(com.jivesoftware.community.widget.WidgetDescriptor descriptor)
throws java.lang.ClassNotFoundException
WidgetDescriptor
descriptor - the WidgetDescriptor for the requested Widget
WidgetDescriptor
java.lang.ClassNotFoundException - if the class could not be loaded.WidgetDescriptor,
Widgetjava.util.Map<com.jivesoftware.community.widget.WidgetDescriptor,Widget> getAvailableWidgets()
Widgets in the system
Widgets in the systemWidget
void removeWidget(long id)
throws UnauthorizedException
Widget from the system.
id - the id of the Widget to remove
UnauthorizedException - if not a system administratorWidget
com.jivesoftware.community.widget.WidgetFrame addWidgetFrame(com.jivesoftware.community.widget.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,
Widgetcom.jivesoftware.community.widget.WidgetFrame 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,
Widgetjava.util.Map<java.lang.Integer,java.util.List<com.jivesoftware.community.widget.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,
java.util.List<com.jivesoftware.community.widget.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(com.jivesoftware.community.widget.WidgetFrame widgetFrame)
throws UnauthorizedException
WidgetFrame. To change the index or
containerID of the WidgetFrameBean, use the method #updateWidgetFrames(java.util.List).
widgetFrame - the WidgetFrame to update
UnauthorizedException - if not a community or system administratorWidgetFrame
void removeWidgetFrame(com.jivesoftware.community.widget.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 administratorWidgetFramejava.util.Map<java.lang.Integer,java.util.List<com.jivesoftware.community.widget.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 copyWidgetFrames(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 | |||||||||