
com.adobe.aemds.guide.common.GuideFileUpload Maven / Gradle / Ivy
/*************************************************************************
*
* ADOBE CONFIDENTIAL
* __________________
*
* Copyright 2014 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 may be covered by U.S. and Foreign Patents,
* patents in process, 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.adobe.aemds.guide.common;
import com.adobe.aemds.guide.utils.GuideConstants;
import org.apache.commons.lang3.StringUtils;
import org.apache.sling.api.resource.Resource;
/**
* GuideFileUpload class encapsulates basic properties of the adaptive forms File Upload Component.
* Few are listed below:
*
* - mimeType of the component
*
- button text of the component
*
*
* @since AEM 6.0
*/
public class GuideFileUpload extends GuideField{
/**
* Returns the file type supported by the file upload component configured in authoring dialog
* @return String[] representing the file types supported
*/
public String getMimeType(){
String[] arr = this.resourceProps.get("mimeType",new String[0]);
return StringUtils.join(arr, ",");
}
/**
* Returns the button text configured for the file upload component during authoring
* @return String representing the button text
*/
public String getButtonText(){
return externalize(this.resourceProps.get("buttonText", String.class));
}
/**
* Returns the field type of the Adaptive Forms Component
* @return String representing guide field type
*/
public String getGuideFieldType(){
return GuideConstants.GUIDE_FIELD_FILEUPLOAD;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy