Getting folder Path if I know the FolderID

Hi
I can get the folder path If I know the folderID I use a pretty elaborate method to do this.
I have been trying to use the andfilter clause and get an invalid cast exception.
Could any one please help
DimSearchFactory AsISearchFactory
SearchFactory = ptSession.GetSearchFactory
DimsearchRequest AsIPortalSearchRequest
searchRequest = SearchFactory.CreatePortalSearchRequest
DimintFolders() AsInteger
ReDimintFolders(0)
intFolders(0) = 200
DimfieldsToReturn(0) AsField
fieldsToReturn(0) = PortalField.FOLDER_PATH 'PortalField.ForID(propertyID)
searchRequest.SetFieldsToReturn(fieldsToReturn)
DimFilterClause AsIFilterClause
FilterClause = SearchFactory.CreateAndFilterClause
FilterClause.AddStatement(PortalField.OBJECT_ID, Operator.Equals, CInt(3044))
searchRequest.SetDocFoldersToSearch(intFolders, True)
DimobjectTypes() AsObjectClass = {ObjectClass.DocumentFolder}
searchRequest.SetObjectTypesToSearch(objectTypes)
searchRequest.SetQuery(SearchFactory) This is where it errors out Invalid Cast exception
DimsearchResponse AsISearchResponse = searchRequest.Execute()

Looks like there's a "path" property in this bad boy
http://www.plumtree.com/edoc/References/ndocs/Plumtree.Remote.PRC.DocumentFolderProperty.Path.html
http://www.plumtree.com/edoc/References/javadocs/com/plumtree/remote/prc/DocumentFolderProperty.html
System.Object Plumtree.Remote.PRC.ObjectProperty Plumtree.Remote.PRC.DocumentFolderProperty
I think (think....) I have a piece of sample code for this somewhere. Let me ask one of our guys if we have something handy.
Thanks,
Eric

