uri_prefix.py :  » Development » SnapLogic » snaplogic » common » Python Open Source

Home
Python Open Source
1.3.1.2 Python
2.Ajax
3.Aspect Oriented
4.Blog
5.Build
6.Business Application
7.Chart Report
8.Content Management Systems
9.Cryptographic
10.Database
11.Development
12.Editor
13.Email
14.ERP
15.Game 2D 3D
16.GIS
17.GUI
18.IDE
19.Installer
20.IRC
21.Issue Tracker
22.Language Interface
23.Log
24.Math
25.Media Sound Audio
26.Mobile
27.Network
28.Parser
29.PDF
30.Project Management
31.RSS
32.Search
33.Security
34.Template Engines
35.Test
36.UML
37.USB Serial
38.Web Frameworks
39.Web Server
40.Web Services
41.Web Unit
42.Wiki
43.Windows
44.XML
Python Open Source » Development » SnapLogic 
SnapLogic » snaplogic » common » uri_prefix.py
#!/usr/bin/env python
# $SnapHashLicense:
# 
# SnapLogic - Open source data services
# 
# Copyright (C) 2008-2009, SnapLogic, Inc.  All rights reserved.
# 
# See http://www.snaplogic.org for more information about
# the SnapLogic project. 
# 
# This program is free software, distributed under the terms of
# the GNU General Public License Version 2. See the LEGAL file
# at the top of the source tree.
# 
# "SnapLogic" is a trademark of SnapLogic, Inc.
# 
# 
# $
# $Id: uri_prefix.py 9099 2009-09-25 21:53:48Z dhiraj $

"""
Common prefixes for the SnapLogic server.

The various server 'resources', such as repository, components,
run-time components, log files, etc. can be addressed in a RESTful
manner. For this purpose, the server implements a CRUD-like REST
call-matrix. This matrix determines where in the URI space those
resources are located and what action should be taken if those
URIs are hit with the various HTTP methods.

This file here defines the prefixes of the call matrix. Requests
with different prefixes are handled by different server components.
The request handler component can use these prefixes to recognize
which module should be called in order to process the request.

"""

ROOT = "/"

SNAP_PREFIX = ROOT + "__snap__"

STATIC = SNAP_PREFIX + "/__static__"

CC_REGISTER = SNAP_PREFIX + "/cc/register"

INFO = SNAP_PREFIX + "/meta/info"

LOGS = SNAP_PREFIX + "/meta/logs"

CC_LOGS = LOGS + "/cc"

URI_CHECK = SNAP_PREFIX + "/uri_check"
"""
This URI provides a URI checking service to the modules of the server and its CCs. They can submit
a URI to this URI checking service and the service will tell requester whether the URI points to
the server or not. 

"""

SELF_CHECK = SNAP_PREFIX + "/self_check"
"""
This URI is used by the server to check if a given URI points to itself. The server does this check
by parsing out the protocol/hostname/port from the URI in question and then creates the SELF_CHECK
URI with those values. The server then connects to this self check URI and sees if the request
circles back to it. If it does circle back, then the hostname/port does indeed point to the server.

"""

STATS = SNAP_PREFIX + "/meta/stats"

SCHEDULER = SNAP_PREFIX + "/scheduler"

NOTIFICATION = SNAP_PREFIX + "/notification"

PIPELINE_RESOURCE_TEMPLATE = SNAP_PREFIX + "/pipeline/template"

PIPELINE_SUGGEST_RESOURCE_VALUES = SNAP_PREFIX + "/pipeline/suggestions"

PIPELINE_VALIDATE_RESOURCE = SNAP_PREFIX + "/pipeline/validate"

COMPONENT = SNAP_PREFIX + "/component"

COMPONENT_RESOURCE_TEMPLATE = COMPONENT + "/template"

COMPONENT_SUGGEST_RESOURCE_VALUES = COMPONENT + "/suggestions"

COMPONENT_VALIDATE_RESOURCE = COMPONENT + "/validate"

COMPONENT_UPGRADE_RESOURCE = COMPONENT + "/upgrade"

COMPONENT_LIST = COMPONENT + "/list"

RUNTIME = SNAP_PREFIX + "/runtime"
"""Prefix used by resource runtime URIs."""

RUNTIME_STATUS = RUNTIME + "/status"

RUNTIME_STATUS_ENTRY = RUNTIME_STATUS + "/entry"
"""Prefix used by CC and PM status URIs."""

RUNTIME_VIEW = SNAP_PREFIX + "/runtime/view"
"""Prefix used by CC runtime view URIs."""

RUNTIME_BINARY_VIEW = RUNTIME_VIEW + "/binary"

RUNTIME_RECORD_VIEW = RUNTIME_VIEW + "/record"

RESOURCES = SNAP_PREFIX + "/resources"

RESOURCE_LIST = RESOURCES + "/list"

RESOURCE_SUMMARY = RESOURCES + "/summary"

RESOURCE_UPGRADE = RESOURCES + "/upgrade"

RESOURCE_READ = RESOURCES + "/read"
"""This is what we post to for reading resources"""

RESOURCE_HAS_CHANGED = RESOURCES + "/has_changed"
"""POST list of resource URIs with genind/guids and check if they have changed."""

RESOURCE_DIFF = RESOURCES + "/diff"
"""POST Resource's shallow copy and get back the diff with the latest shallow copy of that resource."""

AUTOGEN = SNAP_PREFIX + "/autogen"

AUTH              = SNAP_PREFIX + "/auth"
AUTH_CHECK        = AUTH + "/check"

AUTH_USER         = AUTH + "/user"
AUTH_USER_ENTRY   = AUTH_USER + "/entry"
AUTH_USER_LIST    = AUTH_USER + "/list"

AUTH_GROUP        = AUTH + "/group"
AUTH_GROUP_ENTRY  = AUTH_GROUP + "/entry"
AUTH_GROUP_LIST   = AUTH_GROUP + "/list"

AUTH_ACL          = AUTH + "/acl"
AUTH_ACL_ENTRY    = AUTH_ACL + "/entry"
AUTH_ACL_LIST     = AUTH_ACL + "/list"

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.