What's new

Discovering repository file paths from API, or similar

alexfranke

Senior Member
Discovering repository file paths from API, or similar

Hi there,

One of the users in the Enhancements forum is pretty frustrated by not being able to search the repository and I'd like to try to help out if possible. Because I don't have repository funcitonality in my version of Alibre Xpress, I'm kind of flying blind, but I wonder if anyone here might be able to shed some light on the issue.

The repository is clearly a type of source and version control, so here a couple questions I'm hoping to get answers to:

1) Does the API (e.g. FilderItem.Reference) expose anything that might lead me to the Windows filesystem path of the file? (I can even search within the files to make a comparison.)
2) Is the file, stored in a "binaries" folder, encoded, compressed or encrypted when it goes into the filesystem, or is it essentailly a normal AD file but with a GUID as its name?
3) Are versions stored as separate files in "binanries" or are they combined in some way with the original file?
4) The FolderItem.Reference property seems to provide a pipe-delimited name and GUID followed by two other fields. Any idea what the last two fields mean? Is the last one a version?

Thanks for your help!
Cheers,
Alex Franke
 

shubhab

Member


Hi Alex,

To answer your questions:

1) Does the API (e.g. FolderItem.Reference) expose anything that might lead me to the Windows filesystem path of the file? (I can even search within the files to make a comparison.)

>> No, FolderItem.Reference only provides the Repository GUID, but not the actual location in Windows where you can find it. (The reason was that we din't want our users to manipulate them unintentionally, because it can cause data loss).

2) Is the file, stored in a "binaries" folder, encoded, compressed or encrypted when it goes into the filesystem, or is it essentailly a normal AD file but with a GUID as its name?

>> It is an encoded file, and NOT a normal AD file. You will not be able to either open or import the file. It is meant only to be viewed and manipulated from within the Repository (via the Repository GUI)

3) Are versions stored as separate files in "binanries" or are they combined in some way with the original file?

>> They are combined with the original file, I believe. I might be incorrect here. I'll clarify this withour Development team.

4) The FolderItem.Reference property seems to provide a pipe-delimited name and GUID followed by two other fields. Any idea what the last two fields mean? Is the last one a version?

>> The last field, is the type of item you are referring to. For e.g., if it's AD_PART type, then you get 1, if AD_ASSEMBLY type, then you get 2 and so on. It's not the version.
Version information can be obtained by CurrentVersionID property on IADFolderItem.
As far as the last but one filed, are you referring to that GUID of the item?

Thanks,
Shubha,
Alibre, Inc.
 

alexfranke

Senior Member


Thanks for the quick reply, Shubha!

So it sounds like the repository takes a file, encodes it, assigns it two GUIDs (one for FolderItem.Reference and one for the file name) and probably manages the relationship between those GUIDs in the ADB file (I'm guessig here). Did I get that right?

Is is possible to glean this relationship from the key file (ADB file, I'm guessing)? The user specifically wants repository search functionality that includes file system information such as created/modified date. Can you think of any ways to accomplish this through the API?

In any case, I would add this to the API enhancement list -- ideally allow the physical files to be discoverable, or provide file system data about those files. I don't think you would need to worry about users manipulating them unintentionally because very few use the API, and those that discover the locations through the API will have a very intentional purpose for doing so...

As far as the last but one filed, are you referring to that GUID of the item?

From the example I saw, it looked like:

Code:
[partName]|[GUID]|[empty]|[partType]

...where the [empty] field what what I was referring to.


Thanks!
Alex Franke
 

shubhab

Member


Hi Alex,

The Repository API lets you create and manipulate data from within the Repository GUI. You will not be able to and in fact we don't intend to provide any functionality to manipulate the ADB or other files which are the internal representations of what you see in the Repository GUI.

Thanks,
Shubha,
Alibre, Inc.
 

alexfranke

Senior Member


Okay -- I'll post an enhancement request for the alternative then -- to provide some date/time information about repository files through the API, such as created date, modified date, and I suppose even version control dates would be good -- like last check in datetime, last check-out datetime, last label, etc.

Thanks for the info!

Cheers,
Alex
 
Top