📄 remotestorage.java
字号:
/*--------------------------------------------------------------------------*
| Copyright (C) 2006 ?, Christopher Kohlhaas |
| |
| This program is free software; you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by the |
| Free Software Foundation. A copy of the license has been included with |
| these distribution in the COPYING file, if not go to www.fsf.org |
| |
| As a special exception, you are granted the permissions to link this |
| program with every library, which license fulfills the Open Source |
| Definition as published by the Open Source Initiative (OSI). |
*--------------------------------------------------------------------------*/
package org.rapla.server;
import java.util.Date;
import java.util.List;
import org.rapla.entities.RaplaType;
import org.rapla.framework.RaplaException;
import org.rapla.storage.UpdateEvent;
public interface RemoteStorage {
String ROLE = RemoteStorage.class.getName();
RemoteMethod AUTHENTICATE = new RemoteMethod("authenticate",new String[] { "username", "password"});
RemoteMethod CAN_CHANGE_PASSWORD= new RemoteMethod("canChangePassword");
RemoteMethod CHANGE_PASSWORD= new RemoteMethod("changePassword",new String[] {"username","oldPassword","newPassword"});
RemoteMethod GET_RESOURCES = new RemoteMethod("getResources");
RemoteMethod GET_SERVER_TIME= new RemoteMethod("getServerTime");
RemoteMethod GET_RESERVATIONS= new RemoteMethod("getReservations", new String[] {"start","end"});
RemoteMethod GET_ENTITY_RECURSIVE= new RemoteMethod("getEntityRecursive", new String[] {"id"});
RemoteMethod DISPATCH= new RemoteMethod("dispatch", new String[] {"evt"});
RemoteMethod CREATE_IDENTIFIER= new RemoteMethod("createIdentifier", new String[] {"raplaType"});
// These Methods belong to the server
RemoteMethod LOGIN = new RemoteMethod("login",new String[] { "username", "password"});
RemoteMethod RESTART_SERVER = new RemoteMethod("restartServer",new String[] { });
RemoteMethod CHECK_SERVER_VERSION = new RemoteMethod("checkServerVersion",new String[] {"clientVersion" });
RemoteMethod REFRESH = new RemoteMethod("refresh",new String[] {"clientRepositoryVersion" });
void authenticate(String username,String password) throws RaplaException;
boolean canChangePassword() throws RaplaException;
void changePassword(String username,char[] oldPassword,char[] newPassword) throws RaplaException;
List getResources() throws RaplaException;
/** returns the time on the server */
long getServerTime() throws RaplaException;
/** delegates the corresponding method in the StorageOperator. */
List getReservations(Date start,Date end) throws RaplaException;
List getEntityRecursive(Object id) throws RaplaException;
void dispatch(UpdateEvent evt) throws RaplaException;
Object createIdentifier(RaplaType raplaType) throws RaplaException;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -