IBM Connections Files CMIS: Unable to find object at path /My Files - lotus

I am using DotCMIS with no problem to connect to Alfresco and FileNet.
I registered for an IBM Connections account, added a few files via the web interface, and tried to connect to its CMIS endpoint https://greenhouse.lotus.com/files/basic/cmis/my/servicedoc
GetRepositories on this URL gives one repository, which in turn contain the two folders below:
My Files
My Folders
But when I run GetObjectByPath("/My Files") in the same repository, I get:
DotCMIS.Exceptions.CmisObjectNotFoundException was unhandled
Message=Not Found
Source=DotCMIS
ErrorContent=<?xml version="1.0" encoding="UTF-8"?><lcmis:error xmlns:lcmis="http://www.ibm.com/xmlns/prod/sn/cmis"><lcmis:code>objectNotFound</lcmis:code><lcmis:message>EJPVJ9023E: Unable to find object at path /My Files</lcmis:message><lcmis:userAction></lcmis:userAction></lcmis:error>
What does IBM Connections say Unable to find object at path /My Files despite My Files being a folder at the root of the repository?

The cmis:name property ("My Files", "My Folers") is localized. A non-English user would get different cmis:name property values for these two objects.
To fetch children from these resources, you need to build the path using the cmis:path property returned on each object or construct the path relative to its parent using the cmisra:pathSegment.
For example, the cmis:object for the resource labeled "My Files" in your scenario has the following:
<cmis:propertyString propertyDefinitionId="cmis:path"
localName="cmis_path" displayName="Path" queryName="cmis:path">
<cmis:value>/files</cmis:value>
</cmis:propertyString>
So to actually fetch the user's files, the path to call is the following:
GetObjectByPath("/files")
And to fetch the user's folders, the path to call is the following:
GetObjectByPath("/collections")
The net is to ensure you build paths using the cmisra:pathSegment or the cmis:path property, and not the cmis:name as this may not be valid in all scenarios (i.e. if the repository has same name siblings, etc.).

Related

Azure bot framework Composer publish with own json data files

I am using json files to store data that is loaded by an LG function. I have the json files within a custom directory under the dialog folder e.g.
mybot/
dialogs/
mydialog/
knowledge-base
language-generation
language-understanding
myfolder/
myfile1.json
myfile2.json
The path I use is relative to the dialog folder e.g.
# MyTemplate(name)
- ${json(fromFile(concat("../../myfolder/",name)))}
Works when testing locally, fails when deployed to Azure webapp
mydialog.en-us.lg:Could not find a part of the path ‘D:\home\site\wwwroot\ComposerDialogs\dialogs\mydialog\myfolder\myfile1.json'
Anyone know what the correct path name should be?
I've tried several different locations for "myfolder" - none work.
I suspect the question should be "How do I tell Composer to include this folder when it builds and deploys the bot?".

Where to save application data in windows?

I am trying to make a windows application. In this application, some files get modified as a user add or delete an entry. I saved these files on the application folder itself.
But After making binary file I installed it, As I try to add a entry it get crashed.
So, I figured out the issue. The windows doesn't allow to modified files inside C:\Program Files.
So, I installed it in other drive and it works. It solved my issue temporarily but I want to know how other application works in windows.
Where do those applications save their data?
I am not talking about some data which get saved in "Documents" but something which is essential need to modified every time user makes change like theme, formates.
No user access is allowed to the "program folder", and that's for good: it is a system folder, and it should only be accessed for system related operations (like installing or uninstalling a program).
There are many places where "program data" can be stored depending on the situation, and QStandardPaths provides access to their paths, according to the category location. What you might be interested in are:
ConfigLocation: Returns a directory location where user-specific configuration files should be written. This may be either a generic value or application-specific, and the returned path is never empty.
AppDataLocation: Returns a directory location where persistent application data can be stored. This is an application-specific directory.
AppLocalDataLocation: As the previous one, but Windows specific.
AppConfigLocation: Returns a directory location where user-specific configuration files should be written. This is an application-specific directory, and the returned path is never empty.
Those paths (along with the others listed in the documentation) can be accessed using the following static methods:
standardLocations(locationType): returns a list of paths for the requested location type, in order of priority (the first is usually the preferred one);
writableLocation(locationType): returns the preferred path for which write access is allowed (usually the first of the standardLocations());
If you need to store the user configuration, you can use QStandardPaths.writableLocation(AppConfigLocation), while if you have some user-specific internal data that is used by the application (email database, document templates, etc) QStandardPaths.writableLocation(AppLocalDataLocation) should be a good choice.
In both cases, those paths may not exist, so you need to ensure that and eventually create them, possibly by using QDir(path):
dataPath = QtCore.QStandardPaths.writableLocation(AppLocalDataLocation)
dataPathDir = QtCore.QDir(dataPath)
if not dataPathDir.exists():
# create the directory (including parent directories if they don't exist);
# that the argument of mkpath is relative to the QDir's object path, so
# using '.' means that it will create the actual dataPath
dataPathDir.mkpath('.')
Note that for all of the above (especially the last 3) it's required that you correctly set both the organizationName and the applicationName.

