com.evrythng.thng.resource.model.access.SocialNetwork Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of thng-resource-model Show documentation
Show all versions of thng-resource-model Show documentation
Models for REST resources representations.
/*
* (c) Copyright 2012 EVRYTHNG Ltd London / Zurich
* www.evrythng.com
*/
package com.evrythng.thng.resource.model.access;
/**
* SocialNetwork access of an {@link com.evrythng.thng.resource.model.store.Application}. Contains the appId, e.g.
* facebook application id.
* As defined on the social network side.
*/
public class SocialNetwork {
public SocialNetwork() {
// nop
}
/**
* Create a SocialNetwork having the give appId set
*/
public SocialNetwork(final String appId) {
this.appId = appId;
this.appSecret = null;
}
private String appId;
private String appSecret;
/**
* @return the appId
*/
public String getAppId() {
return appId;
}
/**
* @param appId the appId to set
*/
public void setAppId(final String appId) {
this.appId = appId;
}
/**
* @return the appSecret
*/
public String getAppSecret() {
return appSecret;
}
/**
* @param appSecret the appSecret to set
*/
public void setAppSecret(final String appSecret) {
this.appSecret = appSecret;
}
/**
* {@inheritDoc}
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + (appId == null ? 0 : appId.hashCode());
result = prime * result + (appSecret == null ? 0 : appSecret.hashCode());
return result;
}
/**
* {@inheritDoc}
*/
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
SocialNetwork other = (SocialNetwork) obj;
if (appId == null) {
if (other.appId != null) {
return false;
}
} else if (!appId.equals(other.appId)) {
return false;
}
if (appSecret == null) {
if (other.appSecret != null) {
return false;
}
} else if (!appSecret.equals(other.appSecret)) {
return false;
}
return true;
}
/**
* {@inheritDoc}
*/
@Override
public String toString() {
return "[appId=" + appId + "]";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy