blob: bf3dd61e5683cd17c3f19a63f7d5645e5d3bf3d2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
/*******************************************************************************
* Copyright (c) 2005, 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
/*
* Created on Jan 18, 2005
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package org.eclipse.jst.jee.ui.internal.deployables;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.debug.ui.actions.ILaunchable;
import org.eclipse.jst.javaee.ejb.SessionBean;
import org.eclipse.wst.server.core.IModuleArtifact;
import org.eclipse.wst.server.core.model.ModuleArtifactAdapterDelegate;
public class EJBDeployableArtifactAdapterFactory extends ModuleArtifactAdapterDelegate implements IAdapterFactory {
public Object getAdapter(Object adaptableObject, Class adapterType) {
return null;
}
public Class[] getAdapterList() {
return new Class[]{ILaunchable.class};
}
public IModuleArtifact getModuleArtifact(Object obj) {
return EJBDeployableArtifactAdapterUtil.getModuleObject(obj);
}
public IModuleArtifact[] getModuleArtifacts(Object obj) {
if (obj instanceof SessionBean)
return EJBDeployableArtifactAdapterUtil.getModuleObjects((SessionBean) obj);
IModuleArtifact artifact = getModuleArtifact(obj);
if (artifact != null)
return new IModuleArtifact[] { artifact };
return null;
}
}
|