buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/SignalExceptionMessage.java
changeset 628 7c4a911dc066
parent 587 85df38eb4012
equal deleted inserted replaced
588:c7c26511138f 628:7c4a911dc066
     1 /*
     1 /*
     2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3  * All rights reserved.
     4 * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     5  * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     8  *
     9 * Initial Contributors:
     9  * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10  * Nokia Corporation - initial contribution.
    11 *
    11  *
    12 * Contributors:
    12  * Contributors:
    13 *
    13  *
    14 * Description:To print the message on the shell in case of build fails for deffered Signals. 
    14  * Description:To print the message on the shell in case of build fails for deffered Signals. 
    15 *
    15  *
    16 */
    16  */
    17  
    17 
    18 package com.nokia.helium.signal;
    18 package com.nokia.helium.signal;
    19 
    19 
       
    20 import org.apache.log4j.Logger;
       
    21 import org.apache.tools.ant.Project;
       
    22 import org.apache.tools.ant.types.DataType;
    20 
    23 
    21 import org.apache.tools.ant.Project;
       
    22 import com.nokia.helium.core.ant.HlmExceptionHandler;
    24 import com.nokia.helium.core.ant.HlmExceptionHandler;
    23 import org.apache.log4j.Logger;
       
    24 
    25 
    25 /**
    26 /**
    26  * Class to check the signal is present in the deferred and now signal list.
    27  * Class to check the signal is present in the deferred and now signal list.
    27  * Print the message on the shell "Build completed with errors and warnings".
    28  * Print the message on the shell "Build completed with errors and warnings".
    28  * 
    29  * 
    29  */
    30  */
    30 
    31 
    31 public class SignalExceptionMessage implements HlmExceptionHandler {
    32 public class SignalExceptionMessage extends DataType implements
       
    33         HlmExceptionHandler {
    32     private Logger log = Logger.getLogger(SignalExceptionMessage.class);
    34     private Logger log = Logger.getLogger(SignalExceptionMessage.class);
    33     
    35 
    34     /**
    36     /**
    35      * Implements the Exception method to print the build completed message.
    37      * Implements the Exception method to print the build completed message.
       
    38      * 
    36      * @param project
    39      * @param project
    37      * @param module
    40      * @param module
    38      * @param e
    41      * @param e
    39      */
    42      */
    40     public void handleException(Project project, String module, Exception e) {
    43     public void handleException(Project project, Exception e) {
    41         
    44 
    42         if (SignalStatusList.getDeferredSignalList().hasSignalInList()) {
    45         if (SignalStatusList.getDeferredSignalList().hasSignalInList()) {
    43             log.info("Build completed with errors and warnings.");
    46             log.info("Build completed with errors and warnings.");
    44         }
    47         }
    45         
    48 
    46         if (SignalStatusList.getNowSignalList().hasSignalInList()) {
    49         if (SignalStatusList.getNowSignalList().hasSignalInList()) {
    47             log.info("Build completed with errors and warnings.");
    50             log.info("Build completed with errors and warnings.");
    48         }
    51         }
    49     }
    52     }
    50 }
    53 }