Get file path from FTPService for use in RoutingEngine

I have a service of class EnsLib.HL7.Service.FTPService that picks up files from multiple subfolders and sends them to an EnsLib.HL7.MsgRouter.RoutingEngine. What I want to do is somehow capture the subfolder as a variable for use in the routing rules. Is this possible?
Let's say I have the following files and directory structure on my FTP Server
/incoming/green/apple.dat
/incoming/yellow/banana.dat
I want the Routing Rule to be able to send anything that came from the /green/ folder to one operation and from /yellow/ to another.
With a message viewer, you can trace any messages. Where you can see any message properties, and one of them is Source. Text in this property looks like:
Source apple.dat via FTP localhost:21 path '/incoming/green/'
So with all of this data, you can create a rule by this property in a Rule editor

Google Drive api scope and file access (drive vs drive.files)

I have created two refresh tokens for me:
one for
SCOPE = 'https://www.googleapis.com/auth/drive'
and another
SCOPE = 'https://www.googleapis.com/auth/drive.file'
I'm trying to get information about files (using get method)
Some files I can get when using SCOPE drive.files, and some only when using wider scope drive
But I can not figure out what is the reason for that? Files are located in different folders but have one shared root folder.
The difference is that 'drive.file' only gives you permission to files that your app has created or the user has explicitly shared with your app, whereas 'drive' gives your app permission to see the all the files in the user's drive.
See
https://developers.google.com/drive/web/scopes
You should really look into using drive.file, that is where they are trying to push users. I was just fighting with this myself and found that if you use the drive.file scope, you can then subsequently open the file that is chosen using the API for the file type, but only if you set the correct AppID.
See here: https://developers.google.com/picker/docs/#gdata
This allows you to get past the 404 error that you get if you don't set the AppID.

ColdFusion error after hosting transfer

I recently moved a ColdFusion site from one domain to the other with no issue (practically) besides one which I am having some trouble figuring out. I am a LAMP developer / designer and CF is a bit foreign to me so pardon my ignorance.
The site is working properly except for the store component, I am getting the following error "The .cart.models.store name is not a valid component or interface name.Component and interface names cannot be empty and cannot start or end with a period.". The only piece of code that I have changed throughout this process has been the config.ini, I changed the vmap=SitenameDev to vmap= as the notes in this file recommneded to do if the directory housing the site was the webroot directory.
Any insight on this error or common issues when transferring will be greatly appreciated, as always.
JN
FYI, the config.ini is something specific to the app you're dealing not a ColdFusion convention of any sort. Most likely the "vmap" entry therein means "virtual mapping". Its value is probably being used to resolve a path to an object (i.e. [value of vmap] + ".cart.models.store". With it empty, you're getting an error because ColdFusion wants its paths to not start with a period, and is unable to resolve the location of the file its looking for to create an object.
So previously this path was "SitenameDev.cart.models.store". What you need to do is figure out what directory houses the "cart\models\store" hierarchy. Then in the ColdFusion administrator setup a mapping to its parent directory - that is an alias to a physical directory that ColdFusion recognizes. Then whatever alias you choose should be set as the "vmap" value in the config.ini file.

Resources