All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.adobe.aemds.guide.common.GuideButton 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 com.adobe.aemds.guide.utils.NodeStructureUtils;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceUtil;


/**
 * GuideButton class encapsulates basic properties of the adaptive forms Button Component.
 * Some of the properties that it encapsulates are listed below:
 * 
    *
  • Type of the button
  • *
  • Size of the button
  • *
* * @since 6.0 */ public class GuideButton extends GuideField { /** * Button type and size are deprecated after 6.2. To * add button types or size, use the theme editor. These variables are there * to support forms created before 6.2. Hence, it is not to be removed */ private final String defaultButtonType = "button-default"; private final String defaultButtonSize = "button-medium"; private final String defaultType = "button"; public String getGuideFieldType() { return GuideConstants.GUIDE_FIELD_BUTTON; } /** * In case of button, we don't have notion of hideTitle * Other guide fields have this notion */ public boolean getHideTitle(){ return false; } /* * Returns the type of button configured during authoring. Possible types could be: *
    *
  • Default(button-default)
  • *
  • Info(button-informative)
  • *
  • Warning(button-warning)
  • *
  • Danger(button-alert)
  • *
* @return String representing the type of button * @deprecated Done to support forms created uptill 6.1 FP1 */ public String getButtonType() { return resourceProps.get("buttonType", this.defaultButtonType); } /** * Returns the button size type set in authoring dialog. It can be one of the following *
    *
  • button-small
  • *
  • button-medium (default)
  • *
  • button-large
  • *
* @return string representing the size of button * @deprecated Done to support forms created uptill 6.1 FP1 */ public String getButtonSize() { return resourceProps.get("buttonSize", this.defaultButtonSize); } /** * Returns the type of button configured in the authoring dialog * @return type of the button configured */ public String getType() { return resourceProps.get("type", this.defaultType); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy