Package org.apache.commons.beanutils

Examples of org.apache.commons.beanutils.BeanPropertyValueEqualsPredicate


     * Find an active application.
     * @return null if not found
     */
    public Application findApplication(String appName)
    {
        return (Application) CollectionUtils.find(applications, new BeanPropertyValueEqualsPredicate("appName", appName));
    }


        deployer.undeploy(app);
    }

    public void undeploy(String appName)
    {
        Application app = (Application) CollectionUtils.find(applications, new BeanPropertyValueEqualsPredicate("appName", appName));
        undeploy(app);
    }

                    File appZip = null;
                    try
                    {
                        // check if this app is running first, undeploy it then
                        final String appName = StringUtils.removeEnd(zip, ".zip");
                        Application app = (Application) CollectionUtils.find(applications, new BeanPropertyValueEqualsPredicate("appName", appName));
                        if (app != null)
                        {
                            undeploy(appName);
                        }
                        appZip = new File(appsDir, zip);

    public AroundPolicy find(String policyName)
    {
        // TODO concurrency
        // find { policy.name == policyName }
        return (AroundPolicy) CollectionUtils.find(this.policies,
                                                   new BeanPropertyValueEqualsPredicate("name", policyName));
    }

    this.predicate = predicate;
  }
 
 
  public static WherePredicate equals(final String property, final Object value) {
    return new WherePredicate(new BeanPropertyValueEqualsPredicate(property, value, true));
  }

    return new WherePredicate(new BeanPropertyValueEqualsPredicate(property, value, true));
  }
 
  public static WherePredicate notEquals(final String property, final Object value) {
    return new WherePredicate(new NotPredicate(//
        new BeanPropertyValueEqualsPredicate(property, value, true)));
  }

        }
    }

    public <T extends Artifact> T findArtifact(String artifactName, ObservableList<T> artifacts)
    {
        return (T) CollectionUtils.find(artifacts, new BeanPropertyValueEqualsPredicate(ARTIFACT_NAME_PROPERTY, artifactName));
    }

        if ((zombieFile != null))
        {
            return;
        }

        T artifact = (T) CollectionUtils.find(artifacts, new BeanPropertyValueEqualsPredicate(ARTIFACT_NAME_PROPERTY, artifactId));
        undeploy(artifact);
    }

                return null;
            }
        }

        // check if this artifact is running first, undeployArtifact it then
        T artifact = (T) CollectionUtils.find(artifacts, new BeanPropertyValueEqualsPredicate(ARTIFACT_NAME_PROPERTY, artifactName));
        if (artifact != null)
        {
            undeployArtifact(artifactName);
        }

        }
    }

    private T findArtifact(String artifactName)
    {
        return (T) CollectionUtils.find(artifacts, new BeanPropertyValueEqualsPredicate(ARTIFACT_NAME_PROPERTY, artifactName));
    }

TOP

Related Classes of org.apache.commons.beanutils.BeanPropertyValueEqualsPredicate

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.