Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

547289 - Provide javadoc for org.eclipse.passage.lic.api package #25

Merged
merged 6 commits into from
Oct 26, 2019
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
import java.io.OutputStream;

/**
* Transport interface for {@link LicensingCondition}(s)
* Transport interface for {@link LicensingCondition}(s).
*
* @since 0.4.0
*/
public interface ConditionTransport {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,53 @@

import java.util.Map;

/**
* Contract for a registry of {@link ConditionTransport}s.
*
* <p>As {@link LicensingCondition} can be persisted in any form, a {@link ConditionTransport}
* is associated with a particular <i>content type</i>.
* </p>
*
* @see ConditionTransport
* @see LicensingCondition
* @see #getConditionTransportForContentType(String)
* @since 0.4.0
*/
public interface ConditionTransportRegistry {

/**
* Returns an aggregate of all registered {@link ConditionTransport}s.
*
* @return all registered {@link ConditionTransport}s.
*/
Iterable<ConditionTransport> getConditionTransports();

/**
* <p>
* Returns {@link ConditionTransport}, which is registered to handle (read and write)
* {@link LicensingCondition}s in the given {@code contentType}. The value is nullable.
* </p>
*
* @param contentType string representation of content type (like <i>application/json</i> or <i>application/xmk</i>)
* @return a {@link ConditionTransport} registered for the given {@code contentType}, if any, and {@code null} otherwise.
* @see #registerConditionTransport(ConditionTransport, Map)
*/
ConditionTransport getConditionTransportForContentType(String contentType);
ruspl-afed marked this conversation as resolved.
Show resolved Hide resolved

/**
* Adds the {@code transport} to the <i>registry</i> with the given set of properties.
*
* @param transport a transport to be registered
* @param properties the transport properties, like {@link ConditionMiner}s
*/
void registerConditionTransport(ConditionTransport transport, Map<String, Object> properties);

/**
* Removes the {@code transport} from the <i>registry</i>.
*
* @param transport a transport to be unregistered
* @param properties the transport properties
*/
void unregisterConditionTransport(ConditionTransport transport, Map<String, Object> properties);

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,66 +17,64 @@
import org.eclipse.passage.lic.api.access.PermissionEmitter;

/**
*
* Defines the condition to be evaluated by {@link PermissionEmitter} <br/>
* Obtained from {@link ConditionMiner}
*
* @since 0.5.0
*
*/
public interface LicensingCondition {
/**
* Returns unique identifier of a feature under licensing.
*
* @return feature identifier
*/
/**
* Returns unique identifier of a feature under licensing.
*
* @return feature identifier
*/
String getFeatureIdentifier();

/**
/**
* Returns descriptor of the feature version allowed by this licensing condition.
*
* @return version descriptor
* */
*/
String getMatchVersion();

/**
/**
* Returns rule of version matching, like "perfect match" or "equal or greater".
*
* @return match rule
* */
*/
String getMatchRule();

/**
* Returns the validity period start date of this licensing condition. This is
* the value of its <code>"validFrom"</code> attribute.
*
* @return the valid from
*/
/**
* Returns the validity period start date of this licensing condition. This is
* the value of its <code>"validFrom"</code> attribute.
*
* @return the valid from
*/
Date getValidFrom();

/**
* Returns the validity period end date of this licensing condition. This is the
* value of its <code>"validUntil"</code> attribute.
*
* @return the valid until
*/
/**
* Returns the validity period end date of this licensing condition. This is the
* value of its <code>"validUntil"</code> attribute.
*
* @return the valid until
*/
Date getValidUntil();

/**
* The type of condition like "time" or "hardware".
*
* @return condition type
*/
/**
* The type of condition like "time" or "hardware".
*
* @return condition type
*/
String getConditionType();

/**
/**
* Returns additional data encoded in a single string value.
* The expression is utilized by {@link PermissionEmitter} in conjunction with {@code conditionType}
* The expression is utilized by {@link PermissionEmitter} in conjunction with {@code conditionType}
*
* @return enlistment of additional information of this licencing condition
* @see PermissionEmitter
* @see #getConditionType
* */
* @see PermissionEmitter
* @see #getConditionType
*/
String getConditionExpression();

}