External Library

Identifier:
org.eclipse.mtj.core.externallibrary

Since:
1.0

Description:
Define the concept of an external library that can be included in a MIDlet project. A MIDlet Suite Project will be able to select the different libraries that it wants to use and those libraries will be automatically depployed in the final application bundle.

Configuration Markup:

<!ELEMENT extension (library+)+>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED

>


<!ELEMENT library (ClasspathEntry+ , License , Security?)>

<!ATTLIST library

name        CDATA #REQUIRED

version     CDATA #REQUIRED

description CDATA #IMPLIED

visibility  (PUBLIC|INTERNAL)

>


<!ELEMENT ClasspathEntry (AccessRule)*>

<!ATTLIST ClasspathEntry

jarFile     CDATA #REQUIRED

javadocPath CDATA #IMPLIED

srcPath     CDATA #IMPLIED

>


<!ELEMENT AccessRule EMPTY>

<!ATTLIST AccessRule

kind    (ACCESSIBLE|NON_ACCESSIBLE|DISCOURAGED)

pattern CDATA #REQUIRED

>

Describes an access rule to source and class files on a classpath entry. An access rule is composed of a file pattern and a kind (accessible, non accessible, or discouraged).

See org.eclipse.jdt.core.IAccessRule for more information about access rules.



<!ELEMENT License EMPTY>

<!ATTLIST License

name CDATA #REQUIRED

url  CDATA #REQUIRED

>

Licensing information



<!ELEMENT Security EMPTY>

<!ATTLIST Security

ProtectionDomain (MANUFACTURER|OPERATOR|THIRD_PARTY|UNTRUSTED)

Premissions      CDATA #IMPLIED

>


Examples:
Example of a declaration of a externallibrary named "Sample library":

<extension
     point="org.eclipse.mtj.core.externallibrary">
  <library
        description="This sample library has no actual use and was created to demonstrate the use of org.eclipse.mtj.core.library.externallibrary Extension Point available in org.eclipse.mtj.core.library Plug-in."
        name="Sample library"
        version="1.0.0"
        visibility="PUBLIC">
     <ClasspathEntry
           jarFile="lib/SampleLibrary.jar"
           javadocPath="doc/api/"
           srcPath="lib_src/">
        <AccessRule
              kind="NON_ACCESSIBLE"
              pattern="org/eclipse/mtj/example/library/internal/NonAccessibleLibraryClass">
        </AccessRule>
        <AccessRule
              kind="DISCOURAGED"
              pattern="org/eclipse/mtj/example/library/DiscouragedAccessLibraryClass">
        </AccessRule>
        <AccessRule
              kind="ACCESSIBLE"
              pattern="org/eclipse/mtj/example/library/AccessibleLibraryClass">
        </AccessRule>
     </ClasspathEntry>
     <License
           name="Eclipse Public License - v 1.0"
           url="http://www.eclipse.org/legal/epl-v10.html">
     </License>
     <Security
           Premissions="org.eclipse.mtj.example.library.permission.read,org.eclipse.mtj.example.library.permission.write"
           ProtectionDomain="UNTRUSTED">
     </Security>
  </library>
</extension>

Supplied Implementation:
The MTJ itself does not have any public predefined externallibrary.


Copyright (c) 2008, 2009 Motorola.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html