at.spardat.xma.mdl.simple.ISimpleWMClient Maven / Gradle / Ivy
The newest version!
/*******************************************************************************
* Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH .
* 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:
* s IT Solutions AT Spardat GmbH - initial API and implementation
*******************************************************************************/
// @(#) $Id: ISimpleWMClient.java 10268 2013-01-11 10:34:57Z dschwarz $
package at.spardat.xma.mdl.simple;
import at.spardat.xma.mdl.IWModelClient;
/**
* This class defines the behaviour of a SimpleWM at the client side of XMA.
* The primary enrichment compared to ISimpleWM is the ability to set
* and query a formatter, see {@link at.spardat.enterprise.fmt.IFmt IFmt} and
* to check if the value of this is valid with respect to the formatter.
*
* @author YSD, 23.06.2003 13:57:32
*/
public interface ISimpleWMClient extends ISimpleWM, IWModelClient {
/**
* Determines if the value contained in this Model is a valid one in terms of the associated
* formatter. Note the formatter usually restricts the allowed value range of the type.
* Since formatters are only executing at the client side, it may be the case that
* the server provides values which are obeying the type, but are conflicting with
* the formatter.
*
* @return true if the contained value conflicts with the formatter.
*/
public abstract boolean isValueValid ();
/**
* Provides a string that results from applying the formatter to the internally stored
* value.
*/
public abstract String getFormattedString();
/**
* Returns the MANDATORY-property of the associated formatter. Returns false, if there
* is no formatter associated.
*/
public boolean isMandatory ();
/**
* If there is a formatter attached, this method clones the old formatter, changes
* the MANDATORY-property of the formatter to the provided value, and sets the formatter.
* If there is no formatter attached, this method does nothing.
*/
public void setMandatory (boolean what);
/**
* If this is set to true then the widget is validated in the editable=false state, too.
* Normally widgets in the editable=false state are not validated.
* So this property defaults to false, if not set otherwise.
* @param what
* @since version_number
* @author s3460
*/
public void setValidateIfUneditable(boolean what);
/**
* Returns if this widget is validated in the editable=false state, too.
* Normally widgets in the editable=false state are not validated.
* So this property defaults to false, if not set otherwise.
* @return the validateUneditable property
* @since version_number
* @author s3460
*/
public boolean isValidateIfUneditable();
}