All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.windowsazure.messaging.WindowsCredential Maven / Gradle / Ivy

//----------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------------

package com.windowsazure.messaging;

import java.util.AbstractMap.SimpleEntry;
import java.util.ArrayList;
import java.util.List;

public final class WindowsCredential extends PnsCredential {
    private String packageSid;
    private String secretKey;

    public WindowsCredential() {
        this(null, null);
    }

    public WindowsCredential(String packageSid, String secretKey) {
        super();
        this.setPackageSid(packageSid);
        this.setSecretKey(secretKey);
    }

    public String getPackageSid() {
        return packageSid;
    }

    public void setPackageSid(String packageSid) {
        this.packageSid = packageSid;
    }

    public String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    public void setWindowsLiveEndpoint(String propertyValue) {
        // fix for reflection that's calling 'setWindowsLiveEndpoint' of null.
        // unused function
    }

    @Override
    public List> getProperties() {
        ArrayList> result = new ArrayList<>();
        result.add(new SimpleEntry<>("PackageSid", getPackageSid()));
        result.add(new SimpleEntry<>("SecretKey", getSecretKey()));
        return result;
    }

    @Override
    public String getRootTagName() {
        return "WnsCredential";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy