/*  Copyright (c) 2000 by Oracle Corporation. All Rights Reserved. */

package oracle.portal.provider.v1;

/**
 * Represents the portal subscriber.  Used to encapsulate dynamically generated
 * subscriber and encryption information when Provider.register() is called.
 */
public class ProviderSubscriber extends Object {
    private String mId;
    private String mEncryptionKey;

    /**
     * Default constructor
     */
    public ProviderSubscriber() {
    }

    /**
     *  Create a new subscriber instance using the passed ID and key.
     *  @param subscriberId identifier representing this portal or subscription.
     *  It is reasonable and valid for this to be the providerId.
     *  @param key encryption key the portal should use to encrypt all subsequent
     *  requests to this provider.
     */
    public ProviderSubscriber(String subscriberId, String key) {
        mId = subscriberId;
        mEncryptionKey = key;
    }

    /**
     *  Gets the subscriber Id
     *  @return the subscriberId
     */
    public String getId() {
        return mId;
    }

    /**
     *  Sets the subscriber Id.  Used if object created via null constructor.
     *  @param subscriberId the subscriberId
     */
    public void setId(String subscriberId) {
        mId = subscriberId;
    }

    /**
     *  Gets the encryption key
     *  @return the key
     */
    public String getEncryptionKey() {
        return mEncryptionKey;
    }

    /**
     *  Sets the encryption key.  Used if object created via null constructor.
     *  @param key the key
     */
    public void setEncryptionKey(String key) {
        mEncryptionKey = key;
    }


}

 