/** * 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)); }
/** * 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)); }
private void setHmacTypeFromPreferredHMACAlgorithm() { if (BasicBlobCrypter.preferredHMACAlgorithm != null) { this.hmacType = HMACType.valueOf(BasicBlobCrypter.preferredHMACAlgorithm); } }
public String getLockedDomainPrefix(String token) { byte[] sha = GenericDigestUtils.digest(token); return new String(Base32.encodeBase32(sha)); // a hash } }
@Override protected long currentTimeMsec() { return clock.currentTimeMillis(); } }
protected String getFileContent(File file) { try { return ResourceLoader.getContent(file); } catch (IOException e) { // This is fine; errors happen downstream. return null; } }
public Future<?> execute(Map<String, String[]> parameters, Reader body, SecurityToken token, BeanConverter converter) { return ImmediateFuture.errorInstance(error); } }
/** * @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); }
@Override protected long currentTimeMsec() { return clock.currentTimeMillis(); } }
/** * 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)); }
/** * 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)); }
protected String getResourceContent(String resource) { try { return ResourceLoader.getContent(resource); } catch (IOException e) { return null; } }
public Future<?> execute(Map<String, FormDataItem> formItems, SecurityToken token, BeanConverter converter) { return ImmediateFuture.errorInstance(error); } }
private void setHmacTypeFromPreferredHMACAlgorithm() { if (BasicBlobCrypter.preferredHMACAlgorithm != null) { this.hmacType = HMACType.valueOf(BasicBlobCrypter.preferredHMACAlgorithm); } }
@Override protected long currentTimeMsec() { return clock.currentTimeMillis(); } }
/** * 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)); }
protected String getFileContent(File file) { try { return ResourceLoader.getContent(file); } catch (IOException e) { // This is fine; errors happen downstream. return null; } }
public Future<?> execute(Map<String, String[]> parameters, Reader body, SecurityToken token, BeanConverter converter) { return ImmediateFuture.errorInstance(error); } }
protected String getResourceContent(String resource) { try { return ResourceLoader.getContent(resource); } catch (IOException e) { return null; } }
public Future<?> execute(Map<String, FormDataItem> formItems, SecurityToken token, BeanConverter converter) { return ImmediateFuture.errorInstance(error); } }