-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Gerd Wuetherich
committed
Jun 7, 2019
1 parent
e5834f0
commit c3fc39d
Showing
12 changed files
with
364 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...io/codekontor/slizaa/scanner/spi/contentdefinition/InvalidContentDefinitionException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* slizaa-scanner-spi-api - Slizaa Static Software Analysis Tools | ||
* Copyright © 2019 Code-Kontor GmbH and others ([email protected]) | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package io.codekontor.slizaa.scanner.spi.contentdefinition; | ||
|
||
public class InvalidContentDefinitionException extends RuntimeException { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
public InvalidContentDefinitionException() { | ||
super(); | ||
} | ||
|
||
public InvalidContentDefinitionException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
public InvalidContentDefinitionException(String message) { | ||
super(message); | ||
} | ||
|
||
public InvalidContentDefinitionException(Throwable cause) { | ||
super(cause); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...lizaa-server-graphql/src/main/java/io/codekontor/slizaa/server/graphql/ErrorMessages.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.codekontor.slizaa.server.graphql; | ||
|
||
public class ErrorMessages { | ||
|
||
public static final String ERR_NON_EXISTING_DATABASE = "The specified database (id '%s') does not exist."; | ||
|
||
public final static RuntimeException newException(String msg, Object... args) { | ||
String message = args.length > 0 ? String.format(msg, args) : msg; | ||
return new RuntimeException(message); | ||
} | ||
|
||
public final static RuntimeException newException(Exception cause, String msg, Object... args) { | ||
String message = args.length > 0 ? String.format(msg, args) : msg; | ||
return new RuntimeException(message, cause); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
133 changes: 68 additions & 65 deletions
133
...lizaa/server/service/slizaa/internal/graphdatabase/IGraphDatabaseStateMachineContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,68 @@ | ||
/** | ||
* slizaa-server-service-slizaa - Slizaa Static Software Analysis Tools | ||
* Copyright © 2019 Code-Kontor GmbH and others ([email protected]) | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package io.codekontor.slizaa.server.service.slizaa.internal.graphdatabase; | ||
|
||
import java.util.List; | ||
|
||
import io.codekontor.slizaa.scanner.spi.contentdefinition.IContentDefinitionProvider; | ||
import io.codekontor.slizaa.server.service.slizaa.IGraphDatabase; | ||
import io.codekontor.slizaa.server.service.slizaa.IHierarchicalGraph; | ||
|
||
/** | ||
* | ||
* @author Gerd Wütherich ([email protected]) | ||
*/ | ||
public interface IGraphDatabaseStateMachineContext { | ||
|
||
void setGraphDatabase(IGraphDatabase graphDatabase); | ||
|
||
String getIdentifier(); | ||
|
||
int getPort(); | ||
|
||
boolean hasPopulatedDatabaseDirectory(); | ||
|
||
boolean hasContentDefinitionProvider(); | ||
|
||
void setContentDefinition(String factoryId, String contentDefinition); | ||
|
||
IContentDefinitionProvider<?> getContentDefinitionProvider(); | ||
|
||
boolean isRunning(); | ||
|
||
boolean parse(boolean startDatabase); | ||
|
||
void start(); | ||
|
||
void stop(); | ||
|
||
void terminate(); | ||
|
||
IHierarchicalGraph createHierarchicalGraph(String identifier); | ||
|
||
IHierarchicalGraph getHierarchicalGraph(String identifier); | ||
|
||
List<IHierarchicalGraph> getHierarchicalGraphs(); | ||
|
||
void disposeHierarchicalGraph(String identifier); | ||
|
||
void storeConfiguration(); | ||
} | ||
/** | ||
* slizaa-server-service-slizaa - Slizaa Static Software Analysis Tools | ||
* Copyright © 2019 Code-Kontor GmbH and others ([email protected]) | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package io.codekontor.slizaa.server.service.slizaa.internal.graphdatabase; | ||
|
||
import java.util.List; | ||
|
||
import io.codekontor.slizaa.scanner.spi.contentdefinition.IContentDefinitionProvider; | ||
import io.codekontor.slizaa.server.service.slizaa.IGraphDatabase; | ||
import io.codekontor.slizaa.server.service.slizaa.IHierarchicalGraph; | ||
|
||
/** | ||
* | ||
* @author Gerd Wütherich ([email protected]) | ||
*/ | ||
public interface IGraphDatabaseStateMachineContext { | ||
|
||
void setGraphDatabase(IGraphDatabase graphDatabase); | ||
|
||
String getIdentifier(); | ||
|
||
int getPort(); | ||
|
||
boolean hasPopulatedDatabaseDirectory(); | ||
|
||
IContentDefinitionProvider<?> createContentDefinitionProvider(String contentDefinitionFactoryId, | ||
String contentDefinition); | ||
|
||
boolean hasContentDefinitionProvider(); | ||
|
||
void setContentDefinition(IContentDefinitionProvider<?> contentDefinitionProvider); | ||
|
||
IContentDefinitionProvider<?> getContentDefinitionProvider(); | ||
|
||
boolean isRunning(); | ||
|
||
boolean parse(boolean startDatabase); | ||
|
||
void start(); | ||
|
||
void stop(); | ||
|
||
void terminate(); | ||
|
||
IHierarchicalGraph createHierarchicalGraph(String identifier); | ||
|
||
IHierarchicalGraph getHierarchicalGraph(String identifier); | ||
|
||
List<IHierarchicalGraph> getHierarchicalGraphs(); | ||
|
||
void disposeHierarchicalGraph(String identifier); | ||
|
||
void storeConfiguration(); | ||
} |
Oops, something went wrong.