|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tuscany.sca.contribution.service.impl.ContributionRepositoryImpl
public class ContributionRepositoryImpl
The default implementation of ContributionRepository
| Constructor Summary | |
|---|---|
ContributionRepositoryImpl(java.lang.String repository,
javax.xml.stream.XMLInputFactory factory,
Monitor monitor)
Constructor with repository root |
|
| Method Summary | |
|---|---|
void |
addContribution(Contribution contribution)
Contribution Registry methods |
protected void |
error(java.lang.String message,
java.lang.Object model,
java.lang.Exception ex)
Marshals exceptions into the monitor |
protected void |
error(java.lang.String message,
java.lang.Object model,
java.lang.Object... messageParameters)
Marshals errors into the monitor |
java.net.URL |
find(java.lang.String contribution)
Look up the contribution by URI |
Contribution |
getContribution(java.lang.String uri)
Returns the contribution with the given URI. |
java.util.List<Contribution> |
getContributions()
Returns the contributions available in the repository. |
java.net.URI |
getDomain()
Get the URI of the SCA domain |
java.util.List<java.lang.String> |
list()
Get list of URIs for all the contributions in the repository |
void |
remove(java.lang.String contribution)
Remove a contribution from the repository |
void |
removeContribution(Contribution contribution)
Removes a contribution from the repository. |
java.net.URL |
store(java.lang.String contribution,
java.net.URL sourceURL)
Copy a contribution from the source URL to the repository |
java.net.URL |
store(java.lang.String contribution,
java.net.URL sourceURL,
java.io.InputStream contributionStream)
Copies a contribution to the repository. |
void |
updateContribution(Contribution contribution)
Updates a contribution in the repository |
protected void |
warning(java.lang.String message,
java.lang.Object model,
java.lang.String... messageParameters)
Marshals warnings into the monitor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContributionRepositoryImpl(java.lang.String repository,
javax.xml.stream.XMLInputFactory factory,
Monitor monitor)
throws java.io.IOException
repository - factory -
java.io.IOException| Method Detail |
|---|
protected void warning(java.lang.String message,
java.lang.Object model,
java.lang.String... messageParameters)
message - model - messageParameters -
protected void error(java.lang.String message,
java.lang.Object model,
java.lang.Object... messageParameters)
problems - message - model -
protected void error(java.lang.String message,
java.lang.Object model,
java.lang.Exception ex)
problems - message - model - public java.net.URI getDomain()
ContributionRepository
getDomain in interface ContributionRepository
public java.net.URL store(java.lang.String contribution,
java.net.URL sourceURL,
java.io.InputStream contributionStream)
throws java.io.IOException
ContributionRepository
store in interface ContributionRepositorycontribution - A URl pointing to the contribution being copied to
the repositorysourceURL - URL of the source. this would be used to calculate the right
filename to be stored on the repository when a inputStream is being
providedcontributionStream - InputStream with the content of the
distribution
java.io.IOException
public java.net.URL store(java.lang.String contribution,
java.net.URL sourceURL)
throws java.io.IOException
ContributionRepository
store in interface ContributionRepositorycontribution - A URl pointing to the contribution being copied to
the repositorysourceURL - URL of the source. this would be used to calculate the right
filename to be stored on the repository when a inputStream is being
provided
java.io.IOExceptionpublic java.net.URL find(java.lang.String contribution)
ContributionRepository
find in interface ContributionRepositorycontribution - The URI of the contribution
public void remove(java.lang.String contribution)
ContributionRepository
remove in interface ContributionRepositorycontribution - The URI of the contribution to be removedpublic java.util.List<java.lang.String> list()
ContributionRepository
list in interface ContributionRepositorypublic void addContribution(Contribution contribution)
addContribution in interface ContributionRepositorycontribution - The new contribution.public void removeContribution(Contribution contribution)
ContributionRepository
removeContribution in interface ContributionRepositorycontribution - The contribution to removepublic void updateContribution(Contribution contribution)
ContributionRepository
updateContribution in interface ContributionRepositorycontribution - The contribution to updatepublic Contribution getContribution(java.lang.String uri)
ContributionRepository
getContribution in interface ContributionRepositoryuri - the URI of the contribution
public java.util.List<Contribution> getContributions()
ContributionRepository
getContributions in interface ContributionRepository
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||