include_once '../ktapi/ktapi.inc.php'; include_once KT_ATOM_LIB_FOLDER . 'KT_atom_server.inc.php'; include_once KT_ATOM_LIB_FOLDER . 'KT_atom_service_helper.inc.php'; //Containing helper bridge functions to KtAPI include_once KT_ATOM_LIB_FOLDER . 'KT_atom_baseDoc.inc.php'; //Containing the parent class allowing easy XML manipulation include_once KT_ATOM_LIB_FOLDER . 'KT_atom_serviceDoc.inc.php'; //Containing the servicedoc class allowing easy ServiceDocument generation include_once KT_ATOM_LIB_FOLDER . 'KT_atom_responseFeed.inc.php'; //Containing the response feed class allowing easy atom feed generation include_once KT_ATOM_LIB_FOLDER . 'KT_atom_service.inc.php'; include_once KT_ATOM_LIB_FOLDER . 'KT_atom_server.default_dms_services.inc.php'; include_once 'auth.php'; //Containing the authentication protocols //Start the AtomPubProtocol Routing Engine $APP = new KT_atom_server(); /** * Register Services * * Registered services are classes extended from KT_atom_service * The registration process takes the following parameters * Workspace :The workspace within which the service collection will be grouped * ServiceName :This is the name by which the service/collection is exposed * ServiceClass :This is the class name of the class to be instantiated when this service is accessed * Title :This is the title given to the service/collection in the servicedocument */ $APP->registerService('DMS', 'fulltree', 'KT_atom_service_fulltree', 'Full Document Tree'); $APP->registerService('DMS', 'folder', 'KT_atom_service_folder', 'Folder Detail'); $APP->registerService('DMS', 'document', 'KT_atom_service_document', 'Document Detail'); //Execute the current url/header request $APP->execute();
//Containing the servicedoc class allowing easy ServiceDocument generation include_once KT_ATOM_LIB_FOLDER . 'KT_atom_response.inc.php'; //Containing the response feed class allowing easy atom feed generation include_once KT_ATOM_LIB_FOLDER . 'KT_atom_responseFeed.inc.php'; //Containing the response feed class allowing easy atom feed generation include_once KT_ATOM_LIB_FOLDER . 'KT_atom_service.inc.php'; include_once 'demodms/KT_atom_server.default_dms_services.inc.php'; /** * Check Realm Authentication */ require_once KT_ATOM_LIB_FOLDER . 'KT_atom_HTTPauth.inc.php'; if (!KT_atom_HTTPauth::isLoggedIn()) { KT_atom_HTTPauth::login('KnowledgeTree AtomPub', 'You are not authorized to enter this realm'); } //Start the AtomPubProtocol Routing Engine $APP = new KT_atom_server(); /** * Register Services * * Registered services are classes extended from KT_atom_service * The registration process takes the following parameters * Workspace :The workspace within which the service collection will be grouped * ServiceName :This is the name by which the service/collection is exposed * ServiceClass :This is the class name of the class to be instantiated when this service is accessed * Title :This is the title given to the service/collection in the servicedocument */ $APP->addWorkspaceTag('dms', 'atom:title', 'Standard DMS'); $APP->registerService('DMS', 'fulltree', 'KT_atom_service_fulltree', 'Full Document Tree'); $APP->registerService('DMS', 'folder', 'KT_atom_service_folder', 'Folder Detail'); $APP->registerService('DMS', 'document', 'KT_atom_service_document', 'Document Detail'); $APP->registerService('DMS', 'logout', 'KT_atom_service_logout', 'Forceful Logout');