CMCatalog
public interface CatalogLibrary extends CMLibrary
Modifier and Type | Interface | Description |
---|---|---|
static interface |
CatalogLibrary.CataData |
CataData is the metadata about each entry in the
catalog.
|
static class |
CatalogLibrary.CatalogKind |
An enumeration for the two general catalog object kinds.
|
static class |
CatalogLibrary.CataSpawn |
The spawn conditions for mobs or items.
|
static interface |
CatalogLibrary.RoomContent |
An interface for getting a manipulable list of the content
of a room.
|
idConverter
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
addCataDataFromXML(java.lang.String xmlBuffer,
java.util.List<CatalogLibrary.CataData> addHere,
java.util.List<? extends Physical> nameMatchers,
Session S) |
Populate a given CataData list with data objects contained in the given
xml document.
|
void |
addCatalog(Physical PA) |
Creates a new catalog item or mob from the given item or mob
in no category.
|
void |
addCatalog(java.lang.String category,
Physical PA) |
Creates a new catalog item or mob from the given item or mob
in the given category.
|
boolean |
addNewBuilderTemplateObject(java.lang.String playerName,
java.lang.String ID,
Environmental E) |
This is for the non-catalog Builder Templates system.
|
void |
bumpDeathPickup(Physical P) |
When a cataloged mob dies, or a cataloged item is picked up,
this method is called to bump the metadata stats on the object.
|
void |
changeCatalogUsage(Physical P,
boolean add) |
Adds or clears the catalog flag on the item or mob instance given
to this method, and adds (or removes) it as an instance from the
catadata for its prototype.
|
java.lang.StringBuffer |
checkCatalogIntegrity(Physical P) |
Given an item or mob that might be in the catalog, this method
confirms that fact.
|
void |
delCatalog(Physical P) |
Completely removes the given item or mob from the catalog, deleting
it from the database, and unsetting the cataloged flag from every
instance in the world, though it does not save the items..
|
boolean |
deleteBuilderTemplateObject(java.lang.String playerName,
java.lang.String ID) |
This is for the non-catalog Builder Templates system.
|
java.util.List<Triad<java.lang.String,java.lang.String,java.lang.String>> |
getBuilderTemplateList(java.lang.String playerName) |
This is for the non-catalog Builder Templates system.
|
Environmental |
getBuilderTemplateObject(java.lang.String playerName,
java.lang.String ID) |
This is for the non-catalog Builder Templates system.
|
CatalogLibrary.CataData |
getCatalogData(Physical P) |
Returns the cataloged metadata for the mob or item of the same type
and with the same name as the given object.
|
Item |
getCatalogItem(java.lang.String name) |
Returns the cataloged prototype item of the given name.
|
CatalogLibrary.CataData |
getCatalogItemData(java.lang.String name) |
Returns the cataloged metadata for the item of the given name
|
java.lang.String[] |
getCatalogItemNames() |
Creates a list of all the item keys (names) of all the items
in the catalog, regardless of category.
|
java.lang.String[] |
getCatalogItemNames(java.lang.String category) |
Creates a list of all the item keys (names) of all the items
in the catalog in the given category.
|
Item[] |
getCatalogItems() |
Creates a list of all the prototype catalog items.
|
MOB |
getCatalogMob(java.lang.String name) |
Returns the cataloged prototype mob of the given name.
|
CatalogLibrary.CataData |
getCatalogMobData(java.lang.String name) |
Returns the cataloged metadata for the mob of the given name
|
java.lang.String[] |
getCatalogMobNames() |
Creates a list of all the mob keys (names) of all the mobs
in the catalog, regardless of category.
|
java.lang.String[] |
getCatalogMobNames(java.lang.String category) |
Creates a list of all the mob keys (names) of all the mobs
in the catalog in the given category.
|
MOB[] |
getCatalogMobs() |
Creates a list of all the prototype catalog mobs.
|
Physical |
getCatalogObj(Physical P) |
Returns the cataloged prototype mob or item of the same type
and with the same name as the given object.
|
CMFile.CMVFSDir |
getCatalogRoot(CMFile.CMVFSDir resourcesRoot) |
In order to make the catalog appear in the vfs directory paths,
this method is called to get the root directory of the catalog,
which automatically turns all the catalog entries into
directories and files.
|
Item |
getDropItem(MOB M,
boolean live) |
The catalog has the ability to provide random items from the catalog
as either random equipment on a live mob, or a random drop from a
dead one.
|
java.lang.String[] |
getItemCatalogCatagories() |
Creates a list of all the categories that items have been
placed in.
|
java.lang.String[] |
getMobCatalogCatagories() |
Creates a list of all the categories that mobs have been
placed in.
|
boolean |
isCatalogObj(Environmental E) |
Returns whether there exists an item/mob in the catalog
of the same type and name/key as the given item or
mob.
|
boolean |
isCatalogObj(java.lang.String name) |
Returns whether there exists an item or mob in the catalog
of the given name/key.
|
java.lang.String |
makeValidNewBuilderTemplateID(java.lang.String ID) |
This is for the non-catalog Builder Templates system.
|
void |
newInstance(Physical P) |
Registers the given cataloged item or mob as being an instance,
for metadata collection purposes only.
|
java.util.List<CatalogLibrary.RoomContent> |
roomContent(Room R) |
Returns the coded contents of a room, as it presently exists.
|
CatalogLibrary.CataData |
sampleCataData(java.lang.String xml) |
Builds catalog metadata, optionally building it from an xml
doc of saved metadata.
|
void |
setCategory(Physical P,
java.lang.String category) |
Changes the category of the catalog item with the given
physical objects name to the given category.
|
void |
submitToCatalog(Physical P) |
If the given item or mob is not yet in the catalog prototype
library, this method will mark it as uncataloged (as is
correct for a prototype), and add it to the items or mobs
list, depending on which is appropriate.
|
boolean |
toggleBuilderTemplateObject(java.lang.String playerName,
java.lang.String ID) |
This is for the non-catalog Builder Templates system.
|
void |
updateCatalog(Physical modelP) |
When the properties of a cataloged item or mob change, this method
is called to propagate those changes into the catalog prototype,
and then to all the known instances of the cataloged item.
|
void |
updateCatalogCategory(Physical modelP,
java.lang.String newCat) |
Updates the category assigned to the given prototype mob or
item to the given category.
|
void |
updateCatalogIntegrity(Physical P) |
Confirms this mob or item instance against the catalog prototype.
|
void |
updateRoomContent(java.lang.String roomID,
java.util.List<CatalogLibrary.RoomContent> content) |
Updates the database entries of the given room id and the
adjusted content objects.
|
activate, getServiceClient, L, propertiesLoaded, shutdown
copyOf, ID, initializeClass, name, newInstance
java.lang.String[] getCatalogItemNames()
getCatalogItemNames(String)
java.lang.String[] getCatalogItemNames(java.lang.String category)
category
- the item category to filter bygetCatalogItemNames()
java.lang.String[] getCatalogMobNames()
getCatalogItemNames()
,
getCatalogMobNames(String)
java.lang.String[] getCatalogMobNames(java.lang.String category)
category
- the mob category to filter bygetCatalogMobNames()
java.lang.String[] getMobCatalogCatagories()
getItemCatalogCatagories()
java.lang.String[] getItemCatalogCatagories()
getMobCatalogCatagories()
Item[] getCatalogItems()
getCatalogMobs()
MOB[] getCatalogMobs()
getCatalogItems()
boolean isCatalogObj(Environmental E)
E
- the item or mobisCatalogObj(String)
boolean isCatalogObj(java.lang.String name)
name
- the item or mob nameisCatalogObj(Environmental)
Item getCatalogItem(java.lang.String name)
name
- the name to look for.getCatalogItem(String)
,
getCatalogObj(Physical)
MOB getCatalogMob(java.lang.String name)
name
- the name to look for.getCatalogMob(String)
,
getCatalogObj(Physical)
Physical getCatalogObj(Physical P)
P
- the object type and name to look forgetCatalogMob(String)
,
getCatalogItem(String)
CatalogLibrary.CataData getCatalogItemData(java.lang.String name)
name
- the name of the cataloged item.CatalogLibrary.CataData
,
getCatalogMobData(String)
,
getCatalogData(Physical)
CatalogLibrary.CataData getCatalogMobData(java.lang.String name)
name
- the name of the cataloged mob.CatalogLibrary.CataData
,
getCatalogItemData(String)
,
getCatalogData(Physical)
CatalogLibrary.CataData getCatalogData(Physical P)
P
- the object type and name to look forCatalogLibrary.CataData
,
getCatalogItemData(String)
,
getCatalogMobData(String)
void addCatalog(java.lang.String category, Physical PA)
category
- the new category, such as nullPA
- the item or mob to create in the catalogaddCatalog(Physical)
,
delCatalog(Physical)
,
submitToCatalog(Physical)
void addCatalog(Physical PA)
PA
- the item or mob to create in the catalogaddCatalog(String, Physical)
,
delCatalog(Physical)
,
submitToCatalog(Physical)
,
updateCatalog(Physical)
void submitToCatalog(Physical P)
P
- the item or mob to add to the catalogaddCatalog(Physical)
,
delCatalog(Physical)
,
addCatalog(String, Physical)
void updateCatalogCategory(Physical modelP, java.lang.String newCat)
modelP
- the prototype mob or itemnewCat
- the category to change it into, or nullsetCategory(Physical, String)
void setCategory(Physical P, java.lang.String category)
P
- the catalog item to get a key/name fromcategory
- the new category, such as nullupdateCatalogCategory(Physical, String)
void delCatalog(Physical P)
P
- the item or mob whose name and prototype are removedaddCatalog(Physical)
,
updateCatalog(Physical)
void updateCatalog(Physical modelP)
modelP
- the updated changed item or mobjava.lang.StringBuffer checkCatalogIntegrity(Physical P)
P
- the item or mob to checkvoid updateCatalogIntegrity(Physical P)
P
- the item or mob to confirm against the catalog prototypevoid changeCatalogUsage(Physical P, boolean add)
P
- the item or mob to alteradd
- true to flag it as cataloged, false to clear its flag.Item getDropItem(MOB M, boolean live)
M
- the mob to equiplive
- true if its for a live mob, false if its for a corpseCatalogLibrary.CataData sampleCataData(java.lang.String xml)
xml
- an optional xml doc of metadata dataCatalogLibrary.CataData
java.util.List<CatalogLibrary.RoomContent> roomContent(Room R)
R
- the room to retrieve content fromupdateRoomContent(String, List)
,
CatalogLibrary.RoomContent
void updateRoomContent(java.lang.String roomID, java.util.List<CatalogLibrary.RoomContent> content)
roomID
- the roomID of the room being updatedcontent
- the adjusted content of the roomroomContent(Room)
,
CatalogLibrary.RoomContent
void newInstance(Physical P)
P
- the item or mob to register as being in the worldvoid bumpDeathPickup(Physical P)
P
- the item or mob to bump the stats onCMFile.CMVFSDir getCatalogRoot(CMFile.CMVFSDir resourcesRoot)
resourcesRoot
- the vfs dir of the resources directoryjava.util.List<Triad<java.lang.String,java.lang.String,java.lang.String>> getBuilderTemplateList(java.lang.String playerName)
playerName
- the owner of the templatesaddNewBuilderTemplateObject(String, String, Environmental)
,
deleteBuilderTemplateObject(String, String)
,
toggleBuilderTemplateObject(String, String)
,
makeValidNewBuilderTemplateID(String)
,
getBuilderTemplateObject(String, String)
,
getBuilderTemplateList(String)
java.lang.String makeValidNewBuilderTemplateID(java.lang.String ID)
ID
- the possible new template object idaddNewBuilderTemplateObject(String, String, Environmental)
,
deleteBuilderTemplateObject(String, String)
,
toggleBuilderTemplateObject(String, String)
,
makeValidNewBuilderTemplateID(String)
,
getBuilderTemplateObject(String, String)
,
getBuilderTemplateList(String)
boolean addNewBuilderTemplateObject(java.lang.String playerName, java.lang.String ID, Environmental E)
playerName
- the player to whom the template belongsID
- the friendly short validated id codeE
- the mob, item, room, or exit object to addaddNewBuilderTemplateObject(String, String, Environmental)
,
deleteBuilderTemplateObject(String, String)
,
toggleBuilderTemplateObject(String, String)
,
makeValidNewBuilderTemplateID(String)
,
getBuilderTemplateObject(String, String)
,
getBuilderTemplateList(String)
Environmental getBuilderTemplateObject(java.lang.String playerName, java.lang.String ID)
playerName
- the player to whom the template belongsID
- the id code of the itemaddNewBuilderTemplateObject(String, String, Environmental)
,
deleteBuilderTemplateObject(String, String)
,
toggleBuilderTemplateObject(String, String)
,
makeValidNewBuilderTemplateID(String)
,
getBuilderTemplateObject(String, String)
,
getBuilderTemplateList(String)
boolean deleteBuilderTemplateObject(java.lang.String playerName, java.lang.String ID)
playerName
- the player who owns the templateID
- the id code of the templateaddNewBuilderTemplateObject(String, String, Environmental)
,
deleteBuilderTemplateObject(String, String)
,
toggleBuilderTemplateObject(String, String)
,
makeValidNewBuilderTemplateID(String)
,
getBuilderTemplateObject(String, String)
,
getBuilderTemplateList(String)
boolean toggleBuilderTemplateObject(java.lang.String playerName, java.lang.String ID)
playerName
- the owner of the templateID
- the templates idaddNewBuilderTemplateObject(String, String, Environmental)
,
deleteBuilderTemplateObject(String, String)
,
toggleBuilderTemplateObject(String, String)
,
makeValidNewBuilderTemplateID(String)
,
getBuilderTemplateObject(String, String)
,
getBuilderTemplateList(String)
java.lang.String addCataDataFromXML(java.lang.String xmlBuffer, java.util.List<CatalogLibrary.CataData> addHere, java.util.List<? extends Physical> nameMatchers, Session S)
xmlBuffer
- the catalog data xml documentaddHere
- the list to add catalog data objects tonameMatchers
- null, or list of objects to match the names ofS
- optional session for progress, prompts, etc