<?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't use "." 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> | |
<p>The plugin <code>preflighting.samplechecker.androidlabel</code> distributed in the App Validator SDK contains an example on how to implement a Condition that accepts a parameter.</p> | |
<p>The plugin <code>preflighting.samplecheckers.findviewbyid</code> 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.</p> | |
</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 <code>Checker</code>, <code>Condition</code>, <code>ApplicationData</code>, <code> CanExecuteConditionStatus</code>, <code>PlatformRules</code>, </code>ValidationResult</code> . | |
</documentation> | |
</annotation> | |
<annotation> | |
<appinfo> | |
<meta.section type="implementation"/> | |
</appinfo> | |
<documentation> | |
<p><code>Checker</code> is an utility class available in the App Validator SDK that implements <code>IChecker</code>. If checker does not contain any special parameter validation, developers may indicate com.motorolamobility.preflighting.core.checker in the extension point.</p> | |
<p><code>Condition</code> is an utility class available in the App Validator SDK that implements <code>ICondition</code>. Developers may use <code>Condition</code> as a base class to inherit the most common operations for code analysis.</p> | |
</documentation> | |
</annotation> | |
<annotation> | |
<appinfo> | |
<meta.section type="copyright"/> | |
</appinfo> | |
<documentation> | |
Copyright (C) 2012 The Android Open Source Project | |
</documentation> | |
</annotation> | |
</schema> |