Packages
 In this topic

*Methods

*Fields

 

Packages   PreviousThis PackageNext
Package com.ms.license   Previous This
Package
Next

 


Interface LicenseDescriptor

public interface LicenseDescriptor
{
  // Fields
  public static final int ARCHIVE;
  public static final int CLASS;
  public static final int DESIGN;
  public static final int PACKAGE;
  public static final int RUNTIME;

  // Methods
  public java.util.Date getDate();
  public String getKey();
  public String getName();
  public java.net.URL getServer();
  public int getStyle();
  public int getType();
  public String getUser();
  public void setDate(java.util.Date date);
  public void setKey(String key);
  public void setName(String name);
  public void setServer(java.net.URL server);
  public void setStyle(int style) throws Exception;
  public void setType(int type) throws Exception;
  public void setUser(String user);
}

This interface describes the signature of a license object. The descriptor allows access to the different fields of a license.

Methods

getDate

public java.util.Date getDate();

Retrieves the expiration date of the license.

Return Value:

Returns the expiration date. If the returned date is null, the license does not have an expiration.

See Also: setDate

getKey

public String getKey();

Retrieves the license string that is used for validation of the license.

Return Value:

Returns the license string to validate.

See Also: setKey

getName

public String getName();

Retrieves the name of the class, package, or archive licensed by the license file.

Return Value:

Returns the name of the class, package, or archive.

See Also: setName

getServer

public java.net.URL getServer();

Retrieves the server where the true license file is stored for this object.

Return Value:

Returns the URL location of the server.

See Also: setServer

getStyle

public int getStyle();

Retrieves the license style. By default, all licenses are design time licenses. However, a user can have a run-time only license.

Return Value:

Returns the style of license, either DESIGN or RUNTIME.

See Also: setStyle

getType

public int getType();

Retrieves the type of license from the descriptor object.

Return Value:

Returns the type of license. This may be one of the following:

See Also: setType

getUser

public String getUser();

Retrieves the user that is able to use the license.

Return Value:

Returns the username.

See Also: setUser

setDate

public void setDate(java.util.Date date);

Sets the expiration date in the license descriptor.

Return Value:

No return value.

ParameterDescription
date The expiration date.

See Also: getDate

setKey

public void setKey(String key);

Sets the license string that is used to validate the license.

Return Value:

No return value.

ParameterDescription
key The license string.

See Also: getKey

setName

public void setName(String name);

Sets the name of the class, package, or archive that is licensed by the license descriptor.

Return Value:

No return value.

ParameterDescription
name The name of the class, package, or archive (CAB, JAR, and CCF formats are currently supported).

See Also: getName

setServer

public void setServer(java.net.URL server);

Sets the server attribute for the license descriptor.

Return Value:

No return value.

ParameterDescription
server The URL location of the server to get a remote license from.

See Also: getServer

setStyle

public void setStyle(int style) throws Exception;

Sets the license style. If style is zero, the method defaults to a design time license.

Return Value:

No return value.

ParameterDescription
style The style of license. This may be either DESIGN or RUNTIME.

Exceptions:

Exception if the style is invalid.

See Also: getStyle

setType

public void setType(int type) throws Exception;

Sets the type of license.

Return Value:

No return value.

ParameterDescription
type Sets the type of license. The type can be one of the following:

Exceptions:

Exception if the license type is not valid.

See Also: getType

setUser

public void setUser(String user);

Sets the valid user for the license.

Return Value:

No return value.

ParameterDescription
user The username.

See Also: getUser

Fields

ARCHIVE
The archive license type.
CLASS
The class license type. The CLASS type is the default type if none is specified in the license.xml file.
DESIGN
The design license style.
PACKAGE
The package license type.
RUNTIME
The run-time license style.

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.