/** Workaround for OGNL defect. */
 protected String setUpObjectsVarargs(
     final String className, final String alias, final String... propertyValues) {
   return setUpObjectsVarargsNormalized(
       StringUtils.normalized(className),
       StringUtils.normalized(alias),
       StringUtils.normalized(propertyValues));
 }
 public String aliasItemsInList(
     final String listAlias, final String title, final String type, final String aliasAs) {
   aliasItemsInList =
       new AliasItemsInListForConcordion(
           getScenario().getAliasRegistry(), StringUtils.normalized(listAlias));
   return aliasItemsInList.execute(
       StringUtils.normalized(aliasAs),
       StringUtils.normalized(title),
       StringUtils.normalized(type));
 }
 public boolean aliasService(final String aliasAs, final String className) {
   try {
     getScenario()
         .getAliasRegistry()
         .aliasService(StringUtils.normalized(aliasAs), StringUtils.normalized(className));
     return true;
   } catch (final ScenarioValueException e) {
     return false;
   }
 }
 /** With <tt>protected</tt> visibility so that it can be called by custom methods if required. */
 protected String usingIsisViewerThatArgsVarargs(
     final String onObject,
     final String aliasResultAs,
     final String perform,
     final String usingMember,
     final String thatIt,
     final String arg0,
     final String... remainingArgs) {
   return usingIsisViewerThatArgsVarargsNormalized(
       StringUtils.normalized(onObject),
       StringUtils.normalized(aliasResultAs),
       StringUtils.normalized(perform),
       StringUtils.normalized(usingMember),
       StringUtils.normalized(thatIt),
       StringUtils.normalized(arg0),
       StringUtils.normalized(remainingArgs));
 }
  public Iterable<Object> getListContents(final String listAlias) {
    final ObjectAdapter listAdapter =
        getScenario().getAliasRegistry().getAliased(StringUtils.normalized(listAlias));
    if (listAdapter == null) {
      return Collections.emptyList();
    }
    final CollectionFacet facet = listAdapter.getSpecification().getFacet(CollectionFacet.class);
    if (facet == null) {
      return Collections.emptyList();
    }
    final Iterable<ObjectAdapter> objectAdapters = facet.iterable(listAdapter);
    return Iterables.transform(
        objectAdapters,
        new Function<ObjectAdapter, Object>() {

          @Override
          public Object apply(final ObjectAdapter from) {
            return from.getObject();
          }
        });
  }
 public String checkCollectionSize(final String listAlias, final int size) {
   return new CheckCollectionContentsForConcordion(
           getScenario().getAliasRegistry(), StringUtils.normalized(listAlias))
       .assertSize(size);
 }
 public String checkCollectionDoesNotContain(final String listAlias, final String alias) {
   return new CheckCollectionContentsForConcordion(
           getScenario().getAliasRegistry(), StringUtils.normalized(listAlias))
       .doesNotContain(StringUtils.normalized(alias));
 }
 public String checkCollectionIsNotEmpty(final String listAlias) {
   return new CheckCollectionContentsForConcordion(
           getScenario().getAliasRegistry(), StringUtils.normalized(listAlias))
       .isNotEmpty();
 }
 public boolean logonAsWithRoles(final String userName, final String roleListStr) {
   final List<String> roleList = StringUtils.splitOnCommas(StringUtils.normalized(roleListStr));
   getScenario().logonAsOrSwitchUserTo(userName, roleList);
   return true;
 }
 public boolean logonAs(final String userName) {
   getScenario().logonAsOrSwitchUserTo(StringUtils.normalized(userName));
   return true;
 }
 /**
  * For calling from XHTML script.
  *
  * @see #bootstrapIsis(String, DeploymentType)
  * @return <tt>boolean</tt> so that XHTML can assert on it.
  */
 public boolean bootstrapIsis(final String configDirectory, final String deploymentTypeStr) {
   bootstrapIsis(
       configDirectory, DeploymentType.lookup(StringUtils.normalized(deploymentTypeStr)));
   return true; // any runtime exception will propagate
 }
 /**
  * For calling within a <tt>#setUp()</tt> method.
  *
  * @see {@link #bootstrapIsis(String, String)}
  */
 public void bootstrapIsis(final String configDirectory, final DeploymentType deploymentType) {
   getScenario().bootstrapIsis(StringUtils.normalized(configDirectory), deploymentType);
 }