Codota Logo
HashShaLockedDomainPrefixGenerator
Code IndexAdd Codota to your IDE (free)

How to use
HashShaLockedDomainPrefixGenerator
in
org.apache.shindig.gadgets.uri

Best Java code snippets using org.apache.shindig.gadgets.uri.HashShaLockedDomainPrefixGenerator (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: org.apache.shindig/shindig-gadgets

public String getLockedDomainPrefix(Uri gadgetUri) {
 return getLockedDomainPrefix(gadgetUri.toString().toLowerCase());
}
origin: org.wso2.org.apache.shindig/shindig-gadgets

@Before
public void setUp() throws Exception {
 expect(request.getMethod()).andReturn("POST").anyTimes();
 expect(request.getParameter(Param.URL.getKey()))
   .andReturn(REQUEST_URL.toString()).anyTimes();
 JSONObject config = new JSONObject('{' + ContainerConfig.DEFAULT_CONTAINER + ':' +
   "{'gadgets.container': ['default']," +
   "'gadgets.features':{views:" +
   "{aliased: {aliases: ['some-alias', 'alias']}}" +
   ",'core.io':" +
   "{unparseableCruft :\"throw 1; < don't be evil' >\"}}}}");
 containerConfig = new JsonContainerConfig(config, Expressions.forTesting());
 ldService = new HashLockedDomainService(containerConfig, false, new HashShaLockedDomainPrefixGenerator());
 handler = new MakeRequestHandler(containerConfig, pipeline, rewriterRegistry, feedProcessorProvider, gadgetAdminStore, processor, ldService);
 DUMMY_TOKEN.setAppUrl("http://some/gadget.xml");
 DUMMY_TOKEN.setContainer(ContainerConfig.DEFAULT_CONTAINER);
 expect(request.getParameter(Param.GADGET.getKey())).andReturn("http://some/gadget.xml").anyTimes();
 expect(processor.process(capture(context))).andReturn(gadget).anyTimes();
 expect(gadgetAdminStore.isWhitelisted(isA(String.class), isA(String.class))).andReturn(true);
}
origin: org.apache.shindig/shindig-gadgets

@Before
public void setUp() throws Exception {
 expect(request.getMethod()).andReturn("POST").anyTimes();
 expect(request.getParameter(Param.URL.getKey()))
   .andReturn(REQUEST_URL.toString()).anyTimes();
 JSONObject config = new JSONObject('{' + ContainerConfig.DEFAULT_CONTAINER + ':' +
   "{'gadgets.container': ['default']," +
   "'gadgets.features':{views:" +
   "{aliased: {aliases: ['some-alias', 'alias']}}" +
   ",'core.io':" +
   "{unparseableCruft :\"throw 1; < don't be evil' >\"}}}}");
 containerConfig = new JsonContainerConfig(config, Expressions.forTesting());
 ldService = new HashLockedDomainService(containerConfig, false, new HashShaLockedDomainPrefixGenerator());
 handler = new MakeRequestHandler(containerConfig, pipeline, rewriterRegistry, feedProcessorProvider, gadgetAdminStore, processor, ldService);
 DUMMY_TOKEN.setAppUrl("http://some/gadget.xml");
 DUMMY_TOKEN.setContainer(ContainerConfig.DEFAULT_CONTAINER);
 expect(request.getParameter(Param.GADGET.getKey())).andReturn("http://some/gadget.xml").anyTimes();
 expect(processor.process(capture(context))).andReturn(gadget).anyTimes();
 expect(gadgetAdminStore.isWhitelisted(isA(String.class), isA(String.class))).andReturn(true);
}
origin: org.apache.shindig/shindig-gadgets

 @Test(expected = NullPointerException.class)
 public void isNull() {
  generator.getLockedDomainPrefix((Uri)null);
 }
}
origin: com.lmco.shindig/shindig-gadgets

 @Test(expected = NullPointerException.class)
 public void isNull() {
  generator.getLockedDomainPrefix(null);
 }
}
origin: org.wso2.org.apache.shindig/shindig-gadgets

 @Test(expected = NullPointerException.class)
 public void isNull() {
  generator.getLockedDomainPrefix((Uri)null);
 }
}
origin: org.wso2.org.apache.shindig/shindig-gadgets

@Test
public void generate() {
 Uri uri = Uri.parse("http://www.apache.org/gadget.xml");
 assertEquals("e5bld32ce9pe5ln81rjhe0d0e1vao1ba", generator.getLockedDomainPrefix(uri));
}
origin: com.lmco.shindig/shindig-gadgets

@Test
public void generate() {
 Uri uri = Uri.parse("http://www.apache.org/gadget.xml");
 assertEquals("e5bld32ce9pe5ln81rjhe0d0e1vao1ba", generator.getLockedDomainPrefix(uri));
}

origin: org.apache.shindig/shindig-gadgets

@Test
public void generate() {
 Uri uri = Uri.parse("http://www.apache.org/gadget.xml");
 assertEquals("e5bld32ce9pe5ln81rjhe0d0e1vao1ba", generator.getLockedDomainPrefix(uri));
}
org.apache.shindig.gadgets.uriHashShaLockedDomainPrefixGenerator

Javadoc

A simple implementation of locked domain that hashes the gadgeturi as the prefix.

Most used methods

  • getLockedDomainPrefix
  • <init>

Popular in Java

  • Making http requests using okhttp
  • compareTo (BigDecimal)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • putExtra (Intent)
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Logger (org.slf4j)
    The main user interface to logging. It is expected that logging takes place through concrete impleme
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now