com.day.cq.mcm.emailprovider.types.FormFieldType Maven / Gradle / Ivy
/*
* ***********************************************************************
*
* ADOBE CONFIDENTIAL
* ___________________
*
* Copyright 2012 Adobe Systems Incorporated
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
* ************************************************************************
*/
package com.day.cq.mcm.emailprovider.types;
/**
* @deprecated since 5.6.1
* @author aatul
*
*/
@Deprecated
public enum FormFieldType {
EMAIL_FIELD("9","mcm/components/cta-form/emailId","foundation/components/form/defaults/field","foundation/components/form/constraints/email"),
TEXT_FIELD("0","foundation/components/form/text","foundation/components/form/defaults/field",null),
DATE_FIELD("1","foundation/components/form/text","foundation/components/form/defaults/field","foundation/components/form/constraints/date"),
NUMERIC("2","foundation/components/form/text","foundation/components/form/defaults/field","foundation/components/form/constraints/numeric"),
CHECKBOX("3","foundation/components/form/checkbox","foundation/components/form/defaults/field",null);
private final String type;
private final String resourceType;
private final String resourceSuperType;
private final String constraintType;
private FormFieldType(final String type, final String resourceType,final String resourceSuperType, final String constraintType){
this.type = type;
this.resourceType = resourceType;
this.resourceSuperType = resourceSuperType;
this.constraintType = constraintType;
}
@Override
public String toString(){
return this.type;
}
public String getResourceType(){
return this.resourceType;
}
public String getResourceSuperType(){
return this.resourceSuperType;
}
public String getConstraintType(){
return this.constraintType;
}
public static FormFieldType getFormFieldType(String type){
for(FormFieldType fieldType: FormFieldType.values()){
if(fieldType.toString().equals(type))
return fieldType;
}
//DEFAULT
return TEXT_FIELD;
}
}