Commit a8e89e2d authored by Christos Tranoris's avatar Christos Tranoris
Browse files

Edit README.md

parent 528b594c
Loading
Loading
Loading
Loading
Loading
+0 −46
Original line number Diff line number Diff line
@@ -70,49 +70,6 @@ mvn spring-boot:run
- **HTTP Callbacks**: Subscribe to resource/service changes via REST callbacks
- **Transaction Management**: Proper handling of distributed transactions with Camel

## Resource Inventory API (ri639) - Recent Updates

### New Category-based Query Routes

The Resource Inventory API now supports retrieving resources filtered by category:

#### CATALOG_GET_RESOURCE_BY_CATEGORY Route
- **Endpoint**: `jms:queue:CATALOG.GET.RESOURCE_BY_CATEGORY`
- **Header Parameter**: `category` (String) - The category to filter by
- **Response**: JSON array of resource summaries
- **Fields Returned**: `id`, `@type`, `name`, `category`, `description`
- **Usage**: Quick listing of resources without full entity details

#### Service Methods

1. **getResourcesByCategory(String category)**
   - Lightweight resource summaries as `List<Map<String, Object>>`
   - Efficient HQL querying
   - Ordered by resource name

2. **getDetailedResourcesByCategory(String categoryName)**
   - Full `List<Resource>` entities with all relationships
   - Eagerly initializes lazy collections (characteristics, notes, related parties, etc.)
   - Error handling and transaction management included

### Example Usage

```java
// Via ProducerTemplate
template.sendBodyAndHeaders(
    "jms:queue:CATALOG.GET.RESOURCE_BY_CATEGORY",
    null,
    Map.of("category", "NetworkEquipment")
);

// Direct method call - lightweight
List<Map<String, Object>> resources =
    resourceRepoService.getResourcesByCategory("NetworkEquipment");

// Direct method call - detailed
List<Resource> detailedResources =
    resourceRepoService.getDetailedResourcesByCategory("NetworkEquipment");
```

## Database Configuration

@@ -129,9 +86,6 @@ List<Resource> detailedResources =
- Thread safety: 3 forks, alphabetical order, no parallelism
- Memory optimization: JaCoCo disabled, connection pool size reduced

## Documentation

See `CLAUDE.md` for detailed architecture documentation, testing best practices, and implementation guidelines for developers.

## Dependencies