chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Klevenz, Stephan" <stephan.klev...@sap.com>
Subject API Feedback: OperationalContext (OC)
Date Tue, 06 Jul 2010 09:00:32 GMT
Hi,

For performance optimization a OC was introduced to control all the include and exclude artifacts
of backend calls. The default OC assigned to the session has some includes which are set to
false by default. For instance Policies and ACLs:

    public OperationContextImpl() {
        setFilter(null);
        setIncludeAcls(false);
        setIncludeAllowableActions(true);
        setIncludePolicies(false);
        setIncludeRelationships(IncludeRelationships.NONE);
        setRenditionFilter(null);
        setIncludePathSegments(true);
        setOrderBy(null);
        setCacheEnabled(false);
        generateCacheKey();

        setMaxItemsPerPage(100);  // default
    }

As a result calls like document.getAcl() simply return NULL. This is error prone and it is
also quite hard to find out the reason why the result is null. I think this can be improved
by following options:

a)      set includes by default to true (optimize only if required)
b)      throw a meaningful exception in case of the artifact is excluded
c)      load artifact lazy by having an extra call to the backend

My favor would be a) and c) or at least c). WDYT?

Regards,
Stephan


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message