%3 ::xo::db::CrClass ::xo::db::CrClass → delete → ensure_item_ids_instantiated → get_child_item_ids → get_instance_from_db → get_name → get_object_type → get_parent_id → id_belongs_to_package → lookup create_object_type delete drop_object_type edit_atts fetch_object folder_type folder_type_unregister_all getFormClass get_instance_from_db get_instances_from_db init insert_statement instance_select_query lock mk_insert_method mk_save_method new_persistent_object remember_long_text_slots type_selection_clause unknown ::xo::db::Class ::xo::db::Class → class_to_object_type → create_all_functions → delete → delete_all_acs_objects → drop_type → exists_in_db → get_class_from_db → get_instance_from_db → get_object_type → get_table_name → object_type_exists_in_db → object_type_to_class check_default_values check_table_atts collect_constraints create_object_type db_slots dbproc_nonposargs drop_object_type fetch_query get_context get_instances_from_db init init_type_hierarchy initialize_acs_object instance_select_query instantiate_objects mk_insert_method mk_update_method new_acs_object new_persistent_object object_types object_types_query require_constraints table_definition unknown ::xo::db::CrClass->::xo::db::Class ::xo::db::CrCache::Class ::xo::db::CrCache::Class ::xo::db::CrClass->::xo::db::CrCache::Class mixin ::xo::db::CrCache ::xo::db::CrCache ::xo::db::CrClass->::xo::db::CrCache instmixin ::xo::PackageMgr ::xo::PackageMgr → get_package_class_from_package_key configure_fresh_instance first_instance fix_site_wide_package_ids form_unify form_usages get_nls_language_from_lang get_site_wide_page import_prototype_page initialize instances lookup_side_wide_page prototype_page_file_name require require_site_wide_info require_site_wide_pages ::xo::PackageMgr->::xo::db::Class ::xotcl::Class ::xotcl::Class → __unknown __class_configureparameter ad_instforward ad_instproc allinstances extend_slot extend_slot_default instfilter instforward instinvar instmixin instparametercmd instproc method parameter slots superclass unknown uses ::xo::db::Class->::xotcl::Class ::xotcl::Object ::xotcl::Object ::xotcl::Class->::xotcl::Object

Class ::xo::PackageMgr

::xo::PackageMgr[i] create ... \
           [ -default_package_parameter_page_info (default "") ] \
           [ -default_package_parameters (default "") ] \
           [ -package_key package_key ] \
           [ -site_wide_package_parameter_page_info (default "") ] \
           [ -site_wide_package_parameters (default "") ] \
           [ -site_wide_pages (default "") ]

Defined in

Class Relations

  • class: ::xotcl::Class[i]
  • superclass: ::xo::db::Class[i]

Methods (to be applied on the object)

