|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.registry.jdbc.mediatypes.MediaTypeHandler
public abstract class MediaTypeHandler
Base class of all media type handlers. It defines the three basic methods to be implemented by all media type handlers. This is initialized with the objects required for handling media type specific operations, so that extending media type handlers can easily access them. One such object is the instance of the MediaTypeManager.
Field Summary | |
---|---|
protected ArtifactDAO |
artifactDAO
ArtifactDAO for directly accessing resources. |
protected AuthorizationUtil |
authorizationUtil
Some common authorization tasks are implemented in this util. |
protected ConnectionFactory |
connectionFactory
Connection factory to obtaining database connections. |
protected MediaTypeManager |
mediaTypeManager
While processing media types, handlers may want to access resources with other media types. |
protected org.wso2.usermanager.Realm |
realm
User manager realm, which can be used to set permissions on resources. |
Constructor Summary | |
---|---|
MediaTypeHandler(ConnectionFactory connectionFactory,
org.wso2.usermanager.Realm realm,
MediaTypeManager mediaTypeManager)
|
Method Summary | |
---|---|
abstract boolean |
delete(java.lang.String path)
Processes the DELETE action of the media type. |
abstract Artifact |
get(java.lang.String path,
Artifact rawArtifact)
Processes the GET action of the media type. |
abstract boolean |
put(java.lang.String path,
Artifact artifact)
Processes the PUT action of the media type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ConnectionFactory connectionFactory
protected org.wso2.usermanager.Realm realm
protected MediaTypeManager mediaTypeManager
protected ArtifactDAO artifactDAO
protected AuthorizationUtil authorizationUtil
Constructor Detail |
---|
public MediaTypeHandler(ConnectionFactory connectionFactory, org.wso2.usermanager.Realm realm, MediaTypeManager mediaTypeManager)
Method Detail |
---|
public abstract Artifact get(java.lang.String path, Artifact rawArtifact) throws RegistryException
path
- Path of the resourcerawArtifact
- Raw artifact at the given path, which is retrieved directly from the
database. This can be used by media type handlers, which need to alter contents of the
raw artifact, etc.
RegistryException
public abstract boolean put(java.lang.String path, Artifact artifact) throws RegistryException
path
- to put the resource.artifact
- to put.
RegistryException
public abstract boolean delete(java.lang.String path) throws RegistryException
path
- path of the resource to be deleted.
RegistryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |