Package org.apache.empire.exceptions

Examples of org.apache.empire.exceptions.InvalidArgumentException


     * @return the component or null if no component was found
     */
    public UIComponent findComponent(FacesContext fc, String componentId, UIComponent nearComponent)
    {
        if (StringUtils.isEmpty(componentId))
            throw new InvalidArgumentException("componentId", componentId);
        // Begin search near given component (if any)
        UIComponent component = null;
        if (nearComponent != null)
        {   // Search below the nearest naming container 
            component = nearComponent.findComponent(componentId);
View Full Code Here


     * returns a connection for the current Request
     */
    public Connection getConnectionForRequest(FacesContext fc, DBDatabase db)
    {
        if (fc == null)
            throw new InvalidArgumentException("FacesContext", fc);
        if (db == null)
            throw new InvalidArgumentException("DBDatabase", db);
        // Get Conneciton map
        @SuppressWarnings("unchecked")
        Map<DBDatabase, Connection> connMap = (Map<DBDatabase, Connection>) FacesUtils.getRequestAttribute(fc, CONNECTION_ATTRIBUTE);
        if (connMap != null && connMap.containsKey(db))
            return connMap.get(db);
View Full Code Here

    public void setApplication(Application application)
    {
        if (this.application != null)
            throw new ItemExistsException(this.application);
        if (!(application instanceof FacesApplication))
            throw new InvalidArgumentException("application", application);
        this.application = (FacesApplication)application;
    }
View Full Code Here

{
    private String outcome;
    public PageOutcome(String outcome)
    {
        if (StringUtils.isEmpty(outcome))
            throw new InvalidArgumentException("outcome", outcome);
        this.outcome = outcome;
    }
View Full Code Here

    }
   
    public PageOutcome addParamWithValue(String paramWithValue)
    {
        if (paramWithValue==null || paramWithValue.indexOf('=')<0)
            throw new InvalidArgumentException("paramWithValue", paramWithValue);
        // assemble
        if (outcome.indexOf('?')>0)
            outcome = outcome+"&"+paramWithValue;
        else
            outcome = outcome+"?"+paramWithValue;
View Full Code Here

    public PageOutcome addParam(String param, String value)
    {
        if (StringUtils.isEmpty(value))
            return this; // Ignore Empty values
        if (StringUtils.isEmpty(param))
            throw new InvalidArgumentException("param", param);
        String paramWithValue = param + "=" + value;
        return addParamWithValue(paramWithValue);
    }
View Full Code Here

    }
   
    public synchronized String encodeString(String valueAsString)
    {
        if (valueAsString==null)
            throw new InvalidArgumentException("valueAsString", valueAsString);
        // log
        if (log.isTraceEnabled())
            log.trace("Generating code for value {}.", valueAsString);
        // generate code
        md5.reset();
View Full Code Here

   
    protected Object getBeanPropertyValue(Object bean, ColumnExpr column)
    {
        // Check Params
        if (bean==null)
            throw new InvalidArgumentException("bean", bean);
        if (column==null)
            throw new InvalidArgumentException("column", column);
        // getBeanPropertyValue
        return getBeanPropertyValue(bean, column.getBeanPropertyName());
    }
View Full Code Here

    protected Object getBeanPropertyValue(Object bean, String property)
    {
        // Check Params
        if (bean==null)
            throw new InvalidArgumentException("bean", bean);
        if (property==null)
            throw new InvalidArgumentException("property", property);
        try
        {   // Get Property Value
            PropertyUtilsBean pub = BeanUtilsBean.getInstance().getPropertyUtils();
            return pub.getSimpleProperty(bean, property);
View Full Code Here

    protected void setBeanPropertyValue(Object bean, Column column, Object value)
    {
        // Check Params
        if (bean==null)
            throw new InvalidArgumentException("bean", bean);
        if (column==null)
            throw new InvalidArgumentException("column", column);
        // Get Property Name
        String property = column.getBeanPropertyName();
        try
        {   // Get Property Value
            if (ObjectUtils.isEmpty(value))
View Full Code Here

TOP

Related Classes of org.apache.empire.exceptions.InvalidArgumentException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.