Accessing KM Folders

hi,
   i need to list all the folders available under a certain repository(eg: /documents).how ca i do it using km api's?
Regards,
Jules

To get the all the folders , use recursion by putting the below code logic in a method.
IUser user = (IUser) ((IPortalComponentRequest) this.getRequest()).getUser().getUser();
ResourceContext resourceContext = new ResourceContext(user);
RID rid = RID.getRID("/documents");
IResource resource = ResourceFactory.getInstance().getResource(repository, resourceContext);
//Condition to check if this resource is a folder
if (resource.isCollection())
     ICollection collection = (ICollection) resource;
     IResourceListIterator it = collection.getChildren().listIterator();
     while (it.hasNext())
          IResource res = it.next();
          //This res is either a folder or a document, if folder do a recursion
P.S. Reward points if this helps you solve your problem.
Ankur

Similar Messages

  • Cannot access shared folders anymore....

    Hi,
    We have a naughty problem at the office for accessing shared folders .
    We use G5 Xserve + Xraid serving home access to 12 macs.
    Our problem started when we updated all machines to 10.5.2 (nor did we have a problem with 10.5.1 or with 10.5.0).
    All machines login correctly, fetch their folders with their home accesses located in the Xserve, as allways did, BUT :
    ·Almost all the machines running Leopard (except two) CANNOT access shared items. They get Error -5002
    ·The old machines running Tiger (G3 Imac's) acess shared items without problem.
    So after many weeks doing multiple tests, we got the following conclusions:
    ·Problem is not server related.
    ·Problem si related to Leopard clients , although not in all
    ·Problem is not related to the machine, but with the account (accounts that can access shared items do it on any machine, and accounts that can't, don't do it on any machine)
    ·It seems that the trouble is related somewhat with Kerberos authentication, but it's not related to tickets (renewing them is no use)
    ·If we create new account with new name, it can access shared items
    ·If we create new account with same name that of the faulty one (renaming the later), it CANNOT access shared items.
    We have got a problem in the office, and no clue of solving it.... Have read all over apple discussions over the internet, and although some people have similar issues, they are not as close as ours....
    And none of the solutions proposed have solved the problem.
    Any ideas would be greatly appreciated, cause we are starting to get desperate
    Thanks everyone.

    new update:
    we are able to connect to remote shared folders with a different remote server (dual G4) from every machine
    machines who can connect to local server are INTELs, the one who can't are PPCs
    makes any sense to anyone?¿

  • Computer screen goes black accessing network folders

    We have a computer on our network whose screen goes black when you try to access shared folders on the network.
    When working locally it doesn't happen at all. But if you, for instance, open the run command and type in \servername and click OK it'll flash black. Or if you open a file in one of the shared folders on that server.
    This is a new one for me. Any ideas on how I could begin troubleshooting? I've verified that the only time it happens is when accessing files/folders
    shared on the server and that it only happens on that machine.

    Does your computer function properly in safe mode with networking? Follow below step if you do not know how to boot the system into safe mode
    with networking
    http://windows.microsoft.com/en-in/windows/start-computer-safe-mode#start-computer-safe-mode=windows-7  
    If your computer is working fine go to step 2 to find which program is causing
    the current issue.
    http://support.microsoft.com/kb/929135/en-us
    MCP

  • BO authorization model with sap roles / access tot folders, functionalities

    Hi Specialists,
    As authorization cunsultant in BI, I have little knowledge of the security setup in Business Objects.
    I have to setup an authorization model were the authorizations are assigned via sap roles in the backend BI system. These roles are imported in BO were they can serv as 'user groups' and access to folders, functionalities.
    Can anyone provide me a overview, guide, training document... on how the authorizations are managed in BO and best practice when they are linked to sap backend roles.
    The goal will be to user the sap BI backend roles and user them to grant users in BO specific access to specific folders. Eg; User A can access folders 1 as "refresher only", User B is able to publish reports in folder 2, User C has only view access in folder 2...
    Any help would be great!
    Thanks very much in advance.
    rgrds
    Kristof

    Hello,
    this is the best approach you mentioned here.
    I prefer to create roles serverd as functionalities in the Backend. For Example you have a "View" role, a "Refresh" role and so on.
    On the other hand i saw some setups where there is only on role in the Backend with all the BO Users. Then you have to create you functional groups in BO and have to assign the Users there to the Groups.
    Check the Adminguide of BO XI 3.1 for more Informations.
    Regards
    -Seb.

  • Access root folders in finder

    Is it possible to access root folders in the finder window instead of using terminal

    With the Finder active, from the File menu, select Find... .
    In the Find window that opens, in the section under the heading "Search for items whose:", click the Name pull-down menu and select Visibility. The options in the next pull-down menu to the right will change accordingly; select either invisible items or visible and invisible items as you prefer.
    You can make invisible folders visible all the time (not recommended) using TinkerTool
    You can also make make .hidden things visible by Booting from another drive.
    You can hide things selectively using AltoMac
    About hidden files

  • Cannot access some folders from Bridge CS6

    Only certain folders on my internal drive can't be accessed from Bridge.
    I can access the folders from PS CS6 but from Bridge, files cannot be displayed.

    Not sure where to look to ensure a folder is both read & write permission. Focusing on one of the folders which suddenly I can't access from Bridge - Pictures; if I use Finder all pics  are visible from the folder. If I open a file from the folder in Photoshop I can edit and save in the Pictures folder.
    Select a folder in the finder and choose cmd + i or use menu File / show info. This provides a window and at the bottom it shows the permissions that are set. If you are the user and have administrator privileges (meaning you you have access with password to the account and are able to install and uninstall applications) it should sat for both system and administrator 'read and write'
    Only from Bridge are certain folders inaccessable....in Bridge the folder has a red circle with white - and message 'no items to display'
    This is getting a bit tricky. If you have jpeg or raw files in the picture folder that also show in the Finder Bridge should display them without problems. If you try to visualize a library form iPhoto or Aperture this will not be able in Bridge because those files are packages.

  • Satellite A-300D and the general access to folders

    Hello,
    I can not open access to folders and files in control centre of networks and the general access. Earlier all was good, and now at attempt to open access to a file, after acknowledgement of the rights of the manager, occurs nothing - access is switched off. And at attempt to open access to the general folders writes "Server RPC it is inaccessible".
    I think that an error in system.
    How it is possible to correct?

    Hello
    Are you using your notebook at office?
    If yes contact the administrator they can give you the rights to access the network folders.
    Otherwise I think your firewall or security software is blocking the network access. Try to disable it and check it again.
    Greets

  • Time Capsule: Windows user could access all folders in TC

    I have a new TimeCapsule (TC) 1 TB, 2 MBPs (latest Mac OS X) and 2 PCs - 1 runs XP and other runs Vista.
    I had setup TC as NAS, allow users to access TC using account.
    Each user in MBPs can access their folder and shared folder only, so it is fine.
    Same for windows users, they can access their folders and shared folder only.
    However I found that, if the windows user has the windows administrator privilege and has windows account password as same as TC disk password, then after logged-in windows machine, this user can access TC using Run:\\TCname then he/she can see all folders in TC and has read/write privilege on these folders. TC does not ask for any password (as long as the user has logged-in their windows machine) nor stop the user to access any folder in TC.
    Is anybody has the same problem ? Or you can try yourself and see if it happens on your system ?
    Apple: can you fix this, this is unwanted "feature" ?

    SMB is blocked by every responsible ISP. As indeed it has to be due to the level of unprotected shares on computers on the internet.
    If the TC is the main router.. and you have port forwarded SMB ports wan to lan.. be thankful your ISP has blocked it so your files and network are not hacked.
    The right way to do this is a vpn router.. with the TC working as bridged device on the network.
    Windows does not offer AFP which is the only other protocol Apple offer in the TC and is the only one exposed to internet.

  • Cannot access DFS folders as domain admin when using Server 2012 R2

    Hello,
    recently we added a new domain controller running Windows Server 2012 R2 to our domain. All other domain controllers are running Server 2008 R2. A user now had a problem with his home folder. Therefore, I logged into the new domain controller as a domain
    administrator and opened an Explorer. Next I entered "\\ourdomain.comp\accounts$\homes" into the address bar. To my suprise I could only see one folder (the one for the domain administrator account). If I do the same on a any of the Server 2008 R2
    machines, I can see all user homes (as expected).
    I temporarily disabled ABE for the home folder and now I can see all folders. But if I click on any of them, I get an access denied error stating that I have insufficient permissions to access this folder. It does not matter whether I open Explorer as administrator
    or not. On Server 2008 R2 it works in either case. I don't get what's going wrong. No matter which machine I use, I always end up trying to access the same folder on the same machine. Therefore, the rights on this folder are always the same and I should be
    able to access it. Do I need to configure something on the new DC? Is there anything related to this that has changed with Server 2012 R2?
    Regards,
    Oliver

    Hi Oliver,
    According to your description above, here are the symptoms you observed:
    •Logon Server 2008 R2 DC as domain administrator, you can see all user home folders  under
    \\ourdomain.comp\accounts$\homes and access these folders.
    •Logon Server 2012 R2 DC as domain administrator, you can only see the domain administrator home folder under
    \\ourdomain.comp\accounts$\homes.
    •Logon Server 2012 R2 DC as domain administrator and disable ABE, then you can see all user home folder under
    \\ourdomain.comp\accounts$\homes but get an access denied error when you access others user home folder.
    Is there any error message in event log on Server 2012 R2 DC when you access the shared folder? Try to disable UAC on the server to check if you can access the shared folder.
    Regards,
    Mandy
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Deny access to Folders

    How can I deny access to folders?
    i.e. On double-clicking on the folder, I should get a message which will say "Acess Denied."

    Apps like PhotoBooth, iChat, Mail and Chess can be deleted or moved to a folder the user does not have access to. If for some reason you want to keep them, you can change permission to deny the user read/execute on the app.

  • Re:Can't able to access shared folders from different VLANs in SG300 series switches

    Hi All,
    I supplied 3 numbers of SG300 series switches for the sole reason to have inter-vlan routing. I created 4 VLANs in the switches and made one switch as Layer 3 switch and other 2 as Layer 2 switch. Inter-Vlan routing is working fine. I am able to ping PCs from different VLANs. But I am not to access shared folders. Customer has installed Window 2003 server installed and it is in VLAN 1. There are some folders created in this server and it is very important for users to have access to the folders.Also, I am not able to access shared folders in other VLANs. I have created a case with Cisco small business and I got a reply saying that the switches will not support shared folder feature, which I think is not real. I am getting a very time to implement this solution in the network. I have a Sonicwall firewall after Core switch which is connected to ISP.
    ISP<----->Sonicwall FW<----->Core Switch<------>Layer 2 switch<------>Layer 2 switch
    Kindly help me out to resolve this issue.
    Regards,
    Prashant K

    Hi Prashant,
    I think you're running into a Windows firewall issue. SMB file sharing, by default I believe, is only allowed on your local subnet. Please try disabling windows firewall on the computer hosting the shared folder, then see if you can access the shared file.
    Best,
    David
    PS: It looks like this post got published twice. You can delete the other one using the task bar on the right.
    Please remember to rate helpful resonses and identify correct answers.

  • Map a drive to the Remote Web Access - Shared Folders

    All companies love Remote Web Access. No need for VPN for access to remote desktop and the "private skydrive" Shared Folders.
    Is there anyway to map a drive to these "private skydrive" Shared Folders? you can map a drive to the real skydrive and to Sharepoint so surely it is possible?

    The trick that I found was to upgrade my file server to server 2012 R2 and configure iSCSI Target for the resource I wanted to access by RWA. On my RWA Server I then used the iSCSI initiator to connect to that Target. This makes the shared drive appear
    as if it is a native drive on the RWA server. Once this was done I configured that drive, or a folder within that drive for access with RWA. It has worked perfectly ever since.
    Trust but verify!

  • Upgraded 2 macs to Mavericks, can no longer access shared folders/files.

    So I upgraded my Macbook Pro, and Mac Mini to Mavericks today, and previously when they were both on mountain lion I could access the shared folders/files and screen share with absolutely no issue whatsoever.
    But upon updating to Mavericks today it all broke.
    Both computers were running the OS X Server software on Mountain Lion, and I went ahead and purchased/installed the new edition of server that came out today.
    I can see the other mac under the "Shared" option in Finder's sidebar, but when I try to open the other mac it says connection failed and offers to "connect as"
    As I usually do, I connect as and it asks for the login credentials. I put in the same credentials as before, 150% sure they're right, in the text boxes that I used before, but it won't allow me to connect to the mac.
    I know beyond a shadow of a doubt that they're the right credentials.
    I thought it may have been just a wonky permissions error so I unshared the folders and reshared using the same permissions that had worked before.
    I've been working on it for about 3 hours now so any help would be appreciated.

    I upgraded my two machines - now when I access files on the "shared" storage array (a thunderbolt, pegasus array) across the network (ethernet) if I modify the file (for instance, a jpg) and then go to save I get a "you don't have permissions to etc...." and then when I just close the file without saving - it disappears from my file server permanently! even if I go to the machine hooked up to the array the file is "gone" - unbelievable. I have updated permissions where I can, deleted and added the sharing for users, tried SMB and AFP, and even downgraded the "sharing" machine back to OSX 10.8 where it was working fine but the client machine still is doing this where it can connect, see all the files, but as soon as I modify a file I get the warning and bam, it's gone forever....
    Wow - this is a doozy. I don't have a fix but WARNING - watch out as you are working on this problem that your files are being vanished permanently.

  • I don't have permission to access certain folders in my external hard drive?

    Every year at my college, we get our laptops re-imaged and completely wiped of all their data for new programs, etc. Prior doing this, I backed up all my files onto a WD external hard drive. This is not the first time I've gotten my macbook wiped or used the hard drive, so I am not sure why I'm experiencing problems this time around. In the hard drive I am able to access the Applications folder, but all the rest of the folders such as Desktop, Documents, Downloads, Pictures, etc. which is located in the Users folder under my previous user acc, have a tiny no entry symbol on the bottom right corner. When I click on the folder it tells me "The folder "blahbalh" can't be opened because you don't have permission to see its contents."
    The only security the drive has on it is an initial prompt for a password that I enter once the hard drive is plugged into my mac. There are no problems there. So why don't I have permission to view certain folders?
    Any help would be appreciated. I have all my work on there. Thanks.

    First make sure you have read & write access to the folder you're trying to restore to. You should be able to see its contents in the Finder, and to move files in and out of it.
    This is an exception to the rule that you should never make any changes to backup data. I've tested this procedure in OS X 10.8 only. It should work with later versions, but I don't know whether it works in earlier versions. Use this procedure  only for files that were backed up from your home folder, or a folder on another volume created by you, and would normally be writable by you. Do not touch backups of system or application files.
    In the Finder (not in the time-travel view), navigate to the backup volume, then to the folder named "Backups.backupdb", and then to the snapshot you want to restore from. The snapshots are folders labeled with the date when they were created. Inside each of those folders is a file hierarchy like the one on the volume that was backed up. Descend through the hierarchy until you come to a folder named "Users," and inside that, a folder with your user name. The procedure will be different if you're trying to restore files on another volume.
    Select the folder and open the Info dialog (command-I). Click the padlock icon in the lower right corner of the window and authenticate. In the Sharing & Permissions section, give your account Read & Write access. You may have to close the dialog and repeat this step in order for the change to show up. Then click the gear icon and select Apply to Enclosed Items from the popup menu.
    Try the restore operation again, in the time-travel interface.

  • After upgrading to Lion OS 10.7.5 takes 10 seconds or more to access NAS folders and files

    I've upgraded my customers IMacs to Lion OS and whenever they try to access folders on the Buffalo NAS terastation it takes about 10 seconds for the folders to populate with the files. It will open right away but will look blank. If I click get info during this time it says "fetching". I'm assuming it has something to do with the SMB change with lion but don't know how to fix it. I called Buffalo and they said it must be an apple issue. I called apple and they were of no help. THe tech support person asked me to reset my computer and leave it powered of for 30 seconds......ugh. Then I asked to speak to someone higher and we got cut off.
    The Buffalo NAS terastation has SCSI drives but they are mounted to an HP Server. So the SMB connection is to the HP Server running server 2003. Any help would be greatly appreciated.

    Any luck getting the info on SMBX parameters like OPLOCKS ? This is apparently causing an issue with Autodesk Revit. I am resorting to installing SMBUP.
    There is an article that describes this method for altering the Lion smbd configuration parameters for honoring ACLs:
    sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server AclsEnabled -bool NO
    from this article
    http://support.apple.com/kb/TS4149
    and this:
    http://www.stanford.edu/group/macosxsig/blog/2011/08/enable-logging-with-107-smb x-w.html

  • How do I access old folders from a different user on Time Machine

    Hi
    I migrated my old macbook to my new macbook pro with all the files and backed up to time machine.
    I then restored my macbook pro using erase and install and started from scratch installing most apps from scratch and restoring some documents and apps from time machine from the old backup of the macbook pro (before erase and install).
    I'm now having lots of issues with permissions. I can't save a lot of files in the folders they are already in - e.g. If I try to save a Logic song, it often won't let me save it in the folder it was in.
    iWeb is refusing to save anything at all.
    I can't seem to get my photos back into iPhoto.
    My primary concern at the moment is getting access to documents in Time Machine that were on an old user of the MacBook Pro. My current user is set up from scratch I think (not too sure - I'm getting confused about which user was on which computer).
    When I try to open a folder, it says "the folder cannot be accessed because you do not have permission to use its contents".
    Any help around these problems would be greatly appreciated.
    Thanks
    Steve

    okstevep wrote:
    The reason I did the erase and install in the first place was because I had some kind of bug that was really slowing down my computer. An apple genius said that there were probably some issues with files that was causing this and the best way was to restore and start from scratch.
    That's a last resort, but doesn't include a full restore.  You have to reinstall all your 3rd-party apps from the original discs; re-enter all your preferences, configuration, and settings; and copy selected data files back.  Not a quick or easy procedure, especially if you're not prepared in advance. 
    If I do a restore from back-up won't the problem come back?
    Possibly, but it will get you back where you were, without the permissions problems, and without the confusion about which user account is which, so you can do something constructive.
    Is there another way?
    Depends.  If you haven't done any backups since you erased, you could erase again, install a fresh copy of OSX, then use Setup Assistant to transfer everything else from your backups.  Assuming you're running Snow Leopard (per your profile), see Using Setup Assistant on Snow Leopard or Leopard, especially the green box there.
    Either way, you may still have to fix the original problem, but there are ways to do that short of the "nuclear" option.  I hate to guess with nothing more than "some kind of bug that was really slowing down my computer," but one possibility is a partially-installed or partially-deleted app.  Once you get back to where you were, see OSX Log Files, especially the Application Installation or Removal problems section in the blue box

Maybe you are looking for