Example usage for org.apache.commons.lang StringUtils capitalize

List of usage examples for org.apache.commons.lang StringUtils capitalize

Introduction

In this page you can find the example usage for org.apache.commons.lang StringUtils capitalize.

Prototype

public static String capitalize(String str) 

Source Link

Document

Capitalizes a String changing the first letter to title case as per Character#toTitleCase(char) .

Usage

From source file:org.andromda.cartridges.gui.metafacades.GuiActionLogicImpl.java

/**
 * @return "get" + StringUtils.capitalize(this.getFormBeanName(false)) + "()"
 * @see org.andromda.cartridges.gui.metafacades.GuiAction#getFormImplementationGetter()
 *//*from w w w.j a  v  a 2s  .co m*/
@Override
protected String handleGetFormImplementationGetter() {

    return "get" + StringUtils.capitalize(this.getFormBeanName(false)) + "()";

}

From source file:org.andromda.cartridges.gui.metafacades.GuiControllerLogicImpl.java

/**
 * @return implementationName//from ww w .  jav a  2  s  .  co  m
 * @see org.andromda.cartridges.gui.metafacades.GuiController#getImplementationName()
 */
@Override
protected String handleGetImplementationName() {

    final String pattern = ObjectUtils
            .toString(this.getConfiguredProperty(GuiGlobals.CONTROLLER_IMPLEMENTATION_PATTERN));

    return pattern.replaceFirst("\\{0\\}", StringUtils.capitalize(this.getName()));

}

From source file:org.andromda.cartridges.gui.metafacades.GuiControllerOperationLogicImpl.java

/**
 * @return formName//from ww  w .j ava  2s .com
 * @see org.andromda.cartridges.gui.metafacades.GuiControllerOperation#getFormName()
 */
@Override
protected String handleGetFormName() {

    final String pattern = ObjectUtils.toString(this.getConfiguredProperty(GuiGlobals.FORM_PATTERN));

    return pattern.replaceFirst("\\{0\\}", StringUtils.capitalize(this.getName()));

}

From source file:org.andromda.cartridges.gui.metafacades.GuiControllerOperationLogicImpl.java

/**
 * @return fullyQualifiedFormName/*from   w w  w.  jav  a2  s.com*/
 * @see org.andromda.cartridges.gui.metafacades.GuiControllerOperation#getFullyQualifiedFormName()
 */
@Override
protected String handleGetFullyQualifiedFormName() {

    final StringBuilder fullyQualifiedName = new StringBuilder();
    final String packageName = this.getPackageName();

    if (StringUtils.isNotBlank(packageName)) {

        fullyQualifiedName.append(packageName + ".");

    }

    return fullyQualifiedName.append(StringUtils.capitalize(this.getFormName())).toString();

}

From source file:org.andromda.cartridges.gui.metafacades.GuiManageableEntityLogicImpl.java

/**
 * @return StringUtils.capitalize(this.getFormBeanName())
 * @see org.andromda.cartridges.gui.metafacades.GuiManageableEntity#getFormBeanClassName()
 *//*from   w ww .  j  av  a 2s  . c o m*/
@Override
protected String handleGetFormBeanClassName() {

    return StringUtils.capitalize(this.getFormBeanName());

}

From source file:org.andromda.cartridges.gui.metafacades.GuiManageableEntityLogicImpl.java

/**
 * @return StringUtils.capitalize(this.getSearchFormBeanName())
 * @see org.andromda.cartridges.gui.metafacades.GuiManageableEntity#getSearchFormBeanClassName()
 *//*from  w w  w.j av a  2 s.c o m*/
@Override
protected String handleGetSearchFormBeanClassName() {

    return StringUtils.capitalize(this.getSearchFormBeanName());

}

From source file:org.andromda.cartridges.gui.metafacades.GuiParameterLogicImpl.java

@Override
protected java.lang.String handleGetResetName() {

    return "reset" + StringUtils.capitalize(StringUtils.trimToEmpty(this.getName()));

}

From source file:org.apache.ambari.server.state.stack.upgrade.Direction.java

/**
 * @param proper {@code true} to make the first letter captilized
 * @return "upgrade" or "downgrade"/*w  w  w  .  ja v a 2 s .c  o  m*/
 */
public String getText(boolean proper) {
    return proper ? StringUtils.capitalize(name().toLowerCase()) : name().toLowerCase();
}

From source file:org.apache.ambari.server.state.stack.upgrade.Direction.java

/**
 * @param proper {@code true} to make the first letter captilized
 * @return "upgrading" or "downgrading"//from w  ww.j  a v a 2 s. c o  m
 */
public String getVerb(boolean proper) {
    String verb = (this == UPGRADE) ? "upgrading" : "downgrading";

    return proper ? StringUtils.capitalize(verb) : verb;
}

From source file:org.apache.cayenne.dbsync.merge.builders.DbEntityBuilder.java

@Override
public DbEntity build() {
    if (obj.getName() == null) {
        obj.setName(StringUtils.capitalize(getRandomJavaName()));
    }

    return obj;
}