Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
gythialy committed Jul 23, 2015
1 parent 6b36671 commit 7df3b66
Show file tree
Hide file tree
Showing 509 changed files with 119,998 additions and 112,007 deletions.
15 changes: 7 additions & 8 deletions projects/core/api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@

dependencies {
compile group: 'org.osgi', name: 'org.osgi.core', version: '4.3.1'
compile group: 'org.osgi', name: 'org.osgi.compendium', version: '4.3.1'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.7'
compile group: 'org.osgi', name: 'org.osgi.core', version: '4.3.1'
compile group: 'org.osgi', name: 'org.osgi.compendium', version: '4.3.1'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.7'
}

jar {
manifest {
name = "OpenMUC Core - API"
instruction 'Export-Package', '*'
}
manifest {
name = "OpenMUC Core - API"
instruction 'Export-Package', '*'
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,17 @@
import java.util.Set;

/**
*
* Service interface to get access to the framework wide user management and authentication
*
*/
public interface AuthenticationService {

public boolean login(String name, String password);
public boolean login(String name, String password);

public boolean contains(String user);
public boolean contains(String user);

public void delete(String user);
public void delete(String user);

public void register(String user, String pwd);
public void register(String user, String pwd);

public Set<String> getAllUsers();
public Set<String> getAllUsers();
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@

public class ArgumentSyntaxException extends Exception {

private static final long serialVersionUID = 4793620849675542512L;
private static final long serialVersionUID = 4793620849675542512L;

public ArgumentSyntaxException(String message) {
super(message);
}
public ArgumentSyntaxException(String message) {
super(message);
}

public ArgumentSyntaxException() {
super();
}
public ArgumentSyntaxException() {
super();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,93 +21,93 @@

package org.openmuc.framework.config;

import java.util.List;

import org.openmuc.framework.data.ValueType;

import java.util.List;

public interface ChannelConfig {

public static final Boolean DISABLED_DEFAULT = false;
public static final String DESCRIPTION_DEFAULT = "";
public static final String CHANNEL_ADDRESS_DEFAULT = "";
public static final String UNIT_DEFAULT = "";
public static final ValueType VALUE_TYPE_DEFAULT = ValueType.DOUBLE;
public static final int BYTE_ARRAY_SIZE_DEFAULT = 10;
public static final int STRING_SIZE_DEFAULT = 10;
public static final boolean LISTENING_DEFAULT = false;
public static final int SAMPLING_INTERVAL_DEFAULT = -1;
public static final int SAMPLING_TIME_OFFSET_DEFAULT = 0;
public static final String SAMPLING_GROUP_DEFAULT = "";
public static final int LOGGING_INTERVAL_DEFAULT = -1;
public static final int LOGGING_TIME_OFFSET_DEFAULT = 0;
public static final Boolean DISABLED_DEFAULT = false;
public static final String DESCRIPTION_DEFAULT = "";
public static final String CHANNEL_ADDRESS_DEFAULT = "";
public static final String UNIT_DEFAULT = "";
public static final ValueType VALUE_TYPE_DEFAULT = ValueType.DOUBLE;
public static final int BYTE_ARRAY_SIZE_DEFAULT = 10;
public static final int STRING_SIZE_DEFAULT = 10;
public static final boolean LISTENING_DEFAULT = false;
public static final int SAMPLING_INTERVAL_DEFAULT = -1;
public static final int SAMPLING_TIME_OFFSET_DEFAULT = 0;
public static final String SAMPLING_GROUP_DEFAULT = "";
public static final int LOGGING_INTERVAL_DEFAULT = -1;
public static final int LOGGING_TIME_OFFSET_DEFAULT = 0;

public String getId();
public String getId();

public void setId(String id) throws IdCollisionException;
public void setId(String id) throws IdCollisionException;

public String getDescription();
public String getDescription();

public void setDescription(String description);
public void setDescription(String description);

public String getChannelAddress();
public String getChannelAddress();

public void setChannelAddress(String address);
public void setChannelAddress(String address);

public String getUnit();
public String getUnit();

public void setUnit(String unit);
public void setUnit(String unit);

public ValueType getValueType();
public ValueType getValueType();

public void setValueType(ValueType type);
public void setValueType(ValueType type);

public Integer getValueTypeLength();
public Integer getValueTypeLength();

public void setValueTypeLength(Integer maxLength);
public void setValueTypeLength(Integer maxLength);

public Double getScalingFactor();
public Double getScalingFactor();

public void setScalingFactor(Double factor);
public void setScalingFactor(Double factor);

public Double getValueOffset();
public Double getValueOffset();

public void setValueOffset(Double offset);
public void setValueOffset(Double offset);

public Boolean isListening();
public Boolean isListening();

public void setListening(Boolean listening);
public void setListening(Boolean listening);

public Integer getSamplingInterval();
public Integer getSamplingInterval();

public void setSamplingInterval(Integer interval);
public void setSamplingInterval(Integer interval);

public Integer getSamplingTimeOffset();
public Integer getSamplingTimeOffset();

public void setSamplingTimeOffset(Integer offset);
public void setSamplingTimeOffset(Integer offset);

public String getSamplingGroup();
public String getSamplingGroup();

public void setSamplingGroup(String group);
public void setSamplingGroup(String group);

public Integer getLoggingInterval();
public Integer getLoggingInterval();

public void setLoggingInterval(Integer interval);
public void setLoggingInterval(Integer interval);

public Integer getLoggingTimeOffset();
public Integer getLoggingTimeOffset();

public void setLoggingTimeOffset(Integer offset);
public void setLoggingTimeOffset(Integer offset);

public Boolean isDisabled();
public Boolean isDisabled();

public void setDisabled(Boolean disabled);
public void setDisabled(Boolean disabled);

public void delete();
public void delete();

public DeviceConfig getDevice();
public DeviceConfig getDevice();

public List<ServerMapping> getServerMappings();
public List<ServerMapping> getServerMappings();

public void addServerMapping(ServerMapping serverMapping);
public void addServerMapping(ServerMapping serverMapping);

public void deleteServerMappings(String id);
public void deleteServerMappings(String id);
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,51 +25,51 @@

public class ChannelScanInfo {

private final String channelAddress;
private final String description;
private final ValueType valueType;
private final Integer valueTypeLength;
private final Boolean readable;
private final Boolean writable;
private final String channelAddress;
private final String description;
private final ValueType valueType;
private final Integer valueTypeLength;
private final Boolean readable;
private final Boolean writable;

public ChannelScanInfo(String channelAddress, String description, ValueType valueType, Integer valueTypeLength) {
this(channelAddress, description, valueType, valueTypeLength, true, true);
}
public ChannelScanInfo(String channelAddress, String description, ValueType valueType, Integer valueTypeLength) {
this(channelAddress, description, valueType, valueTypeLength, true, true);
}

public ChannelScanInfo(String channelAddress, String description, ValueType valueType, Integer valueTypeLength,
Boolean readable, Boolean writable) {
if (channelAddress == null || channelAddress.equals("")) {
throw new IllegalArgumentException("Channel Address may not be empty.");
}
this.channelAddress = channelAddress;
this.description = description;
this.valueType = valueType;
this.valueTypeLength = valueTypeLength;
this.readable = readable;
this.writable = writable;
}
public ChannelScanInfo(String channelAddress, String description, ValueType valueType, Integer valueTypeLength, Boolean readable,
Boolean writable) {
if (channelAddress == null || channelAddress.equals("")) {
throw new IllegalArgumentException("Channel Address may not be empty.");
}
this.channelAddress = channelAddress;
this.description = description;
this.valueType = valueType;
this.valueTypeLength = valueTypeLength;
this.readable = readable;
this.writable = writable;
}

public String getChannelAddress() {
return channelAddress;
}
public String getChannelAddress() {
return channelAddress;
}

public String getDescription() {
return description;
}
public String getDescription() {
return description;
}

public ValueType getValueType() {
return valueType;
}
public ValueType getValueType() {
return valueType;
}

public Integer getValueTypeLength() {
return valueTypeLength;
}
public Integer getValueTypeLength() {
return valueTypeLength;
}

public Boolean isReadable() {
return readable;
}
public Boolean isReadable() {
return readable;
}

public Boolean isWritable() {
return writable;
}
public Boolean isWritable() {
return writable;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@

public interface ConfigChangeListener {

public void configurationChanged();
public void configurationChanged();
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,48 +21,47 @@

package org.openmuc.framework.config;

import org.openmuc.framework.dataaccess.DeviceState;

import java.io.FileNotFoundException;
import java.util.List;

import org.openmuc.framework.dataaccess.DeviceState;

public interface ConfigService {

public void lock();
public void lock();

public boolean tryLock();
public boolean tryLock();

public void unlock();
public void unlock();

public RootConfig getConfig();
public RootConfig getConfig();

public RootConfig getConfig(ConfigChangeListener listener);
public RootConfig getConfig(ConfigChangeListener listener);

public void stopListeningForConfigChange(ConfigChangeListener listener);
public void stopListeningForConfigChange(ConfigChangeListener listener);

public void setConfig(RootConfig config);
public void setConfig(RootConfig config);

public void writeConfigToFile() throws ConfigWriteException;
public void writeConfigToFile() throws ConfigWriteException;

public void reloadConfigFromFile() throws FileNotFoundException, ParseException;
public void reloadConfigFromFile() throws FileNotFoundException, ParseException;

public RootConfig getEmptyConfig();
public RootConfig getEmptyConfig();

public List<DeviceScanInfo> scanForDevices(String driverId, String settings) throws DriverNotAvailableException,
UnsupportedOperationException, ArgumentSyntaxException, ScanException, ScanInterruptedException;
public List<DeviceScanInfo> scanForDevices(String driverId, String settings) throws DriverNotAvailableException,
UnsupportedOperationException, ArgumentSyntaxException, ScanException, ScanInterruptedException;

public void scanForDevices(String driverId, String settings, DeviceScanListener scanListener)
throws DriverNotAvailableException;
public void scanForDevices(String driverId, String settings, DeviceScanListener scanListener) throws DriverNotAvailableException;

public void interruptDeviceScan(String driverId) throws DriverNotAvailableException, UnsupportedOperationException;
public void interruptDeviceScan(String driverId) throws DriverNotAvailableException, UnsupportedOperationException;

public List<ChannelScanInfo> scanForChannels(String deviceId, String settings) throws DriverNotAvailableException,
UnsupportedOperationException, ArgumentSyntaxException, ScanException;
public List<ChannelScanInfo> scanForChannels(String deviceId, String settings) throws DriverNotAvailableException,
UnsupportedOperationException, ArgumentSyntaxException, ScanException;

public DriverInfo getDriverInfo(String driverId) throws DriverNotAvailableException;
public DriverInfo getDriverInfo(String driverId) throws DriverNotAvailableException;

public List<String> getIdsOfRunningDrivers();
public List<String> getIdsOfRunningDrivers();

public DeviceState getDeviceState(String deviceId);
public DeviceState getDeviceState(String deviceId);

}
Loading

0 comments on commit 7df3b66

Please sign in to comment.