Difference between revisions of "Global Class: DEPRECATED"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 1: Line 1:
[[ISV]]s and [[MSP]]s can create custom pages at global level for use by [[Tenants]]. This feature gives [[Service Provider]]s the ability to design and build classes once, then make the custom work available to multiple tenants.
[[ISV]]s can create custom pages at global level for use by [[Tenants]]. This feature gives [[Service Provider]]s the ability to design and build classes once, then make the custom work available to multiple tenants.


:{| style="margin-left: border-collapse: collapse; background: #FBFBFB; border: 1px solid #aaa; border-left: 10px solid #0066b0;"
:{| style="margin-left: border-collapse: collapse; background: #FBFBFB; border: 1px solid #aaa; border-left: 10px solid #0066b0;"
Line 13: Line 13:
;Considerations:
;Considerations:
*Usage is hierarchical, meaning that:
*Usage is hierarchical, meaning that:
:*ISVs can create Global Classes, which can be used by MSPs and Tenants ''of that ISV''
:*ISVs can create Global Classes, which can be used by Tenants  
:*MSPs can create Global Classes, which can be used by Tenants ''of that MSP''
*Java Packages:
*Java Packages:
:*The Package name of all classes starts with: <tt>com.platform.{namespace};</tt>  
:*The Package name of all classes starts with: <tt>com.platform.{namespace};</tt>  
Line 20: Line 19:
:*The namespace (along with the rest of the package path) must be specified to access the global class.
:*The namespace (along with the rest of the package path) must be specified to access the global class.
*Runtime considerations:
*Runtime considerations:
:*At run time, parent class loader loads the global class, parent class loader can be an MSP class loader or an ISV class loader
:*At run time, ISV class loader loads the global class
:*If the Parent class loader is MSP and the class not present in class loader, it checks its parent class loader (ISV class loader)

Revision as of 00:27, 29 June 2013

ISVs can create custom pages at global level for use by Tenants. This feature gives Service Providers the ability to design and build classes once, then make the custom work available to multiple tenants.

Lock-tiny.gif

Users who are logged into a Service Provider tenancy can create custom pages. 

To create a Global Class: Prerequisite Before you create a class, you need to decide what package to put it in. Here are a few notes to help you make that decision:

  • Packages let you organize classes into different directories according to their functionality, their usability, or any other category that makes sense. (The only rule is that classes in one package have a qualitatively different kind of functionality compared with those in another package.)
  • Packages help to avoid class name collision. (The same class name can be used in different packages.)
  • Classes in the same package can access each others package-protected fields and methods, as well as their public members, without doing an import. So classes that cooperate with each other extensively generally belong in the same package.
  • Classes that are part of a different package can be accessed with an import declaration.

To add a class:

  1. Click GearIcon.png > Customization > Developer Resources > Classes
  2. Click [New Class]
  3. Fill in the class properties.
  4. Click [Next]
    A class template appears.
  5. Provide the code for the class.
  6. Click [Save]

Class properties

Package
The package name
  • The platform supplies this part: com.platform.{namespace},
    where {namespace} is defined in the Developer Configuration settings of the current tenancy.
  • You supply this part: {packagename}
The result is the fully-qualified package path for the class: com.platform.{namespace}.{packagename}
Class Name
The name of the class. Must consist of alphanumeric characters (a-z,A-Z,0-9) or underscores (_). Must start with an alphabetic character (a-z,A-Z) or underscore (_).
Java code
Enter Java code in the text area.
Considerations
  • Usage is hierarchical, meaning that:
  • ISVs can create Global Classes, which can be used by Tenants
  • Java Packages:
  • The Package name of all classes starts with: com.platform.{namespace};
  • The {namespace} is defined by the ISV as part of the Developer Configuration settings
  • The namespace (along with the rest of the package path) must be specified to access the global class.
  • Runtime considerations:
  • At run time, ISV class loader loads the global class