@ -491,7 +491,6 @@ private void saveNotification( String eventType,
configService . setProperty (
eventTypeNodeName + ".active" ,
Boolean . toString ( isActive ) ) ;
return ;
}
@ -510,6 +509,8 @@ private void saveNotification( String eventType,
actionTypeNodeName = actionTypeRootPropName ;
}
Map < String , Object > configProperties = new HashMap < String , Object > ( ) ;
// If we didn't find the given actionType in the configuration we save
// it here.
if ( actionTypeNodeName = = null )
@ -518,7 +519,7 @@ private void saveNotification( String eventType,
+ ".actionType"
+ Long . toString ( System . currentTimeMillis ( ) ) ;
config Service. setProperty ( actionTypeNodeName , actionType ) ;
config Properties. put ( actionTypeNodeName , actionType ) ;
}
if ( actionHandler instanceof SoundNotificationHandler )
@ -526,19 +527,19 @@ private void saveNotification( String eventType,
SoundNotificationHandler soundHandler
= ( SoundNotificationHandler ) actionHandler ;
config Service. setProperty (
config Properties. put (
actionTypeNodeName + ".soundFileDescriptor" ,
soundHandler . getDescriptor ( ) ) ;
config Service. setProperty (
config Properties. put (
actionTypeNodeName + ".loopInterval" ,
soundHandler . getLoopInterval ( ) ) ;
config Service. setProperty (
config Properties. put (
actionTypeNodeName + ".enabled" ,
Boolean . toString ( isActive ) ) ;
config Service. setProperty (
config Properties. put (
actionTypeNodeName + ".default" ,
Boolean . toString ( isDefault ) ) ;
}
@ -547,15 +548,15 @@ else if(actionHandler instanceof PopupMessageNotificationHandler)
PopupMessageNotificationHandler messageHandler
= ( PopupMessageNotificationHandler ) actionHandler ;
config Service. setProperty (
config Properties. put (
actionTypeNodeName + ".defaultMessage" ,
messageHandler . getDefaultMessage ( ) ) ;
config Service. setProperty (
config Properties. put (
actionTypeNodeName + ".enabled" ,
Boolean . toString ( isActive ) ) ;
config Service. setProperty (
config Properties. put (
actionTypeNodeName + ".default" ,
Boolean . toString ( isDefault ) ) ;
}
@ -564,15 +565,15 @@ else if(actionHandler instanceof LogMessageNotificationHandler)
LogMessageNotificationHandler logMessageHandler
= ( LogMessageNotificationHandler ) actionHandler ;
config Service. setProperty (
config Properties. put (
actionTypeNodeName + ".logType" ,
logMessageHandler . getLogType ( ) ) ;
config Service. setProperty (
config Properties. put (
actionTypeNodeName + ".enabled" ,
Boolean . toString ( isActive ) ) ;
config Service. setProperty (
config Properties. put (
actionTypeNodeName + ".default" ,
Boolean . toString ( isDefault ) ) ;
}
@ -581,18 +582,21 @@ else if(actionHandler instanceof CommandNotificationHandler)
CommandNotificationHandler commandHandler
= ( CommandNotificationHandler ) actionHandler ;
config Service. setProperty (
config Properties. put (
actionTypeNodeName + ".commandDescriptor" ,
commandHandler . getDescriptor ( ) ) ;
config Service. setProperty (
config Properties. put (
actionTypeNodeName + ".enabled" ,
Boolean . toString ( isActive ) ) ;
config Service. setProperty (
config Properties. put (
actionTypeNodeName + ".default" ,
Boolean . toString ( isDefault ) ) ;
}
if ( configProperties . size ( ) > 0 )
configService . setProperties ( configProperties ) ;
}
/ * *