01: /*
02: * Copyright (c) 1998-2008 Caucho Technology -- all rights reserved
03: *
04: * This file is part of Resin(R) Open Source
05: *
06: * Each copy or derived work must preserve the copyright notice and this
07: * notice unmodified.
08: *
09: * Resin Open Source is free software; you can redistribute it and/or modify
10: * it under the terms of the GNU General Public License as published by
11: * the Free Software Foundation; either version 2 of the License, or
12: * (at your option) any later version.
13: *
14: * Resin Open Source is distributed in the hope that it will be useful,
15: * but WITHOUT ANY WARRANTY; without even the implied warranty of
16: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
17: * of NON-INFRINGEMENT. See the GNU General Public License for more
18: * details.
19: *
20: * You should have received a copy of the GNU General Public License
21: * along with Resin Open Source; if not, write to the
22: *
23: * Free Software Foundation, Inc.
24: * 59 Temple Place, Suite 330
25: * Boston, MA 02111-1307 USA
26: *
27: * @author Sam
28: */
29:
30: package com.caucho.netbeans;
31:
32: import com.caucho.netbeans.ide.ResinTarget;
33: import com.caucho.netbeans.ide.ResinTargetModuleID;
34: import java.util.logging.Logger;
35: import javax.enterprise.deploy.spi.Target;
36: import javax.enterprise.deploy.spi.TargetModuleID;
37: import javax.enterprise.deploy.spi.exceptions.OperationUnsupportedException;
38: import javax.enterprise.deploy.spi.status.ClientConfiguration;
39: import javax.enterprise.deploy.spi.status.DeploymentStatus;
40: import javax.enterprise.deploy.spi.status.ProgressListener;
41: import javax.enterprise.deploy.spi.status.ProgressObject;
42:
43: public class SuccessProgressObject implements ProgressObject {
44: private static final Logger log = Logger
45: .getLogger(SuccessProgressObject.class.getName());
46:
47: private Target[] _target;
48: private TargetModuleID[] _targetModuleIDs = new TargetModuleID[0];
49:
50: public SuccessProgressObject(Target[] target) {
51: _target = target;
52: _targetModuleIDs = new TargetModuleID[] { new ResinTargetModuleID(
53: (ResinTarget) target[0]), };
54: }
55:
56: public SuccessProgressObject() {
57: }
58:
59: SuccessProgressObject(TargetModuleID[] targetModuleIDs) {
60: _targetModuleIDs = targetModuleIDs;
61: }
62:
63: public DeploymentStatus getDeploymentStatus() {
64: return SuccessStatus.SUCCESS;
65: }
66:
67: public TargetModuleID[] getResultTargetModuleIDs() {
68: return _targetModuleIDs;
69: }
70:
71: public ClientConfiguration getClientConfiguration(
72: TargetModuleID arg0) {
73: return null;
74: }
75:
76: public boolean isCancelSupported() {
77: return false;
78: }
79:
80: public void cancel() throws OperationUnsupportedException {
81: }
82:
83: public boolean isStopSupported() {
84: return false;
85: }
86:
87: public void stop() throws OperationUnsupportedException {
88: }
89:
90: public void addProgressListener(ProgressListener arg0) {
91: }
92:
93: public void removeProgressListener(ProgressListener arg0) {
94: }
95: }
|