Class Index | File Index

Classes


Class DefaultFurnitureCatalog


Extends FurnitureCatalog.

Defined in: DefaultFurnitureCatalog.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
DefaultFurnitureCatalog(preferences, furnitureCatalogUrls, furnitureResourcesUrlBase)
Creates a default furniture catalog read through resources referenced by preferences or from furnitureCatalogUrls if called with two parameters
Method Summary
Method Attributes Method Name and Description
 
getAdditionalContents(resource, index, furnitureCatalogUrl, furnitureResourcesUrlBase)
Returns the contents of the piece at the given index different from default properties.
 
getAdditionalProperties(resource, index)
Returns the properties of the piece at the given index different from default properties.
 
Returns the furniture libraries at initialization.
 
isDefaultProperty(keyPrefix)
Returns true if the given parameter is the prefix of a default property used as an attribute of a piece of furniture.
 
readFurnitureCategory(resource, index)
Returns the furniture category of a piece at the given index of a localized resource bundle.
 
readPieceOfFurniture(resource, index, furnitureCatalogUrl, furnitureResourcesUrlBase)
Returns the piece of furniture at the given index of a localized resource bundle.
Methods borrowed from class FurnitureCatalog:
add, addFurnitureListener, getCategories, getCategoriesCount, getCategory, getPieceOfFurnitureWithId, removeFurnitureListener
Class Detail
DefaultFurnitureCatalog(preferences, furnitureCatalogUrls, furnitureResourcesUrlBase)
Creates a default furniture catalog read through resources referenced by preferences or from furnitureCatalogUrls if called with two parameters
Author: Emmanuel Puybaret.
Parameters:
{UserPreferences} preferences Optional
{Array} furnitureCatalogUrls Optional
{String} furnitureResourcesUrlBase Optional
Method Detail
{Object} getAdditionalContents(resource, index, furnitureCatalogUrl, furnitureResourcesUrlBase)
Returns the contents of the piece at the given index different from default properties.
Parameters:
{Object[]} resource
{number} index
{string} furnitureCatalogUrl Optional
{string} furnitureResourcesUrlBase Optional
Returns:
{Object}

{Object} getAdditionalProperties(resource, index)
Returns the properties of the piece at the given index different from default properties.
Parameters:
{Object[]} resource
{number} index
Returns:
{Object}

{Object} getLibraries()
Returns the furniture libraries at initialization.
Returns:
{Object}

{boolean} isDefaultProperty(keyPrefix)
Returns true if the given parameter is the prefix of a default property used as an attribute of a piece of furniture.
Parameters:
{string} keyPrefix
Returns:
{boolean}

{FurnitureCategory} readFurnitureCategory(resource, index)
Returns the furniture category of a piece at the given index of a localized resource bundle.
Parameters:
{Object[]} resource
{number} index
Throws:
MissingResourceException if mandatory keys are not defined.
Returns:
{FurnitureCategory}

{CatalogPieceOfFurniture} readPieceOfFurniture(resource, index, furnitureCatalogUrl, furnitureResourcesUrlBase)
Returns the piece of furniture at the given index of a localized resource bundle.
Parameters:
{Object[]} resource
a resource bundle
{number} index
the index of the read piece
{string} furnitureCatalogUrl
the URL from which piece resources will be loaded or null if it's read from current classpath.
{string} furnitureResourcesUrlBase
the URL used as a base to build the URL to piece resources or null if it's read from current classpath or furnitureCatalogUrl
Throws:
MissingResourceException if mandatory keys are not defined.
Returns:
{CatalogPieceOfFurniture} the read piece of furniture or null if the piece at the given index doesn't exist.

© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Aug 21 2024 17:43:23 GMT+0200 (CEST)