Skip to content

Commit

Permalink
Merge pull request #34 from TAK-Product-Center/upstream/4.9-RELEASE-50
Browse files Browse the repository at this point in the history
TAK Server 4.9-RELEASE-50
  • Loading branch information
takdeveloper authored Nov 17, 2023
2 parents f08ca71 + a853246 commit cab78ea
Show file tree
Hide file tree
Showing 391 changed files with 56,366 additions and 4,006 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ java -Xmx<value> -Dspring.profiles.active=messaging,duplicatelogs -jar ../build/

Run API
```
java -Xmx<value> -Dspring.profiles.active=api,duplicatelogs -jar ../build/libs/takserver-core-xyz.war
java -Xmx<value> -Dspring.profiles.active=api,duplicatelogs -Dkeystore.pkcs12.legacy -jar ../build/libs/takserver-core-xyz.war
```

Run Plugin Manager (useful when working on plugin capability)
Expand Down
5 changes: 2 additions & 3 deletions src/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ ext {

allprojects {

apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'eclipse'
apply plugin: 'idea'
// apply plugin: 'pmd'
Expand Down Expand Up @@ -99,8 +99,7 @@ subprojects {
}

dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:' + gradle_shadow_version
classpath 'gradle.plugin.org.openrepose:gradle-jaxb-plugin:2.5.0'
classpath 'gradle.plugin.com.github.johnrengelman:shadow:' + gradle_shadow_version
// classpath 'gradle.plugin.se.bjurr.violations:violations-gradle-plugin:1.52.2'
// classpath 'com.github.jk1:gradle-license-report:1.17'
}
Expand Down
Binary file modified src/docs/TAK_Server_Configuration_Guide.odt
Binary file not shown.
Binary file modified src/docs/TAK_Server_Configuration_Guide.pdf
Binary file not shown.
24 changes: 13 additions & 11 deletions src/federation-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@ apply plugin: 'maven-publish'
version = '0.0.1-SNAPSHOT'

dependencies {
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: log4j_api_version
compile group: 'org.apache.logging.log4j', name: 'log4j-to-slf4j', version: log4j_api_version
compile group: 'org.slf4j', name: 'slf4j-api', version: slf4j_version
compile group: 'org.slf4j', name: 'log4j-over-slf4j', version: slf4j_version
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: log4j_api_version
implementation group: 'org.apache.logging.log4j', name: 'log4j-to-slf4j', version: log4j_api_version
implementation group: 'org.slf4j', name: 'slf4j-api', version: slf4j_version
implementation group: 'org.slf4j', name: 'log4j-over-slf4j', version: slf4j_version

compile project(':takserver-fig-core')
api project(':takserver-fig-core')

// Apache Ignite (cache and distributed service grid).
// compile group: 'org.apache.ignite', name: 'ignite-spring', version: ignite_spring_version
// compile group: 'org.apache.ignite', name: 'ignite-spring-cache-ext', version: ignite_spring_cache_version
compile group: 'org.springframework', name: 'spring-beans', version: spring_version
compile group: 'org.springframework', name: 'spring-context', version: spring_version
// implementation group: 'org.apache.ignite', name: 'ignite-spring', version: ignite_spring_version
// implementation group: 'org.apache.ignite', name: 'ignite-spring-cache-ext', version: ignite_spring_cache_version
implementation group: 'org.springframework', name: 'spring-beans', version: spring_version
implementation group: 'org.springframework', name: 'spring-context', version: spring_version


compile group: 'org.apache.ignite', name: 'ignite-kubernetes', version: ignite_version
compile group: 'org.apache.ignite', name: 'ignite-slf4j', version: ignite_version
implementation group: 'org.apache.ignite', name: 'ignite-kubernetes', version: ignite_version
implementation group: 'org.apache.ignite', name: 'ignite-slf4j', version: ignite_version
implementation 'org.apache.commons:commons-lang3:' + commons_lang_version
implementation group: 'commons-codec', name: 'commons-codec', version: commons_codec_version
}

compileJava {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,69 @@
* Filter Expression - the filter expression of this edge.
*/
public class FederateEdge {

public enum GroupFilterType {
ALL, ALLOWED, DISALLOWED, ALLOWED_AND_DISALLOWED

}

public static GroupFilterType getGroupFilterType(String name) {
if ("allGroups".equals(name.toLowerCase())) {
return GroupFilterType.ALL;
}

if ("allowed".equals(name.toLowerCase())) {
return GroupFilterType.ALLOWED;
}

if ("disallowed".equals(name.toLowerCase())) {
return GroupFilterType.DISALLOWED;
}

if ("allowedanddisallowed".equals(name.toLowerCase())) {
return GroupFilterType.ALLOWED_AND_DISALLOWED;
}

return GroupFilterType.ALL;
}

private final FederateIdentity source;
private final FederateIdentity destination;
private final Set<FederationFilter> filterSet;
private final String filterExpression;
private final Set<String> allowedGroups;
private final Set<String> disallowedGroups;
private final GroupFilterType filterType;

public FederateEdge(FederateIdentity source, FederateIdentity destination,
String filterExpression) {
String filterExpression, Set<String> allowedGroups, Set<String> disallowedGroups,
GroupFilterType filterType) {
this.source = source;
this.destination = destination;

filterSet = new HashSet<>();
this.filterExpression = filterExpression;

this.allowedGroups = allowedGroups;
this.disallowedGroups = disallowedGroups;
this.filterType = filterType;
}



public Set<String> getAllowedGroups() {
return allowedGroups;
}

public Set<String> getDisallowedGroups() {
return disallowedGroups;
}

public FederateIdentity getSourceIdentity() {
public GroupFilterType getFilterType() {
return filterType;
}

public FederateIdentity getSourceIdentity() {
return source;
}

Expand Down Expand Up @@ -75,17 +124,9 @@ public String getFilterExpression() {
}

@Override
public String toString() {
StringBuilder builder = new StringBuilder(67);
builder.append("FederateEdge [source=")
.append(source)
.append(", destination=")
.append(destination)
.append(", filterSet=")
.append(filterSet)
.append(", filterExpression=")
.append(filterExpression)
.append(']');
return builder.toString();
}
public String toString() {
return "FederateEdge [source=" + source + ", destination=" + destination + ", filterSet=" + filterSet
+ ", filterExpression=" + filterExpression + ", allowedGroups=" + allowedGroups + ", disallowedGroups="
+ disallowedGroups + ", filterType=" + filterType + "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import java.util.Map;
import java.util.Set;

import tak.server.federation.hub.policy.FederationPolicyGraphImpl.FederationPolicyReachabilityHolder;

/*
* Interface for a FederationPolicyGraph object to represent a federation
* policy as defined by the federation policy schema.
Expand Down Expand Up @@ -109,16 +111,30 @@ public boolean isReachable(String sourceUid,
* has a valid path to. Throws FederationException if the
* given source node does not exist.
*/
public Set<Federate> allReachableFederates(FederationNode source)
public FederationPolicyReachabilityHolder allReachableFederates(FederationNode source)
throws FederationException;

/*
* Returns the set of all nodes that the given source node
* indicated by the sourceUid has a valid path to. Throws
* FederationException if the given source node does not exist.
*/
public Set<Federate> allReachableFederates(String sourceUid)
public FederationPolicyReachabilityHolder allReachableFederates(String sourceUid)
throws FederationException;

/*
* Returns the set of all nodes that have a valid path to
* the source node. Throws FederationException if the
* given source node does not exist.
*/
Set<Federate> allReceivableFederates(FederationNode source) throws FederationException;

/*
* Returns the set of all nodes that have a valid path to
* the node with the given sourceUid. Throws FederationException if the
* given source node does not exist.
*/
Set<Federate> allReceivableFederates(String sourceUid) throws FederationException;

/* Operations on edges. */

Expand Down
Loading

0 comments on commit cab78ea

Please sign in to comment.