/*******************************************************************************
* Copyright (c) 2006-2010 eBay Inc. All Rights Reserved.
* 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
*******************************************************************************/
package org.ebayopensource.turmeric.eclipse.services.ui.views;
import org.apache.commons.lang.StringUtils;
import org.ebayopensource.turmeric.eclipse.ui.UIConstants;
/**
* The Class ServicesViewLayerModel.
*
* @author smathew
*/
public class ServicesViewLayerModel extends ServicesViewBaseModel {
private String layer;
/**
* Instantiates a new services view layer model.
*
* @param layer the layer
*/
public ServicesViewLayerModel(String layer) {
super();
this.layer = layer;
}
/**
* Gets the layer.
*
* @return the layer
*/
public String getLayer() {
return layer;
}
/**
* Sets the layer.
*
* @param layer the new layer
*/
public void setLayer(String layer) {
this.layer = layer;
}
/**
* Gets the image name.
*
* @return the image name
*/
public static String getImageName() {
return UIConstants.IMAGE_LABEL;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
String[] formattedArray = { UIConstants.SERVICES_VIEW_LAYER,
UIConstants.SERVICES_VIEW_COLON, " ", layer };
return StringUtils.join(formattedArray);
}
}