ENTAXY-480 release version 1.8.3

This commit is contained in:
2023-08-03 04:44:09 +03:00
parent 603889d627
commit 5844a2e5cf
2546 changed files with 11242 additions and 207556 deletions

View File

@ -3,7 +3,7 @@
<parent>
<groupId>ru.entaxy.esb.platform.runtime.base</groupId>
<artifactId>objects-base</artifactId>
<version>1.8.2.2</version>
<version>1.8.3</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.base.objects-base</groupId>
<artifactId>objects-core</artifactId>

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* test-producers
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -23,6 +23,7 @@ public interface EntaxyObject {
public interface HEADERS {
String ENTAXY_GENERATED = "Entaxy-Generated";
String MAIN_OBJECT = "Entaxy-Main-Object";
String GENERATED_OBJECTS = "Entaxy-Generated-Object";
// public static final String HEADER_MAIN_OBJECT_ID = "Entaxy-Main-Object-Id";
@ -73,11 +74,22 @@ public interface EntaxyObject {
public long getBundleId();
}
public String getObjectId();
public String getObjectType();
public default String getObjectFullId() {
return getObjectId() + ":" + getObjectType();
public String getId();
public String getType();
@Deprecated
public default String getObjectId() {
return getId();
};
@Deprecated
public default String getObjectType() {
return getType();
};
public default String getObjectFullId() {
return getId() + ":" + getType();
};
public String getScope();
public String getFactoryId();
public BundleInfo getBundleInfo();

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* test-producers
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -24,5 +24,7 @@ import java.util.List;
public interface EntaxyObjectService {
public List<EntaxyObject> getObjects();
public EntaxyObject findObject(String objectId, String objectType);
}

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* test-producers
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* test-producers
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* test-producers
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* test-producers
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -22,6 +22,7 @@ package ru.entaxy.platform.base.objects.service.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
import org.osgi.framework.Bundle;
@ -69,6 +70,14 @@ public class EntaxyObjectServiceImpl implements EntaxyObjectService {
return trackedObjects.values().stream().collect(Collectors.toList());
}
@Override
public EntaxyObject findObject(String objectId, String objectType) {
Optional<EntaxyObject> object = getObjects().stream()
.filter(obj -> (obj.getObjectId().equals(objectId) && obj.getObjectType().equals(objectType)))
.findFirst();
return object.orElse(null);
}
protected void openTracker() {
objectTracker = BundleTrackerUtils.<List<TrackedEntaxyObject>>createBuilder()
.addFilter(

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* test-producers
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -32,11 +32,16 @@ public class TrackedEntaxyObject implements EntaxyObject {
static public TrackedEntaxyObject create(BundleContext bundleContext, String objectId, String objectType) {
return new TrackedEntaxyObject(bundleContext, objectId, objectType);
}
static public TrackedEntaxyObject create(BundleContext bundleContext, String objectId, String objectType, String scope) {
return new TrackedEntaxyObject(bundleContext, objectId, objectType, scope);
}
protected BundleContext bundleContext;
protected String objectId;
protected String objectType;
protected String objectScope = "public";
protected String factoryId = "UNKNOWN";
protected JsonObject configuration;
@ -50,16 +55,26 @@ public class TrackedEntaxyObject implements EntaxyObject {
this.objectType = objectType;
}
protected TrackedEntaxyObject(BundleContext bundleContext, String objectId, String objectType, String scope) {
this(bundleContext, objectId, objectType);
this.objectScope = scope;
}
@Override
public String getObjectId() {
public String getId() {
return this.objectId;
}
@Override
public String getObjectType() {
public String getType() {
return this.objectType;
}
@Override
public String getScope() {
return this.objectScope;
}
@Override
public String getFactoryId() {
return this.factoryId;

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* test-producers
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -65,9 +65,19 @@ public class TrackedEntaxyObjectCustomizer extends UniformBundleTrackerCustomize
configuration = "{}";
}
TrackedEntaxyObject obj = TrackedEntaxyObject.create(
objectServiceImpl.getBundleContext(), objectData[0], objectData[1]
).bundle(bundle).configuration(configuration);
TrackedEntaxyObject obj;
if (objectData.length>2)
obj = TrackedEntaxyObject.create(
objectServiceImpl.getBundleContext()
, objectData[0]
, objectData[1]
, objectData[2]
);
else
obj = TrackedEntaxyObject.create(
objectServiceImpl.getBundleContext(), objectData[0], objectData[1]
);
obj.bundle(bundle).configuration(configuration);
result.add(obj);
}

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* test-producers
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* test-producers
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* test-producers
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -36,14 +36,16 @@ public class ListObjects extends EntaxyObjectServiceSupport implements Action {
ShellTable shellTable = new ShellTable();
shellTable.column("Id");
shellTable.column("Type");
shellTable.column("Scope");
shellTable.column("Full Id");
shellTable.column("Factory Id");
shellTable.column("Bundle Id");
for (EntaxyObject object: objectService.getObjects())
shellTable.addRow().addContent(
object.getObjectId(),
object.getObjectType(),
object.getId(),
object.getType(),
object.getScope(),
object.getObjectFullId(),
object.getFactoryId(),
object.getBundleInfo().getBundleId()

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* test-producers
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* test-producers
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* test-producers
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* test-producers
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.