com.liferay.portal.kernel.workflow.DefaultWorkflowDefinition Maven / Gradle / Ivy
/**
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.liferay.portal.kernel.workflow;
import com.liferay.portal.kernel.util.LocalizationUtil;
import com.liferay.portal.kernel.util.StringPool;
import java.io.InputStream;
import java.io.Serializable;
import java.util.Map;
/**
* @author Shuyang Zhou
* @author Brian Wing Shun Chan
* @author Eduardo Lundgren
*/
public class DefaultWorkflowDefinition
implements Serializable, WorkflowDefinition {
@Override
public String getContent() {
return _content;
}
@Override
public InputStream getInputStream() {
return _inputStream;
}
@Override
public String getName() {
return _name;
}
@Override
public Map getOptionalAttributes() {
return _optionalAttributes;
}
@Override
public String getTitle() {
if (_title == null) {
return StringPool.BLANK;
}
else {
return _title;
}
}
@Override
public String getTitle(String languageId) {
return LocalizationUtil.getLocalization(getTitle(), languageId);
}
@Override
public int getVersion() {
return _version;
}
@Override
public boolean isActive() {
return _active;
}
public void setActive(boolean active) {
_active = active;
}
public void setContent(String content) {
_content = content;
}
public void setInputStream(InputStream inputStream) {
_inputStream = inputStream;
}
public void setName(String name) {
_name = name;
}
public void setOptionalAttributes(Map optionalAttributes) {
_optionalAttributes = optionalAttributes;
}
public void setTitle(String title) {
_title = title;
}
public void setVersion(int version) {
_version = version;
}
private boolean _active;
private String _content;
private InputStream _inputStream;
private String _name;
private Map _optionalAttributes;
private String _title;
private int _version;
}