Package com.microstrategy.web.objects
Interface WebProjectReferences
-
public interface WebProjectReferences
The WebProjectReferences interface represents the collection of project references registered with a server definition(WebServerDef
) object. This interface can be used to add, remove, view, and modify the collection of project references.- Since:
- MicroStrategy Web 7.5.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WebProjectReference
add(WebProjectInstance projectInst)
Adds the given project instance to the list of projects registered to the server definition.java.util.Enumeration
elements()
Returns a java.util.Enumeration object containing the items in the collection.WebProjectReference
get(int i)
Returns the item in the collection with the given index.boolean
isEmpty()
Returns whether the collection is empty.WebProjectReference
itemByID(java.lang.String id)
Returns theWebProjectReference
object in the collection with the given project ID.WebProjectReference
itemByName(java.lang.String name)
Returns the item in the collection with the given name, if one exists.void
remove(WebProjectReference projectRef)
Removes the givenWebProjectReference
object from the collection.int
size()
Returns the number of items in the collection.
-
-
-
Method Detail
-
size
int size()
Returns the number of items in the collection.- Returns:
- The size of the collection.
-
get
WebProjectReference get(int i) throws java.lang.IndexOutOfBoundsException
Returns the item in the collection with the given index.- Parameters:
i
- The 0-based index of the item in the collection to return.- Returns:
- The
WebProjectReference
object at the given index. - Throws:
java.lang.IndexOutOfBoundsException
- Thrown if the index does not exist in the collection.
-
isEmpty
boolean isEmpty()
Returns whether the collection is empty.- Returns:
- True if the collection is empty, false otherwise.
-
elements
java.util.Enumeration elements()
Returns a java.util.Enumeration object containing the items in the collection.- Returns:
- A java.util.Enumeration containing the items in the collection.
-
itemByName
WebProjectReference itemByName(java.lang.String name) throws java.lang.IllegalArgumentException
Returns the item in the collection with the given name, if one exists.- Parameters:
name
- The name of the project reference to return.- Returns:
- A
WebProjectReference
object with the given name. - Throws:
java.lang.IllegalArgumentException
- Thrown if the given name does not exist in the collection.
-
itemByID
WebProjectReference itemByID(java.lang.String id) throws java.lang.IllegalArgumentException
Returns theWebProjectReference
object in the collection with the given project ID.- Parameters:
id
- The ID of the project to search for in the collection.- Returns:
- The
WebProjectReference
object with the given ID. - Throws:
java.lang.IllegalArgumentException
- Thrown if no object exists in the collection with the given ID.
-
add
WebProjectReference add(WebProjectInstance projectInst)
Adds the given project instance to the list of projects registered to the server definition.- Parameters:
projectInst
- TheWebProjectInstance
object to add to the collection. This object should come from one of the methods on theWebProjectSource
interface.- Returns:
- The newly created
WebProjectReference
object.
-
remove
void remove(WebProjectReference projectRef)
Removes the givenWebProjectReference
object from the collection. When saving the object, this will cause the given project to no longer be registered with the server definition object.- Parameters:
projectRef
- TheWebProjectReference
object to remove from the collection.
-
-