Is it possible to upload properties file to aws parameter store and fetch one element in the file based on a key? - aws-sdk

In spring-cloud-config, it is possible to configure a properties file and then fetch an element in the properties file using the key.
But in aws parameter store, each key value is stored as a separate entry. As i understand, i need to take each key-value from the properties file and then configure in parameter store.
In reality, each region (DEV, QA etc.) has a set of configuration files. Each configuration file has a set of properties in it. These files can be grouped based on the hierarchy support that parameter store provides.
SDLC REGION >> FILE >> KEY-VALUE ENTRIES
SDLC region can be supported by hierarchy. Key-value entries are supported by parameter store. How do we manage the FILE entity in parameter store?

you can use the path hierarchy and get parameters by path or by name prefix.
e.g.
SDLC_REGION/FILE/param1
SDLC_REGION/FILE/param2
SDLC_REGION2/FILE/param1
SDLC_REGION2/FILE/param2
then you can get by path: /SDLC_REGION/FILE to get all it parameters
another option is using tags

Related

Autodesk-Forge bucket system: New versioning

I am wondering of what is the best practise for handling new version of the same model in the Data Management API Bucket system
Currently, I have one bucket per user and the files with same name overwrites the existing model when doing a svf/svf2 conversion.
In order to handle model versioning in be the best manner, should I :
create one bucket per file converted
or
continue with one bucket per user.
If 1): is there a limitation of number of buckets which is possible to create?
else 2): How do I get the translation to accept an bucketKey different than the file name? (As it is now, the uploaded file need to be the filename to get the translation going.)
In advance, cheers for the assistance.
In order to translate a file, you do not have to keep the original file name, but you do need to keep the file extension (e.g. *.rvt), so that the Model Derivative service knows which translator to use. So you could just create files with different names: perhaps add a suffix like "_v1" etc or generate random names and keep track of which file is what version of what model in a database. Up to you.
There is no limit on number of buckets, but it might be an overkill to have a separate one for each file.

persistence of externalId Navisworks files

I've been using the externalId to uniquely refer to objects in the forge viewer and connect them with outside data about these objects. This has worked well for revit files, which have a kind of GUID 86715290-fa28-4ff5-aef9-8c75d7c81e77-0012917b. Now I'm working with a Navisworks file, and their externalId use looks very different with values like a, 0 or 0/0/0/. How persistent are these, I can imagine not globally unique, but do changes/removals/additions keep them unique within the file? What is the suggested strategy to globally refer to solids in Navisworks files?
The external id of the path through the model selection tree to that element started from 0, see the snapshot below:
As I know:
In Revit case, it uses a unique id of the element (saying Element.UniqueId of the Revit API) as the externalId. However, the Navisworks doesn't have a concept unique id since it will have to handle different formats and some source models don't have unique id either. Therefore, it uses the selection tree path as the externalId instead.
Thus,
To preserve the identity information of the Revit elements, I would like to advise you to add a Revit shared parameter to store the value of the Element.UniqueId, and identify the element by this parameter.

How can I change the names of objects in a DWFx file?

I did a conversion program to change the object structure of a DWFx file, and it works fine. What I did was to open the DWFx file as a zip archive, parse the internal XML files, and reorganize them, creating new parent nodes when needed.
But what doesn't work is changing the names of these nodes. When I open the file in any Autodesk viewer (the offline Design Review program and the online Viewer are the ones I tested), the tree structure is changed as it should, but the parent node names are not. In fact, the nodes that already existed keep their old names, and the new ones are called Object XXXX. The child nodes (actual objects) have their names changed correctly.
I tried to search in every readable (text) file inside the DWFx, but none of them hold any other reference to these nodes. I didn't open binary files, like W3D files, which probably hold the geometry.
Does anyone have any experience in creating or altering DWFx files? Do I need to change anything else besides the 'label' tag in the Presentation XML file?
Instead of manipulating the contents of DWFx files manually, consider using one of the Autodesk Forge services: Design Automation. The APIs allow you to run AutoCAD "in the cloud". You could theoretically load your DWFx file there, update the structure/names, and generate an updated DWFx file. Here's an example of how the service can be used to generate PDFs out of DWG files: https://forge.autodesk.com/en/docs/design-automation/v2/tutorials/convert-dwg-to-pdf.

Problems working with the ACL of a folder in Google Cloud Storage

I've created an object inside a folder in Google Cloud Storage whith the following OptionsBuilder object:
GSFileOptionsBuilder optionsBuilder = new GSFileOptionsBuilder()
.setBucket("bucket")
.setKey("folder/obj.csv")
.setMimeType("text/csv");
Making the next structure:
bucket >> folder >> obj.csv
When I run the gsutil command to get ACL for "bucket" and "obj.csv" works fine, however when I execute it for "folder" throws this exception:
GSResponseError: status=404, code=NoSuchKey, reason=Not Found.
The exactly command I run is: gsutil getacl gs://bucket/folder/ > acl.txt
How I can get and set permissions on a folder?
You can only retrieve the ACL of an object or a bucket. There is no such thing as a "folder" in GCS, so you can't set or get the ACL of a folder. I suggest you read the Concepts and Terminology section of the developer guide carefully. In particular, the section on object names:
Object names
An object name is just metadata to Google Cloud Storage. Object names
can contain any combination of Unicode characters (UTF-8 encoded) less
than 1024 bytes in length. A common character to include in file names
is a slash (/). By using slashes in an object name, you can make
objects appear as though they're stored in a hierarchical structure.
For example, you could name one object /europe/france/paris.jpg and
another object /europe/france/cannes.jpg. When you list these objects
they appear to be in a hierarchical directory structure based on
location; however, Google Cloud Storage sees the objects as
independent objects with no hierarchical relationship whatsoever.

Configuring DisplayTag for individual pages

I have too many modules (around 90) in my project.
But I want to keep individual displaytag.properties file for each module rather than having single file for whole project.
How to achieve this.
I am using struts2
I think that you can configure each displaytag using the appropiate bundle, remember the bundle search order from S2 docs:
ActionClass.properties Interface.properties
Interface.properties (every interface and sub-interface)
BaseClass.properties (all the way to Object.properties)
ModelDriven's model (if implements ModelDriven), for the model object repeat from 1
package.properties (of the directory where class is located and every parent directory all the way to the root directory)
search up the i18n message key hierarchy itself
global resource properties
and from the docs for the DisplayTag library:
For the whole web application, create a custom properties file named "displaytag.properties" and place it in the application classpath. Displaytag will use the locale of the request object to determine the locale of the property file to use; if the key required does not exist in the specified file, the key will be loaded from a more general property file.
so i guess that the displaytag will search the config keys in the s2 available bundles.