-
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.
last page of a license issuing wizard is always empty #1148
add description to floating license issue wizard's info Signed-off-by: eparovyshnaya <[email protected]>
- Loading branch information
1 parent
1e17dbd
commit 21a0f3f
Showing
7 changed files
with
232 additions
and
0 deletions.
There are no files selected for viewing
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
45 changes: 45 additions & 0 deletions
45
...l/src/org/eclipse/passage/lic/licenses/model/described/DescribedFloatingFeatureGrant.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,45 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2022 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.lic.licenses.model.described; | ||
|
||
import org.eclipse.passage.lic.internal.licenses.model.i18n.Messages; | ||
import org.eclipse.passage.lic.licenses.FeatureGrantDescriptor; | ||
|
||
public final class DescribedFloatingFeatureGrant extends Described { | ||
|
||
private FeatureGrantDescriptor grant; | ||
|
||
public DescribedFloatingFeatureGrant(FeatureGrantDescriptor grant) { | ||
this.grant = grant; | ||
} | ||
|
||
@Override | ||
public String get() { | ||
StringBuilder out = new StringBuilder(); | ||
out.append(tab).append(Messages.getString("DescribedPersonalFeatureGrant_feature")) // //$NON-NLS-1$ | ||
.append(grant.getFeature().getIdentifier()).append(nl)// | ||
|
||
.append(tabs).append(Messages.getString("DescribedPersonalFeatureGrant_version")) // //$NON-NLS-1$ | ||
.append(grant.getFeature().getVersionMatch().getVersion())// | ||
.append(Messages.getString("DescribedPersonalFeatureGrant_rule")) // //$NON-NLS-1$ | ||
.append(grant.getFeature().getVersionMatch().getRule())// | ||
.append(nl)// | ||
|
||
.append(tabs).append(new DescribedValidityPeriod(grant.getValid()).get()).append(nl)// | ||
|
||
.append(tabs).append(Messages.getString("DescribedPersonalFeatureGrant_capacity"))// //$NON-NLS-1$ | ||
.append(grant.getCapacity()).append(nl);// | ||
return out.toString(); | ||
} | ||
|
||
} |
38 changes: 38 additions & 0 deletions
38
.../src/org/eclipse/passage/lic/licenses/model/described/DescribedFloatingFeatureGrants.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,38 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2022 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.lic.licenses.model.described; | ||
|
||
import java.util.List; | ||
|
||
import org.eclipse.passage.lic.internal.licenses.model.i18n.Messages; | ||
import org.eclipse.passage.lic.licenses.FeatureGrantDescriptor; | ||
|
||
public final class DescribedFloatingFeatureGrants extends Described { | ||
|
||
private final List<? extends FeatureGrantDescriptor> grants; | ||
|
||
public DescribedFloatingFeatureGrants(List<? extends FeatureGrantDescriptor> grants) { | ||
this.grants = grants; | ||
} | ||
|
||
@Override | ||
public String get() { | ||
StringBuilder out = new StringBuilder(); | ||
out.append(grants.size()).append(Messages.getString("DescribedPersonalFeatureGrants_grants")).append(nl); //$NON-NLS-1$ | ||
for (FeatureGrantDescriptor grant : grants) { | ||
out.append(new DescribedFloatingFeatureGrant(grant).get()); | ||
} | ||
return out.toString(); | ||
} | ||
|
||
} |
37 changes: 37 additions & 0 deletions
37
....model/src/org/eclipse/passage/lic/licenses/model/described/DescribedFloatingLicense.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,37 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2022 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.lic.licenses.model.described; | ||
|
||
import java.util.function.Supplier; | ||
|
||
import org.eclipse.passage.lic.licenses.FloatingLicensePackDescriptor; | ||
|
||
public final class DescribedFloatingLicense implements Supplier<String> { | ||
|
||
private final FloatingLicensePackDescriptor pack; | ||
|
||
public DescribedFloatingLicense(FloatingLicensePackDescriptor license) { | ||
this.pack = license; | ||
} | ||
|
||
@Override | ||
public String get() { | ||
StringBuilder out = new StringBuilder(); | ||
out.append(new DescribedLicenseRequisites(pack.getLicense()).get()); | ||
out.append(new DescribedHost(pack.getHost()).get()); | ||
out.append(new DescribedUserGrants(pack.getUsers()).get()); | ||
out.append(new DescribedFloatingFeatureGrants(pack.getFeatures()).get()); | ||
return out.toString(); | ||
} | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
...ic.licenses.model/src/org/eclipse/passage/lic/licenses/model/described/DescribedHost.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,35 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2022 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.lic.licenses.model.described; | ||
|
||
import org.eclipse.passage.lic.internal.licenses.model.i18n.Messages; | ||
import org.eclipse.passage.lic.licenses.FloatingServerDescriptor; | ||
|
||
public final class DescribedHost extends Described { | ||
|
||
private final FloatingServerDescriptor server; | ||
|
||
public DescribedHost(FloatingServerDescriptor server) { | ||
this.server = server; | ||
} | ||
|
||
@Override | ||
public String get() { | ||
StringBuilder out = new StringBuilder(); | ||
out.append(tab).append(Messages.getString("DescribedHost_host")) //$NON-NLS-1$ | ||
.append(server.getIdentifier()).append(nl)// | ||
.append(tab).append(new DescribedAuthenticationInstructions(server.getAuthentication())).append(nl); | ||
return out.toString(); | ||
} | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
...censes.model/src/org/eclipse/passage/lic/licenses/model/described/DescribedUserGrant.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,36 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2022 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.lic.licenses.model.described; | ||
|
||
import org.eclipse.passage.lic.internal.licenses.model.i18n.Messages; | ||
import org.eclipse.passage.lic.licenses.UserGrantDescriptor; | ||
|
||
public final class DescribedUserGrant extends Described { | ||
|
||
private UserGrantDescriptor grant; | ||
|
||
public DescribedUserGrant(UserGrantDescriptor grant) { | ||
this.grant = grant; | ||
} | ||
|
||
@Override | ||
public String get() { | ||
StringBuilder out = new StringBuilder(); | ||
out.append(tab).append(Messages.getString("DescribedPersonalFeatureGrant_user")) //$NON-NLS-1$ | ||
.append(grant.getUser()).append(nl)// | ||
.append(tabs).append(new DescribedAuthenticationInstructions(grant.getAuthentication()).get()) | ||
.append(nl); | ||
return out.toString(); | ||
} | ||
|
||
} |
38 changes: 38 additions & 0 deletions
38
...enses.model/src/org/eclipse/passage/lic/licenses/model/described/DescribedUserGrants.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,38 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2022 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.lic.licenses.model.described; | ||
|
||
import java.util.List; | ||
|
||
import org.eclipse.passage.lic.internal.licenses.model.i18n.Messages; | ||
import org.eclipse.passage.lic.licenses.UserGrantDescriptor; | ||
|
||
public final class DescribedUserGrants extends Described { | ||
|
||
private final List<? extends UserGrantDescriptor> grants; | ||
|
||
public DescribedUserGrants(List<? extends UserGrantDescriptor> grants) { | ||
this.grants = grants; | ||
} | ||
|
||
@Override | ||
public String get() { | ||
StringBuilder out = new StringBuilder(); | ||
out.append(grants.size()).append(Messages.getString("DescribedUserGrants_grants")).append(nl); //$NON-NLS-1$ | ||
for (UserGrantDescriptor grant : grants) { | ||
out.append(new DescribedUserGrant(grant).get()); | ||
} | ||
return out.toString(); | ||
} | ||
|
||
} |