Loading src/policy/src/main/java/eu/teraflow/policy/context/model/Uuid.java→src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigActionEnum.java +4 −11 Original line number Diff line number Diff line Loading @@ -16,15 +16,8 @@ package eu.teraflow.policy.context.model; public class Uuid { private String id; public Uuid(String id) { this.id = id; } public String getId() { return id; } public enum ConfigActionEnum { UNDEFINED, SET, DELETE } src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigRule.java 0 → 100644 +49 −0 Original line number Diff line number Diff line /* * Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package eu.teraflow.policy.context.model; public class ConfigRule { private final ConfigActionEnum action; private final String resourceKey; private final String resourceValue; public ConfigRule(ConfigActionEnum action, String resourceKey, String resourceValue) { this.action = action; this.resourceKey = resourceKey; this.resourceValue = resourceValue; } public ConfigActionEnum getAction() { return action; } public String getResourceKey() { return resourceKey; } public String getResourceValue() { return resourceValue; } @Override public String toString() { return String.format( "%s:{action:\"%s\", resourceKey:\"%s\", resourceValue:\"%s\"}", getClass().getSimpleName(), action.toString(), resourceKey, resourceValue); } } src/policy/src/main/java/eu/teraflow/policy/context/model/Constraint.java 0 → 100644 +43 −0 Original line number Diff line number Diff line /* * Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package eu.teraflow.policy.context.model; public class Constraint { private final String constraintType; private final String constraintValue; public Constraint(String constraintType, String constraintValue) { this.constraintType = constraintType; this.constraintValue = constraintValue; } public String getConstraintType() { return constraintType; } public String getConstraintValue() { return constraintValue; } @Override public String toString() { return String.format( "%s:{constraintType:\"%s\", constraintValue:\"%s\"}", getClass().getSimpleName(), constraintType, constraintValue); } } src/policy/src/main/java/eu/teraflow/policy/context/model/EndPointId.java 0 → 100644 +49 −0 Original line number Diff line number Diff line /* * Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package eu.teraflow.policy.context.model; public class EndPointId { private final TopologyId topologyId; private final String deviceId; private final String id; public EndPointId(TopologyId topologyId, String deviceId, String id) { this.topologyId = topologyId; this.deviceId = deviceId; this.id = id; } public TopologyId getTopologyId() { return topologyId; } public String getDeviceId() { return deviceId; } public String getId() { return id; } @Override public String toString() { return String.format( "%s:{%s, deviceId:\"%s\", id:\"%s\"}", getClass().getSimpleName(), topologyId, deviceId, id); } } src/policy/src/main/java/eu/teraflow/policy/context/model/Event.java +7 −0 Original line number Diff line number Diff line Loading @@ -33,4 +33,11 @@ public class Event { public EventTypeEnum getEventTypeEnum() { return eventType; } @Override public String toString() { return String.format( "%s:{timestamp:\"%f\", eventType:\"%s\"}", getClass().getSimpleName(), timestamp, eventType.toString()); } } Loading
src/policy/src/main/java/eu/teraflow/policy/context/model/Uuid.java→src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigActionEnum.java +4 −11 Original line number Diff line number Diff line Loading @@ -16,15 +16,8 @@ package eu.teraflow.policy.context.model; public class Uuid { private String id; public Uuid(String id) { this.id = id; } public String getId() { return id; } public enum ConfigActionEnum { UNDEFINED, SET, DELETE }
src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigRule.java 0 → 100644 +49 −0 Original line number Diff line number Diff line /* * Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package eu.teraflow.policy.context.model; public class ConfigRule { private final ConfigActionEnum action; private final String resourceKey; private final String resourceValue; public ConfigRule(ConfigActionEnum action, String resourceKey, String resourceValue) { this.action = action; this.resourceKey = resourceKey; this.resourceValue = resourceValue; } public ConfigActionEnum getAction() { return action; } public String getResourceKey() { return resourceKey; } public String getResourceValue() { return resourceValue; } @Override public String toString() { return String.format( "%s:{action:\"%s\", resourceKey:\"%s\", resourceValue:\"%s\"}", getClass().getSimpleName(), action.toString(), resourceKey, resourceValue); } }
src/policy/src/main/java/eu/teraflow/policy/context/model/Constraint.java 0 → 100644 +43 −0 Original line number Diff line number Diff line /* * Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package eu.teraflow.policy.context.model; public class Constraint { private final String constraintType; private final String constraintValue; public Constraint(String constraintType, String constraintValue) { this.constraintType = constraintType; this.constraintValue = constraintValue; } public String getConstraintType() { return constraintType; } public String getConstraintValue() { return constraintValue; } @Override public String toString() { return String.format( "%s:{constraintType:\"%s\", constraintValue:\"%s\"}", getClass().getSimpleName(), constraintType, constraintValue); } }
src/policy/src/main/java/eu/teraflow/policy/context/model/EndPointId.java 0 → 100644 +49 −0 Original line number Diff line number Diff line /* * Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package eu.teraflow.policy.context.model; public class EndPointId { private final TopologyId topologyId; private final String deviceId; private final String id; public EndPointId(TopologyId topologyId, String deviceId, String id) { this.topologyId = topologyId; this.deviceId = deviceId; this.id = id; } public TopologyId getTopologyId() { return topologyId; } public String getDeviceId() { return deviceId; } public String getId() { return id; } @Override public String toString() { return String.format( "%s:{%s, deviceId:\"%s\", id:\"%s\"}", getClass().getSimpleName(), topologyId, deviceId, id); } }
src/policy/src/main/java/eu/teraflow/policy/context/model/Event.java +7 −0 Original line number Diff line number Diff line Loading @@ -33,4 +33,11 @@ public class Event { public EventTypeEnum getEventTypeEnum() { return eventType; } @Override public String toString() { return String.format( "%s:{timestamp:\"%f\", eventType:\"%s\"}", getClass().getSimpleName(), timestamp, eventType.toString()); } }