com.wewebu.ow.server.util.paramcodec
Class OwTransientCodec

java.lang.Object
  extended by com.wewebu.ow.server.util.paramcodec.OwCookieStoreCodec
      extended by com.wewebu.ow.server.util.paramcodec.OwTransientCodec
All Implemented Interfaces:
OwParameterMapCodec

public class OwTransientCodec
extends OwCookieStoreCodec

An OwCookieStoreCodec implementation that stores the cookies in memory.
The index name uniqueness is guaranteed per VM-instance.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com

Since:
3.0.0.0

Nested Class Summary
 
Nested classes/interfaces inherited from class com.wewebu.ow.server.util.paramcodec.OwCookieStoreCodec
OwCookieStoreCodec.OwTimedCookie, OwCookieStoreCodec.OwTimedCookieValue
 
Field Summary
 
Fields inherited from class com.wewebu.ow.server.util.paramcodec.OwCookieStoreCodec
CONFIGURATION_BOOTSTRAP_ELEMENT_NAME, CONFIGURATION_DAYS_ATTRIBUTE, CONFIGURATION_HOURS_ATTRIBUTE, CONFIGURATION_MINUTES_ATTRIBUTE, CONFIGURATION_NAME_ATTRIBUTE, CONFIGURATION_SECONDS_ATTRIBUTE, CONFIGURATION_URL_LIFE_TIME_ELEMENT, CONFIGURATION_URL_PARAMETER_ELEMENT, DEFAULT_CONFIG_URL_LIFE_TIME, DEFAULT_URL_PARAMETER_NAME
 
Constructor Summary
OwTransientCodec()
           
OwTransientCodec(long namesExpirationTime_p)
           
OwTransientCodec(OwAlphabetCoder alphabetCder_p, long initialNameIndex_p, String cookieParamenterName_p, long namesExpirationTime_p)
           
OwTransientCodec(String cookieParamenterName_p, long namesExpirationTime_p)
           
 
Method Summary
protected  void addCookieValue(OwCookieStoreCodec.OwTimedCookieValue timedCookieValue_p)
          Adds the given OwCookieStoreCodec.OwTimedCookieValue to the cookie store
static OwTransientCodec createConfiguredCodec(OwMainAppContext context_p)
          Creates a new OwTransientCodec based on the bootstrap configuration that is accessed through the given OwMainAppContext.
The expected XML structure of the URLParameterCodec tag element is the following : URLLifeTimeTime - tag Configures the amount of time an encoded URL parameter map is valid.
protected  List createTimedCookieCollectList()
          Hook method that returns a list of OwCookieStoreCodec.OwTimedCookies to be collected.
protected  OwCookieStoreCodec.OwTimedCookieValue getCookieValue(String cookieName_p)
           
 long getNextUnqiueNameIndex()
          Get the next available unique index.
 String peekAtNextURLParameter()
          Retrieve the next unique URL parameter value without incrementing the global unique counter.
protected  void remove(OwCookieStoreCodec.OwTimedCookie timedCookie_p)
          Removes the given OwCookieStoreCodec.OwTimedCookie from cookie storage.
 
Methods inherited from class com.wewebu.ow.server.util.paramcodec.OwCookieStoreCodec
canDecode, collectExpiredNames, createCookie, decode, encode, loadUrlLifeTimeConfig, loadUrlParameterConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwTransientCodec

public OwTransientCodec()

OwTransientCodec

public OwTransientCodec(long namesExpirationTime_p)

OwTransientCodec

public OwTransientCodec(String cookieParamenterName_p,
                        long namesExpirationTime_p)

OwTransientCodec

public OwTransientCodec(OwAlphabetCoder alphabetCder_p,
                        long initialNameIndex_p,
                        String cookieParamenterName_p,
                        long namesExpirationTime_p)
Method Detail

createConfiguredCodec

public static OwTransientCodec createConfiguredCodec(OwMainAppContext context_p)
                                              throws OwInvalidOperationException
Creates a new OwTransientCodec based on the bootstrap configuration that is accessed through the given OwMainAppContext.
The expected XML structure of the URLParameterCodec tag element is the following : URLLifeTimeTime - tag Configures the amount of time an encoded URL parameter map is valid. After that the parameter map is considered expired and links that rely on are considered out of date / expired and will not produce the desired response. Attributes : days = days until the parameter map expires considering the URL parameter map encoding time hours = hours until the parameter map expires considering the URL parameter map encoding time minutes = minutes until the parameter map expires considering the URL parameter map encoding time seconds = seconds until the parameter map expires considering the URL parameter map encoding time CookieParameter - tag The parameter map codec encodes a parameter map into another parameter map containing one cookie defining parameter. Attributes : name = string name of the URL parameter

Parameters:
context_p -
Returns:
the configured codec
Throws:
OwInvalidOperationException

addCookieValue

protected void addCookieValue(OwCookieStoreCodec.OwTimedCookieValue timedCookieValue_p)
Description copied from class: OwCookieStoreCodec
Adds the given OwCookieStoreCodec.OwTimedCookieValue to the cookie store

Specified by:
addCookieValue in class OwCookieStoreCodec

createTimedCookieCollectList

protected List createTimedCookieCollectList()
Description copied from class: OwCookieStoreCodec
Hook method that returns a list of OwCookieStoreCodec.OwTimedCookies to be collected.

Specified by:
createTimedCookieCollectList in class OwCookieStoreCodec
Returns:
a List of OwCookieStoreCodec.OwTimedCookie
See Also:
OwCookieStoreCodec.collectExpiredNames()

getCookieValue

protected OwCookieStoreCodec.OwTimedCookieValue getCookieValue(String cookieName_p)
Specified by:
getCookieValue in class OwCookieStoreCodec
Returns:
the OwCookieStoreCodec.OwTimedCookieValue for the given cookie

remove

protected void remove(OwCookieStoreCodec.OwTimedCookie timedCookie_p)
Description copied from class: OwCookieStoreCodec
Removes the given OwCookieStoreCodec.OwTimedCookie from cookie storage.

Specified by:
remove in class OwCookieStoreCodec

peekAtNextURLParameter

public final String peekAtNextURLParameter()
                                    throws OwException
Retrieve the next unique URL parameter value without incrementing the global unique counter.

Returns:
the next unique URL parameter value
Throws:
OwException
Since:
3.2.0.1

getNextUnqiueNameIndex

public long getNextUnqiueNameIndex()
Description copied from interface: OwParameterMapCodec
Get the next available unique index.

Returns:
a unique long index


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.