Package org.apache.shindig.gadgets.features

Examples of org.apache.shindig.gadgets.features.FeatureResource$Simple


    throws ProcessingErrorException
  {
    String result;
    try {
      // Find the simple object.
      Simple simple = simple_factory_ref.find_simple();

      if (changeCase.equals("UPPER")) {
        // Invoke the to_upper opeation on M3 Simple object
        org.omg.CORBA.StringHolder buf = new org.omg.CORBA.StringHolder(mixed);
        simple.to_upper(buf);
        result = buf.value;
      }
      else
      {
        result = simple.to_lower(mixed);
      }
   
    }
    catch (org.omg.CORBA.SystemException e) {
      throw new ProcessingErrorException("Converter error: Corba system exception: " + e);
View Full Code Here


    try {
      String result;

      // Find the simple object.
      Simple simple = simple_factory_ref.find_simple();

      if (changeCase.equals(defaultCase)) {
        // Invoke the to_upper opeation on WebLogic Enterprise Simple object
        org.omg.CORBA.StringHolder buf =
        new org.omg.CORBA.StringHolder(mixed);
        simple.to_upper(buf);
        result = buf.value;
      }
      else
      {
        // Invoke the to_lower opeation on WebLogic Enterprise Simple object
        result = simple.to_lower(mixed);
      }
      page.getBody()
        .addElement(new HeadingElement("Output String: " + result, 4));
       
      // Return the html to the client browser
View Full Code Here

      }
    };

    Gadget gadget = makeGadgetWithSpec(gadgetXml).setContext(context);

    FeatureResource fooResource = inline("foo-content", "foo-debug");
    expectFeatureCalls(gadget,
        ImmutableList.of(fooResource),
        libs,
        ImmutableList.of(fooResource, inline("bar-c", "bar-d"), inline("baz-c", "baz-d")));
View Full Code Here

        return null;
      }
    };

    Gadget gadget = makeGadgetWithSpec(gadgetXml).setContext(context);
    FeatureResource fooResource = inline("foo-content", "foo-debug");
    expectFeatureCalls(gadget,
        ImmutableList.of(fooResource),
        libs,
        ImmutableList.of(fooResource, inline("bar-c", "bar-d"), inline("baz-c", "baz-d")));
    String rewritten = rewrite(gadget, BODY_CONTENT);
View Full Code Here

    expect(denied.getName()).andReturn("hello");
    expect(gadgetAdminStore.checkFeatureAdminInfo(isA(Gadget.class))).andReturn(true);
    expect(gadgetAdminStore.isAllowedFeature(eq(denied), isA(Gadget.class))).andReturn(false);
    replay();

    FeatureResource fooResource = inline("foo-content", "foo-debug");
    expectFeatureCalls(gadget,
        ImmutableList.of(fooResource),
        libs,
        ImmutableList.of(fooResource, inline("bar-c", "bar-d"), inline("baz-c", "baz-d")));
View Full Code Here

    assertEquals(UriStatus.VALID_VERSIONED, status);
    verify(registry);
  }
 
  private void expectReq(String feature, String content) {
    FeatureResource resource = new FeatureResource.Simple(content, "");
    Collection<String> libs = Lists.newArrayList(feature);
    List<FeatureResource> resources = Lists.newArrayList(resource);
    expect(registry.getFeatureResources(isA(GadgetContext.class), eq(libs),
        EasyMock.<List<String>>isNull())).andReturn(resources).anyTimes();
  }
View Full Code Here

  public void setUp() {
    String featureContent = "THE_FEATURE_CONTENT";
    String debugContent = "FEATURE_DEBUG_CONTENT";
    featureChecksum = HashUtil.checksum((featureContent + debugContent).getBytes());
    FeatureRegistry registry = createMock(FeatureRegistry.class);
    FeatureResource resource = new FeatureResource.Simple(featureContent, debugContent);
    List<FeatureResource> allResources = Lists.newArrayList(resource);
    expect(registry.getAllFeatures()).andReturn(allResources).once();
    replay(registry);
    versioner = new AllJsIframeVersioner(registry);
    verify(registry);
View Full Code Here

      }
    };

    Gadget gadget = makeGadgetWithSpec(gadgetXml).setContext(context);

    FeatureResource fooResource = inline("foo-content", "foo-debug");
    expectFeatureCalls(gadget,
        ImmutableList.of(fooResource),
        libs,
        ImmutableList.of(fooResource, inline("bar-c", "bar-d"), inline("baz-c", "baz-d")));
   
View Full Code Here

      }
    };

    Gadget gadget = makeGadgetWithSpec(gadgetXml).setContext(context);

    FeatureResource fooResource = inline("foo-content", "foo-debug");
    expectFeatureCalls(gadget,
        ImmutableList.of(fooResource),
        libs,
        ImmutableList.of(fooResource, inline("bar-c", "bar-d"), inline("baz-c", "baz-d")));
View Full Code Here

        return null;
      }
    };

    Gadget gadget = makeGadgetWithSpec(gadgetXml).setContext(context);
    FeatureResource fooResource = inline("foo-content", "foo-debug");
    expectFeatureCalls(gadget,
        ImmutableList.of(fooResource),
        libs,
        ImmutableList.of(fooResource, inline("bar-c", "bar-d"), inline("baz-c", "baz-d")));
    String rewritten = rewrite(gadget, BODY_CONTENT);
View Full Code Here

TOP

Related Classes of org.apache.shindig.gadgets.features.FeatureResource$Simple

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.