T - the type of object that can be queried for in this repositorypublic abstract class AbstractRepository<T> extends PlatformObject implements IRepository<T>
Clients may extend this class.
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| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRepository(IProvisioningAgent agent,
String name,
String type,
String version,
URI location,
String description,
String provider,
Map<String,String> properties)
Creates a new repository with the given attributes.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertModifiable()
Asserts that this repository is modifiable, throwing a runtime exception if
it is not.
|
String |
getDescription()
Returns a brief description of the repository.
|
URI |
getLocation()
Returns the location of this repository.
|
String |
getName()
Returns the name of the repository.
|
Map<String,String> |
getProperties()
Returns a read-only collection of the properties of the repository.
|
String |
getProperty(String key)
Returns the repository property with the given key, or
null
if no such property is defined |
String |
getProvider()
Returns the name of the provider of the repository.
|
IProvisioningAgent |
getProvisioningAgent()
Returns the provisioning agent used by this repository
|
String |
getType()
Returns a string representing the type of the repository.
|
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(String description)
Sets the description of this repository
|
protected void |
setLocation(URI location)
Sets the location of this repository
|
void |
setName(String value)
Sets the name of this repository
|
protected void |
setProperties(Map<String,String> properties)
Sets the properties of this repository
|
String |
setProperty(String key,
String value)
Sets the value of the property with the given key.
|
String |
setProperty(String key,
String value,
IProgressMonitor monitor)
Sets the value of the property with the given key.
|
void |
setProvider(String provider)
Sets the provider of this repository
|
protected void |
setType(String type)
Sets the type of this repository
|
protected void |
setVersion(String version)
Sets the version of this repository
|
getAdapterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAdapterqueryprotected AbstractRepository(IProvisioningAgent agent, String name, String type, String version, URI location, String description, String provider, Map<String,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 propertiesprotected void assertModifiable()
public String getDescription()
getDescription in interface IRepository<T>public URI getLocation()
getLocation in interface IRepository<T>public String getName()
getName in interface IRepository<T>public Map<String,String> getProperties()
getProperties in interface IRepository<T>public String getProperty(String key)
null
if no such property is definedgetProperty in interface IRepository<T>key - the property keynullpublic String getProvider()
getProvider in interface IRepository<T>public IProvisioningAgent getProvisioningAgent()
getProvisioningAgent in interface IRepository<T>public String getType()
getType in interface IRepository<T>public 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(String description)
description - the repository descriptionpublic void setName(String value)
value - the repository namepublic String setProperty(String key, String value, IProgressMonitor monitor)
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 keymonitor - A progress monitor use to track progress and cancel the operation. This may
be a long running operation if another process holds the lock on this locationnull if there was no old valuepublic String setProperty(String key, 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 keynull if there was no old valuepublic void setProvider(String provider)
provider - the repository providerprotected void setType(String type)
type - the repository typeprotected void setLocation(URI location)
location - the repository locationprotected void setVersion(String version)
version - the repository version
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.