public class OwNetworkAttributeBagCodec extends OwAttributeBagCodec
OwNetwork
based implementation of the OwAttributeBagCodec
.
Uses an instance of OwNetwork
to access attribute bags.
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
OwAttributeBag
,
OwAttributeBagWriteable
OwCookieStoreCodec.OwTimedCookie, OwCookieStoreCodec.OwTimedCookieValue
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CODEC_BAGS_PSEUDO_USER |
CONFIGURATION_ATTRIBUTEBAGS_ELEMENT, CONFIGURATION_CODEC_PREFIX_ATTRIBUTE, CONFIGURATION_COOKIE_PREFIX_ATTRIBUTE, CONFIGURATION_USER_ATTRIBUTE, DEFAULT_CODEC_BAGS_PREFIX, DEFAULT_CONFIG_BAG_USER_NAME, DEFAULT_COOKIE_BAGS_PREFIX
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 and Description |
---|
OwNetworkAttributeBagCodec(OwNetwork netowrk_p,
String cookieParameterName_p,
long namesExpirationTime_p,
String codecBagsPrefix_p,
String cookieBagsPrefix_p,
String codecBagsUser_p) |
Modifier and Type | Method and Description |
---|---|
static OwNetworkAttributeBagCodec |
createConfiguredCodec(OwMainAppContext context_p)
Creates a new
OwNetworkAttributeBagCodec based on the bootstrap configuration that is accessed through the given OwMainAppContext .The expected XML structure of the URLParameterCodec tag element is the following : URLLifeTime - tag Configures the amount of time an encoded URL parameter map is valid. After that the parameter map is considered expired and links that relay 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 AttributeBags - tag Configures the attribute bag storage name for the parameters maps. In order to prevent name conflicts in attribute bags usage unique bag names prefixes should be specified here. Attributes : codecprefix = a string prefix to be used in codec internal bag names cookieprefix = a string prefix to be used in codec internal bag names that will store cookie based parameter maps user = user to be used when storing codec attribute bags CookieParameter - tag The parameter map codec encodes a parameter map into another parameter map containing one cookie defining parameter. |
protected OwAttributeBagWriteable |
getBag(String bagName_p,
boolean create_p) |
addCookieValue, cookieBagName, cookieTableBagName, createTimedCookieCollectList, getCookieBag, getCookieTableBag, getCookieValue, getInitialValueForIndex, getMasterBag, getNextUnqiueNameIndex, loadAttributeBagsConfiguation, masterBagName, remove
canDecode, collectExpiredNames, createCookie, decode, encode, loadUrlLifeTimeConfig, loadUrlParameterConfig
public static final String DEFAULT_CODEC_BAGS_PSEUDO_USER
public OwNetworkAttributeBagCodec(OwNetwork netowrk_p, String cookieParameterName_p, long namesExpirationTime_p, String codecBagsPrefix_p, String cookieBagsPrefix_p, String codecBagsUser_p)
netowrk_p
- the OwNetwork
instance used to access attribute bagscookieParameterName_p
- namesExpirationTime_p
- codecBagsPrefix_p
- cookieBagsPrefix_p
- codecBagsUser_p
- public static OwNetworkAttributeBagCodec createConfiguredCodec(OwMainAppContext context_p) throws OwInvalidOperationException
OwNetworkAttributeBagCodec
based on the bootstrap configuration that is OwMainAppContext
.context_p
- OwInvalidOperationException
protected OwAttributeBagWriteable getBag(String bagName_p, boolean create_p) throws Exception
getBag
in class OwAttributeBagCodec
create_p
- if true
the given bag should be created if not foundException
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.