getPathsToListen();
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/ProcessIOResult.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin;
20 |
21 | /**
22 | * Response result.
23 | *
24 | * Order of values defines values priority.
25 | *
26 | *
27 | * @author Tomas Kraus
28 | */
29 | public enum ProcessIOResult {
30 |
31 | ////////////////////////////////////////////////////////////////////////////
32 | // Enum values //
33 | ////////////////////////////////////////////////////////////////////////////
34 |
35 | /** Unknown response. */
36 | UNKNOWN,
37 |
38 | /** Successful response. */
39 | SUCCESS,
40 |
41 | /** Error response. */
42 | ERROR
43 | }
44 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/facets/PayaraEjbFacetUninstallDelegate.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2023 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.facets;
20 |
21 | import org.eclipse.core.resources.IProject;
22 | import org.eclipse.core.runtime.CoreException;
23 | import org.eclipse.core.runtime.IProgressMonitor;
24 | import org.eclipse.wst.common.project.facet.core.IDelegate;
25 | import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
26 |
27 | public class PayaraEjbFacetUninstallDelegate implements IDelegate {
28 |
29 | @Override
30 | public void execute(IProject project, IProjectFacetVersion fv, Object config, IProgressMonitor monitor) throws CoreException {
31 |
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/facets/PayaraWebFacetUninstallDelegate.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2023 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.facets;
20 |
21 | import org.eclipse.core.resources.IProject;
22 | import org.eclipse.core.runtime.CoreException;
23 | import org.eclipse.core.runtime.IProgressMonitor;
24 | import org.eclipse.wst.common.project.facet.core.IDelegate;
25 | import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
26 |
27 | public class PayaraWebFacetUninstallDelegate implements IDelegate {
28 |
29 | @Override
30 | public void execute(IProject project, IProjectFacetVersion fv, Object config, IProgressMonitor monitor) throws CoreException {
31 |
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/ActionReport.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin;
20 |
21 | /**
22 | * Represents response returned from server after command execution.
23 | *
24 | * Inspired by ActionReport class from module GF Admin Rest Service. In our case the interface
25 | * allows just read-only access.
26 | *
27 | *
28 | * @author Tomas Kraus, Peter Benedikovic
29 | */
30 | public interface ActionReport {
31 |
32 | public enum ExitCode {
33 | SUCCESS, WARNING, FAILURE
34 | }
35 |
36 | public ExitCode getExitCode();
37 |
38 | public String getMessage();
39 |
40 | public String getCommand();
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.micro/src/fish/payara/eclipse/tools/micro/BuildTool.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2020-2022 Payara Foundation
3 | *
4 | * All rights reserved. This program and the accompanying materials
5 | * are made available under the terms of the Eclipse Public License v2.0
6 | * which accompanies this distribution, and is available at
7 | * http://www.eclipse.org/legal/epl-v20.html
8 | * SPDX-License-Identifier: EPL-2.0
9 | */
10 | package fish.payara.eclipse.tools.micro;
11 |
12 | import java.io.FileNotFoundException;
13 | import java.util.List;
14 |
15 | import org.eclipse.core.resources.IProject;
16 | import org.eclipse.core.runtime.CoreException;
17 |
18 | public abstract class BuildTool {
19 |
20 | protected final IProject project;
21 |
22 | public static final String MAVEN_NATURE = "org.eclipse.m2e.core.maven2Nature";
23 |
24 | protected BuildTool(IProject project) {
25 | this.project = project;
26 | }
27 |
28 | public abstract String getExecutableHome() throws FileNotFoundException;
29 |
30 | public abstract List getStartCommand(String contextPath, String microVersion, String buildType,
31 | String debugPort, boolean hotDeploy);
32 |
33 | public abstract List getReloadCommand(boolean hotDeploy, List sourcesChanged,
34 | boolean metadataChanged);
35 |
36 | public static boolean isMavenProject(IProject project) {
37 | try {
38 | return project.hasNature(MAVEN_NATURE);
39 | } catch (CoreException e) {
40 | return false;
41 | }
42 | }
43 |
44 | public static BuildTool getToolSupport(IProject project) {
45 | if (isMavenProject(project)) {
46 | return new MavenBuildTool(project);
47 | } else {
48 | return new GradleBuildTool(project);
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/response/ResponseContentType.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin.response;
20 |
21 | /**
22 | * Enum that represents possible content types that runners accept responses in.
23 | *
24 | *
25 | * @author Tomas Kraus, Peter Benedikovic
26 | */
27 | public enum ResponseContentType {
28 |
29 | APPLICATION_XML("application/xml"), APPLICATION_JSON("application/json"), TEXT_PLAIN("text/plain");
30 |
31 | private String type;
32 |
33 | ResponseContentType(String type) {
34 | this.type = type;
35 | }
36 |
37 | @Override
38 | public String toString() {
39 | return type;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/data/ToolConfig.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.data;
20 |
21 | /**
22 | * GlassFish tool.
23 | *
24 | *
25 | * @author Peter Benedikovic, Tomas Kraus
26 | */
27 | public interface ToolConfig {
28 |
29 | ////////////////////////////////////////////////////////////////////////////
30 | // Getters and setters //
31 | ////////////////////////////////////////////////////////////////////////////
32 |
33 | /**
34 | * Get tool JAR path (relative under GlassFish home).
35 | *
36 | *
37 | * @return ToolConfig JAR path (relative under GlassFish home)
38 | */
39 | public String getJar();
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/utils/PartialCompletionException.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.utils;
20 |
21 | /**
22 | *
23 | * @author vbk
24 | */
25 | public class PartialCompletionException extends Exception {
26 |
27 | /**
28 | *
29 | */
30 | private static final long serialVersionUID = 1L;
31 | private String failedUpdates;
32 |
33 | PartialCompletionException(String itemsNotUpdated) {
34 | // throw new UnsupportedOperationException("Not yet implemented");
35 | failedUpdates = itemsNotUpdated;
36 | }
37 |
38 | @Override
39 | public String getMessage() {
40 | return "Failed to update: " + failedUpdates;
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/MessagePart.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin;
20 |
21 | import java.util.ArrayList;
22 | import java.util.List;
23 | import java.util.Properties;
24 |
25 | /**
26 | *
27 | * @author Tomas Kraus, Peter Benedikovic
28 | */
29 | public class MessagePart {
30 |
31 | Properties props = new Properties();
32 | String message;
33 |
34 | List children = new ArrayList<>();
35 |
36 | public List getChildren() {
37 | return children;
38 | }
39 |
40 | public String getMessage() {
41 | return message;
42 | }
43 |
44 | public Properties getProps() {
45 | return props;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/response/ResponseParser.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin.response;
20 |
21 | import java.io.InputStream;
22 |
23 | /**
24 | * Interface for various implementations of parsing response functionality.
25 | *
26 | *
27 | * @author Tomas Kraus, Peter Benedikovic
28 | */
29 | public interface ResponseParser {
30 |
31 | /**
32 | * Method parses the response and returns it's object representation - ActionReport.
33 | *
34 | *
35 | * @param in - input stream object
36 | * @return ActionReport object that represents the response.
37 | */
38 | public ActionReport parse(InputStream in);
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/exceptions/HttpPortUpdateException.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.exceptions;
20 |
21 | public class HttpPortUpdateException extends Exception {
22 |
23 | /**
24 | *
25 | */
26 | private static final long serialVersionUID = 7714377871660146294L;
27 |
28 | public HttpPortUpdateException() {
29 | super();
30 | }
31 |
32 | public HttpPortUpdateException(String message, Throwable cause) {
33 | super(message, cause);
34 | }
35 |
36 | public HttpPortUpdateException(String message) {
37 | super(message);
38 | }
39 |
40 | public HttpPortUpdateException(Throwable cause) {
41 | super(cause);
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/handlers/PayaraVersionTester.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.handlers;
20 |
21 | import static fish.payara.eclipse.tools.server.utils.WtpUtil.load;
22 |
23 | import java.io.File;
24 |
25 | import org.eclipse.core.expressions.PropertyTester;
26 | import org.eclipse.wst.server.core.IServer;
27 |
28 | import fish.payara.eclipse.tools.server.PayaraServer;
29 |
30 | public class PayaraVersionTester extends PropertyTester {
31 |
32 | @Override
33 | public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
34 | return new File(load((IServer) receiver, PayaraServer.class).getServerInstallationDirectory() + "/modules").exists();
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/internal/InstallJAXRS.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.internal;
20 |
21 | import org.eclipse.core.runtime.CoreException;
22 | import org.eclipse.core.runtime.IProgressMonitor;
23 | import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderOperation;
24 | import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderOperationConfig;
25 |
26 | /**
27 | * @author ludo>
28 | */
29 | public class InstallJAXRS extends LibraryProviderOperation {
30 |
31 | @Override
32 | public void execute(final LibraryProviderOperationConfig config, final IProgressMonitor monitor) throws CoreException {
33 | monitor.beginTask("", 1);
34 | monitor.done();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/dtds/sun-application-client_1_3-0.dtd:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
14 |
15 |
18 |
19 |
20 |
23 |
24 |
25 |
28 |
29 |
30 |
33 |
34 |
35 |
39 |
40 |
41 |
44 |
45 |
46 |
49 |
50 |
51 |
54 |
55 |
56 |
59 |
60 |
61 |
64 |
65 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/internal/Library.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.internal;
20 |
21 | public class Library {
22 |
23 | private String path;
24 | private String javadoc;
25 | private String source;
26 |
27 | public String getPath() {
28 | return path;
29 | }
30 |
31 | public void setPath(String name) {
32 | this.path = name;
33 | }
34 |
35 | public String getJavadoc() {
36 | return javadoc;
37 | }
38 |
39 | public void setJavadoc(String doc) {
40 | this.javadoc = doc;
41 | }
42 |
43 | public String getSource() {
44 | return source;
45 | }
46 |
47 | public void setSource(String src) {
48 | this.source = src;
49 | }
50 |
51 | }
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/ui/internal/JAXRSActionPanels.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.ui.internal;
20 |
21 | import static org.eclipse.swt.SWT.NONE;
22 |
23 | import org.eclipse.jst.common.project.facet.ui.libprov.LibraryProviderOperationPanel;
24 | import org.eclipse.swt.widgets.Composite;
25 | import org.eclipse.swt.widgets.Control;
26 |
27 | /**
28 | * See plug-in.xml
29 | * org.eclipse.jst.common.project.facet.ui.libraryProviderActionPanels
30 | *
31 | * @author arjan
32 | *
33 | */
34 | public class JAXRSActionPanels extends LibraryProviderOperationPanel {
35 |
36 | @Override
37 | public Control createControl(Composite c) {
38 | return new Composite(c, NONE);
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/serverview/WSDesc.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.serverview;
20 |
21 | /**
22 | *
23 | * @author Peter Williams
24 | */
25 | public class WSDesc {
26 |
27 | private final String testUrl;
28 | private final String wsdlUrl;
29 | private final String name;
30 |
31 | public WSDesc(final String name, final String wsdlUrl, final String testUrl) {
32 | this.name = name;
33 | this.testUrl = testUrl;
34 | this.wsdlUrl = wsdlUrl;
35 | }
36 |
37 | public String getName() {
38 | return name;
39 | }
40 |
41 | public String getTestURL() {
42 | return testUrl;
43 | }
44 |
45 | public String getWsdlUrl() {
46 | return wsdlUrl;
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/server/config/GlassFishConfigManager.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.server.config;
20 |
21 | import java.net.URL;
22 |
23 | import fish.payara.eclipse.tools.server.sdk.data.GlassFishConfig;
24 |
25 | /**
26 | * GlassFish configuration manager.
27 | *
28 | *
29 | * @author Peter Benedikovic, Tomas Kraus
30 | */
31 | public class GlassFishConfigManager {
32 |
33 | /**
34 | * Get GlassFish configuration access object.
35 | *
36 | *
37 | * @param configFile GlassFish configuration XML file.
38 | * @return GlassFish configuration API.
39 | */
40 | public static GlassFishConfig getConfig(URL configFile) {
41 | return new GlassFishConfigXMLImpl(configFile);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/data/IdeContext.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.data;
20 |
21 | /**
22 | * IDE context containing interfaces to access IDE objects.
23 | *
24 | *
25 | * @author Tomas Kraus, Peter Benedikovic
26 | * @deprecated IDE context support was removed. DO NOT USE!
27 | */
28 | @Deprecated
29 | public class IdeContext {
30 |
31 | ////////////////////////////////////////////////////////////////////////////
32 | // Constructors //
33 | ////////////////////////////////////////////////////////////////////////////
34 |
35 | /**
36 | * Constructs IDE context object and sets IDE accessors.
37 | *
38 | *
39 | * @deprecated IDE context support was removed. DO NOT USE!
40 | */
41 | @Deprecated
42 | public IdeContext() {
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/ui/wizards/SWTUtil.java:
--------------------------------------------------------------------------------
1 | package fish.payara.eclipse.tools.server.ui.wizards;
2 |
3 | import org.eclipse.jface.dialogs.Dialog;
4 | import org.eclipse.jface.dialogs.IDialogConstants;
5 | import org.eclipse.jface.resource.JFaceResources;
6 | import org.eclipse.swt.SWT;
7 | import org.eclipse.swt.graphics.FontMetrics;
8 | import org.eclipse.swt.graphics.GC;
9 | import org.eclipse.swt.layout.GridData;
10 | import org.eclipse.swt.widgets.Button;
11 | import org.eclipse.swt.widgets.Composite;
12 | import org.eclipse.swt.widgets.Control;
13 | /**
14 | * SWT Utility class.
15 | */
16 | public class SWTUtil {
17 | private static FontMetrics fontMetrics;
18 |
19 | protected static void initializeDialogUnits(Control testControl) {
20 | // Compute and store a font metric
21 | GC gc = new GC(testControl);
22 | gc.setFont(JFaceResources.getDialogFont());
23 | fontMetrics = gc.getFontMetrics();
24 | gc.dispose();
25 | }
26 |
27 | /**
28 | * Returns a width hint for a button control.
29 | */
30 | protected static int getButtonWidthHint(Button button) {
31 | int widthHint = Dialog.convertHorizontalDLUsToPixels(fontMetrics, IDialogConstants.BUTTON_WIDTH);
32 | return Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
33 | }
34 |
35 | /**
36 | * Create a new button with the standard size.
37 | *
38 | * @param comp the component to add the button to
39 | * @param label the button label
40 | * @return a button
41 | */
42 | public static Button createButton(Composite comp, String label) {
43 | Button b = new Button(comp, SWT.PUSH);
44 | b.setText(label);
45 | if (fontMetrics == null)
46 | initializeDialogUnits(comp);
47 | GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
48 | data.widthHint = getButtonWidthHint(b);
49 | b.setLayoutData(data);
50 | return b;
51 | }
52 | }
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/utils/Jobs.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Payara Foundation
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | package fish.payara.eclipse.tools.server.utils;
11 |
12 | import static org.eclipse.core.runtime.jobs.Job.SHORT;
13 |
14 | import org.eclipse.core.runtime.ICoreRunnable;
15 | import org.eclipse.core.runtime.jobs.Job;
16 |
17 | /**
18 | * Utility class for running jobs
19 | *
20 | * @author Arjan Tijms
21 | *
22 | */
23 | public class Jobs {
24 |
25 | /**
26 | * Schedules the runnable to be run via a Job
27 | *
28 | *
29 | * The job is added to a queue of waiting jobs with the priority for short background jobs,
30 | * and will be run when it arrives at the beginning of the queue.
31 | *
32 | *
33 | * The monitor is started and set at 100 steps, and closed after the runnable executes.
34 | *
35 | * @param name the name of the job
36 | * @param runnable the runnable to execute
37 | */
38 | public static void scheduleShortJob(String name, ICoreRunnable runnable) {
39 | Job job = Job.create(name,
40 | monitor -> {
41 | try {
42 | monitor.beginTask(name, 100);
43 | runnable.run(monitor);
44 | } finally {
45 | monitor.done();
46 | }
47 | });
48 |
49 | job.setPriority(SHORT);
50 | job.schedule();
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/serverview/ResourceDesc.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.serverview;
20 |
21 | /**
22 | *
23 | * @author Peter Williams
24 | */
25 | public class ResourceDesc implements Comparable {
26 |
27 | private final String name;
28 | private final String cmdSuffix;
29 |
30 | public ResourceDesc(final String name, final String cmdSuffix) {
31 | this.name = name;
32 | this.cmdSuffix = cmdSuffix;
33 | }
34 |
35 | public String getName() {
36 | return name;
37 | }
38 |
39 | public String getCommandSuffix() {
40 | return cmdSuffix;
41 | }
42 |
43 | @Override
44 | public int compareTo(ResourceDesc o) {
45 | int result = name.compareTo(o.name);
46 | if (result == 0) {
47 | result = cmdSuffix.compareTo(o.cmdSuffix);
48 | }
49 | return result;
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/utils/JdkFilter.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.utils;
20 |
21 | import static fish.payara.eclipse.tools.server.utils.JdtUtil.validateJvm;
22 |
23 | import org.eclipse.jdt.launching.IVMInstall;
24 |
25 | /**
26 | * @author Konstantin Komissarchik
27 | */
28 |
29 | public final class JdkFilter implements Filter {
30 | private final VersionConstraint versionConstraint;
31 |
32 | public JdkFilter(final VersionConstraint versionConstraint) {
33 | if (versionConstraint == null) {
34 | throw new IllegalArgumentException();
35 | }
36 |
37 | this.versionConstraint = versionConstraint;
38 | }
39 |
40 | @Override
41 |
42 | public boolean allows(final IVMInstall jvm) {
43 | return validateJvm(jvm).jdk().version(this.versionConstraint).result().ok();
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/serverview/AppDesc.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.serverview;
20 |
21 | /**
22 | *
23 | * @author Peter Williams
24 | */
25 | public class AppDesc {
26 |
27 | private final String name;
28 | private final String path;
29 | private final String contextRoot;
30 | private final String engineType;
31 |
32 | public AppDesc(final String name, final String path, final String contextRoot, final String type) {
33 | this.name = name;
34 | this.path = path;
35 | this.contextRoot = contextRoot;
36 | this.engineType = type;
37 | }
38 |
39 | public String getName() {
40 | return name;
41 | }
42 |
43 | public String getPath() {
44 | return path;
45 | }
46 |
47 | public String getContextRoot() {
48 | return contextRoot;
49 | }
50 |
51 | public String getType() {
52 | return engineType;
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/facets/internal/AbstractPayaraDeploymentDescriptor.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2023 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.facets.internal;
20 |
21 | import org.eclipse.core.runtime.CoreException;
22 | import org.eclipse.core.runtime.IProgressMonitor;
23 |
24 | import fish.payara.eclipse.tools.server.facets.IPayaraDeploymentDescriptor;
25 |
26 | abstract class AbstractPayaraDeploymentDescriptor implements
27 | IPayaraDeploymentDescriptor {
28 |
29 | /**
30 | * Created new deployment descriptor if it's not already there.
31 | *
32 | */
33 | @Override
34 | public final void store(IProgressMonitor monitor) throws CoreException {
35 | if (isPossibleToCreate()) {
36 | prepareDescriptor();
37 | save();
38 | }
39 | }
40 |
41 | protected abstract void save();
42 |
43 | protected abstract void prepareDescriptor();
44 |
45 | protected abstract boolean isPossibleToCreate();
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/TaskStateListener.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk;
20 |
21 | /**
22 | * GlassFish server administration command execution state report callback.
23 | *
24 | *
25 | * @author Tomas Kraus, Peter Benedikovic
26 | */
27 | public interface TaskStateListener {
28 |
29 | ////////////////////////////////////////////////////////////////////////////
30 | // Interface Methods //
31 | ////////////////////////////////////////////////////////////////////////////
32 |
33 | /**
34 | * Callback to notify about GlassFish server administration command execution state change.
35 | *
36 | *
37 | * @param newState New command execution state.
38 | * @param event Event related to execution state change.
39 | * @param args Additional String arguments.
40 | */
41 | public void operationStateChanged(TaskState newState, TaskEvent event,
42 | String... args);
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/log/AbstractPayaraConsole.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.log;
20 |
21 | import java.util.List;
22 | import java.util.concurrent.CountDownLatch;
23 | import java.util.concurrent.ScheduledFuture;
24 |
25 | import org.eclipse.jface.resource.ImageDescriptor;
26 | import org.eclipse.ui.console.MessageConsole;
27 | import org.eclipse.ui.console.MessageConsoleStream;
28 |
29 | public abstract class AbstractPayaraConsole extends MessageConsole implements IPayaraConsole {
30 |
31 | protected List readers;
32 | protected MessageConsoleStream out;
33 | protected CountDownLatch latch;
34 | protected ILogFilter filter;
35 | protected ScheduledFuture> stopJobResult;
36 |
37 | public AbstractPayaraConsole(String name, ImageDescriptor imageDescriptor, ILogFilter filter) {
38 | super(name, imageDescriptor);
39 | this.filter = filter;
40 | this.out = newMessageStream();
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/server/parser/HttpData.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.server.parser;
20 |
21 | /**
22 | * Data holder for port informations from domain.xml.
23 | *
24 | *
25 | * @author Peter Benedikovic, Tomas Kraus
26 | */
27 | public class HttpData {
28 |
29 | private final String id;
30 | private final int port;
31 | private final boolean secure;
32 |
33 | public HttpData(String id, int port, boolean secure) {
34 | this.id = id;
35 | this.port = port;
36 | this.secure = secure;
37 | }
38 |
39 | public String getId() {
40 | return id;
41 | }
42 |
43 | public int getPort() {
44 | return port;
45 | }
46 |
47 | public boolean isSecure() {
48 | return secure;
49 | }
50 |
51 | @Override
52 | public String toString() {
53 | return "{ " + id + ", " + port + ", " + secure + " }"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Bundle-ManifestVersion: 2
3 | Bundle-Name: Payara Server Tools
4 | Bundle-SymbolicName: fish.payara.eclipse.tools.server;singleton:=true
5 | Bundle-Version: 2.4.0
6 | Bundle-ClassPath: .
7 | Bundle-Localization: plugin
8 | Bundle-Activator: fish.payara.eclipse.tools.server.PayaraServerPlugin
9 | Bundle-Vendor: Payara
10 | Require-Bundle:
11 | org.eclipse.emf.codegen,
12 | org.eclipse.jst.server.core,
13 | org.eclipse.jst.j2ee,
14 | org.eclipse.jst.server.core,
15 | org.eclipse.jst.servlet.ui,
16 | org.eclipse.jst.j2ee.ejb,
17 | org.eclipse.jst.common.project.facet.core,
18 | org.eclipse.jst.common.project.facet.ui,
19 | org.eclipse.jst.j2ee,
20 | org.eclipse.jst.j2ee.core,
21 | org.eclipse.jst.j2ee.ejb,
22 | org.eclipse.jst.j2ee.web,
23 | org.eclipse.jst.j2ee.ui,
24 | org.eclipse.jst.jee.ui,
25 | org.eclipse.jst.server.generic.core,
26 | org.eclipse.wst.server.core,
27 | org.eclipse.wst.server.ui,
28 | org.eclipse.wst.common.project.facet.core,
29 | org.eclipse.wst.common.project.facet.ui,
30 | org.eclipse.wst.common.frameworks.ui,
31 | org.eclipse.ui.console,
32 | org.eclipse.ui,
33 | org.eclipse.ui.ide,
34 | org.eclipse.ui.forms,
35 | org.eclipse.ui.navigator,
36 | org.eclipse.ui.workbench.texteditor,
37 | org.eclipse.text,
38 | org.eclipse.swt,
39 | org.eclipse.jem.util,
40 | com.sun.jna,
41 | com.sun.jna.platform,
42 | org.apache.ant,
43 | org.eclipse.m2e.core,
44 | org.eclipse.m2e.core.ui,
45 | org.eclipse.m2e.archetype.common,
46 | org.eclipse.debug.core,
47 | org.eclipse.debug.ui,
48 | org.eclipse.core.expressions,
49 | org.eclipse.core.externaltools,
50 | org.eclipse.core.runtime,
51 | org.eclipse.jdt.core,
52 | org.eclipse.jdt.debug,
53 | org.eclipse.jdt.debug.ui,
54 | org.eclipse.jdt.ui,
55 | org.eclipse.jdt.launching,
56 | org.eclipse.datatools.connectivity,
57 | org.eclipse.datatools.connectivity.ui
58 | Bundle-RequiredExecutionEnvironment: JavaSE-17
59 | Bundle-ActivationPolicy: lazy
60 | Import-Package: org.eclipse.ui.navigator.resources
61 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/handlers/OpenDomainHomeHandler.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.handlers;
20 |
21 | import static fish.payara.eclipse.tools.server.PayaraServerPlugin.logMessage;
22 | import static fish.payara.eclipse.tools.server.utils.URIHelper.getDomainHomeURI;
23 | import static fish.payara.eclipse.tools.server.utils.URIHelper.showURI;
24 | import static fish.payara.eclipse.tools.server.utils.WtpUtil.load;
25 |
26 | import org.eclipse.wst.server.core.IServer;
27 |
28 | import fish.payara.eclipse.tools.server.deploying.PayaraServerBehaviour;
29 |
30 | public class OpenDomainHomeHandler extends AbstractPayaraSelectionHandler {
31 |
32 | @Override
33 | public void processSelection(IServer server) {
34 | try {
35 | showURI(getDomainHomeURI(load(server, PayaraServerBehaviour.class).getPayaraServerDelegate()));
36 | } catch (Exception e) {
37 | logMessage("Error opening browser: " + e.getMessage());
38 | }
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/handlers/OpenServerHomeHandler.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.handlers;
20 |
21 | import static fish.payara.eclipse.tools.server.PayaraServerPlugin.logMessage;
22 | import static fish.payara.eclipse.tools.server.utils.URIHelper.getServerHomeURI;
23 | import static fish.payara.eclipse.tools.server.utils.URIHelper.showURI;
24 | import static fish.payara.eclipse.tools.server.utils.WtpUtil.load;
25 |
26 | import org.eclipse.wst.server.core.IServer;
27 |
28 | import fish.payara.eclipse.tools.server.deploying.PayaraServerBehaviour;
29 |
30 | public class OpenServerHomeHandler extends AbstractPayaraSelectionHandler {
31 |
32 | @Override
33 | public void processSelection(IServer server) {
34 | try {
35 | showURI(getServerHomeURI(load(server, PayaraServerBehaviour.class).getPayaraServerDelegate()));
36 | } catch (Exception e) {
37 | logMessage("Error opening folder in desktop " + e.getMessage());
38 | }
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/ui/internal/PayaraRuntimeComponentLabelProviderFactory.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.ui.internal;
20 |
21 | import org.eclipse.core.runtime.IAdapterFactory;
22 | import org.eclipse.wst.common.project.facet.core.runtime.IRuntimeComponent;
23 | import org.eclipse.wst.common.project.facet.ui.IRuntimeComponentLabelProvider;
24 |
25 | /**
26 | * @author Konstantin Komissarchik
27 | */
28 |
29 | public final class PayaraRuntimeComponentLabelProviderFactory implements IAdapterFactory {
30 | private static final Class>[] ADAPTER_TYPES = { IRuntimeComponentLabelProvider.class };
31 |
32 | @Override
33 | public T getAdapter(Object adaptable, Class adapterType) {
34 | return adapterType.cast(new PayaraRuntimeComponentLabelProvider((IRuntimeComponent) adaptable));
35 | }
36 |
37 | @Override
38 | public Class>[] getAdapterList() {
39 | return ADAPTER_TYPES;
40 | }
41 |
42 | }
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/dtds/sun-application_1_4-0.dtd:
--------------------------------------------------------------------------------
1 |
8 |
9 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
30 |
31 |
32 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
51 |
52 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/facets/PayaraEjbFacetInstallDelegate.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2023 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.facets;
20 |
21 | import org.eclipse.core.resources.IProject;
22 | import org.eclipse.core.runtime.CoreException;
23 | import org.eclipse.core.runtime.IProgressMonitor;
24 | import org.eclipse.wst.common.project.facet.core.IDelegate;
25 | import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
26 |
27 | import fish.payara.eclipse.tools.server.facets.internal.PayaraDeploymentDescriptorFactory;
28 |
29 | public class PayaraEjbFacetInstallDelegate implements IDelegate {
30 |
31 | @Override
32 | public void execute(IProject project, IProjectFacetVersion fv, Object config, IProgressMonitor monitor) throws CoreException {
33 | IPayaraDeploymentDescriptor ejbDescriptor = PayaraDeploymentDescriptorFactory
34 | .getEjbDeploymentDescriptor(project);
35 |
36 | if (ejbDescriptor != null) {
37 | ejbDescriptor.store(monitor);
38 | }
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/RunnerHttpClass.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin;
20 |
21 | import static java.lang.annotation.ElementType.TYPE;
22 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
23 |
24 | import java.lang.annotation.Retention;
25 | import java.lang.annotation.Target;
26 |
27 | /**
28 | * Annotation to select Payara server admin command runner for command entity.
29 | *
30 | *
31 | * @author Tomas Kraus, Peter Benedikovic
32 | */
33 | @Retention(RUNTIME)
34 | @Target(TYPE)
35 | public @interface RunnerHttpClass {
36 |
37 | ////////////////////////////////////////////////////////////////////////////
38 | // Instance attributes //
39 | ////////////////////////////////////////////////////////////////////////////
40 |
41 | /** Payara command runner class as named value. */
42 | Class extends Runner> runner() default RunnerHttp.class;
43 |
44 | /** Payara command string if differs from default one. */
45 | String command() default "";
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/RunnerRestClass.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin;
20 |
21 | import java.lang.annotation.ElementType;
22 | import java.lang.annotation.Retention;
23 | import java.lang.annotation.RetentionPolicy;
24 | import java.lang.annotation.Target;
25 |
26 | /**
27 | * Annotation to select Payara server admin command runner for command entity.
28 | *
29 | *
30 | * @author Tomas Kraus, Peter Benedikovic
31 | */
32 | @Retention(RetentionPolicy.RUNTIME)
33 | @Target(ElementType.TYPE)
34 | public @interface RunnerRestClass {
35 |
36 | ////////////////////////////////////////////////////////////////////////////
37 | // Instance attributes //
38 | ////////////////////////////////////////////////////////////////////////////
39 |
40 | /** Payara command runner class as named value. */
41 | Class extends Runner> runner() default RunnerRest.class;
42 |
43 | /** Override Payara command string if differs from default one. */
44 | String command() default "";
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/RunnerRestListResources.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin;
20 |
21 | import fish.payara.eclipse.tools.server.PayaraServer;
22 |
23 | /**
24 | * Command runner for commands that retrieve list of resources of certain kind.
25 | *
26 | *
27 | * @author Tomas Kraus, Peter Benedikovic
28 | */
29 | public class RunnerRestListResources extends RunnerRestList {
30 |
31 | ////////////////////////////////////////////////////////////////////////////
32 | // Constructors //
33 | ////////////////////////////////////////////////////////////////////////////
34 |
35 | /**
36 | * Constructs an instance of administration command executor using REST interface.
37 | *
38 | *
39 | * @param server GlassFish server entity object.
40 | * @param command GlassFish server administration command entity.
41 | */
42 | public RunnerRestListResources(final PayaraServer server,
43 | final Command command) {
44 | super(server, command);
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/RunnerRestListWebServices.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin;
20 |
21 | import fish.payara.eclipse.tools.server.PayaraServer;
22 |
23 | /**
24 | * Command runner for commands that retrieve list of web services deployed on server.
25 | *
26 | *
27 | * @author Tomas Kraus, Peter Benedikovic
28 | */
29 | public class RunnerRestListWebServices extends RunnerRestList {
30 |
31 | ////////////////////////////////////////////////////////////////////////////
32 | // Constructors //
33 | ////////////////////////////////////////////////////////////////////////////
34 |
35 | /**
36 | * Constructs an instance of administration command executor using REST interface.
37 | *
38 | *
39 | * @param server GlassFish server entity object.
40 | * @param command GlassFish server administration command entity.
41 | */
42 | public RunnerRestListWebServices(final PayaraServer server,
43 | final Command command) {
44 | super(server, command);
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/data/GlassFishStatusTask.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.data;
20 |
21 | import fish.payara.eclipse.tools.server.sdk.TaskEvent;
22 |
23 | /**
24 | * GlassFish server status check task details.
25 | *
26 | * Provides access to server status check task details in status listener callback methods.
27 | *
28 | *
29 | * @author Tomas Kraus
30 | */
31 | public interface GlassFishStatusTask {
32 |
33 | /**
34 | * Get server status check type.
35 | *
36 | *
37 | * @return Server status check type.
38 | */
39 | public GlassFishStatusCheck getType();
40 |
41 | /**
42 | * Get last command task execution status.
43 | *
44 | *
45 | * @return Last command task execution status.
46 | */
47 | public GlassFishStatusCheckResult getStatus();
48 |
49 | /**
50 | * Get last command task execution status.
51 | *
52 | *
53 | * @return Last command task execution status.
54 | */
55 | public TaskEvent getEvent();
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/RunnerRestListApplications.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin;
20 |
21 | import fish.payara.eclipse.tools.server.PayaraServer;
22 |
23 | /**
24 | * Command runner for commands that retrieve list of applications deployed on server.
25 | *
26 | *
27 | * @author Tomas Kraus, Peter Benedikovic
28 | */
29 | public class RunnerRestListApplications extends RunnerRestList {
30 |
31 | ////////////////////////////////////////////////////////////////////////////
32 | // Constructors //
33 | ////////////////////////////////////////////////////////////////////////////
34 |
35 | /**
36 | * Constructs an instance of administration command executor using REST interface.
37 | *
38 | *
39 | * @param server GlassFish server entity object.
40 | * @param command GlassFish server administration command entity.
41 | */
42 | public RunnerRestListApplications(final PayaraServer server,
43 | final Command command) {
44 | super(server, command);
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/ui/rest/wizards/Messages.properties:
--------------------------------------------------------------------------------
1 | ProjectName=Java EE 6 Project:
2 | sessionWizardTitle=Create EJB 3.1 Session Bean
3 | errorBusinessInterfaceMissing=At least one checkbox must be selected in Create business interface section
4 |
5 | timerWizardTitle=Create EJB Timer Callback
6 | timerWizardDescription=Create Java class with an added EJB Timer Callback method.
7 | timerScheduleLabel=Schedule:
8 | timerScheduleDefault=second="*/10", minute="*", hour="8-23", dayOfWeek="Mon-Fri", dayOfMonth="*", month="*", year="*", info="MyTimer"
9 | errorTimerScheduleMissing=The schedule cannot be empty.
10 |
11 | genericResourceWizardTitle=RESTful Web Service from Pattern
12 | genericResourceWizardDescription=Create RESTful Web Service from Pattern.
13 | patternTypeLabel=Pattern type:
14 | patternTypeSimpleValue=Simple Root Resource
15 | patternTypeContainerValue=Container-Item
16 | patternTypeClientContainerValue=Client-Controlled Container-Item
17 | mimeTypeLabel=MIME type:
18 | errorMimeTypeMissing=The MIME type cannot be empty.
19 | representationClassLabel=Representation class:
20 | representationClassDialogTitle=Representation Class Selection
21 | representationClassDialogLabel=Choose a representation class
22 | errorRepresentationClassMissing=The Representation class cannot be empty.
23 | errorRepresentationClassInvalid=The Representation class does not exist.
24 | containerRepresentationClassLabel=Container representation class:
25 | containerRepresentationClassDialogTitle=Container representation Class Selection
26 | containerRepresentationClassDialogLabel=Choose a container representation class
27 | errorContainerRepresentationClassMissing=The Container representation class cannot be empty.
28 | errorContainerRepresentationClassInvalid=The Container representation class does not exist.
29 | pathLabel=Path:
30 | errorPathMissing=The Path cannot be empty.
31 | errorPathInvalid=The Path must contain a list of unique java identifiers surrounded by braces, or string literals, separated by slashes.
32 | containerPathLabel=Container path:
33 | errorContainerPathMissing=The Container path cannot be empty.
34 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.micro/src/fish/payara/eclipse/tools/micro/ui/wizards/Messages.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2020-2022 Payara Foundation
3 | *
4 | * All rights reserved. This program and the accompanying materials
5 | * are made available under the terms of the Eclipse Public License v2.0
6 | * which accompanies this distribution, and is available at
7 | * http://www.eclipse.org/legal/epl-v20.html
8 | * SPDX-License-Identifier: EPL-2.0
9 | */
10 | package fish.payara.eclipse.tools.micro.ui.wizards;
11 |
12 | public class Messages extends org.eclipse.osgi.util.NLS {
13 |
14 | static {
15 | initializeMessages(Messages.class.getName(), Messages.class);
16 | }
17 |
18 | public static String microProjectTitle;
19 |
20 | public static String microProjectSettingsPageTitle;
21 | public static String microProjectSettingsPageDescription;
22 | public static String groupIdComponentLabel;
23 | public static String artifactIdComponentLabel;
24 | public static String versionComponentLabel;
25 | public static String packageComponentLabel;
26 | public static String versionValidationMessage;
27 | public static String packageValidationMessage;
28 |
29 | public static String microProjectLocationPageTitle;
30 | public static String microProjectLocationPageDescription;
31 |
32 | public static String projectArchetypeJobCreating;
33 | public static String projectArchetypeJobFailed;
34 | public static String projectPomAlreadyExists;
35 |
36 | public static String microSettingsPageTitle;
37 | public static String microSettingsPageDescription;
38 | public static String contextPathComponentLabel;
39 | public static String microVersionComponentLabel;
40 | public static String autobindComponentLabel;
41 | public static String contextPathValidationMessage;
42 | public static String microVersionValidationMessage;
43 |
44 | public static String microProjectTabTitle;
45 | public static String projectBuildNotFound;
46 | public static String buildArtifactComponentLabel;
47 | public static String debugPortComponentLabel;
48 | public static String reloadArtifactComponentLabel;
49 | public static String reloadArtifactComponentTooltip;
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/internal/RuntimeComponentProvider.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.internal;
20 |
21 | import java.util.List;
22 |
23 | import org.eclipse.wst.common.project.facet.core.runtime.IRuntimeComponent;
24 | import org.eclipse.wst.server.core.IRuntime;
25 |
26 | /**
27 | * This abstract class is used in conjunction with runtimeComponentProviders extension
28 | * point to extend the list of runtime components that make up a Payara Server runtime.
29 | *
30 | * @author Konstantin Komissarchik
31 | */
32 |
33 | public abstract class RuntimeComponentProvider {
34 |
35 | /**
36 | * Returns additional components to add to the runtime that represents the provided GlassFish Server
37 | * installation.
38 | *
39 | * @param runtime the WTP server tools runtime definition
40 | * @return list of additional components or null to not contribute anything
41 | */
42 | public abstract List getRuntimeComponents(IRuntime runtime);
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/data/GlassFishServerStatus.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.data;
20 |
21 | import fish.payara.eclipse.tools.server.PayaraServer;
22 | import fish.payara.eclipse.tools.server.sdk.GlassFishStatus;
23 |
24 | /**
25 | * GlassFish server status interface.
26 | *
27 | * GlassFish Server entity interface allows to use foreign entity classes.
28 | *
29 | *
30 | * @author Tomas Kraus, Peter Benedikovic
31 | */
32 | public interface GlassFishServerStatus {
33 |
34 | ////////////////////////////////////////////////////////////////////////////
35 | // Interface Methods //
36 | ////////////////////////////////////////////////////////////////////////////
37 |
38 | /**
39 | * Get GlassFish server entity.
40 | *
41 | *
42 | * @return GlassFish server entity.
43 | */
44 | public PayaraServer getServer();
45 |
46 | /**
47 | * Get current GlassFish server status.
48 | *
49 | *
50 | * @return Current GlassFish server status.
51 | */
52 | public GlassFishStatus getStatus();
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/ui/log/PayaraLogPageParticipant.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.ui.log;
20 |
21 | import org.eclipse.swt.custom.StyledText;
22 | import org.eclipse.ui.console.IConsole;
23 | import org.eclipse.ui.console.IConsolePageParticipant;
24 | import org.eclipse.ui.console.TextConsole;
25 | import org.eclipse.ui.part.IPageBookViewPage;
26 |
27 | public class PayaraLogPageParticipant implements IConsolePageParticipant {
28 |
29 | @Override
30 | public void init(IPageBookViewPage page, IConsole console) {
31 | if (page.getControl() instanceof StyledText) {
32 | StyledText viewer = (StyledText) page.getControl();
33 | viewer.addLineStyleListener(new LogStyle(((TextConsole) console).getDocument()));
34 | }
35 | }
36 |
37 | @Override
38 | public void activated() {
39 | }
40 |
41 | @Override
42 | public void deactivated() {
43 | }
44 |
45 | @Override
46 | public void dispose() {
47 | }
48 |
49 | @Override
50 | public T getAdapter(Class adapter) {
51 | return null;
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/preferences/PreferenceInitializer.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.preferences;
20 |
21 | import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
22 | import org.eclipse.jface.preference.IPreferenceStore;
23 |
24 | import fish.payara.eclipse.tools.server.PayaraServerPlugin;
25 |
26 | /**
27 | * Class used to initialize default preference values.
28 | *
29 | * @author Ludovic Champenois
30 | */
31 | public class PreferenceInitializer extends AbstractPreferenceInitializer {
32 |
33 | /*
34 | * (non-Javadoc)
35 | *
36 | * @see
37 | * org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
38 | */
39 | @Override
40 | public void initializeDefaultPreferences() {
41 | IPreferenceStore store = PayaraServerPlugin.getInstance().getPreferenceStore();
42 | store.setDefault(PreferenceConstants.ENABLE_LOG, false);
43 | store.setDefault(PreferenceConstants.ENABLE_START_VERBOSE, false);
44 | store.setDefault(PreferenceConstants.ENABLE_COLORS_CONSOLE, true);
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/ui/internal/PayaraRuntimeComponentLabelProvider.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.ui.internal;
20 |
21 | import org.eclipse.osgi.util.NLS;
22 | import org.eclipse.wst.common.project.facet.core.runtime.IRuntimeComponent;
23 | import org.eclipse.wst.common.project.facet.ui.IRuntimeComponentLabelProvider;
24 |
25 | /**
26 | * @author Konstantin Komissarchik
27 | */
28 | public final class PayaraRuntimeComponentLabelProvider implements IRuntimeComponentLabelProvider {
29 | private final IRuntimeComponent rc;
30 |
31 | public PayaraRuntimeComponentLabelProvider(IRuntimeComponent rc) {
32 | this.rc = rc;
33 | }
34 |
35 | @Override
36 | public String getLabel() {
37 | return NLS.bind(Resources.label, rc.getRuntimeComponentVersion().getVersionString());
38 | }
39 |
40 | private static final class Resources extends NLS {
41 | public static String label;
42 |
43 | static {
44 | initializeMessages(PayaraRuntimeComponentLabelProvider.class.getName(), Resources.class);
45 | }
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/exceptions/PayaraLaunchException.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.exceptions;
20 |
21 | public class PayaraLaunchException extends Exception {
22 |
23 | private static final long serialVersionUID = -3931653934641477601L;
24 |
25 | private Process payaraProcess;
26 |
27 | public PayaraLaunchException() {
28 | super();
29 | }
30 |
31 | public PayaraLaunchException(String message, Throwable cause) {
32 | this(message, cause, null);
33 | }
34 |
35 | public PayaraLaunchException(String message, Process gfProcess) {
36 | this(message, null, gfProcess);
37 | }
38 |
39 | public PayaraLaunchException(String message, Throwable cause, Process payaraProcess) {
40 | super(message, cause);
41 | this.payaraProcess = payaraProcess;
42 | }
43 |
44 | public PayaraLaunchException(String message) {
45 | this(message, null, null);
46 | }
47 |
48 | public PayaraLaunchException(Throwable cause) {
49 | this(null, cause, null);
50 | }
51 |
52 | public Process getStartedProcess() {
53 | return payaraProcess;
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/response/ActionReport.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin.response;
20 |
21 | /**
22 | * Represents response returned from server after command execution.
23 | *
24 | * Inspired by ActionReport class from module GF Admin Rest Service. In our case the interface
25 | * allows just read-only access.
26 | *
27 | *
28 | * @author Tomas Kraus, Peter Benedikovic
29 | */
30 | public interface ActionReport {
31 |
32 | /** Possible exit codes that are sent by server. */
33 | public enum ExitCode {
34 | SUCCESS, WARNING, FAILURE, NA
35 | }
36 |
37 | /**
38 | * Get command execution exit code.
39 | *
40 | *
41 | * @return exit code of the called operation
42 | */
43 | public ExitCode getExitCode();
44 |
45 | /**
46 | * Getter for message included in server response.
47 | *
48 | *
49 | * @return message
50 | */
51 | public String getMessage();
52 |
53 | /**
54 | * Getter for command name (description).
55 | *
56 | *
57 | * @return command name
58 | */
59 | public String getCommand();
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/facets/internal/PayaraEjbDeploymentDescriptor.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2023 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.facets.internal;
20 |
21 | import org.eclipse.core.resources.IFile;
22 | import org.eclipse.core.runtime.IPath;
23 | import fish.payara.eclipse.tools.server.facets.IPayaraEjbDeploymentDescriptor;
24 |
25 | class PayaraEjbDeploymentDescriptor extends
26 | AbstractPayaraDeploymentDescriptor implements IPayaraEjbDeploymentDescriptor {
27 |
28 | private IFile file;
29 |
30 | PayaraEjbDeploymentDescriptor(IFile file) {
31 | this.file = file;
32 | }
33 |
34 | @Override
35 | protected void prepareDescriptor() {
36 |
37 | }
38 |
39 | @Override
40 | protected boolean isPossibleToCreate() {
41 | // check for existence of older sun descriptor
42 | IPath sunDescriptor = file.getLocation().removeLastSegments(1)
43 | .append(IPayaraEjbDeploymentDescriptor.SUN_EJB_DEPLOYMENT_DESCRIPTOR_NAME);
44 | if (sunDescriptor.toFile().exists()) {
45 | return false;
46 | }
47 | return true;
48 | }
49 |
50 | @Override
51 | protected void save() {
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/response/MessagePart.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin.response;
20 |
21 | import java.util.List;
22 | import java.util.Properties;
23 |
24 | /**
25 | * Class represents one part of REST server message.
26 | *
27 | * This part can be repeated in server response. It includes string message and can have other
28 | * properties. It can be nesting also other message parts.
29 | *
30 | *
31 | * @author Tomas Kraus, Peter Benedikovic
32 | */
33 | public class MessagePart {
34 |
35 | /** Message properties. */
36 | Properties props;
37 |
38 | /** Message. */
39 | String message;
40 |
41 | /** Nested messages. */
42 | List children;
43 |
44 | public List getChildren() {
45 | return children;
46 | }
47 |
48 | public String getMessage() {
49 | return message;
50 | }
51 |
52 | public Properties getProperties() {
53 | return props;
54 | }
55 |
56 | public void setProperties(Properties props) {
57 | this.props = props;
58 | }
59 |
60 | void setMessage(String message) {
61 | this.message = message;
62 | }
63 |
64 | }
65 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/CommandListWebServices.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin;
20 |
21 | /**
22 | * Command that retrieves list of web services defined on server.
23 | *
24 | *
25 | * @author Tomas Kraus, Peter Benedikovic
26 | */
27 | @RunnerHttpClass(runner = RunnerHttpListWebServices.class)
28 | @RunnerRestClass(runner = RunnerRestListWebServices.class)
29 | public class CommandListWebServices extends Command {
30 |
31 | ////////////////////////////////////////////////////////////////////////////
32 | // Class attributes //
33 | ////////////////////////////////////////////////////////////////////////////
34 |
35 | /** Command string for list web services command. */
36 | private static final String COMMAND = "__list-webservices";
37 |
38 | ////////////////////////////////////////////////////////////////////////////
39 | // Constructors //
40 | ////////////////////////////////////////////////////////////////////////////
41 |
42 | /**
43 | * Constructs an instance of GlassFish server list web services command entity.
44 | */
45 | public CommandListWebServices() {
46 | super(COMMAND);
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/ui/resources/wizards/Messages.properties:
--------------------------------------------------------------------------------
1 | JNDIName=&JNDI Name:
2 | ProjectName=Project:
3 | wizardTitle=Sun Resources File
4 | wizardDescription=Create a sun-resources.xml file from an existing JDBC connection. Note that target project must contain the Sun Deployment Descriptors Files Facet.
5 | Connection=&Connection:
6 | Create=Create...
7 |
8 | mailWizardTitle=JavaMail Session Sun Resource
9 | mailWizardDescription=Create/Update a sun-resources.xml file with a JavaMail Session resource. Note that target project must contain the Sun Deployment Descriptors Files Facet.
10 | MailHost=&Mail Host:
11 | MailUser=Default &User:
12 | MailFrom=Default Return &Address:
13 |
14 | errorMailHostNameMissing=Mail Host must be specified
15 | errorMailUserNameMissing=Default User must be specified
16 | errorMailReturnAddrMissing=Default Return Address must be specified
17 |
18 | jmsWizardTitle=JMS Sun Resource
19 | jmsWizardDescription=Create/Update a sun-resources.xml file with a JMS resource. Note that target project must contain the Sun Deployment Descriptors Files Facet.
20 |
21 | lblChooseType=Choose Resource Type:
22 | lblAdminObject=Admin Object Resource
23 | lblConnector=Connector Resource
24 | lblQueue=javax.jms.&Queue
25 | lblTopic=javax.jms.&Topic
26 | lblQueueConnectionFactory=javax.jms.Queue&ConnectionFactory
27 | lblTopicConnectionFactory=javax.jms.T&opicConnectionFactory
28 | lblConnectionFactory=javax.jms.Co&nnectionFactory
29 | errorResourceTypeMissing=Resource Type must be specified
30 |
31 | ErrorTitle=Error
32 | errorUnknown=Unknown error creating file
33 | errorFileExists=File already exists
34 | errorFolderNull=Cannot create sun-resources.xml file in project of this type.
35 | errorFolderMissing=Cannot create this type of resource in a project which does not contain a {0} folder
36 | errorProjectMissing=Project must be specified. Note that target project must contain the Sun Deployment Descriptors Files Facet.
37 | errorConnectionMissing=Connection must be specified
38 | errorConnectionInvalid=Invalid Database Connection. Please specify a valid connection.
39 | errorJndiNameMissing=JNDI Name must be specified
40 | errorDuplicateName=A resource with name {0} already exists. Please provide a unique value.
41 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/server/parser/ConfigReaderSources.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.server.parser;
20 |
21 | import java.util.LinkedList;
22 | import java.util.List;
23 |
24 | /**
25 | * sources library configuration XML element reader.
26 | *
27 | *
28 | * @author Peter Benedikovic, Tomas Kraus
29 | */
30 | public class ConfigReaderSources extends ConfigReader {
31 |
32 | ////////////////////////////////////////////////////////////////////////////
33 | // XML reader methods //
34 | ////////////////////////////////////////////////////////////////////////////
35 |
36 | /**
37 | * Provide paths to listen on.
38 | *
39 | * Sets readers for internal javadocs elements.
40 | *
41 | *
42 | * @return Paths that the reader listens to.
43 | */
44 | @Override
45 | public List getPathsToListen() {
46 | LinkedList paths = new LinkedList<>();
47 | paths.add(new TreeParser.Path("/server/library/sources/file", pathReader));
48 | paths.add(new TreeParser.Path("/server/library/sources/fileset", filesetReader));
49 | return paths;
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/RunnerRestStartCluster.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin;
20 |
21 | import java.io.IOException;
22 | import java.io.OutputStreamWriter;
23 | import java.net.HttpURLConnection;
24 |
25 | import fish.payara.eclipse.tools.server.PayaraServer;
26 |
27 | /**
28 | * Command runner executes start cluster command.
29 | *
30 | *
31 | * @author Tomas Kraus, Peter Benedikovic
32 | */
33 | public class RunnerRestStartCluster extends RunnerRest {
34 |
35 | /**
36 | * Constructs an instance of administration command executor using REST interface.
37 | *
38 | *
39 | * @param server GlassFish server entity object.
40 | * @param command GlassFish server administration command entity.
41 | */
42 | public RunnerRestStartCluster(final PayaraServer server,
43 | final Command command) {
44 | super(server, command);
45 | }
46 |
47 | @Override
48 | protected void handleSend(HttpURLConnection hconn) throws IOException {
49 | OutputStreamWriter wr = new OutputStreamWriter(hconn.getOutputStream());
50 | wr.write("clusterName=" + ((CommandTarget) command).target);
51 | wr.flush();
52 | wr.close();
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/RunnerRestStopCluster.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin;
20 |
21 | import java.io.IOException;
22 | import java.io.OutputStreamWriter;
23 | import java.net.HttpURLConnection;
24 |
25 | import fish.payara.eclipse.tools.server.PayaraServer;
26 |
27 | /**
28 | * Command runner executes stop cluster command.
29 | *
30 | *
31 | * @author Tomas Kraus, Peter Benedikovic
32 | */
33 | public class RunnerRestStopCluster extends RunnerRest {
34 |
35 | /**
36 | * Constructs an instance of administration command executor using REST interface.
37 | *
38 | *
39 | * @param server GlassFish server entity object.
40 | * @param command GlassFish server administration command entity.
41 | */
42 | public RunnerRestStopCluster(final PayaraServer server,
43 | final Command command) {
44 | super(server, command);
45 | }
46 |
47 | @Override
48 | protected void handleSend(HttpURLConnection hconn) throws IOException {
49 | OutputStreamWriter wr = new OutputStreamWriter(hconn.getOutputStream());
50 | wr.write("clusterName=" + ((CommandTarget) command).target);
51 | wr.flush();
52 | wr.close();
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/RunnerRestDeleteCluster.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin;
20 |
21 | import java.io.IOException;
22 | import java.io.OutputStreamWriter;
23 | import java.net.HttpURLConnection;
24 |
25 | import fish.payara.eclipse.tools.server.PayaraServer;
26 |
27 | /**
28 | * Command runner for command that deletes the cluster.
29 | *
30 | *
31 | * @author Tomas Kraus, Peter Benedikovic
32 | */
33 | public class RunnerRestDeleteCluster extends RunnerRest {
34 |
35 | /**
36 | * Constructs an instance of administration command executor using REST interface.
37 | *
38 | *
39 | * @param server GlassFish server entity object.
40 | * @param command GlassFish server administration command entity.
41 | */
42 | public RunnerRestDeleteCluster(final PayaraServer server,
43 | final Command command) {
44 | super(server, command);
45 | }
46 |
47 | @Override
48 | protected void handleSend(HttpURLConnection hconn) throws IOException {
49 | OutputStreamWriter wr = new OutputStreamWriter(hconn.getOutputStream());
50 | wr.write("name=" + ((CommandTarget) command).target);
51 | wr.flush();
52 | wr.close();
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/server/parser/ConfigReaderClasspath.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.server.parser;
20 |
21 | import java.util.LinkedList;
22 | import java.util.List;
23 |
24 | import fish.payara.eclipse.tools.server.sdk.server.parser.TreeParser.Path;
25 |
26 | /**
27 | * classpath library configuration XML element reader.
28 | *
29 | *
30 | * @author Peter Benedikovic, Tomas Kraus
31 | */
32 | public class ConfigReaderClasspath extends ConfigReader {
33 |
34 | ////////////////////////////////////////////////////////////////////////////
35 | // XML reader methods //
36 | ////////////////////////////////////////////////////////////////////////////
37 |
38 | /**
39 | * Provide paths to listen on.
40 | *
41 | * Sets readers for internal javadocs elements.
42 | *
43 | *
44 | * @return Paths that the reader listens to.
45 | */
46 | @Override
47 | public List getPathsToListen() {
48 | LinkedList paths = new LinkedList<>();
49 | paths.add(new Path("/server/library/classpath/file", pathReader));
50 | paths.add(new Path("/server/library/classpath/fileset", filesetReader));
51 | return paths;
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/dtds/sun-application_5_0-0.dtd:
--------------------------------------------------------------------------------
1 |
8 |
9 |
18 |
19 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
36 |
37 |
38 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
58 |
59 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/RunnerRestDeleteResource.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin;
20 |
21 | import java.io.IOException;
22 | import java.io.OutputStreamWriter;
23 | import java.net.HttpURLConnection;
24 |
25 | import fish.payara.eclipse.tools.server.PayaraServer;
26 |
27 | /**
28 | * Command runner for command that deletes the resource.
29 | *
30 | *
31 | * @author Tomas Kraus, Peter Benedikovic
32 | */
33 | public class RunnerRestDeleteResource extends RunnerRest {
34 |
35 | /**
36 | * Constructs an instance of administration command executor using REST interface.
37 | *
38 | *
39 | * @param server GlassFish server entity object.
40 | * @param command GlassFish server administration command entity.
41 | */
42 | public RunnerRestDeleteResource(final PayaraServer server,
43 | final Command command) {
44 | super(server, command);
45 | }
46 |
47 | @Override
48 | protected void handleSend(HttpURLConnection hconn) throws IOException {
49 | CommandDeleteResource cmd = (CommandDeleteResource) command;
50 | OutputStreamWriter wr = new OutputStreamWriter(hconn.getOutputStream());
51 | wr.write(cmd.cmdPropertyName + "=" + cmd.name);
52 | wr.flush();
53 | wr.close();
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/data/GlassFishConfig.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.data;
20 |
21 | import java.util.List;
22 |
23 | import fish.payara.eclipse.tools.server.sdk.server.config.JavaEESet;
24 | import fish.payara.eclipse.tools.server.sdk.server.config.JavaSESet;
25 | import fish.payara.eclipse.tools.server.sdk.server.config.LibraryNode;
26 |
27 | /**
28 | * Payara configuration reader API interface.
29 | *
30 | *
31 | * @author Peter Benedikovic, Tomas Kraus
32 | */
33 | public interface GlassFishConfig {
34 |
35 | /**
36 | * Get Payara libraries configuration.
37 | *
38 | *
39 | * @return Payara libraries configuration.
40 | */
41 | public List getLibrary();
42 |
43 | /**
44 | * Get Payara Java EE configuration.
45 | *
46 | *
47 | * @return Payara JavaEE configuration.
48 | */
49 | public JavaEESet getJavaEE();
50 |
51 | /**
52 | * Get Payara Java SE configuration.
53 | *
54 | *
55 | * @return Payara JavaSE configuration.
56 | */
57 | public JavaSESet getJavaSE();
58 |
59 | /**
60 | * Get Payara tools configuration.
61 | *
62 | *
63 | * @return Payara tools configuration.
64 | */
65 | public ToolsConfig getTools();
66 |
67 | }
68 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/CommandDeleteCluster.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin;
20 |
21 | /**
22 | * GlassFish Server Delete Cluster Command Entity.
23 | *
24 | * Holds data for command. Objects of this class are created by API user.
25 | *
26 | *
27 | * @author Tomas Kraus, Peter Benedikovic
28 | */
29 | @RunnerHttpClass(runner = RunnerHttpTarget.class)
30 | @RunnerRestClass(runner = RunnerRestDeleteCluster.class)
31 | public class CommandDeleteCluster extends CommandTarget {
32 |
33 | ////////////////////////////////////////////////////////////////////////////
34 | // Class attributes //
35 | ////////////////////////////////////////////////////////////////////////////
36 |
37 | /** Command string for delete-cluster command. */
38 | private static final String COMMAND = "delete-cluster";
39 |
40 | ////////////////////////////////////////////////////////////////////////////
41 | // Constructors //
42 | ////////////////////////////////////////////////////////////////////////////
43 |
44 | /**
45 | * Constructs an instance of GlassFish server delete-cluster command entity.
46 | *
47 | *
48 | * @param target Target GlassFish instance.
49 | */
50 | public CommandDeleteCluster(String target) {
51 | super(COMMAND, target);
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/CommandTarget.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin;
20 |
21 | /**
22 | * Abstract GlassFish Server Command Entity containing target.
23 | *
24 | * Contains common target attribute. Holds data for command. Objects of this class are
25 | * created by API user.
26 | *
27 | *
28 | * @author Tomas Kraus, Peter Benedikovic
29 | */
30 | public abstract class CommandTarget extends Command {
31 |
32 | ////////////////////////////////////////////////////////////////////////////
33 | // Instance attributes //
34 | ////////////////////////////////////////////////////////////////////////////
35 |
36 | /** Target GlassFish instance or cluster. */
37 | final String target;
38 |
39 | ////////////////////////////////////////////////////////////////////////////
40 | // Constructors //
41 | ////////////////////////////////////////////////////////////////////////////
42 |
43 | /**
44 | * Constructs an instance of GlassFish server enable command entity.
45 | *
46 | *
47 | * @param command Server command represented by this object.
48 | * @param target Target GlassFish instance or cluster.
49 | */
50 | CommandTarget(String command, String target) {
51 | super(command);
52 | this.target = target;
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/CommandCreateCluster.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin;
20 |
21 | /**
22 | * GlassFish Server Cerate Cluster Command Entity.
23 | *
24 | * Holds data for command. Objects of this class are created by API user.
25 | *
26 | *
27 | * @author Tomas Kraus, Peter Benedikovic
28 | */
29 | @RunnerHttpClass(runner = RunnerHttpTarget.class)
30 | @RunnerRestClass(runner = RunnerRestCreateCluster.class)
31 | public class CommandCreateCluster extends CommandTarget {
32 |
33 | ////////////////////////////////////////////////////////////////////////////
34 | // Class attributes //
35 | ////////////////////////////////////////////////////////////////////////////
36 |
37 | /** Command string for create-cluster command. */
38 | private static final String COMMAND = "create-cluster";
39 |
40 | ////////////////////////////////////////////////////////////////////////////
41 | // Constructors //
42 | ////////////////////////////////////////////////////////////////////////////
43 |
44 | /**
45 | * Constructs an instance of GlassFish server create-cluster command entity.
46 | *
47 | *
48 | * @param clusterName Name of the created cluster.
49 | */
50 | public CommandCreateCluster(String clusterName) {
51 | super(COMMAND, clusterName);
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/sdk/admin/CommandDeleteInstance.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.sdk.admin;
20 |
21 | /**
22 | * GlassFish Server Delete Instance Command Entity.
23 | *
24 | * Holds data for command. Objects of this class are created by API user.
25 | *
26 | *
27 | * @author Tomas Kraus, Peter Benedikovic
28 | */
29 | @RunnerHttpClass(runner = RunnerHttpDeleteInstance.class)
30 | @RunnerRestClass(runner = RunnerRestDeleteInstance.class)
31 | public class CommandDeleteInstance extends CommandTarget {
32 |
33 | ////////////////////////////////////////////////////////////////////////////
34 | // Class attributes //
35 | ////////////////////////////////////////////////////////////////////////////
36 |
37 | /** Command string for delete-instance command. */
38 | private static final String COMMAND = "delete-instance";
39 |
40 | ////////////////////////////////////////////////////////////////////////////
41 | // Constructors //
42 | ////////////////////////////////////////////////////////////////////////////
43 |
44 | /**
45 | * Constructs an instance of GlassFish server delete-instance command entity.
46 | *
47 | *
48 | * @param target Target GlassFish instance.
49 | */
50 | public CommandDeleteInstance(String target) {
51 | super(COMMAND, target);
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/bundles/fish.payara.eclipse.tools.server/src/fish/payara/eclipse/tools/server/handlers/PayaraStateTester.java:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright (c) 2018 Oracle
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Eclipse Public License v2.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/epl-v20.html
7 | * SPDX-License-Identifier: EPL-2.0
8 | ******************************************************************************/
9 |
10 | /******************************************************************************
11 | * Copyright (c) 2018-2022 Payara Foundation
12 | * All rights reserved. This program and the accompanying materials
13 | * are made available under the terms of the Eclipse Public License v2.0
14 | * which accompanies this distribution, and is available at
15 | * http://www.eclipse.org/legal/epl-v20.html
16 | * SPDX-License-Identifier: EPL-2.0
17 | ******************************************************************************/
18 |
19 | package fish.payara.eclipse.tools.server.handlers;
20 |
21 | import static fish.payara.eclipse.tools.server.utils.WtpUtil.load;
22 | import static org.eclipse.wst.server.core.IServer.STATE_STARTED;
23 |
24 | import org.eclipse.core.expressions.PropertyTester;
25 | import org.eclipse.wst.server.core.IServer;
26 |
27 | import fish.payara.eclipse.tools.server.PayaraServer;
28 |
29 | public class PayaraStateTester extends PropertyTester {
30 |
31 | @Override
32 | public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
33 | IServer server = (IServer) receiver;
34 |
35 | if (property.equals("isRunning")) {
36 | return (server.getServerState() == STATE_STARTED);
37 | }
38 |
39 | if (property.equals("isRemote")) {
40 | PayaraServer payaraServer = load(server, PayaraServer.class);
41 |
42 | if (payaraServer != null) {
43 | return payaraServer.isRemote();
44 | }
45 | }
46 |
47 | if (property.equals("isWSLInstance")) {
48 | PayaraServer payaraServer = load(server, PayaraServer.class);
49 |
50 | if (payaraServer != null) {
51 | return payaraServer.isWSLInstance();
52 | }
53 | }
54 |
55 | return false;
56 | }
57 |
58 | }
59 |
--------------------------------------------------------------------------------