blob: d302ba168aa107b071d953d809e0cc4469dee3f4 [file] [log] [blame]
//------------------------------------------------------------------------------
// Copyright (c) 2005, 2007 IBM Corporation and others.
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// which accompanies this distribution, and is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// Contributors:
// IBM Corporation - initial implementation
//------------------------------------------------------------------------------
package org.eclipse.epf.library.edit.util;
import org.eclipse.epf.uma.Process;
import org.eclipse.epf.uma.Property;
/**
* @author Phong Nguyen Le
*
* @since 1.2
*/
public class DiagramOptions {
private static final String PROP_DIAGRAM_PUBLISH_NONE = "diagram_publish_none";
private static final String PROP_DIAGRAM_PUBLISH_ALL = "diagram_publish_all";
public static final boolean isPublishNone(Process process) {
Property prop = MethodElementPropertyHelper.getProperty(process, PROP_DIAGRAM_PUBLISH_NONE);
return prop != null ? Boolean.parseBoolean(prop.getValue()) : false;
}
public static final void setPublishNone(Process process, boolean b) {
MethodElementPropertyHelper.setProperty(process, PROP_DIAGRAM_PUBLISH_NONE, b);
}
public static final boolean isPublishAll(Process process) {
Property prop = MethodElementPropertyHelper.getProperty(process, PROP_DIAGRAM_PUBLISH_ALL);
return prop != null ? Boolean.parseBoolean(prop.getValue()) : false;
}
public static final void setPublishAll(Process process, boolean b) {
MethodElementPropertyHelper.setProperty(process, PROP_DIAGRAM_PUBLISH_ALL, b);
}
}