Tabnine Logo
org.apache.shindig.common.util
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.shindig.common.util

Best Java code snippets using org.apache.shindig.common.util (Showing top 20 results out of 315)

origin: org.apache.shindig/shindig-common

/**
 * Tests if OpenSocialVersion is equivalent to the parameter version
 * @param version Compare with this version string
 * @return TRUE if is equivalent to version
 */
public boolean isEquivalent(String version){
 return isEquivalent(new OpenSocialVersion(version));
}
origin: org.apache.shindig/shindig-common

/**
 * Tests if OpenSocialVersion is equal to or greater than parameter version
 * @param version Compare with this version string
 * @return TRUE if is equal or greater than version
 */
public boolean isEqualOrGreaterThan(String version){
 return isEqualOrGreaterThan(new OpenSocialVersion(version));
}
origin: org.apache.shindig/shindig-common

private void setHmacTypeFromPreferredHMACAlgorithm() {
 if (BasicBlobCrypter.preferredHMACAlgorithm != null) {
  this.hmacType = HMACType.valueOf(BasicBlobCrypter.preferredHMACAlgorithm);
 }
}
origin: org.apache.shindig/shindig-gadgets

 public String getLockedDomainPrefix(String token) {
  byte[] sha = GenericDigestUtils.digest(token);
  return new String(Base32.encodeBase32(sha)); // a hash
 }
}
origin: org.apache.shindig/shindig-gadgets

 @Override
 protected long currentTimeMsec() {
  return clock.currentTimeMillis();
 }
}
origin: com.lmco.shindig/shindig-gadgets

protected String getFileContent(File file) {
 try {
  return ResourceLoader.getContent(file);
 } catch (IOException e) {
  // This is fine; errors happen downstream.
  return null;
 }
}

origin: org.gatein.shindig/shindig-common

 public Future<?> execute(Map<String, String[]> parameters, Reader body,
            SecurityToken token, BeanConverter converter) {
  return ImmediateFuture.errorInstance(error);
 }
}
origin: org.apache.shindig/shindig-gadgets

/**
 * @return The post body as a string, assuming UTF-8 encoding.
 * TODO: We should probably tolerate other encodings, based on the
 *     Content-Type header.
 */
public String getPostBodyAsString() {
 return CharsetUtil.newUtf8String(postBody);
}
origin: com.lmco.shindig/shindig-gadgets

 @Override
 protected long currentTimeMsec() {
  return clock.currentTimeMillis();
 }
}
origin: apache/shindig

/**
 * Tests if OpenSocialVersion is equivalent to the parameter version
 * @param version Compare with this version string
 * @return TRUE if is equivalent to version
 */
public boolean isEquivalent(String version){
 return isEquivalent(new OpenSocialVersion(version));
}
origin: org.wso2.org.apache.shindig/shindig-common

/**
 * Tests if OpenSocialVersion is equal to or greater than parameter version
 * @param version Compare with this version string
 * @return TRUE if is equal or greater than version
 */
public boolean isEqualOrGreaterThan(String version){
 return isEqualOrGreaterThan(new OpenSocialVersion(version));
}
origin: com.lmco.shindig/shindig-gadgets

protected String getResourceContent(String resource) {
 try {
  return ResourceLoader.getContent(resource);
 } catch (IOException e) {
  return null;
 }
}

origin: org.gatein.shindig/shindig-common

 public Future<?> execute(Map<String, FormDataItem> formItems, SecurityToken token,
   BeanConverter converter) {
  return ImmediateFuture.errorInstance(error);
 }
}
origin: org.wso2.org.apache.shindig/shindig-common

private void setHmacTypeFromPreferredHMACAlgorithm() {
 if (BasicBlobCrypter.preferredHMACAlgorithm != null) {
  this.hmacType = HMACType.valueOf(BasicBlobCrypter.preferredHMACAlgorithm);
 }
}
origin: org.wso2.org.apache.shindig/shindig-gadgets

 @Override
 protected long currentTimeMsec() {
  return clock.currentTimeMillis();
 }
}
origin: org.wso2.org.apache.shindig/shindig-common

/**
 * Tests if OpenSocialVersion is equivalent to the parameter version
 * @param version Compare with this version string
 * @return TRUE if is equivalent to version
 */
public boolean isEquivalent(String version){
 return isEquivalent(new OpenSocialVersion(version));
}
origin: org.gatein.shindig/shindig-gadgets

protected String getFileContent(File file) {
 try {
  return ResourceLoader.getContent(file);
 } catch (IOException e) {
  // This is fine; errors happen downstream.
  return null;
 }
}

origin: com.lmco.shindig/shindig-common

 public Future<?> execute(Map<String, String[]> parameters, Reader body,
            SecurityToken token, BeanConverter converter) {
  return ImmediateFuture.errorInstance(error);
 }
}
origin: org.gatein.shindig/shindig-gadgets

protected String getResourceContent(String resource) {
 try {
  return ResourceLoader.getContent(resource);
 } catch (IOException e) {
  return null;
 }
}

origin: com.lmco.shindig/shindig-common

 public Future<?> execute(Map<String, FormDataItem> formItems, SecurityToken token,
   BeanConverter converter) {
  return ImmediateFuture.errorInstance(error);
 }
}
org.apache.shindig.common.util

Most used classes

  • CharsetUtil
    Utilities for dealing with character set encoding.
  • DateUtil
    Date parsing and writing utilities.
  • HashUtil
    Routines for producing hashes.
  • Utf8UrlCoder
    Performs url encoding / decoding with forced utf-8. Automatically takes care of boilerplate exceptio
  • ResourceLoader
    Handles loading contents from resource and file system files.
  • GenericDigestUtils,
  • JsonConversionUtil,
  • StringEncoding,
  • Base32,
  • FakeTimeSource,
  • ImmediateFuture,
  • HMACType,
  • OpenSocialVersion,
  • CharsetUtilTest,
  • DateUtilTest,
  • JsonConversionUtilTest,
  • StringEncodingTest,
  • FutureUtil,
  • FutureUtil$1
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now