com.wewebu.ow.server.ecm
Class OwAttributeBagResolver

java.lang.Object
  extended by com.wewebu.ow.server.ecm.OwAttributeBagResolver
All Implemented Interfaces:
OwAttributeBagsSupport

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


Field Summary
protected  OwStandardDBAttributeBagWriteableFactory m_writeablebagfactory
          factory for pooled attribute bags
static String STANDARD_DB_ATTRIBUTE_BAG_TABLE_NAME
          standard table for writable attribute bags, this table must exist in order to persist writable attribute bags
 
Constructor Summary
OwAttributeBagResolver()
           
 
Method Summary
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STANDARD_DB_ATTRIBUTE_BAG_TABLE_NAME

public static String STANDARD_DB_ATTRIBUTE_BAG_TABLE_NAME
standard table for writable attribute bags, this table must exist in order to persist writable attribute bags


m_writeablebagfactory

protected OwStandardDBAttributeBagWriteableFactory m_writeablebagfactory
factory for pooled attribute bags

Constructor Detail

OwAttributeBagResolver

public OwAttributeBagResolver()
Method Detail

createAndCheckResolver

public static OwAttributeBagResolver createAndCheckResolver(OwNetworkContext networkContext_p)
                                                     throws OwNotSupportedException
Returns an OwAttributeBagResolver instance if such an attribute bag support is usable in the given context. Fails with OwNotSupportedException otherwise.

Parameters:
networkContext_p -
Returns:
an OwAttributeBagResolver instance
Throws:
OwNotSupportedException - if the DB attribute bags can not be used (egg. no DB connection is defined
Since:
3.1.0.0

getNameKeyAttributeBag

public OwAttributeBag getNameKeyAttributeBag(OwNetworkContext context_p,
                                             String bagname_p,
                                             String attributename_p)
                                      throws Exception
get a inverted writable attribute bag based on a attribute name key i.e.: the attributenames of the bag represent the users

Specified by:
getNameKeyAttributeBag in interface OwAttributeBagsSupport
Parameters:
context_p -
bagname_p -
attributename_p -
Returns:
an OwAttributeBag
Throws:
Exception
OwException
See Also:
OwNetwork.APPLICATION_OBJECT_TYPE_INVERTED_ATTRIBUTE_BAG

getUserKeyAttributeBagWriteable

public OwAttributeBagWriteable getUserKeyAttributeBagWriteable(OwNetworkContext context_p,
                                                               String bagname_p,
                                                               String username_p)
                                                        throws Exception
get a writable attribute bag based an a user key i.e.: the attributenames of the bag represent the attribute names

Specified by:
getUserKeyAttributeBagWriteable in interface OwAttributeBagsSupport
Parameters:
context_p -
bagname_p -
username_p -
Returns:
an OwAttributeBagWriteable
Throws:
Exception
OwException
See Also:
OwNetwork.APPLICATION_OBJECT_TYPE_ATTRIBUTE_BAG_WRITABLE


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.