-
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
fill personal license issuing wizard's info page
- Loading branch information
1 parent
2d4cc7a
commit 1e17dbd
Showing
17 changed files
with
466 additions
and
12 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
....passage.lic.base/src/org/eclipse/passage/lic/base/restrictions/ExaminationExplained.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
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
34 changes: 34 additions & 0 deletions
34
...lic.licenses.model/src/org/eclipse/passage/lic/internal/licenses/model/i18n/Messages.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,34 @@ | ||
/******************************************************************************* | ||
* 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.internal.licenses.model.i18n; | ||
|
||
import java.util.MissingResourceException; | ||
import java.util.ResourceBundle; | ||
|
||
public class Messages { | ||
|
||
private static final String BUNDLE_NAME = Messages.class.getPackage().getName() + ".messages"; //$NON-NLS-1$ | ||
|
||
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME); | ||
|
||
private Messages() { | ||
} | ||
|
||
public static String getString(String key) { | ||
try { | ||
return RESOURCE_BUNDLE.getString(key); | ||
} catch (MissingResourceException e) { | ||
return '!' + key + '!'; | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...censes.model/src/org/eclipse/passage/lic/internal/licenses/model/i18n/messages.properties
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,28 @@ | ||
############################################################################### | ||
# Copyright (c) 2022 ArSysOp and others | ||
# | ||
# 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 | ||
############################################################################### | ||
|
||
DescribedAuthenticationInstructions_environment=Authenticated by | ||
DescribedAuthenticationInstructions_expression=with expression | ||
DescribedLicenseRequisites_identifier=Identifier: | ||
DescribedLicenseRequisites_issued=Issued: | ||
DescribedLicenseRequisites_plan=Under licensing plan | ||
DescribedLicenseRequisites_product=Product | ||
DescribedLicenseRequisites_requisites=General requisites | ||
DescribedLicenseRequisites_version=\ version | ||
DescribedLicenseRequisites_agreements=\ agreements | ||
DescribedPersonalFeatureGrant_capacity=Capacity: | ||
DescribedPersonalFeatureGrant_feature=Grant for feature | ||
DescribedPersonalFeatureGrant_version=version | ||
DescribedPersonalFeatureGrant_rule = \ matching with rule | ||
DescribedPersonalFeatureGrants_grants=\ grants | ||
DescribedValidityPeriodClosed.template=Valid from %s until %s |
23 changes: 23 additions & 0 deletions
23
...ge.lic.licenses.model/src/org/eclipse/passage/lic/licenses/model/described/Described.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) 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; | ||
|
||
abstract class Described implements Supplier<String> { | ||
|
||
protected final String nl = "\r\n"; //$NON-NLS-1$ | ||
protected final String tab = "\t"; //$NON-NLS-1$ | ||
protected final String tabs = "\t\t"; //$NON-NLS-1$ | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
...org/eclipse/passage/lic/licenses/model/described/DescribedAuthenticationInstructions.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.EvaluationInstructionsDescriptor; | ||
|
||
public final class DescribedAuthenticationInstructions extends Described { | ||
|
||
private final EvaluationInstructionsDescriptor auth; | ||
|
||
public DescribedAuthenticationInstructions(EvaluationInstructionsDescriptor auth) { | ||
this.auth = auth; | ||
} | ||
|
||
@Override | ||
public String get() { | ||
StringBuilder out = new StringBuilder(); | ||
out.append(tabs).append(Messages.getString("DescribedAuthenticationInstructions_environment")) //$NON-NLS-1$ | ||
.append(auth.getType()).append(nl)// | ||
.append(tabs).append(tabs).append(Messages.getString("DescribedAuthenticationInstructions_expression")) //$NON-NLS-1$ | ||
.append(auth.getExpression()).append(nl); | ||
return out.toString(); | ||
} | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
...ic.licenses.model/src/org/eclipse/passage/lic/licenses/model/described/DescribedDate.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,34 @@ | ||
/******************************************************************************* | ||
* 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.text.SimpleDateFormat; | ||
import java.util.Date; | ||
import java.util.function.Supplier; | ||
|
||
public final class DescribedDate implements Supplier<String> { | ||
|
||
private final SimpleDateFormat format = new SimpleDateFormat("dd.MM.YYYY z"); //$NON-NLS-1$ | ||
|
||
private final Date date; | ||
|
||
public DescribedDate(Date date) { | ||
this.date = date; | ||
} | ||
|
||
@Override | ||
public String get() { | ||
return format.format(date); | ||
} | ||
|
||
} |
51 changes: 51 additions & 0 deletions
51
...odel/src/org/eclipse/passage/lic/licenses/model/described/DescribedLicenseRequisites.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,51 @@ | ||
/******************************************************************************* | ||
* 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.LicenseRequisitesDescriptor; | ||
|
||
public final class DescribedLicenseRequisites extends Described { | ||
|
||
private final LicenseRequisitesDescriptor license; | ||
|
||
public DescribedLicenseRequisites(LicenseRequisitesDescriptor license) { | ||
this.license = license; | ||
} | ||
|
||
@Override | ||
public String get() { | ||
StringBuilder out = new StringBuilder(); | ||
out.append(Messages.getString("DescribedLicenseRequisites_requisites")).append(nl)// //$NON-NLS-1$ | ||
.append(tab).append(Messages.getString("DescribedLicenseRequisites_product")) //$NON-NLS-1$ | ||
.append(license.getProduct().getIdentifier())// | ||
.append(Messages.getString("DescribedLicenseRequisites_version")) //$NON-NLS-1$ | ||
.append(license.getProduct().getVersion()).append(nl)// | ||
|
||
.append(tab).append(Messages.getString("DescribedLicenseRequisites_identifier")) //$NON-NLS-1$ | ||
.append(license.getIdentifier()).append(nl)// | ||
|
||
.append(tab).append(new DescribedValidityPeriod(license.getValid()).get()).append(nl) // | ||
|
||
.append(tab).append(Messages.getString("DescribedLicenseRequisites_issued")) //$NON-NLS-1$ | ||
.append(new DescribedDate(license.getIssueDate()).get()).append(nl)// | ||
|
||
.append(tab).append(Messages.getString("DescribedLicenseRequisites_plan")).append(license.getPlan()) //$NON-NLS-1$ | ||
.append(nl)// | ||
|
||
.append(tab).append(license.getAgreements().size()) | ||
.append(Messages.getString("DescribedLicenseRequisites_agreements")).append(nl); //$NON-NLS-1$ | ||
return out.toString(); | ||
} | ||
|
||
} |
48 changes: 48 additions & 0 deletions
48
...l/src/org/eclipse/passage/lic/licenses/model/described/DescribedPersonalFeatureGrant.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,48 @@ | ||
/******************************************************************************* | ||
* 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.PersonalFeatureGrantDescriptor; | ||
|
||
public final class DescribedPersonalFeatureGrant extends Described { | ||
|
||
private PersonalFeatureGrantDescriptor grant; | ||
|
||
public DescribedPersonalFeatureGrant(PersonalFeatureGrantDescriptor 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)// | ||
|
||
.append(tabs).append(new DescribedAuthenticationInstructions(grant.getUserAuthentication()).get()) | ||
.append(nl); | ||
return out.toString(); | ||
} | ||
|
||
} |
38 changes: 38 additions & 0 deletions
38
.../src/org/eclipse/passage/lic/licenses/model/described/DescribedPersonalFeatureGrants.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.PersonalFeatureGrantDescriptor; | ||
|
||
public final class DescribedPersonalFeatureGrants extends Described { | ||
|
||
private final List<? extends PersonalFeatureGrantDescriptor> grants; | ||
|
||
public DescribedPersonalFeatureGrants(List<? extends PersonalFeatureGrantDescriptor> 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 (PersonalFeatureGrantDescriptor grant : grants) { | ||
out.append(new DescribedPersonalFeatureGrant(grant).get()); | ||
} | ||
return out.toString(); | ||
} | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
....model/src/org/eclipse/passage/lic/licenses/model/described/DescribedPersonalLicense.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 java.util.function.Supplier; | ||
|
||
import org.eclipse.passage.lic.licenses.PersonalLicensePackDescriptor; | ||
|
||
public final class DescribedPersonalLicense implements Supplier<String> { | ||
|
||
private final PersonalLicensePackDescriptor pack; | ||
|
||
public DescribedPersonalLicense(PersonalLicensePackDescriptor license) { | ||
this.pack = license; | ||
} | ||
|
||
@Override | ||
public String get() { | ||
StringBuilder out = new StringBuilder(); | ||
out.append(new DescribedLicenseRequisites(pack.getLicense()).get()); | ||
out.append(new DescribedPersonalFeatureGrants(pack.getGrants()).get()); | ||
return out.toString(); | ||
} | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
...s.model/src/org/eclipse/passage/lic/licenses/model/described/DescribedValidityPeriod.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 java.util.function.Supplier; | ||
|
||
import org.eclipse.passage.lic.licenses.ValidityPeriodClosedDescriptor; | ||
import org.eclipse.passage.lic.licenses.ValidityPeriodDescriptor; | ||
|
||
public final class DescribedValidityPeriod implements Supplier<String> { | ||
|
||
private final ValidityPeriodDescriptor valid; | ||
|
||
public DescribedValidityPeriod(ValidityPeriodDescriptor valid) { | ||
this.valid = valid; | ||
} | ||
|
||
@Override | ||
public String get() { | ||
if (valid instanceof ValidityPeriodClosedDescriptor) { | ||
return new DescribedValidityPeriodClosed(valid).get(); | ||
} | ||
throw new UnsupportedOperationException("Type of validity period is not supported"); //$NON-NLS-1$ | ||
} | ||
|
||
} |
Oops, something went wrong.