Methods (to be applied on instances)

  • configure_fresh_instance (scripted)

  • default_package_parameter_page_info (setter)

  • default_package_parameters (setter)

  • first_instance (scripted, public)

     <instance of xo::PackageMgr[i]> first_instance \
        [ -privilege privilege ] [ -party_id party_id ]

    Returns the first mounted instance of this Package. When a privilege and a party are specified, will return the first instance where the party has such privilege.

    Switches:
    -privilege (optional)
    -party_id (optional)
    the party we are checking the privilege for
    Returns:
    integer package_id, empty string when none is found

    Testcases:
    xowiki_test_cases, create_form_with_form_instance
  • fix_site_wide_package_ids (scripted)

  • form_unify (scripted)

  • form_usages (scripted)

  • get_nls_language_from_lang (scripted)

  • get_site_wide_page (scripted)

  • import_prototype_page (scripted, public)

     <instance of xo::PackageMgr[i]> import_prototype_page \
        [ -package_key package_key ] -name name  -parent_id parent_id  \
        -package_id package_id  [ -lang lang ] [ -add_revision on|off ]

    Import a named page from the prototypes folder of the package, i.e. under www/prototypes/*.page of the package.

    Switches:
    -package_key (optional)
    when provided, the package_key used to locate the page. When not provided, use the package_key of the class, on which this function is called.
    -name (required)
    name of the page to be loaded (not including the language prefix)
    -parent_id (required)
    place to where the page should be loaded
    -package_id (required)
    package instance to which the page should be loaded
    -lang (optional, defaults to "en")
    -add_revision (optional, boolean, defaults to "true")
    When the page to be loaded exists already, add a new revision. When the page exists already, and the flag is not set, no change happens.

    Testcases:
    xowiki_test_cases
  • initialize (scripted, public)

     <instance of xo::PackageMgr[i]> initialize [ -ad_doc ad_doc ] \
        [ -parameter parameter ] [ -package_id package_id ] [ -url url ] \
        [ -user_id user_id ] [ -actual_query actual_query ] \
        [ -original_url_and_query original_url_and_query ] \
        [ -init_url init_url ] [ -keep_cc keep_cc ] \
        [ -form_parameter form_parameter ] [ -export_vars export_vars ]

    Create the connection context ::xo::cc and a package object if these are none defined yet. The connection context ::xo::cc and the package object will be destroyed on cleanup, when the global variables are reclaimed. As a side effect this method sets in the calling context the query parameters and package_id as variables, using the "defaults" for default values. init_url false requires the package_id to be specified and a call to Package instproc set_url to complete initialization. keep_cc true means that the original connection context is preserved (i.e. not altered) in case it exists already.

    Switches:
    -ad_doc (optional)
    -parameter (optional)
    -package_id (optional, defaults to "0")
    -url (optional)
    -user_id (optional, defaults to "-1")
    -actual_query (optional, defaults to " ")
    -original_url_and_query (optional)
    -init_url (optional, defaults to "true")
    -keep_cc (optional, defaults to "false")
    -form_parameter (optional)
    -export_vars (optional, defaults to "true")

    Testcases:
    package_normalize_path, includelet_toc, includelet_childresources, xowiki_test_cases, link_tests, slot_interactions, path_resolve, create_form_with_form_instance
  • instances (scripted, public)

     <instance of xo::PackageMgr[i]> instances \
        [ -include_unmounted include_unmounted ] [ -closure closure ]
    Switches:
    -include_unmounted (optional, defaults to "false")
    include unmounted package instances
    -closure (optional, defaults to "false")
    include instances of subclasses of the package
    Returns:
    list of package_ids of xowiki instances

    Testcases:
    No testcase defined.
  • lookup_side_wide_page (scripted)

  • package_key (setter)

  • prototype_page_file_name (scripted)

  • require (scripted, public)

     <instance of xo::PackageMgr[i]> require [ -url url ] package_id

    Create package object if needed.

    Switches:
    -url (optional)
    Parameters:
    package_id (required)

    Testcases:
    create_folder_with_page, package_normalize_path, xowiki_test_cases, create_form_with_form_instance
  • require_site_wide_info (scripted)

  • require_site_wide_pages (scripted, public)

     <instance of xo::PackageMgr[i]> require_site_wide_pages \
        [ -refetch on|off ] [ -refetch_if_modified on|off ] \
        [ -pages pages ]

    Load site-wide pages from the prototype page directory. The pages are loaded into to site-wide instance. When a page to be loaded exists already, a new revision is added. If no pages are provided, use the list of pages as defined for the package.

    Switches:
    -refetch (optional, boolean, defaults to "false")
    force fresh loading of prototype pages
    -refetch_if_modified (optional, boolean, defaults to "false")
    refetch when modification date of file is new than the version in the content repository
    -pages (optional)
    list of pages (without languages prefix) or empty to refer to per-package definition.

    Testcases:
    xowiki_test_cases
  • site_wide_package_parameter_page_info (setter)

  • site_wide_package_parameters (setter)

  • site_wide_pages (setter)