|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.core.runtime.PlatformObject
org.eclipse.equinox.p2.repository.spi.AbstractRepository<T>
T - the type of object that can be queried for in this repositorypublic abstract class AbstractRepository<T>
AbstractRepository defines common properties that may be provided by various kinds of repositories.
Clients may extend this class.
| Field Summary |
|---|
| Fields inherited from interface org.eclipse.equinox.p2.repository.IRepository |
|---|
ENABLED, NONE, PREFERENCE_NODE, PROP_COMPRESSED, PROP_DESCRIPTION, PROP_MIRRORS_BASE_URL, PROP_MIRRORS_URL, PROP_NAME, PROP_NICKNAME, PROP_PASSWORD, PROP_SYSTEM, PROP_TIMESTAMP, PROP_USERNAME, TYPE_ARTIFACT, TYPE_METADATA |
| Constructor Summary | |
|---|---|
protected |
AbstractRepository(IProvisioningAgent agent,
java.lang.String name,
java.lang.String type,
java.lang.String version,
java.net.URI location,
java.lang.String description,
java.lang.String provider,
java.util.Map<java.lang.String,java.lang.String> properties)
Creates a new repository with the given attributes. |
| Method Summary | |
|---|---|
protected void |
assertModifiable()
Asserts that this repository is modifiable, throwing a runtime exception if it is not. |
java.lang.String |
getDescription()
Returns a brief description of the repository. |
java.net.URI |
getLocation()
Returns the location of this repository. |
java.lang.String |
getName()
Returns the name of the repository. |
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Returns a read-only collection of the properties of the repository. |
java.lang.String |
getProperty(java.lang.String key)
Returns the repository property with the given key, or null
if no such property is defined |
java.lang.String |
getProvider()
Returns the name of the provider of the repository. |
IProvisioningAgent |
getProvisioningAgent()
Returns the provisioning agent used by this repository |
java.lang.String |
getType()
Returns a string representing the type of the repository. |
java.lang.String |
getVersion()
Returns a string representing the version for the repository type. |
boolean |
isModifiable()
Returns true if this repository can be modified, and
false otherwise. |
void |
setDescription(java.lang.String description)
Sets the description of this repository |
protected void |
setLocation(java.net.URI location)
Sets the location of this repository |
void |
setName(java.lang.String value)
Sets the name of this repository |
protected void |
setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Sets the properties of this repository |
java.lang.String |
setProperty(java.lang.String key,
java.lang.String value)
Sets the value of the property with the given key. |
void |
setProvider(java.lang.String provider)
Sets the provider of this repository |
protected void |
setType(java.lang.String type)
Sets the type of this repository |
protected void |
setVersion(java.lang.String version)
Sets the version of this repository |
| 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 |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
|---|
getAdapter |
| Methods inherited from interface org.eclipse.equinox.p2.query.IQueryable |
|---|
query |
| Constructor Detail |
|---|
protected AbstractRepository(IProvisioningAgent agent,
java.lang.String name,
java.lang.String type,
java.lang.String version,
java.net.URI location,
java.lang.String description,
java.lang.String provider,
java.util.Map<java.lang.String,java.lang.String> properties)
agent - the provisioning agent to be used by this repositoryname - the repository nametype - the repository typeversion - the repository versionlocation - the repository locationdescription - the repository descriptionprovider - the repository providerproperties - the repository properties| Method Detail |
|---|
protected void assertModifiable()
public java.lang.String getDescription()
getDescription in interface IRepository<T>public java.net.URI getLocation()
getLocation in interface IRepository<T>public java.lang.String getName()
getName in interface IRepository<T>public java.util.Map<java.lang.String,java.lang.String> getProperties()
getProperties in interface IRepository<T>public java.lang.String getProperty(java.lang.String key)
null
if no such property is defined
getProperty in interface IRepository<T>key - the property key
nullpublic java.lang.String getProvider()
getProvider in interface IRepository<T>public IProvisioningAgent getProvisioningAgent()
getProvisioningAgent in interface IRepository<T>public java.lang.String getType()
getType in interface IRepository<T>public java.lang.String getVersion()
getVersion in interface IRepository<T>public boolean isModifiable()
true if this repository can be modified, and
false otherwise. Attempts to change the contents of
an unmodifiable repository will fail.
isModifiable in interface IRepository<T>public void setDescription(java.lang.String description)
description - the repository descriptionpublic void setName(java.lang.String value)
value - the repository name
public java.lang.String setProperty(java.lang.String key,
java.lang.String value)
null will
remove the corresponding key from the properties of this repository.
setProperty in interface IRepository<T>key - The property keyvalue - The new property value, or null to remove the key
null if there was no old valuepublic void setProvider(java.lang.String provider)
provider - the repository providerprotected void setType(java.lang.String type)
type - the repository typeprotected void setLocation(java.net.URI location)
location - the repository locationprotected void setVersion(java.lang.String version)
version - the repository versionprotected void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
properties - the repository provider
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.