@Service @ConditionalOnBean(value=ResourcesManagerConfiguration.class) public class ResourcesManagerService extends Object
Constructor and Description |
---|
ResourcesManagerService(PunchplatformConfiguration punchConf,
ResourcesManagerConfiguration conf) |
Modifier and Type | Method and Description |
---|---|
List<org.thales.punch.libraries.resources.manager.metadata.pojo.Metadata> |
copy(String name,
Long version,
String toPath)
copy a resource from its original name to a new destination
|
void |
delete(String resourceName,
List<Long> versions)
Delete a resource data and metadata
|
InputStream |
get(String name,
Long version)
Get a resource data according to its name and version (nullable)
|
List<org.thales.punch.libraries.resources.manager.metadata.pojo.Metadata> |
list(String pattern,
boolean onlyLastVersion,
Map<String,Object> filters)
Return a list of metadata
|
List<org.thales.punch.libraries.resources.manager.metadata.pojo.Metadata> |
move(String name,
Long version,
String toPath)
copy a resource from its original name to a new destination
|
org.thales.punch.libraries.resources.manager.metadata.pojo.Metadata |
put(String name,
InputStream dataStream,
Long version,
Map<String,Object> properties)
upload a resource to the data storage and generate its metadata
|
org.thales.punch.libraries.resources.manager.metadata.pojo.Metadata |
register(String registeringPath,
String toPath,
Long version,
Map<String,Object> properties)
Register metadata for an existing resource
|
org.thales.punch.libraries.resources.manager.metadata.pojo.Metadata |
update(String path,
Long version,
Map<String,Object> properties)
Update properties of a resource
|
@Autowired public ResourcesManagerService(PunchplatformConfiguration punchConf, ResourcesManagerConfiguration conf) throws IOException, org.thales.punch.libraries.resources.manager.exceptions.PunchRmConfigException
IOException
org.thales.punch.libraries.resources.manager.exceptions.PunchRmConfigException
public org.thales.punch.libraries.resources.manager.metadata.pojo.Metadata put(String name, InputStream dataStream, Long version, Map<String,Object> properties)
name
- name of the resourcedataStream
- inputversion
- Resource versionproperties
- Resource propertiespublic InputStream get(String name, Long version)
name
- name of the resourceversion
- version of the resource. If null, return the data of the last versionpublic List<org.thales.punch.libraries.resources.manager.metadata.pojo.Metadata> list(String pattern, boolean onlyLastVersion, Map<String,Object> filters)
filters
- key=value pairs to filter on metadata custom propertiespublic void delete(String resourceName, List<Long> versions)
resourceName
- name of the resourceversions
- List of versionspublic List<org.thales.punch.libraries.resources.manager.metadata.pojo.Metadata> copy(String name, Long version, String toPath)
name
- name of the original resource to copyversion
- resource versiontoPath
- Where to save the new resourcepublic List<org.thales.punch.libraries.resources.manager.metadata.pojo.Metadata> move(String name, Long version, String toPath)
name
- name of the original resource to copyversion
- resource versiontoPath
- Where to move the original contentpublic org.thales.punch.libraries.resources.manager.metadata.pojo.Metadata register(String registeringPath, String toPath, Long version, Map<String,Object> properties)
registeringPath
- name of the resource to registerversion
- resource versionproperties
- public org.thales.punch.libraries.resources.manager.metadata.pojo.Metadata update(String path, Long version, Map<String,Object> properties)
path
- Resource path to updateversion
- Resource version to updateproperties
- New properties to set for this resourceCopyright © 2023. All rights reserved.