// Path: src/java/com/idega/documentmanager/business/component/ComponentPlain.java
// public interface ComponentPlain extends Component {
// 
// 	public abstract PropertiesPlain getProperties();
// }
// 
// Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPlain.java
// public interface PropertiesPlain extends PropertiesComponent {
// 
// 	public abstract LocalizedStringBean getText();
// 
// 	public abstract void setText(LocalizedStringBean text);
// }
// 
// Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPlain.java
// public class ComponentPropertiesPlain extends ComponentProperties implements PropertiesPlain {
// 	
// 	private LocalizedStringBean text;
// 	
// 	public LocalizedStringBean getText() {
// 		return text;
// 	}
// 
// 	public void setText(LocalizedStringBean text) {
// 		this.text = text;
// 		component.update(ConstUpdateType.TEXT);
// 	}
// 	
// 	public void setPlainText(LocalizedStringBean text) {
// 		this.text = text;
// 	}
// }
// 
// Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java
// public enum ConstUpdateType {
// 	
// 	LABEL,
// 	CONSTRAINT_REQUIRED,
// 	ERROR_MSG,
// 	P3P_TYPE,
// 	ITEMSET,
// 	EXTERNAL_DATA_SRC,
// 	THANKYOU_TEXT,
// 	AUTOFILL_KEY,
// 	HELP_TEXT,
// 	READ_ONLY,
// 	TEXT,
// 	STEPS_VISUALIZATION_USED,
// 	SUBMISSION_ACTION,
// 	VARIABLE_NAME,
// 	BUTTON_REFER_TO_ACTION,
// 	DATA_SRC_USED,
// 	ADD_BUTTON_LABEL,
// 	REMOVE_BUTTON_LABEL,
// 	DESCRIPTION_BUTTON_LABEL,
// 	UPLOADING_FILE_DESC,
// 	VALIDATION;
// }
// 
// Path: src/java/com/idega/documentmanager/manager/XFormsManagerPlain.java
// public interface XFormsManagerPlain extends XFormsManager {
// 
// 	public abstract void update(FormComponent component, ConstUpdateType what);
// 
// 	public abstract LocalizedStringBean getText(FormComponent component);
// 
// }


import com.idega.documentmanager.business.component.ComponentPlain;
import com.idega.documentmanager.business.component.properties.PropertiesPlain;
import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPlain;
import com.idega.documentmanager.component.properties.impl.ConstUpdateType;
import com.idega.documentmanager.manager.XFormsManagerPlain;
package com.idega.documentmanager.component.impl;


/**
 * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a>
 * @version $Revision: 1.9 $
 *
 * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $
 */
public class FormComponentPlainImpl extends FormComponentImpl implements ComponentPlain {

	@Override
	protected void setProperties() {
		
		ComponentPropertiesPlain properties = (ComponentPropertiesPlain)getProperties();
		
		if(properties == null)
			return;
		
		properties.setText(getXFormsManager().getText(this));
	}
	
	@Override
	public PropertiesPlain getProperties() {
		
		if(properties == null) {
			ComponentPropertiesPlain properties = new ComponentPropertiesPlain();
			properties.setComponent(this);
			this.properties = properties;
		}
		
// Path: src/java/com/idega/documentmanager/business/component/ComponentPlain.java
// public interface ComponentPlain extends Component {
// 
// 	public abstract PropertiesPlain getProperties();
// }
// 
// Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPlain.java
// public interface PropertiesPlain extends PropertiesComponent {
// 
// 	public abstract LocalizedStringBean getText();
// 
// 	public abstract void setText(LocalizedStringBean text);
// }
// 
// Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPlain.java
// public class ComponentPropertiesPlain extends ComponentProperties implements PropertiesPlain {
// 	
// 	private LocalizedStringBean text;
// 	
// 	public LocalizedStringBean getText() {
// 		return text;
// 	}
// 
// 	public void setText(LocalizedStringBean text) {
// 		this.text = text;
// 		component.update(ConstUpdateType.TEXT);
// 	}
// 	
// 	public void setPlainText(LocalizedStringBean text) {
// 		this.text = text;
// 	}
// }
// 
// Path: src/java/com/idega/documentmanager/component/properties/impl/ConstUpdateType.java
// public enum ConstUpdateType {
// 	
// 	LABEL,
// 	CONSTRAINT_REQUIRED,
// 	ERROR_MSG,
// 	P3P_TYPE,
// 	ITEMSET,
// 	EXTERNAL_DATA_SRC,
// 	THANKYOU_TEXT,
// 	AUTOFILL_KEY,
// 	HELP_TEXT,
// 	READ_ONLY,
// 	TEXT,
// 	STEPS_VISUALIZATION_USED,
// 	SUBMISSION_ACTION,
// 	VARIABLE_NAME,
// 	BUTTON_REFER_TO_ACTION,
// 	DATA_SRC_USED,
// 	ADD_BUTTON_LABEL,
// 	REMOVE_BUTTON_LABEL,
// 	DESCRIPTION_BUTTON_LABEL,
// 	UPLOADING_FILE_DESC,
// 	VALIDATION;
// }
// 
// Path: src/java/com/idega/documentmanager/manager/XFormsManagerPlain.java
// public interface XFormsManagerPlain extends XFormsManager {
// 
// 	public abstract void update(FormComponent component, ConstUpdateType what);
// 
// 	public abstract LocalizedStringBean getText(FormComponent component);
// 
// }


// Path: src/java/com/idega/documentmanager/component/impl/FormComponentPlainImpl.java
import com.idega.documentmanager.business.component.ComponentPlain;
import com.idega.documentmanager.business.component.properties.PropertiesPlain;
import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPlain;
import com.idega.documentmanager.component.properties.impl.ConstUpdateType;
import com.idega.documentmanager.manager.XFormsManagerPlain;

package com.idega.documentmanager.component.impl;


/**
 * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a>
 * @version $Revision: 1.9 $
 *
 * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $
 */
public class FormComponentPlainImpl extends FormComponentImpl implements ComponentPlain {

	@Override
	protected void setProperties() {
		
		ComponentPropertiesPlain properties = (ComponentPropertiesPlain)getProperties();
		
		if(properties == null)
			return;
		
		properties.setText(getXFormsManager().getText(this));
	}
	
	@Override
	public PropertiesPlain getProperties() {
		
		if(properties == null) {
			ComponentPropertiesPlain properties = new ComponentPropertiesPlain();
			properties.setComponent(this);
			this.properties = properties;
		}
		
		return (PropertiesPlain)properties;