*** empty log message ***
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
||||
* (the "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
|
||||
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Venice Web Communities System.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
|
||||
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
|
||||
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
package com.silverwrist.venice.xmlrpc;
|
||||
|
||||
import java.util.*;
|
||||
import com.silverwrist.dynamo.iface.*;
|
||||
import com.silverwrist.dynamo.xmlrpc.*;
|
||||
|
||||
public class VeniceCreateSession implements XmlRpcDispatcher, XmlRpcTypeNames
|
||||
{
|
||||
/*--------------------------------------------------------------------------------
|
||||
* Static data members
|
||||
*--------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
private static final List SUPPORTED_METHODS;
|
||||
private static final List SIGNATURES;
|
||||
|
||||
/*--------------------------------------------------------------------------------
|
||||
* Constructor
|
||||
*--------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
public VeniceCreateSession()
|
||||
{ // do nothing
|
||||
} // end constructor
|
||||
|
||||
/*--------------------------------------------------------------------------------
|
||||
* Implementations from interface XmlRpcDispatcher
|
||||
*--------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
public String getSessionIDParamValue(Request r, Application app)
|
||||
{
|
||||
return null;
|
||||
|
||||
} // end getSessionIDParamValue
|
||||
|
||||
public Object dispatchXmlRpcCall(Request r, Application app) throws Exception, FaultCode
|
||||
{
|
||||
if (r.getParameters().size()!=0)
|
||||
throw new XmlRpcParameterError("parameter count mismatch");
|
||||
XmlRpcCreateSession creator = (XmlRpcCreateSession)(r.queryService(XmlRpcCreateSession.class));
|
||||
SessionInfo session = creator.createNewSession(r);
|
||||
return session.getID();
|
||||
|
||||
} // end dispatchXmlRpcCall
|
||||
|
||||
public Collection getSupportedMethods(Request r)
|
||||
{
|
||||
return SUPPORTED_METHODS;
|
||||
|
||||
} // end getSupportedMethods
|
||||
|
||||
public List getMethodSignature(Request r, String method) throws FaultCode
|
||||
{
|
||||
return SIGNATURES;
|
||||
|
||||
} // end getMethodSignature
|
||||
|
||||
public String getMethodHelp(Request r, String method) throws FaultCode
|
||||
{
|
||||
ResourceBundle b = ResourceBundle.getBundle("com.silverwrist.venice.xmlrpc.VeniceXmlRpcMessages",
|
||||
Locale.getDefault());
|
||||
return b.getString("help.createSess");
|
||||
|
||||
} // end getMethodHelp
|
||||
|
||||
/*--------------------------------------------------------------------------------
|
||||
* Static initializer
|
||||
*--------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static
|
||||
{ // create the supported methods list
|
||||
SUPPORTED_METHODS = Collections.singletonList("venice:session.create");
|
||||
|
||||
// create the signatures list
|
||||
List l = Collections.singletonList(TYPE_STRING);
|
||||
SIGNATURES = Collections.singletonList(l);
|
||||
|
||||
} // end static initializer
|
||||
|
||||
} // end class VeniceCreateSession
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
||||
* (the "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
|
||||
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Venice Web Communities System.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
|
||||
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
|
||||
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
package com.silverwrist.venice.xmlrpc;
|
||||
|
||||
public interface VeniceFaultCodes
|
||||
{
|
||||
public static final int IS_LOGGEDIN = 1000;
|
||||
|
||||
public static final int IS_NOT_LOGGEDIN = 1001;
|
||||
|
||||
public static final int USER_NOTFOUND = 1002;
|
||||
|
||||
public static final int USER_NOLOGIN = 1003;
|
||||
|
||||
public static final int USER_LOCKED = 1004;
|
||||
|
||||
public static final int USER_NOAUTH = 1005;
|
||||
|
||||
} // end interface VeniceFaultCodes
|
||||
@@ -0,0 +1,19 @@
|
||||
# The contents of this file are subject to the Mozilla Public License Version 1.1
|
||||
# (the "License"); you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
|
||||
# WARRANTY OF ANY KIND, either express or implied. See the License for the specific
|
||||
# language governing rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Venice Web Communities System.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
|
||||
# for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
|
||||
# Copyright (C) 2003 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# ---------------------------------------------------------------------------------
|
||||
# This file has been localized for the en_US locale
|
||||
help.createSess=Creates a new Venice session. \r\n\
|
||||
Returns: The identifier of the new session. This is passed to most other Venice API functions.
|
||||
Reference in New Issue
Block a user