|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.netmgt.notifd.Growl
A class that encapsulates the "work" of talking to growl
Field Summary | |
private NSArray |
allNotes
|
private NSData |
appImageData
|
private java.lang.String |
appName
|
private NSArray |
defNotes
|
static java.lang.String |
GROWL_APP_ICON
|
static java.lang.String |
GROWL_APP_NAME
|
static java.lang.String |
GROWL_APP_REGISTRATION
|
static java.lang.String |
GROWL_NOTIFICATION
|
static java.lang.String |
GROWL_NOTIFICATION_APP_ICON
|
static java.lang.String |
GROWL_NOTIFICATION_DESCRIPTION
|
static java.lang.String |
GROWL_NOTIFICATION_ICON
|
static java.lang.String |
GROWL_NOTIFICATION_NAME
|
static java.lang.String |
GROWL_NOTIFICATION_TITLE
|
static java.lang.String |
GROWL_NOTIFICATIONS_ALL
|
static java.lang.String |
GROWL_NOTIFICATIONS_DEFAULT
|
private NSDictionary |
regDict
|
private boolean |
registered
|
private NSDistributedNotificationCenter |
theCenter
|
Constructor Summary | |
(package private) |
Growl(java.lang.String inAppName,
NSData inImageData,
NSArray inAllNotes,
NSArray inDefNotes,
boolean registerNow)
Convenience method to contruct a growl instance, defers to Growl( String inAppName, NSData inImageData, NSArray inAllNotes, NSArray inDefNotes, boolean registerNow ) with empty arrays for your notifications. |
(package private) |
Growl(java.lang.String inAppName,
NSImage inImage)
Convenience method to contruct a growl instance, defers to Growl( String inAppName, NSData inImageData, NSArray inAllNotes, NSArray inDefNotes, boolean registerNow ) with empty arrays for your notifications. |
(package private) |
Growl(java.lang.String inAppName,
java.lang.String[] inAllNotes,
java.lang.String[] inDefNotes)
Convenience method to contruct a growl instance, defers to Growl( String inAppName, NSData inImageData, NSArray inAllNotes, NSArray inDefNotes, boolean registerNow ) with the arrays passed here and empty Data for the icon. |
Method Summary | |
NSArray |
allowedNotifications()
Accessor for the Array of allowed Notifications returned an NSArray |
java.lang.String |
applicationName()
Accessor for The currently set "Application" Name |
NSArray |
defaultNotifications()
Accessor for the Array of default Notifications returned as an NSArray |
void |
notifyGrowlOf(java.lang.String inNotificationName,
NSData inIconData,
java.lang.String inTitle,
java.lang.String inDescription,
NSDictionary inExtraInfo)
The fun part is actually sending those notifications we worked so hard for so here we let growl know about things we think the user would like, and growl decides if that is the case. |
void |
notifyGrowlOf(java.lang.String inNotificationName,
java.lang.String inTitle,
java.lang.String inDescription)
Convenienve method that defers to notifyGrowlOf( String inNotificationName, NSData inIconData, String inTitle, String inDescription, NSDictionary inExtraInfo ) with null passed for icon and extraInfo arguments |
void |
notifyGrowlOf(java.lang.String inNotificationName,
java.lang.String inImagePath,
java.lang.String inTitle,
java.lang.String inDescription)
Convenienve method that defers to notifyGrowlOf( String inNotificationName, NSData inIconData, String inTitle, String inDescription, NSDictionary inExtraInfo ) with null passed for extraInfo |
boolean |
register()
Register all our notifications with Growl, this should only be called once |
void |
setAllowedNotifications(NSArray inAllNotes)
Set the list of allowed Notifications |
void |
setApplicationName(java.lang.String inAppName)
Sets The name of the Application talking to growl |
void |
setDefaultNotifications(NSArray inDefNotes)
Set the list of Default Notfiications |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String GROWL_APP_REGISTRATION
public static final java.lang.String GROWL_APP_NAME
public static final java.lang.String GROWL_APP_ICON
public static final java.lang.String GROWL_NOTIFICATIONS_DEFAULT
public static final java.lang.String GROWL_NOTIFICATIONS_ALL
public static final java.lang.String GROWL_NOTIFICATION
public static final java.lang.String GROWL_NOTIFICATION_NAME
public static final java.lang.String GROWL_NOTIFICATION_TITLE
public static final java.lang.String GROWL_NOTIFICATION_DESCRIPTION
public static final java.lang.String GROWL_NOTIFICATION_ICON
public static final java.lang.String GROWL_NOTIFICATION_APP_ICON
private boolean registered
private java.lang.String appName
private NSData appImageData
private NSDictionary regDict
private NSArray allNotes
private NSArray defNotes
private NSDistributedNotificationCenter theCenter
Constructor Detail |
Growl(java.lang.String inAppName, NSImage inImage)
inAppName
- - The Name of your "application"inImage
- - The NSImage Icon for your ApplicationGrowl(java.lang.String inAppName, java.lang.String[] inAllNotes, java.lang.String[] inDefNotes)
inAppName
- - The Name of your "Application"inAllNotes
- - A String Array with the name of all your notificationsinDefNotes
- - A String Array with the na,es of the Notifications on
by defaultGrowl(java.lang.String inAppName, NSData inImageData, NSArray inAllNotes, NSArray inDefNotes, boolean registerNow)
inAppName
- - The Name of your "Application"inImageData
- - The Data of your "Application"'s iconinAllNotes
- - The NSArray of Strings of all your NotificationsinDefNotes
- - The NSArray of Strings of your default NotificationsregisterNow
- - Since we have all the necessary info we can go ahead
and registerMethod Detail |
public boolean register()
public void notifyGrowlOf(java.lang.String inNotificationName, NSData inIconData, java.lang.String inTitle, java.lang.String inDescription, NSDictionary inExtraInfo) throws java.lang.Exception
inNotificationName
- - The name of one of the notifications we told growl
about.inIconData
- - The NSData for the icon for this notification, can be nullinTitle
- - The Title of our Notification as Growl will show itinDescription
- - The Description of our Notification as Growl will
display it
java.lang.Exception
- When a notification is not knownpublic void notifyGrowlOf(java.lang.String inNotificationName, java.lang.String inTitle, java.lang.String inDescription) throws java.lang.Exception
inNotificationName
- - The name of one of the notifications we told growl
about.inTitle
- - The Title of our Notification as Growl will show itinDescription
- - The Description of our Notification as Growl will
display it
java.lang.Exception
- When a notification is not knownpublic void notifyGrowlOf(java.lang.String inNotificationName, java.lang.String inImagePath, java.lang.String inTitle, java.lang.String inDescription) throws java.lang.Exception
inNotificationName
- - The name of one of the notifications we told growl
about.inImagePath
- - Path to the image for this notificationinTitle
- - The Title of our Notification as Growl will show itinDescription
- - The Description of our Notification as Growl will
display it
java.lang.Exception
- When a notification is not knownpublic java.lang.String applicationName()
public NSArray allowedNotifications()
public NSArray defaultNotifications()
public void setApplicationName(java.lang.String inAppName)
inAppName
- - The Application Namepublic void setAllowedNotifications(NSArray inAllNotes)
inAllNotes
- - The array of allowed Notificationspublic void setDefaultNotifications(NSArray inDefNotes) throws java.lang.Exception
inDefNotes
- - The default Notifications
java.lang.Exception
- when an element of the array is not in the
allowedNotifications
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |