public class OwAttributeBagResolver extends Object implements OwAttributeBagsSupport
Implements a helper class that resolves attribute bags for the getAttributeBagWriteable methods in the OwNetwork adapters.
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
Modifier and Type | Field and Description |
---|---|
static OwTableSpec |
DB_ATTRIBUTE_BAG_TABLE
standard table for writable attribute bags, this table must exist in order to persist writable attribute bags
|
protected OwStandardDBAttributeBagWriteableFactory |
m_writeablebagfactory
factory for pooled attribute bags
|
Constructor and Description |
---|
OwAttributeBagResolver() |
Modifier and Type | Method and Description |
---|---|
static OwAttributeBagResolver |
createAndCheckResolver(OwNetworkContext networkContext_p)
Returns an
OwAttributeBagResolver instance if such
an attribute bag support is usable in the given context. |
OwAttributeBag |
getNameKeyAttributeBag(OwNetworkContext context_p,
String bagname_p,
String attributename_p)
get a inverted writable attribute bag based on a attribute name key
i.e.: the attributenames of the bag represent the users
|
OwAttributeBagWriteable |
getUserKeyAttributeBagWriteable(OwNetworkContext context_p,
String bagname_p,
String username_p)
get a writable attribute bag based an a user key
i.e.: the attributenames of the bag represent the attribute names
|
public static OwTableSpec DB_ATTRIBUTE_BAG_TABLE
protected OwStandardDBAttributeBagWriteableFactory m_writeablebagfactory
public static OwAttributeBagResolver createAndCheckResolver(OwNetworkContext networkContext_p) throws OwNotSupportedException
OwAttributeBagResolver
instance if such
an attribute bag support is usable in the given context. Fails with OwNotSupportedException
otherwise.networkContext_p
- OwAttributeBagResolver
instanceOwNotSupportedException
- if the DB attribute bags can not be used (egg. no DB connection is definedpublic OwAttributeBag getNameKeyAttributeBag(OwNetworkContext context_p, String bagname_p, String attributename_p) throws Exception
getNameKeyAttributeBag
in interface OwAttributeBagsSupport
context_p
- bagname_p
- attributename_p
- OwAttributeBag
Exception
OwException
OwNetwork.APPLICATION_OBJECT_TYPE_INVERTED_ATTRIBUTE_BAG
public OwAttributeBagWriteable getUserKeyAttributeBagWriteable(OwNetworkContext context_p, String bagname_p, String username_p) throws Exception
getUserKeyAttributeBagWriteable
in interface OwAttributeBagsSupport
context_p
- bagname_p
- username_p
- OwAttributeBagWriteable
Exception
OwException
OwNetwork.APPLICATION_OBJECT_TYPE_ATTRIBUTE_BAG_WRITABLE
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.