org.wso2.carbon.registry.app
Class RegistryResolver

java.lang.Object
  extended by org.wso2.carbon.registry.app.RegistryResolver
All Implemented Interfaces:
org.apache.abdera.protocol.Resolver<org.apache.abdera.protocol.server.Target>

public class RegistryResolver
extends java.lang.Object
implements org.apache.abdera.protocol.Resolver<org.apache.abdera.protocol.server.Target>

Class that is capable of resolving requests made via the Atom API, and identify how to process them. Some of the target types are provided by Abdera itself, whereas some others are defined.


Field Summary
static org.apache.abdera.protocol.server.TargetType ASPECT_TYPE
          The target type for aspects.
static org.apache.abdera.protocol.server.TargetType ASSOCIATIONS_TYPE
          The target type for associations.
static org.apache.abdera.protocol.server.TargetType CHECKPOINT_TYPE
          The target type for check points.
static org.apache.abdera.protocol.server.TargetType COLLECTION_CUSTOM_TYPE
          The target type for custom collections.
static org.apache.abdera.protocol.server.TargetType COMMENTS_TYPE
          The target type for comments.
static org.apache.abdera.protocol.server.TargetType COPY_TYPE
          The target type for copy operations.
static org.apache.abdera.protocol.server.TargetType DELETE_TYPE
          The target type for delete requests.
static org.apache.abdera.protocol.server.TargetType DUMP_TYPE
          The target type for dump.
static org.apache.abdera.protocol.server.TargetType IMPORT_TYPE
          The target type for import requests.
static org.apache.abdera.protocol.server.TargetType LOGS_TYPE
          The target type for logs.
static org.apache.abdera.protocol.server.TargetType MOVE_TYPE
          The target type for move operations.
static org.apache.abdera.protocol.server.TargetType QUERY_TYPE
          The target type for queries..
static org.apache.abdera.protocol.server.TargetType RATINGS_TYPE
          The target type for ratings.
static org.apache.abdera.protocol.server.TargetType RENAME_TYPE
          The target type for rename operations.
static org.apache.abdera.protocol.server.TargetType RESTORE_TYPE
          The target type for restore operations.
static org.apache.abdera.protocol.server.TargetType TAG_URL_TYPE
          The target type for tag urls.
static org.apache.abdera.protocol.server.TargetType TAGS_TYPE
          The target type for tags.
static org.apache.abdera.protocol.server.TargetType VERSIONS_TYPE
          The target type for versions.
 
Constructor Summary
RegistryResolver(EmbeddedRegistryService embeddedRegistryService, java.lang.String basePath)
           
 
Method Summary
 java.lang.String getBasePath()
           
static int getTenantId(java.lang.String userNameWithDomain)
           
static java.lang.String getUserName(java.lang.String userNameWithDomain)
           
 org.apache.abdera.protocol.server.Target resolve(org.apache.abdera.protocol.Request request)
          Method to identify the response target for the request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAGS_TYPE

public static final org.apache.abdera.protocol.server.TargetType TAGS_TYPE
The target type for tags.


LOGS_TYPE

public static final org.apache.abdera.protocol.server.TargetType LOGS_TYPE
The target type for logs.


RATINGS_TYPE

public static final org.apache.abdera.protocol.server.TargetType RATINGS_TYPE
The target type for ratings.


RENAME_TYPE

public static final org.apache.abdera.protocol.server.TargetType RENAME_TYPE
The target type for rename operations.


COPY_TYPE

public static final org.apache.abdera.protocol.server.TargetType COPY_TYPE
The target type for copy operations.


MOVE_TYPE

public static final org.apache.abdera.protocol.server.TargetType MOVE_TYPE
The target type for move operations.


COMMENTS_TYPE

public static final org.apache.abdera.protocol.server.TargetType COMMENTS_TYPE
The target type for comments.


TAG_URL_TYPE

public static final org.apache.abdera.protocol.server.TargetType TAG_URL_TYPE
The target type for tag urls.


ASSOCIATIONS_TYPE

public static final org.apache.abdera.protocol.server.TargetType ASSOCIATIONS_TYPE
The target type for associations.


RESTORE_TYPE

public static final org.apache.abdera.protocol.server.TargetType RESTORE_TYPE
The target type for restore operations.


ASPECT_TYPE

public static final org.apache.abdera.protocol.server.TargetType ASPECT_TYPE
The target type for aspects.


VERSIONS_TYPE

public static final org.apache.abdera.protocol.server.TargetType VERSIONS_TYPE
The target type for versions.


CHECKPOINT_TYPE

public static final org.apache.abdera.protocol.server.TargetType CHECKPOINT_TYPE
The target type for check points.


QUERY_TYPE

public static final org.apache.abdera.protocol.server.TargetType QUERY_TYPE
The target type for queries..


IMPORT_TYPE

public static final org.apache.abdera.protocol.server.TargetType IMPORT_TYPE
The target type for import requests.


DELETE_TYPE

public static final org.apache.abdera.protocol.server.TargetType DELETE_TYPE
The target type for delete requests.


COLLECTION_CUSTOM_TYPE

public static final org.apache.abdera.protocol.server.TargetType COLLECTION_CUSTOM_TYPE
The target type for custom collections.


DUMP_TYPE

public static final org.apache.abdera.protocol.server.TargetType DUMP_TYPE
The target type for dump.

Constructor Detail

RegistryResolver

public RegistryResolver(EmbeddedRegistryService embeddedRegistryService,
                        java.lang.String basePath)
Method Detail

resolve

public org.apache.abdera.protocol.server.Target resolve(org.apache.abdera.protocol.Request request)
Method to identify the response target for the request.

Specified by:
resolve in interface org.apache.abdera.protocol.Resolver<org.apache.abdera.protocol.server.Target>
Parameters:
request - the request.
Returns:
the response target.

getBasePath

public java.lang.String getBasePath()

getUserName

public static java.lang.String getUserName(java.lang.String userNameWithDomain)
                                    throws RegistryException
Throws:
RegistryException

getTenantId

public static int getTenantId(java.lang.String userNameWithDomain)
                       throws RegistryException
Throws:
RegistryException


Copyright © 2011 WSO2 Inc. All Rights Reserved.