-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #689 from eclipse-passage/566482
Bug 566482 implement license grants uploading interface
- Loading branch information
Showing
12 changed files
with
141 additions
and
38 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...org.eclipse.passage.lbc.jetty/src/org/eclipse/passage/lbc/internal/jetty/FlsCommands.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2021 ArSysOp | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* https://www.eclipse.org/legal/epl-2.0/. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* ArSysOp - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.passage.lbc.internal.jetty; | ||
|
||
import org.osgi.framework.BundleContext; | ||
|
||
final class FlsCommands { | ||
|
||
void register(BundleContext context, String name) { | ||
new UploadLicense(name).register(context); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...g.eclipse.passage.lbc.jetty/src/org/eclipse/passage/lbc/internal/jetty/UploadLicense.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2021 ArSysOp | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* https://www.eclipse.org/legal/epl-2.0/. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* ArSysOp - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.passage.lbc.internal.jetty; | ||
|
||
import org.eclipse.passage.lic.internal.jetty.interaction.Command; | ||
import org.eclipse.passage.lic.internal.jetty.interaction.Scope; | ||
|
||
final class UploadLicense extends Command { | ||
|
||
public UploadLicense(String scope) { | ||
super(new Scope.Of(scope), new String[] { "upload" }); //$NON-NLS-1$ | ||
} | ||
|
||
public void upload(String from) { | ||
// new IncomingLicense(from).upload(); | ||
} | ||
|
||
public void upload(String from, String product, String version) { | ||
// new IncomingLicense(from).uploadForProduct(product, version); | ||
} | ||
|
||
public void upload(String... args) { | ||
if (args.length == 1) { | ||
upload(args[0]); | ||
} else if (args.length == 3) { | ||
upload(args[0], args[1], args[2]); | ||
} else { | ||
System.out.println(help()); | ||
} | ||
} | ||
|
||
private String help() { | ||
return "[fls:upload] places the given floating license pack at the Server's disposal.\n" + //$NON-NLS-1$ | ||
"Usage:\n\t" + //$NON-NLS-1$ | ||
scope.id() + ":upload <path-to-license-pack-folder>\n\t" + //$NON-NLS-1$ | ||
scope.id() + ":upload <path-to-license-pack-folder> <product-id> <product-version>\n"; //$NON-NLS-1$ | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters