JavaScript Application Development API for Oracle Visual Builder Cloud Service - Classic Applications

Source: viewmodel/js/api/ArchetypeType.js

/*global define*/

define(function() {
    'use strict';

    /**
     * Lists types of ABCS {@link viewmodel/js/api/Archetype archetypes}.
     *
     * Type defines archetype's behavior and the set of use-cases it solves.
     * For example {@link viewmodel/js/api/ArchetypeType.COLLECTION ArchetypeType.COLLECTION}
     * is the type of an archetype used to work with collections, querying data or
     * removing arbitrary records while {@link viewmodel/js/api/ArchetypeType.ENTITY_DETAIL ArchetypeType.ENTITY_DETAIL}
     * defines archetype used to solve use-cases related to a single-record form.
     *
     * To get an archetype's type use {@link viewmodel/js/api/Archetype#getType Archetype.getType}.
     *
     * @AbcsAPI stable
     * @exports viewmodel/js/api/ArchetypeType
     * @constructor
     * @private
     * @version 16.3.5
     * @example <caption>Find all archetypes on a page working with collections</caption>
     * var archetypes = pageViewModel.Archetypes;
     * for (var archetype in archetypes) {
     *     if (archetype.getType() === ArchetypeType.COLLECTION) {
     *         console.log('Found page collection archetype: ' + archetype.getId());
     *     }
     * }
     */
    var ArchetypeType = function() {
        AbcsLib.throwStaticClassError();
    };

    /**
     * Represents viewmodel support ({@link viewmodel/js/api/Archetype Archetype})
     * for both new record creation and existing record modification, in other
     * words for a form related use-cases.
     *
     * @AbcsAPI stable
     * @version 16.3.5
     * @static
     * @constant
     * @type {String}
     * @see {@link viewmodel/js/api/DetailArchetype DetailArchetype} as existing
     * archetype of this type.
     */
    ArchetypeType.ENTITY_DETAIL = 'ENTITY_DETAIL';

    /**
     * Represents viewmodel support for building query conditions and passing it
     * to another pages and archetypes.
     *
     * @static
     * @constant
     * @type {String}
     */
    ArchetypeType.QUERY_DATA = 'QUERY_DATA';

    /**
     * Represents viewmodel support ({@link viewmodel/js/api/Archetype Archetype})
     * for use cases related to display of and work with collection of records.
     *
     * @AbcsAPI stable
     * @version 16.3.5
     * @static
     * @constant
     * @type {String}
     * @see {@link viewmodel/js/api/CollectionArchetype CollectionArchetype} as existing
     * archetype of this type.
     */
    ArchetypeType.COLLECTION = 'LIST';

    /**
     * Represents viewmodel support for use cases related to display and work with
     * collection of records.
     *
     * @static
     * @constant
     * @type {String}
     * @deprecated Deprecated naming, use {@link viewmodel/js/api/ArchetypeType.COLLECTION ArchetypeType.COLLECTION}.
     */
    ArchetypeType.LIST = ArchetypeType.COLLECTION;

    return ArchetypeType;

});