Spring Extensions

com.myjeeva.spring.security.secureuri
Class SecureUriProviderImpl

java.lang.Object
  extended by com.myjeeva.spring.security.secureuri.SecureUriProviderImpl
All Implemented Interfaces:
SecureUriProvider

public class SecureUriProviderImpl
extends Object
implements SecureUriProvider

Implementation of SecureUriProvider interface Secure link computation.

So generateSecureUri(String, long, String) method generates the secure link with given params

Since:
v1.0.1
Author:
Jeevanandam ([email protected])

Constructor Summary
SecureUriProviderImpl()
           
 
Method Summary
 String generateSecureUri(String file, long expiryTime, String additionalParams)
          Generate a secure link/download link for the given parameters.
 void setSecureUriMapper(SecureUriMapper secureUriMapper)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecureUriProviderImpl

public SecureUriProviderImpl()
Method Detail

setSecureUriMapper

public void setSecureUriMapper(SecureUriMapper secureUriMapper)
Parameters:
secureUriMapper - the secureUriMapper to set

generateSecureUri

public String generateSecureUri(String file,
                                long expiryTime,
                                String additionalParams)
Generate a secure link/download link for the given parameters. This function will return a hashed URL.

for compute a secure URI below params are used.

Specified by:
generateSecureUri in interface SecureUriProvider
Parameters:
file - - String - base URI, i.e everything after myjeeva.com in file path, including the leading slash
(for example: http://myjeeva.com/view/content/file.txt
http://myjeeva.com/view/content/index.jsp
http://myjeeva.com/content/sample.pdf)
expiryTime - - long - expiry in milliseconds since current time. Use 0 for no expiry
additionalParams - - String - custom URL parameters (query String)
Returns:
secure link of hash URL - a String object

Spring Extensions

Copyright © 2010-2012 www.myjeeva.com, All rights reserved.

The copyright of the pages and contents on this website is with myjeeva.com and the content is licensed under Creative Commons Attribution-Share Alike 3.0 Unported License. Libraries and code snippets on myjeeva.com has license information.