/*************************GO-LICENSE-START*********************************
* Copyright 2014 ThoughtWorks, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*************************GO-LICENSE-END***********************************/
package com.thoughtworks.go.server.service.plugins.processor.session;
import java.util.Map;
public class SessionData {
private String pluginId;
private Map<String, String> sessionData;
public SessionData(String pluginId, Map<String, String> sessionData) {
this.pluginId = pluginId;
this.sessionData = sessionData;
}
public String getPluginId() {
return pluginId;
}
public void setPluginId(String pluginId) {
this.pluginId = pluginId;
}
public Map<String, String> getSessionData() {
return sessionData;
}
public void setSessionData(Map<String, String> sessionData) {
this.sessionData = sessionData;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SessionData that = (SessionData) o;
if (pluginId != null ? !pluginId.equals(that.pluginId) : that.pluginId != null) return false;
if (sessionData != null ? !sessionData.equals(that.sessionData) : that.sessionData != null) return false;
return true;
}
@Override
public int hashCode() {
int result = pluginId != null ? pluginId.hashCode() : 0;
result = 31 * result + (sessionData != null ? sessionData.hashCode() : 0);
return result;
}
}