Similar Messages

  • CS2/CS3/CS4: Cannot get file path in Unicode of the current document on Windows

    Hi All,
    In my automation plugin I need to have full absolute path of the opened document with any possible non-English letters. Using SDK examples Listener and Getter that come with Photoshop SDK the full absolute path which I obtain is in the default ANSI code page (CP_ACP) and I can convert it to Unicode using MultiByteToWideChar() API. However this works well when I have corresponding to document name language set in the "Control Panel -> Regional and Language Options -> Advanced -> Select a language to match the language version of the non-Unicode programs you want to use." For example if name of the document has Russian letters and chosen language in "Regional and Language Options" is also Russian the described conversion works well. If I change "Regional and Language Options" to English for example, full path returned by Photoshop SDK API (AliasToFullPath in PIUFile.cpp) for the document with Russian letters will contain "????????.psd" symbols.
    So I need to have an ability to get absolute file path in Unicode. Is it possible in Photoshop CS2/CS3/CS4 for Windows? I have searched forum and SDK but could not find info on it.
    Is it possible to have native HANDLE of the opened file to get file info using Windows API?
    Please advice.
    Below given slightly modified code from Photoshop CS3 which I use to get absolute file pat of the opened document.
    Thanks and regards,
    Sergey
    std::string outFilePath;
    int32 theID = 0;
    SPErr error = kSPNoError;
    error = PIUGetInfo(classDocument, keyDocumentID, &theID, NULL);
    if (error == kSPNoError)
    Handle theFileHandle = NULL;
    error = PIUGetInfoByID(theID, classDocument, keyFileReference, &theFileHandle, NULL);
    if (error == kSPNoError)
    int32 length = sPSHandle->GetSize(theFileHandle);
    Boolean oldLock = FALSE;
    Ptr pointer = NULL;
    sPSHandle->SetLock(theFileHandle, true, &pointer, &oldLock);
    if (pointer != NULL)
    outFilePath = (char*)pointer;
    sPSHandle->SetLock(theFileHandle, oldLock, &pointer, &oldLock);

    Hi All,
    Does anybody know, whether it is possible to get Unicode file path of the current document in Photoshop via Photoshop SDK API or without them?
    Thanks,
    Serhiy

  • Get Folder path

    Hi,
    Windows xp,
    Database 10g,
    Forms 10g,
    Is there any way to get os folder path usiing webuitl dialog or at least check the current folder exists or not.
    Thanks,

    Where do you want to verify if a specific directory or file exists? On the client or on the middle tier? You could try to create a file in the directory you want to check (or try to open the file in read mode to check if a file exists) with client_text_io (client) or text_io (middle tier). By that you would also be sure that you have read/write privilages in the directory. If you don't want to create / read a file (on the client) there is the possibility to create a java bean which checks this with the File class (isFile() or isDirectory())
    http://docs.oracle.com/javase/1.4.2/docs/api/java/io/File.html#isDirectory()
    http://docs.oracle.com/javase/1.4.2/docs/api/java/io/File.html#isFile()
    cheers

  • Please help me, I gave my information out to a person and he has changed all my information and now I can't get in.. I know the persons name

    Please help me, I gave my information out to a person and he has changed all my information and I can't log back in.
    Adrian Lee is the person I gave it to.
    He told me to email him my information so he can level me up in the game Clash of Clans so I did and he changed all my information and I told him to give it back via email and he refused but suggested to restore my iPod and it would go back to normal and I dis, I nearly lost everything since I haven't backed it up for a while and I'm a Music Producer, this password is my paycheck, my food, my rent, my everything, now I'm not sure if this is the right place to go to but please help me. i'm begging you to please restore my password.. I'm not asking for anything of what I lost back, just my password so I can change it, get my things back and move on with my life. I have really back anxiety attacks. Please. I'm begging you. You guys are my last chance..
    <Emails Edited By Host>

    If you can't contact the person and get the information back then:
    - Contact the police for help
    - Restore from backup.
    If you can't get it from the person or from a backup then it is lost.
    In the future be carrful about who you give your login information to.

  • How can I get  J2EE Stack Portnumber to know the status of the Adapter

    Replies appriciated and points will be awarded:)
    Thanks,
    Viswanath

    Also,
    you can find the adapter status in below link
    http://<server>:<j2ee port>/mdt/amtServlet
    Regards,
    Sreenivas

  • I get resolution warnings when I know the resolution and image size exceed

    I am using images that exceed the required resolution (300 dpi) for the size used (8 1/2" x 11"). Mostly these are on full page images. anyone run into these problems?

    Error -36 is I/O error, w/o specifying if the error is in the source or the target.
    So, first of all, verify your disk(s) with Disk Utility, just to make sure there's no problem there.
    If there isn't, then there's a problem with the download. Consult "EVE online" (whatever that might be) tech support and user forums.

  • Loading a class via reflection without knowing the full qualified path ?

    Hi there
    I d like to load a class via reflection and call the constructor of the class object. My problem is that I dont know the full qulified name e.g. org.xyz.Classname bur only the Classname.
    I tried different things but none seem to work:
         1. Class c = Class.forName("Classname");  //does not suffice, full qualified name required
    2. ClassLoader classloader = java.lang.ClassLoader.getSystemClassLoader();
             try {
               Class cl = classloader.loadClass(stripFileType(Filename));//if i do not pass the full qualified name i get a ClassNotFoundException
    3. I tried to consruct a class object with my own classloader , calling:
              Class cl = super.defineClass(null, b, 0, b.length );     b is of type byte[]This almost works. I get a class Object without knowing the full qulified path. I can transform a filename into a raw array of bytes and I get the class out of it. But there is still a problem: If there are more than on classes defined in the same textfile I get an InvocationTargetException.
    It looks like this:
    package org.eml.adaptiveUI.demo;
    import com.borland.jbcl.layout.*;
    import java.awt.*;
    import org.eml.adaptiveUI.layout.*;
    import javax.swing.*;
    import java.awt.event.*;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2003</p>
    * <p>Company: </p>
    * @author not attributable
    * @version 1.0
    public class twoButtons extends JFrame {
      SPanel sPanel1 = new SPanel();
      JButton jButton1 = new JButton();
      GridBagLayout gridBagLayout1 = new GridBagLayout();
      GridBagLayout gridBagLayout2 = new GridBagLayout();
      public twoButtons() throws HeadlessException {
        try {
          jbInit();
        catch(Exception e) {
          e.printStackTrace();
      public static void main(String args[]){
        twoButtons twob = new twoButtons();
        twob.pack();
        twob.show();
      private void jbInit() throws Exception {
        this.getContentPane().setLayout(gridBagLayout1);
        jButton1.setText("button 1");
        jButton1.addActionListener(new TransformationDemo_jButton1_actionAdapter(this));
        this.getContentPane().add(sPanel1,  new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0
                ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(57, 52, 94, 108), 35, 44));
        sPanel1.add(jButton1,  new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
                ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 41, 0, 0), 0, 0));
      void jButton1_actionPerformed(ActionEvent e) {
        System.out.println("button 1 source: " + e.getSource());
        System.out.println("d: " + e.getID());
       System.out.println("/n commmand: " + e.getActionCommand());
    class TransformationDemo_jButton1_actionAdapter implements java.awt.event.ActionListener {
      twoButtons adaptee;
      TransformationDemo_jButton1_actionAdapter(twoButtons adaptee) {
        this.adaptee = adaptee;
      public void actionPerformed(ActionEvent e) {
        adaptee.jButton1_actionPerformed(e);
    }As you can see there is the class TransformationDemo_jButton1_actionAdapter class defined in the same classfile. The problem is now that the twoButtons constructor calls the TransfomationDemo_jButton1_actionAdapter constructor and this leads to InvocationTargetException. I dont know if this is a java bug because it should be possible.
    Can you help me?

    hi thanks at first,
    the thing you mentioned could be a problem, but I dont think it is.
    If I have the full qualified name (which I havent) then everything goes normal. I only have to load the "twoButtons" class and not the other (actionadapter class), so I dont think this is the point. In this case the twoButtons constructor constructs an object of the actionadapter class and everything goes well. The bad thing is though that I do not have the full qulified name :(
    Invocation target exception tells me (in own words): Tried to acces the constructor of the actionadapter class (which is not public) out of class reflectionTest class .
    reflectionTest is the class where the reflection stuff happens and the twoButttons class is defineClass() ed.
    The problem is, only twoButtons class has the rights to call methods from the actionadapter class, the reflection class does not. BUT: I do not call the actionadapter methods from the reflection class. I call them only from the twoButtons class.
    I hope somebody understands my problem :)

  • KM Root folder path in Web Dynpro

    Hi,
    How can I get full path (inlcuding drive of the file system) of documents root folder, which is configured in KM.
    If any body knows give me the details to get it.
    Thanks
    Bobby M

    Hi Bobby
    Here is the code for ur requirement
    <i>
       IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
       com.sap.security.api.IUser sapUser = wdClientUser.getSAPUser();
       // create ep5 user from current user
       IUser ep5User = WPUMFactory.getUserFactory().getEP5User(sapUser);
       IResourceFactory factory = ResourceFactory.getInstance();
    IResourceContext context = new ResourceContext(ep5User);
    RID root_rid = RID.getRID("/documents");
    ICollection root = (ICollection) factory.getResource(root_rid,context);
    // Now read the file contents of say file1
      FileInputStream in = new FileInputStream(file1);
      Content content = new Content(in,"byte",in.available());
    RID newRID = RID.getRID("/documents/" +  filename_portal);
       if(factory.getResource(newRID,context) == null){
            IResource newResource = root.createResource       (filename_portal,null,content);
    // else file already exists</i>
    (Please award the points )

  • Bridge script UI folder path

    I am using a custom Bridge script to load stacks into photoshop layers.
    Every time I run the script I have to change the folder path manually to save the images in a new folder.
    I would like to find out if a UI dialog can be used with the script to edit the folder path.
    The UI dialog would offer to use the previous folder path or to enter/select a new folder location.
    I have not been able to incorporate the core Javascript class Folder successfully with the Bridge script.
    The scripts hangs, does not complete when I add the core JS Folder class.
    How do I approach building a script UI in Bridge?
    Are there any simple Bridge script UI samples available to deconstruct?

    Hi,
    You can follow this example.
    Code examples for ScriptUI from JavaScriptToolsGuide_CS5.

  • Jsp:to know the address-ip of the server

    with
    <%
    out.println(request.getRemoteHost());
    %>
    i get:
    127.0.0.1
    with
    <%
    out.println(request.getServerName());
    %>
    i get:
    localhost
    how can i know the address-ip of the server??(that in this case is my pc)
    (sorry for my bad english)

    see if this help
    serverIp=InetAddress.getLocalHost().getHostAddress

  • Trying to uninstall or repair get an error message: The folder path 'My Music' contains an invalid character.

    Trying to uninstall or repair get an error message: The folder path 'My Music' contains an invalid character. How do I fix?

    Try the following user tip:
    "not a valid short file name" and "invalid character" install errors

  • Trying to remove an old version of I Tunes and keep getting the message "The folder path I Tunes contains an invalid character' . It won't let me go any further, have tried deleting/repairing the program but keep getting the same message?

    trying to remove an old version of I tunes, but keep getting the message 'The folder path I Tunes contains an invalid character'
    It won't let me go any further, have tried deleting/repairing but get the same message and am blocked from continuing?

    Hi Barbara,
    I had a similar problem recently and using the "more like this" feature I discovered an answer. To a problem posed by Holo7,  who like myself was a newbie on this platform,  b noir proposed a solution to Holo7's problem that also worked with my problem. It involves downloading a version of MS Windows Instal Cleanup and using it to completely remove all traces of the old version.
    If you look at my problem (follow OldGit66) and the link to Holo7's problem then you will find b noir's answer which I think may help you. I am new around here so you might want to wait for one of the higher status correspondents.
    Regards
    John

  • When installing or uninstalling iTunes I get 'The folder path 'My Music' contains an invalid character' and fails

    When installing or uninstalling iTunes I get 'The folder path 'My Music' contains an invalid character' and fails

    Download the Windows Installer CleanUp utility from the following page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    To install the utility, doubleclick the msicuu2.exe file you downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • TS3212 I keep getting this error message "The folder path 'Program Files' contains an invalid character.' when upgrading itunes to Itunes 10. I could not uninstall because of the same error message. What needs to done?

    Can not download and install Itunes 10 - Get this message "The folder path 'Program Files' contain an invalid character. I tried to uninstall my old Itune through Control Panel but get the same message. What do I need to do?

    Perhaps try the following user tip with that one:
    "not a valid short file name" and "invalid character" install errors

  • I am trying to download the latest iTunes update.  Keep getting error message stating "The folder path 'My Documents' contains an invalid character".  I can't uninstall iTunes for the same reason.  HELP!

    I am trying to download the latest iTunes update; keep getting error message that says "The folder path 'My Documents' contains an invalid character".  This also happens when I try to uninstall iTunes.  HELP!

    OK, never mind!  I saw another question on the right side that addressed the problem, and it worked perfectly!  Went to Major Geeks' page, downloaded the Windows Installer Cleanup Utility, and was able to reinstall the updated version of iTunes!  This community is super!

Maybe you are looking for

  • Payload Field is empty in b2b_instancemessage view

    Hi All, I am enqueing messages to IP_OUT_QUEUE using ESB. I see the payload coming correctly in the reports.But I dont see the payload coming in the b2b_instancemessage view. I am passing the header data like MSG_ID,FROM_PARTY,TO_PARTY,DOCTYPE_NAME,D

  • Name of track changes to modified date when importing mp4

    I have two .mp4 files: (both names listed below are the filenames) Valentines Day Torin.mp4 with a modified filed date of 02/15/2010 Phoebe Confirmation Entrance.mp4 with a modified date of 03/18/2010 When I import the Valentines Day Torin file, the

  • PPS Tuning Advisory – Missing OOTB Index On s_audit_item In 8.x

    Hi All, We have had to add this missing OOTB index at several of our accounts so I wanted to pass this along. It is missing on deletes such as deleting of quotes. -- azgpf8ju1yj6s ALTER SESSION SET OPTIMIZER_MODE = FIRST_ROWS_10 ; ALTER SESSION SET "

  • How do you turn "Faces" off in the iPhoto?

    How do you turn "Faces" off in the iPhoto?

  • Dbms_xmlschema's automatic type generation

    Hi, I would like to import XML documents in Oracle 9i Release 2 which contain a structure like this: <TEST> <TEST/> <TEST/> </TEST> I am using the following schema definition: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.