blob: 90ee6ab8279f11b4b22287ab66108639dc3235cb [file] [log] [blame]
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="com.motorolamobility.preflighting.core" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
<meta.schema plugin="com.motorolamobility.preflighting.core" id="checker" name="Checker"/>
</appinfo>
<documentation>
This extension point provides means to create a checker for the App Validator. Checkers allow you to make verifications in either your Android Project or Android Application Packages (APKs).
</documentation>
</annotation>
<element name="extension">
<annotation>
<appinfo>
<meta.element />
</appinfo>
</annotation>
<complexType>
<sequence minOccurs="1" maxOccurs="unbounded">
<element ref="checker"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="checker">
<annotation>
<documentation>
This extension point provides the developer with all the basic structures needed for creating a Checker.
The checker architecture supposes a hierarchy of conditions lying below every checker, giving meaningful results divided by the conditions class.
</documentation>
</annotation>
<complexType>
<sequence minOccurs="0" maxOccurs="unbounded">
<element ref="condition"/>
<element ref="parameter"/>
</sequence>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
This is the Checker Id.
Don&apos;t use &quot;.&quot; as part of the id since it is used to specify conditions in the command line (checker.condition).
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string" use="required">
<annotation>
<documentation>
This is the checker name. It would preferably be a translatable value.
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
<attribute name="description" type="string" use="required">
<annotation>
<documentation>
A short description of your checker.
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
<attribute name="class" type="string">
<annotation>
<documentation>
The class where the checker is implemented. If none is provided, the default class will be used, which is com.motorolamobility.preflighting.core.checker.Checker.
In case one wishes to customize a checker, simply implement a new com.motorolamobility.preflighting.core.checker.IChecker
as required by this extension-point, or extend the default class. You can implement your own checker class if you need to compute something that is common to more than one condition, for example.
</documentation>
<appinfo>
<meta.attribute kind="java" basedOn="com.motorolamobility.preflighting.core.checker.Checker:com.motorolamobility.preflighting.core.checker.IChecker"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="condition">
<annotation>
<documentation>
This is the extension point which provides all the necessary interfaces to the developer in order to create a checker condition, a prerequisite for the checker archtecture.
</documentation>
</annotation>
<complexType>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
The condition ID.
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string" use="required">
<annotation>
<documentation>
The condition name.
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
<attribute name="description" type="string" use="required">
<annotation>
<documentation>
A short description about the condition.
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
<attribute name="defaultSeverityLevel" use="required">
<annotation>
<documentation>
The default severity level of your condition. There are 4 valid values for this field:
- WARNING: Will rise a warning;
- ERROR: Wil rise a non-critical error;
- FATAL: will rise a fatal error, usually employed to denote a critical failure.
</documentation>
</annotation>
<simpleType>
<restriction base="string">
<enumeration value="WARNING">
</enumeration>
<enumeration value="ERROR">
</enumeration>
<enumeration value="FATAL">
</enumeration>
</restriction>
</simpleType>
</attribute>
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
The class where the condition is implemented. The actual application verification should be done here, and not in the Checker classes.
There is a default implementation of the Condition at com.motorolamobility.preflighting.core.checker.condition.Condition. It does some
basic tasks such as holding elements of the Condition (Id, Description and so on...). So, when defining the class which implements this extention-point,
one could also make this class extend com.motorolamobility.preflighting.core.checker.condition.Condition. Thus, one only has to implement the abstract methods
of the default class com.motorolamobility.preflighting.core.checker.condition.Condition which actually do the work.
</documentation>
<appinfo>
<meta.attribute kind="java" basedOn="com.motorolamobility.preflighting.core.checker.condition.Condition:com.motorolamobility.preflighting.core.checker.condition.ICondition"/>
</appinfo>
</annotation>
</attribute>
<attribute name="markerType" type="string">
<annotation>
<documentation>
The marker type is used by problems view and editor to distinguish the markers. If the condition being defined provides a quick fix, then it should set its own markerType. Otherwise, use the default value.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="parameter">
<annotation>
<documentation>
This is the extension point which provides a parameter to a checker
</documentation>
</annotation>
<complexType>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
The checker parameter ID.
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string" use="required">
<annotation>
<documentation>
The checker parameter name.
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
<attribute name="description" type="string" use="required">
<annotation>
<documentation>
A short description about the chekcer parameter.
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
<attribute name="valueDescription" type="string" use="required">
<annotation>
<documentation>
A short value-description about the chekcer parameter.
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
<attribute name="isMandatory" type="boolean" use="required">
<annotation>
<documentation>
This flag determines whether this checker parameter is mandatory.
</documentation>
</annotation>
</attribute>
<attribute name="type" use="required">
<annotation>
<documentation>
This fields defines the types of this parameter.
</documentation>
</annotation>
<simpleType>
<restriction base="string">
<enumeration value="STRING">
</enumeration>
<enumeration value="BOOLEAN">
</enumeration>
<enumeration value="INTEGER">
</enumeration>
</restriction>
</simpleType>
</attribute>
</complexType>
</element>
<annotation>
<appinfo>
<meta.section type="since"/>
</appinfo>
<documentation>
1.0.0
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="examples"/>
</appinfo>
<documentation>
&lt;p&gt;The plugin &lt;code&gt;preflighting.samplechecker.androidlabel&lt;/code&gt; distributed in the App Validator SDK contains an example on how to implement a Condition that accepts a parameter.&lt;/p&gt;
&lt;p&gt;The plugin &lt;code&gt;preflighting.samplecheckers.findviewbyid&lt;/code&gt; shows how to implement a Condition available only for projects (not for APKs). It also serves as an example about how to analyse Android (Java code) by using App Validator SDK framework.&lt;/p&gt;
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
You can access App Validator SDK API, by browsing the javadoc of the most important classes in the framework &lt;code&gt;Checker&lt;/code&gt;, &lt;code&gt;Condition&lt;/code&gt;, &lt;code&gt;ApplicationData&lt;/code&gt;, &lt;code&gt; CanExecuteConditionStatus&lt;/code&gt;, &lt;code&gt;PlatformRules&lt;/code&gt;, &lt;/code&gt;ValidationResult&lt;/code&gt; .
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="implementation"/>
</appinfo>
<documentation>
&lt;p&gt;&lt;code&gt;Checker&lt;/code&gt; is an utility class available in the App Validator SDK that implements &lt;code&gt;IChecker&lt;/code&gt;. If checker does not contain any special parameter validation, developers may indicate com.motorolamobility.preflighting.core.checker in the extension point.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Condition&lt;/code&gt; is an utility class available in the App Validator SDK that implements &lt;code&gt;ICondition&lt;/code&gt;. Developers may use &lt;code&gt;Condition&lt;/code&gt; as a base class to inherit the most common operations for code analysis.&lt;/p&gt;
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="copyright"/>
</appinfo>
<documentation>
Copyright (C) 2012 The Android Open Source Project
</documentation>
</annotation>
</schema>