org.overlord.sramp.ui.client.services.growl
Class GrowlService

java.lang.Object
  extended by org.overlord.sramp.ui.client.services.AbstractService
      extended by org.overlord.sramp.ui.client.services.growl.GrowlService
All Implemented Interfaces:
IGrowlService, IService

public class GrowlService
extends AbstractService
implements IGrowlService

Implements the lightweight notification service.

Author:
eric.wittmann@redhat.com

Constructor Summary
GrowlService()
          Constructor.
 
Method Summary
 int growl(String title, String message)
          Growls a simple message at the user.
 int growl(String title, String message, GrowlType type)
          Growls at the user.
 int growl(String title, String message, RemoteServiceException error)
          Called by clients to notify the user of an error.
protected  void onGrowlClosed(Growl growl)
          Called when a growl is closed, either by the user clicking on the close button or the alive timer fires.
 void onProgressComplete(int growlId, String title, String message)
          Called by clients to inform the growl service that a progress style growl has completed successfully.
 void onProgressComplete(int growlId, String title, com.google.gwt.user.client.ui.Widget message)
          Called by clients to inform the growl service that a progress style growl has completed successfully.
 void onProgressError(int growlId, String title, RemoteServiceException error)
          Called by clients to inform the growl service that a progress style growl has completed with an error.
 void onProgressError(int growlId, String title, String message)
          Called by clients to inform the growl service that a progress style growl has completed with an error.
 
Methods inherited from class org.overlord.sramp.ui.client.services.AbstractService
start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.overlord.sramp.ui.client.services.IService
start
 

Constructor Detail

GrowlService

public GrowlService()
Constructor.

Method Detail

growl

public int growl(String title,
                 String message)
Description copied from interface: IGrowlService
Growls a simple message at the user.

Specified by:
growl in interface IGrowlService
Returns:
the unique ID of the growl
See Also:
IGrowlService.growl(java.lang.String, java.lang.String)

growl

public int growl(String title,
                 String message,
                 GrowlType type)
Description copied from interface: IGrowlService
Growls at the user.

Specified by:
growl in interface IGrowlService
Returns:
the unique ID of the growl
See Also:
IGrowlService.growl(java.lang.String, java.lang.String, org.overlord.sramp.ui.client.services.growl.GrowlType)

growl

public int growl(String title,
                 String message,
                 RemoteServiceException error)
Description copied from interface: IGrowlService
Called by clients to notify the user of an error.

Specified by:
growl in interface IGrowlService
Parameters:
title - the title for the growl dialog
message - the message to show the user
error - the error that occured
See Also:
IGrowlService.growl(java.lang.String, java.lang.String, org.overlord.sramp.ui.shared.rsvcs.RemoteServiceException)

onProgressComplete

public void onProgressComplete(int growlId,
                               String title,
                               String message)
Description copied from interface: IGrowlService
Called by clients to inform the growl service that a progress style growl has completed successfully.

Specified by:
onProgressComplete in interface IGrowlService
Parameters:
growlId - the ID of the growl to update - returned by a previous call to growl()
title - the new title for the growl dialog
message - the new message for the growl dialog
See Also:
IGrowlService.onProgressComplete(int, java.lang.String, java.lang.String)

onProgressComplete

public void onProgressComplete(int growlId,
                               String title,
                               com.google.gwt.user.client.ui.Widget message)
Description copied from interface: IGrowlService
Called by clients to inform the growl service that a progress style growl has completed successfully.

Specified by:
onProgressComplete in interface IGrowlService
Parameters:
growlId - the ID of the growl to update - returned by a previous call to growl()
title - the new title for the growl dialog
message - the new message for the growl dialog
See Also:
IGrowlService.onProgressComplete(int, java.lang.String, com.google.gwt.user.client.ui.Widget)

onProgressError

public void onProgressError(int growlId,
                            String title,
                            String message)
Description copied from interface: IGrowlService
Called by clients to inform the growl service that a progress style growl has completed with an error.

Specified by:
onProgressError in interface IGrowlService
Parameters:
growlId - the ID of the growl to update - returned by a previous call to growl()
title - the new title for the growl dialog
message - the new message for the growl dialog
See Also:
IGrowlService.onProgressError(int, java.lang.String, java.lang.String)

onProgressError

public void onProgressError(int growlId,
                            String title,
                            RemoteServiceException error)
Description copied from interface: IGrowlService
Called by clients to inform the growl service that a progress style growl has completed with an error.

Specified by:
onProgressError in interface IGrowlService
Parameters:
growlId - the ID of the growl to update - returned by a previous call to growl()
title - the new title for the growl dialog
error - the error that occurred
See Also:
IGrowlService.onProgressError(int, java.lang.String, org.overlord.sramp.ui.shared.rsvcs.RemoteServiceException)

onGrowlClosed

protected void onGrowlClosed(Growl growl)
Called when a growl is closed, either by the user clicking on the close button or the alive timer fires.

Parameters:
growl -


Copyright © 2012-2013 JBoss, a division of Red Hat. All Rights Reserved.