Eclipse Platform
2.0

org.eclipse.update.core.model
Class SiteModel

java.lang.Object
  |
  +--org.eclipse.core.runtime.PlatformObject
        |
        +--org.eclipse.update.core.model.ModelObject
              |
              +--org.eclipse.update.core.model.SiteModel
All Implemented Interfaces:
IAdaptable
Direct Known Subclasses:
Site

public class SiteModel
extends ModelObject

Site model object.

This class may be instantiated or subclassed by clients. However, in most cases clients should instead instantiate or subclass the provided concrete implementation of this model.

Since:
2.0
See Also:
Site

Constructor Summary
SiteModel()
          Creates an uninitialized site model object.
 
Method Summary
 void addArchiveReferenceModel(ArchiveReferenceModel archiveReference)
          Adds an archive reference model to site.
 void addCategoryModel(CategoryModel category)
          Adds a category model to site.
 void addFeatureReferenceModel(FeatureReferenceModel featureReference)
          Adds a feature reference model to site.
 ArchiveReferenceModel[] getArchiveReferenceModels()
          Returns an array of plug-in and non-plug-in archive reference models on this site
 CategoryModel[] getCategoryModels()
          Returns an array of category models for this site.
 URLEntryModel getDescriptionModel()
          Returns the site description.
 FeatureReferenceModel[] getFeatureReferenceModels()
          Returns an array of feature reference models on this site.
 URL getLocationURL()
          Returns the resolved URL for the site.
 String getLocationURLString()
          Returns the unresolved URL string for the site.
 String getType()
          Returns the site type.
 void markReadOnly()
          Marks the model object as read-only.
 void removeArchiveReferenceModel(ArchiveReferenceModel archiveReference)
          Removes an archive reference model from site.
 void removeCategoryModel(CategoryModel category)
          Removes a category model from site.
 void removeFeatureReferenceModel(FeatureReferenceModel featureReference)
          Removes a feature reference model from site.
 void resolve(URL base, ResourceBundle bundle)
          Resolve the model object.
 void setArchiveReferenceModels(ArchiveReferenceModel[] archiveReferences)
          Sets the archive references for this site.
 void setCategoryModels(CategoryModel[] categories)
          Sets the site categories.
 void setDescriptionModel(URLEntryModel description)
          Sets the site description.
 void setFeatureReferenceModels(FeatureReferenceModel[] featureReferences)
          Sets the feature references for this site.
 void setLocationURLString(String locationURLString)
          Sets the unresolved URL for the site.
 void setType(String type)
          Sets the site type.
 
Methods inherited from class org.eclipse.update.core.model.ModelObject
arrayTypeFor, arrayTypeFor, assertIsWriteable, isReadOnly, markListReferenceReadOnly, markReferenceReadOnly, resolveListReference, resolveNLString, resolveReference, resolveURL
 
Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SiteModel

public SiteModel()
Creates an uninitialized site model object.

Since:
2.0
Method Detail

getType

public String getType()
Returns the site type.

Returns:
site type, or null.
Since:
2.0

getDescriptionModel

public URLEntryModel getDescriptionModel()
Returns the site description.

Returns:
site description, or null.
Since:
2.0

getFeatureReferenceModels

public FeatureReferenceModel[] getFeatureReferenceModels()
Returns an array of feature reference models on this site.

Returns:
an array of feature reference models, or an empty array.
Since:
2.0

getArchiveReferenceModels

public ArchiveReferenceModel[] getArchiveReferenceModels()
Returns an array of plug-in and non-plug-in archive reference models on this site

Returns:
an array of archive reference models, or an empty array if there are no archives known to this site.
Since:
2.0

getCategoryModels

public CategoryModel[] getCategoryModels()
Returns an array of category models for this site.

Returns:
array of site category models, or an empty array.
Since:
2.0

getLocationURLString

public String getLocationURLString()
Returns the unresolved URL string for the site.

Returns:
url string, or null
Since:
2.0

getLocationURL

public URL getLocationURL()
Returns the resolved URL for the site.

Returns:
url, or null
Since:
2.0

setType

public void setType(String type)
Sets the site type. Throws a runtime exception if this object is marked read-only.

Parameters:
type - site type
Since:
2.0

setDescriptionModel

public void setDescriptionModel(URLEntryModel description)
Sets the site description. Throws a runtime exception if this object is marked read-only.

Parameters:
description - site description
Since:
2.0

setFeatureReferenceModels

public void setFeatureReferenceModels(FeatureReferenceModel[] featureReferences)
Sets the feature references for this site. Throws a runtime exception if this object is marked read-only.

Parameters:
featureReferences - an array of feature reference models
Since:
2.0

setArchiveReferenceModels

public void setArchiveReferenceModels(ArchiveReferenceModel[] archiveReferences)
Sets the archive references for this site. Throws a runtime exception if this object is marked read-only.

Parameters:
archiveReferences - an array of archive reference models
Since:
2.0

setCategoryModels

public void setCategoryModels(CategoryModel[] categories)
Sets the site categories. Throws a runtime exception if this object is marked read-only.

Parameters:
categories - an array of category models
Since:
2.0

setLocationURLString

public void setLocationURLString(String locationURLString)
Sets the unresolved URL for the site. Throws a runtime exception if this object is marked read-only.

Parameters:
locationURLString - url for the site (as a string)
Since:
2.0

addFeatureReferenceModel

public void addFeatureReferenceModel(FeatureReferenceModel featureReference)
Adds a feature reference model to site. Throws a runtime exception if this object is marked read-only.

Parameters:
featureReference - feature reference model
Since:
2.0

addArchiveReferenceModel

public void addArchiveReferenceModel(ArchiveReferenceModel archiveReference)
Adds an archive reference model to site. Throws a runtime exception if this object is marked read-only.

Parameters:
archiveReference - archive reference model
Since:
2.0

addCategoryModel

public void addCategoryModel(CategoryModel category)
Adds a category model to site. Throws a runtime exception if this object is marked read-only.

Parameters:
category - category model
Since:
2.0

removeFeatureReferenceModel

public void removeFeatureReferenceModel(FeatureReferenceModel featureReference)
Removes a feature reference model from site. Throws a runtime exception if this object is marked read-only.

Parameters:
featureReference - feature reference model
Since:
2.0

removeArchiveReferenceModel

public void removeArchiveReferenceModel(ArchiveReferenceModel archiveReference)
Removes an archive reference model from site. Throws a runtime exception if this object is marked read-only.

Parameters:
archiveReference - archive reference model
Since:
2.0

removeCategoryModel

public void removeCategoryModel(CategoryModel category)
Removes a category model from site. Throws a runtime exception if this object is marked read-only.

Parameters:
category - category model
Since:
2.0

markReadOnly

public void markReadOnly()
Marks the model object as read-only.

Overrides:
markReadOnly in class ModelObject
Since:
2.0
See Also:
ModelObject.isReadOnly()

resolve

public void resolve(URL base,
                    ResourceBundle bundle)
             throws MalformedURLException
Resolve the model object. Any URL strings in the model are resolved relative to the base URL argument. Any translatable strings in the model that are specified as translation keys are localized using the supplied resource bundle.

Overrides:
resolve in class ModelObject
Parameters:
base - URL
bundle - resource bundle
Throws:
MalformedURLException
Since:
2.0

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.