[xwiki-notifications] [Issue] Created: (XWIKI-1986) hasFeature(featurestring) API for determining what components are installed/enabled

Sergiu Dumitriu (JIRA) jira at xwiki.org
Fri Jan 4 10:11:31 CET 2008


hasFeature(featurestring) API for determining what components are installed/enabled
-----------------------------------------------------------------------------------

                 Key: XWIKI-1986
                 URL: http://jira.xwiki.org/jira/browse/XWIKI-1986
             Project: XWiki Platform
          Issue Type: New Feature
          Components: APIs, Core
            Reporter: Sergiu Dumitriu


There is no good way of testing for an existing feature. The XWiki object provides some methods, like hasVersioning, hasRecycleBin or hasSectionEdit, some code tests if a plugin exists, and some code just assumes that a feature is always enabled.

A proper way would be to have a "features" component, which can be used with calls like:

if (Features.hasFeature("versioning"))
if (Features.get("zipexplorer")) // returns boolean, not the implementation itself
#if($features.charting)
#if($features.hasFeature("tags", "2.0"))

I don't know if the Features class should also link to the implementations for a feature, or just list the enabled features.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.xwiki.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the notifications mailing list