]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ServerInformationImpl.java
Merge "Testing SonarQube with Simantics Platform SDK"
[simantics/platform.git] / bundles / org.simantics.db.procore / src / fi / vtt / simantics / procore / internal / ServerInformationImpl.java
1 /*******************************************************************************\r
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
3  * in Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package fi.vtt.simantics.procore.internal;\r
13 \r
14 import org.simantics.db.service.ServerInformation;\r
15 \r
16 public class ServerInformationImpl implements ServerInformation {\r
17     final String serverId;\r
18     final String protocolId;\r
19     final String databaseId;\r
20     final long firstChangeSetId;\r
21 \r
22     // TODO: get this from the server\r
23     // Default UTF-8\r
24     String characterSet = "UTF-8";\r
25 \r
26     public ServerInformationImpl(String serverId, String protocolId, String databaseId, long firstChangeSetId) {\r
27         this.serverId = serverId;\r
28         this.protocolId = protocolId;\r
29         this.databaseId = databaseId;\r
30         this.firstChangeSetId = firstChangeSetId;\r
31     }\r
32 \r
33     @Override\r
34     public String getServerId() {\r
35         return serverId;\r
36     }\r
37 \r
38     @Override\r
39     public String getProtocolId() {\r
40         return protocolId;\r
41     }\r
42 \r
43     @Override\r
44     public String getDatabaseId() {\r
45         return databaseId;\r
46     }\r
47 \r
48     @Override\r
49     public long getFirstChangeSetId() {\r
50         return firstChangeSetId;\r
51     }\r
52 \r
53     @Override\r
54     public String getCharacterSet() {\r
55         return characterSet;\r
56     }\r
57 \r
58     @Override\r
59     public String toString() {\r
60         return "ServerInformation [server id=" + serverId + ", protocol id=" + protocolId + ", database id=" + databaseId + ", charset=" + characterSet + "]";\r
61     }\r
62 }\r