com.wewebu.ow.server.ecmimpl.cmis.alfresco
Class OwCMISALAspectsService

java.lang.Object
  extended by com.wewebu.ow.server.ecmimpl.cmis.alfresco.OwCMISALAspectsService

public class OwCMISALAspectsService
extends Object

Helper class for mandatory aspect definition. This class is needed during creation process to verify and retrieve mandatory aspect definitions from Alfresco system.

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.2.0.0

Constructor Summary
OwCMISALAspectsService()
           
 
Method Summary
 void ensureMandatroyAspects(OwCMISNetwork network, OwCMISObjectClass objClass)
          Verify cache initialized/existent, before retrieve of information is requested.
protected  OwCMISALAspectRetriever getAspectRetriever(OwCMISNetwork network)
          Read the configuration and create the OwCMISALAspectRetriever, which will be used to get Mandatory Aspects information for specific types.
static boolean isCacheInitialised(OwCMISObjectClass objClass)
          Check if mandatory aspects information already exist in cache or not.
 void retrieveManadatoryAspects(OwCMISNetwork network, OwCMISObjectClass objClass)
          Method which will use a OwCMISALAspectRetriever to get the information about Aspects of provided class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwCMISALAspectsService

public OwCMISALAspectsService()
Method Detail

retrieveManadatoryAspects

public void retrieveManadatoryAspects(OwCMISNetwork network,
                                      OwCMISObjectClass objClass)
                               throws com.wewebu.ow.server.exceptions.OwException,
                                      IOException
Method which will use a OwCMISALAspectRetriever to get the information about Aspects of provided class. Will create a cache object and attach it to the native representation. In case that the OwCMISObjectClass does not have a native object type, the method will ignore the call and simply return.

Attention: Existing cache will be overwritten, this method will not verify the cache (ensureMandatroyAspects(OwCMISNetwork, OwCMISObjectClass) at all.

Parameters:
network - OwCMISNetwork to be used for additional information
objClass - OwCMISObjectClass to retrieve Aspect information
Throws:
com.wewebu.ow.server.exceptions.OwException - if problem occur with creating instance of retriever
IOException - if problem occur during network communication to (ECM) back-end system

ensureMandatroyAspects

public void ensureMandatroyAspects(OwCMISNetwork network,
                                   OwCMISObjectClass objClass)
                            throws com.wewebu.ow.server.exceptions.OwException,
                                   IOException
Verify cache initialized/existent, before retrieve of information is requested. If no cache object was found, the method will delegate to retrieveManadatoryAspects(OwCMISNetwork, OwCMISObjectClass).

Parameters:
network - OwCMISNetwork
objClass - OwCMISObjectClass to ensure aspects cache
Throws:
com.wewebu.ow.server.exceptions.OwException - see retrieveManadatoryAspects(...)
IOException - see retrieveManadatoryAspects(...)
See Also:
retrieveManadatoryAspects(OwCMISNetwork, OwCMISObjectClass)

isCacheInitialised

public static boolean isCacheInitialised(OwCMISObjectClass objClass)
Check if mandatory aspects information already exist in cache or not.

Parameters:
objClass - OwCMISObjectClass to be verified
Returns:
true if respective cache exist.

getAspectRetriever

protected OwCMISALAspectRetriever getAspectRetriever(OwCMISNetwork network)
                                              throws com.wewebu.ow.server.exceptions.OwException
Read the configuration and create the OwCMISALAspectRetriever, which will be used to get Mandatory Aspects information for specific types.

A basic retriever is instantiated if no explicit configuration is found, else an instance from defined retriever is created using default constructor.

Parameters:
network - OwCMISNetwork to be used for configuration information
Returns:
OwCMISALAspectRetriever which is configured
Throws:
com.wewebu.ow.server.exceptions.OwException - if fail to create instance of retriever


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.