]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/GenBuild/org/tianocore/build/pcd/action/UIAction.java
4 This class is the parent action class of UI wizard.
6 Copyright (c) 2006, Intel Corporation
7 All rights reserved. This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 package org
.tianocore
.build
.pcd
.action
;
19 import org
.tianocore
.build
.pcd
.exception
.UIException
;
21 /** This class is the parent class for all UI wizard action.
23 public abstract class UIAction
{
25 /// original message level. when finish this action, original
26 /// message level will be restored.
28 private int originalMessageLevel
;
31 Check the parameter for this aciton.
33 This function will be overrided by child class.
35 abstract void checkParamter() throws UIException
;
40 This function will be overrided by child class.
42 abstract void performAction() throws UIException
;
45 set the message level for this action.
47 @param messageLevel message level wanted.
49 public void setMessageLevel(int messageLevel
) {
50 originalMessageLevel
= ActionMessage
.messageLevel
;
51 ActionMessage
.messageLevel
= messageLevel
;
55 log message for UI wizard aciton.
57 @param actionObj aciton instance object.
58 @param logStr log message string
60 public static void logMsg(Object actionObj
, String logStr
) {
61 System
.out
.println(logStr
);
65 Warning message for UI wizard action.
67 @param warningObj action instance object.
68 @param warningStr warning message string.
70 public static void warningMsg(Object warningObj
, String warningStr
) {
71 System
.out
.println(warningStr
);
75 Entry function for all UI wizard actions.
77 public void execute() throws UIException
{
81 ActionMessage
.messageLevel
= originalMessageLevel
;