* @param inIdentifier Notification identifier for coalescing. This can be null.
* @throws IllegalArgumentException When a notification is not known
*/
public void postNotification(String inNotificationName, NSImage inIcon, String inTitle, String inDescription,
NSDictionary inExtraInfo, boolean inSticky, String inIdentifier) {
NSMutableDictionary noteDict = NSMutableDictionary.dictionaryWithCapacity(0);
if (!allNotes.contains(inNotificationName)) {
throw new IllegalArgumentException("Undefined Notification attempted: " + inNotificationName);
}
noteDict.setValue_forKey(NSString.stringWithString(inNotificationName), GROWL_NOTIFICATION_NAME);
noteDict.setValue_forKey(inTitle != null ? NSString.stringWithString(inTitle) : null, GROWL_NOTIFICATION_TITLE);
noteDict.setValue_forKey(inDescription != null ? NSString.stringWithString(inDescription) : null, GROWL_NOTIFICATION_DESCRIPTION);
noteDict.setValue_forKey(NSString.stringWithString(appName), GROWL_APP_NAME);
if (inIcon != null) {
noteDict.setValue_forKey(inIcon.TIFFRepresentation(), GROWL_NOTIFICATION_ICON);
}
if (inSticky) {
noteDict.setValue_forKey(NSNumber.CLASS.numberWithInt(1), GROWL_NOTIFICATION_STICKY);
}
if (inIdentifier != null) {
noteDict.setValue_forKey(NSString.stringWithString(inIdentifier), GROWL_NOTIFICATION_IDENTIFIER);
}
if (inExtraInfo != null) {
noteDict.addEntriesFromDictionary(inExtraInfo);
}
theCenter.postNotification(GROWL_NOTIFICATION, null, noteDict, true);
}