Package net.java.sip.communicator.impl.notification

Examples of net.java.sip.communicator.impl.notification.EventNotification$Action


        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("user.address.city", "London");
        parameters.put("user.address['postal']", "QJR387");
        parameters.put("user.name", "Superman");

        Action action = new SimpleAction();
        pi.setParameters(action, stack, parameters);

        assertEquals(true, pi.isOrdered());
        assertEquals(3, actual.size());
        assertEquals("London", actual.get("user.address.city"));
View Full Code Here


        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put(sb.toString(), "");
        parameters.put("huuhaa", "");

        Action action = new SimpleAction();
        parametersInterceptor.setParameters(action, stack, parameters);
        assertEquals(1, actual.size());
    }
View Full Code Here

    public void testNoParametersAction() throws Exception {
        ParametersInterceptor interceptor = new ParametersInterceptor();
        interceptor.init();

        MockActionInvocation mai = new MockActionInvocation();
        Action action = new NoParametersAction();
        mai.setAction(action);

        interceptor.doIntercept(mai);
        interceptor.destroy();
    }
View Full Code Here

        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("user.address.city", "London");
        parameters.put("user.name", "Superman");

        Action action = new SimpleAction();
        pi.setParameters(action, stack, parameters);

        assertEquals("ordered should be false by default", false, pi.isOrdered());
        assertEquals(2, actual.size());
        assertEquals("London", actual.get("user.address.city"));
View Full Code Here

        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("user.address.city", "London");
        parameters.put("user.address['postal']", "QJR387");
        parameters.put("user.name", "Superman");

        Action action = new SimpleAction();
        pi.setParameters(action, stack, parameters);

        assertEquals(true, pi.isOrdered());
        assertEquals(3, actual.size());
        assertEquals("London", actual.get("user.address.city"));
View Full Code Here

     */
    public void registerNotificationForEvent(   String eventType,
                                                String actionType,
                                                NotificationActionHandler handler)
    {
        EventNotification notification = null;

        if(notificationsTable.containsKey(eventType))
            notification = notificationsTable.get(eventType);
        else
        {
            notification = new EventNotification(eventType);
           
            notificationsTable.put(eventType, notification);
           
            this.fireNotificationEventTypeEvent(
                NotificationEventTypeEvent.EVENT_TYPE_ADDED, eventType);
        }

        Object existingAction = notification.addAction(actionType, handler);

        // We fire the appropriate event depending on whether this is an
        // already existing actionType or a new one.
        if (existingAction != null)
        {
View Full Code Here

     * specified event occurs (could be one of the ACTION_XXX fields).
     */
    public void removeEventNotificationActionString eventType,
                                                String actionType)
    {
        EventNotification notification
            = notificationsTable.get(eventType);
       
        if(notification == null)
            return;

        Action action = notification.getAction(actionType);
       
        if(action == null)
            return;

        notification.removeAction(actionType);
       
        saveNotification(
            eventType,
            actionType,
            action.getActionHandler(),
View Full Code Here

     * an event with the specified name has occurred, or null if no actions
     * have been defined for <tt>eventType</tt>.
     */
    public Map<String, NotificationActionHandler> getEventNotifications(String eventType)
    {
        EventNotification notification = notificationsTable.get(eventType);

        if(notification == null)
            return null;

        Hashtable<String, NotificationActionHandler> actions
            = new Hashtable<String, NotificationActionHandler>();

        for (Object value : notification.getActions().values())
        {
            Action action = (Action) value;
            NotificationActionHandler handler = action.getActionHandler();

            actions.put(action.getActionType(), handler);
View Full Code Here

     */
    public NotificationActionHandler getEventNotificationActionHandler(
                                                            String eventType,
                                                            String actionType)
    {
        EventNotification notification
            = notificationsTable.get(eventType);

        if(notification == null)
            return null;

        EventNotification.Action action = notification.getAction(actionType);

        if(action == null)
            return null;

        return action.getActionHandler();
View Full Code Here

        String title,
        String message,
        byte[] icon,
        Object tag)
    {
        EventNotification notification
            = notificationsTable.get(eventType);

        if(notification == null || !notification.isActive())
            return;

        Iterator<Action> actions = notification.getActions().values().iterator();

        while(actions.hasNext())
        {
            Action action = actions.next();
View Full Code Here

TOP

Related Classes of net.java.sip.communicator.impl.notification.EventNotification$Action

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.