Commit 6cbfe60a authored by helene ortiz's avatar helene ortiz
Browse files

remote control management

parent 3ce940ab
......@@ -29,6 +29,8 @@ import fr.ill.ics.nscclient.sessionmanagement.SessionManager;
*/
public class TokenManager {
public enum ClientType {MAIN, REMOTE, VIRTUAL, TABLET};
private static TokenManager instance = null;
private String SERVER_ID = CommandZoneWrapper.SERVER_ID;
......
......@@ -54,7 +54,6 @@ import fr.ill.ics.bridge.listeners.TokenEventListener;
import fr.ill.ics.core.property.Property;
import fr.ill.ics.core.property.PropertyManager;
import fr.ill.ics.nomadserver.common.Common.ConfigurationStateType;
import fr.ill.ics.nomadserver.notification.NotificationMessage.TokenState.RemoteControlState;
import fr.ill.ics.nscclient.dataprovider.CommandDatabase;
import fr.ill.ics.nscclient.dataprovider.DataAccessor.ClientCommandState;
import fr.ill.ics.nscclient.dataprovider.DataAccessor.ClientConditionState;
......
......@@ -38,6 +38,7 @@ import java.util.StringTokenizer;
import java.util.logging.Level;
import java.util.logging.Logger;
import fr.ill.ics.bridge.TokenManager;
import fr.ill.ics.util.exception.CommandNotFoundException;
import fr.ill.ics.util.exception.ConfigurationException;
import fr.ill.ics.util.exception.ConfigurationException.PluginType;
......@@ -54,7 +55,7 @@ import fr.ill.ics.util.exception.PropertyNotFoundException;
* </p>
*/
public class ConfigManager {
public final static String PROPERTIES_EXTENSION = ".properties";
public final static String PROPERTIES_PATTERN = "Properties.xml";
public final static String VIEW_PATTERN = "View.xml";
......@@ -109,6 +110,10 @@ public class ConfigManager {
public static boolean CONFIGURATION_ERROR = false;
private static Set<ConfigurationException> configurationExceptions;
private boolean remoteClient = false;
private boolean mainClient = true;
private String clientType;
/**
......@@ -219,6 +224,9 @@ public class ConfigManager {
}*/
}
}
clientType = getString(ConfigManager.CLIENT_TYPE_PROPERTY);
mainClient = (clientType.equals(TokenManager.ClientType.MAIN.toString()) || clientType.equals(TokenManager.ClientType.TABLET.toString()));
remoteClient = !mainClient;
}
......@@ -579,4 +587,12 @@ public class ConfigManager {
}
return false;
}
public boolean isRemoteClient() {
return remoteClient;
}
public boolean isMainClient() {
return mainClient;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment