blob: fb8ba260b5bd3da84b1b43399ccbba3eee3498a8 [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.MethodElementProperty;
import org.eclipse.epf.uma.Process;
/**
* @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) {
MethodElementProperty 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) {
MethodElementProperty 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);
}
}