Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Mobile Java Development Tools
Previous Page Home Next Page

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)

>

  • name - The library name
  • version - Version identifier for the library.

    Version identifiers have four components.

    1. Major version. A non-negative integer.
    2. Minor version. A non-negative integer.
    3. Micro version. A non-negative integer.
    4. Qualifier.

    Here is the grammar for version strings.

    
      version ::= major('.'minor('.'micro('.'qualifier)?)?)?
       major ::= digit+
       minor ::= digit+
       micro ::= digit+
       qualifier ::= (alpha|digit|'_'|'-')+
       digit ::= [0..9]
       alpha ::= [a..zA..Z]
    
    
    There must be no whitespace in version.

    For more information see org.osgi.framework.Version

  • description - The description for the library.
  • visibility -

<!ELEMENT ClasspathEntry ( AccessRule)*>

<!ATTLIST ClasspathEntry

jarFile     CDATA #REQUIRED

javadocPath CDATA #IMPLIED

srcPath     CDATA #IMPLIED

>

  • jarFile - The absolute path of the binary archive.
  • javadocPath - The javadoc location.
  • srcPath - Path to the source archive or folder associated with this classpath entry

<!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.


  • kind - An access rule kind (accessible, non accessible, or discouraged).
    ACCESSIBLE: indicates that files matching the rule's pattern are accessible.
    NON_ACCESSIBLE: indicates that files matching the rule's pattern are non accessible.
    DISCOURAGED: indicates that access to the files matching the rule's pattern is discouraged.
  • pattern - An access rule file pattern.

    Files patterns look like relative file paths with wildcards and are interpreted relative to each entry's path. File patterns are case-sensitive and they can contain '**', '*' or '?' wildcards (see org.eclipse.jdt.core.IClasspathEntry#getExclusionPatterns() for the full description of their syntax and semantics). Note that file patterns must not include the file extension. com/xyz/tests/MyClass is a valid file pattern, whereas com/xyz/tests/MyClass.class is not valid.

    For example, if one of the entry path is /Project/someLib.jar, there are no accessible rules, and there is one non accessible rule whith pattern com/xyz/tests/**, then class files like /Project/someLib.jar/com/xyz/Foo.class and /Project/someLib.jar/com/xyz/utils/Bar.class would be accessible, whereas /Project/someLib.jar/com/xyz/tests/T1.class and /Project/someLib.jar/com/xyz/tests/quick/T2.class would not be accessible.


<!ELEMENT License EMPTY>

<!ATTLIST License

name CDATA #REQUIRED

url  CDATA #REQUIRED

>

Licensing information


  • name - The license name
  • url - An valid URL to the license especification.

<!ELEMENT Security EMPTY>

<!ATTLIST Security

ProtectionDomain (MANUFACTURER|OPERATOR|THIRD_PARTY|UNTRUSTED)

Premissions      CDATA #IMPLIED

>

  • ProtectionDomain - A protection domain is a way to differentiate between downloaded MIDlet suites based on the entity that signed the MIDlet suite, and to grant or make available to a MIDlet suite a set of permissions. A domain binds a Protection Domain Root Certificate to a set of permissions.
    • MANUFACTURER: The trusted manufacturer Protection Domain Root Certificate is used to verify manufacturer MIDlet suites.
    • OPERATOR: A trusted operator Protection Domain Root Certificate is used to verify operator MIDlet suites.
    • THIRD_PARTY:A trusted third party Protection Domain Root Certificate is used to verify third party MIDlet suites.
    • UNTRUSTED: MIDlets suites that are unsigned will belong to the Untrusted domain.
  • Premissions - A comma separated list with named permissions defined by an API or function to prevent it from being used without authorization

    permission1,permission2,...,permissionN


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=
"https://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 https://www.eclipse.org/legal/epl-v10.html


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire