Creating folders in a component

I have this component (filter) that is being executed before a check in.
depening on the values i want to create a folder to store the document. My component allready puts the document in a correct folder if it exist but when the folder doesn't exist, it has to be created.
For example we work with invoices so i have a folder named INVOICE, i also have a folder names ORDER
I've created an extra field where people can enter the name of the customer so when we get an invoice from oracle, it has to be stored in INVOICE/Oracle
say, if the subfolder oracle doesn't exist, i have to create it first. If it allready exist, there is no problem.
Can anybody tell me how i can create a folder in java?

allright i just created my component and it works just fine :)
Thanks to bex's book for the documentation offcourse :)
This is what i've done:
First i looked at the services of the folder component to see if there is a service for creating a folder. I didn't really find one so i checked the IdcService field on the page for creating a folder. There i saw that it was the COLLECTION_ADD service.
THen i altered my filter. He first checkes if a folder allready exist. Therefore i created a function that holds 2 parameters: folderName and parendID. If the folder doesn't exist i return -1 so i know i have to create it.
I've created a method that calls the COLLECTION_ADD service with all the needed parameters. The method also returns the ID of the folder so i can use it to store my document.
This is my first component that really extends functionality. I'm kinda proud of it because this morning i thought it was much harder to write :)
I also noticed it isn't that hard to call the services, query the database, loop resultset,... inside a java component.
And offcourse, i couldn't do it without bex his book :)

Similar Messages

  • How do I create folders on my email account?

    When I open my email account on the Internet it shows all my emails in their respected folders that I created and organized. Unfortunately, when I try to open my account on the desktop email app they provide for us (the postage stamp with the bird) it does not show any of my folders and just has all my emails under ?not junk" and "junk"..... HOW CAN I CREATE FOLDERS (or organize my emails)?!

    Hi tigergirlie,
    First off, how is your email configured in Mail? It sounds like POP (if you just have one folder) versus IMAP. Is that correct? Are you familiar with how to determine that information? Secondly, who is your email provider? Do you know if they offer IMAP access?
    POP will download only the content of your Inbox to your Mail application, you'd then be required to create local folders and manage your email (organize it). IMAP, if you like to work with folders would be the preferred solution here. This way the folders that you see on the web will "sync" with the folders in your Mail application.
    Not all free email providers offer IMAP, GMail is the only one to my knowledge, at least of the popular ones. Most ISP emails or work/corporate email providers offer IMAP but you'd need to get the appropriate server settings.

  • Is there a way to create folders in the pictures app?

    Since I got my Playbook I've been very impressed with the camera quality, way better than my phones 1.3. So I've been taking a lot of pictures. I have taken a lot of my car because I'm making a website for it and want a lot of pictures of it, I take some random ones just for the fun of it, and in school my friends take pictures of themselves with it (it blows the ipad 2's camera quality away) I'd like to put them in separate folders in the pictiures app so that way I don't have to go through all of them and if people want to see the pics they took in school they don't have to go through all of the ones of my stuff on there. I know there is automatically a folder for downloaded pictures, and another for wallpaper like if you got a wallpaper app and download pictures from it. All of my pictures I've taken are in the "camera pictures" folder, so is there a way I can create folders in the app and organize them?
    Solved!
    Go to Solution.

    If you create the folders as a child within the main pictures folder, then they will show up in the app separately. I have many folders with pictures in.
    You will need to move the photos manually - they will automatically go in the Camera folder.
    Hope that helps.
    Love Me - Love My BlackBerry
    Z10 OS Version: 10.0.10.690
    Z10 Software Release: 10.10.90
    PlayBook - 2.1.0.1526

  • Is there a way to create folders on one iPad and sync the folders to multiple iPads?

    Is there a way to create folders on one iPad and sync the folders to multiple iPads? I have 23 iPads and I want to have all the folders match for easier access for students.

    Here is a possibkle workaround, assuming the iPads are all starting out with the same initial content on them:
    Backup that iPad to each computer you will be using. Then restore from the backup (only takes a couple minutes). Then rename the other 22 iPads.

  • Is there a way of creating folders in email

    Is there a way of creating folders in email, apps or otherwise, on my I phone

    Requires an IMAP or Exchange Account. If you have a POP account, no.

  • How to make metadata fields required when creating folders

    Hello all....
    Related issue with SR 3-6472229431 and SR 3-6471130611.
    We're using DIS 11.1.6 64-bits (2011_11_29 (rev 9756) 11.1.6.97) in a Windows 7 64-bits workstation (with UCM 11.1.1.5 in a Linux machine). The check-in of images to UCM goes fine.
    I'm trying to make some metadata fields required when creating a folder. These fields are required when making a check-in, but not when creating folders.
    Folders_g is enabled. DesktopTag too.
    EDIT: Patch: 14695303 - WCC 11.1.1.5.0 BUNDLE ( MLR 16 ) NOV 6 2012 applied.
    Is it possible?
    Thanks for all.
    Edited by: fgomes on 22/11/2012 03:24

    After reading your response and rereading the original question a bit closer, the metadata prompting feature does not apply to creating new folders, only content.
    Again, though, I think the focus here is in the wrong place. The metadata applied to a folder is intended to be ultimately applied to the content. You can build global rules that fire on submission of content to check if a field has a value, and throw an error if the value is empty.
    If you expect users to create folders (and actually apply any metadata to the actual folder itself), you will be disappointed. Experience shows that users are not interested in that level of detail when creating content, let alone folders. Letting typical users create folders is a bad idea anyway, as they tend to create the same inefficient folder structures they previously created in file shares within Content Server.
    If you need to tightly control folder attributes, you'll be better served by locking down the ability to create new folders. Otherwise you're looking at some type of customization. Keep in mind that you won't be able to customize the right click behavior of DIS. Any changes to DIS would have to be an enhancement request.

  • Error While creating a Mobile UI Component

    Hi Friends ,
    While I am trying to crete a new Mobile UI component for an application , In the Select Software component dialog I am getting the below shown Error.
    Software Component does not support selected Development Component Type. Required DCs are located in an SC that is not visible from the selected SC
    Earlier when I created a Mobile UI component the error didn't come but I deleted the Mobile UI component and after that when I created a new Mobile UI component the error started coming.
    I have already read the thread.
    Software Component does not support selected Development Component Type...
    Software Component does not support this Development Component Type.
    But couldn't understand.
    Please Suggest.
    Regards
    Nitesh

    Hi Vidyadhar/David,
    <br><br>
    Thanks for your reply . I tried the steps suggested by u . Now I am getting a new error . The log I have pasted below.<br><br>
    Development Component Build (2009-11-03 12:45:30 GMT+05:30 (IST))<br>
      Component name: order_ui <br>
      Component vendor: demo.sap.com<br>
      SC compartment: MyComponents<br>
      Configuration: LocalDevelopment<br>
      Location: localDevelopment<br>
      Source code location: nharit@****<br>
      DC root folder: C:\Documents and Settings\nharit\workspace.jdi\LocalDevelopment\DCs\demo.sap.com\order_ui\_comp\<br>
      DC type: Mobile Applications for Handhelds<br>
      DC subtype: Mobile UI Component<br>
      Host: *******<br>
    DC Model check:<br>
       DC is available locally<br>
       validating dependency to build plugin "sap.com/tc/bi/bp/oca/cfs"<br>
       validating dependency to used DC "demo.sap.com/order_sv"<br>
       validating dependency to  public part "interface" of DC "demo.sap.com/order_sv"<br>
       validating dependency to  public part "default" of DC "sap.com/tc/cmi"<br>
       validating dependency to  public part "generation" of DC "sap.com/tc/mobile/cfs/api"<br>
       validating dependency to  public part "api" of DC "sap.com/tc/mobile/oca/api"<br>
       validating dependency to  public part "runtime" of DC "sap.com/tc/mobile/wdlite/facade"<br>
       DC model check OK<br>
    Start build plugin:<br>
       using build plugin: sap.com/tc/bi/bp/oca/cfs<br>
       starting build plugin from : C:\Program Files\SAP\IDE\CE\eclipse\plugins\com.sap.tc.ap_2.0.1.091015093457<br>\comp\XOCA\DCs\sap.com\tc\bi\bp\oca\cfs\_comp\gen\default\public\def\<br>
    Build Plugin 'OCA Build plugin CFS', Version 7.10 SP 3 (710_VAL_REL, built on 2007-12-25 01:27:31 +0100, CL285332)<br>
       development component:  order_ui (demo.sap.com)<br>
          software component:  MyComponents (demo.sap.com)<br>
                    location:  localDevelopment<br>
                        type:  Mobile Applications for Handhelds, subtype Mobile UI Component<br>
               build variant:  default<br>
             source location:  nharit@******<br>
             output location:  C:\Documents and Settings\nharit\workspace.jdi\LocalDevelopment\t2<br>\44750CB853388BD98C14319CE2D2842A\default
           generation folder:  C:\Documents and <br>Settings\nharit\workspace.jdi\LocalDevelopment\t\44750CB853388BD98C14319CE2D2842A<br>
           plugin start time:  2009-11-03 12:45:31 GMT+05:30 (IST)<br>
                     Java VM:  Java HotSpot(TM) Client VM, 14.2-b01 (Sun Microsystems Inc.)<br>
    General options:<br>
      convert *.xlf to *.properties: yes<br>
      include sources for debugging: yes<br>
    Warning: Source folder "META-INF" exists but is empty and will be ignored.<br>
    Checking path lengths for sources<br>
    Path length checks finished in 0.016 seconds<br>
    Preparing data context..<br>
    No public part descriptor found in C:\Documents and<br> Settings\nharit\workspace.jdi\LocalDevelopment\FRAMEWORK\sap.com\tc\cmi\_comp\gen\default\public\default, using legacy <br>mode.
    No public part descriptor found for component "tc/mobile/wdlite/facade" (vendor "sap.com"), public part "runtime", using legacy mode.<br>
    Dependency validation check<br>
         Development Component Dependencies<br>
              MCD name: order_sv MCD version: 1.0(order_sv(interface))<br>
         Dependencies in mcd.xml:<br>
    <br>
    Comparing data in MCD and DPI files.<br>
    Error: com.sap.tc.mobile.dt.oca.bp.exception.OCABuildPluginException: Validation of MCD file failed. Description of <br>component 'order_sv' version '1.0' not found in MCD file.  Please update the MCD file by calling the option 'Update <br>deployment descriptors' in the components context menu.<br>
         at com.sap.tc.mobile.dt.oca.bp.impl.cfs.provider.MCDDescription.checkComponentDependency<br>(MCDDescription.java:157)<br>
         at com.sap.tc.mobile.dt.oca.bp.impl.cfs.provider.CFSDataContextProvider.checkMCDDependencies<br>(CFSDataContextProvider.java:156)<br>
         at com.sap.tc.mobile.dt.oca.bp.impl.cfs.provider.CFSDataContextProvider.execute<br>(CFSDataContextProvider.java:126)<br>
         at com.sap.tc.buildplugin.PrepareContextBuildStep.prepareTechnologySpecificData<br>(PrepareContextBuildStep.java:186)<br>
         at com.sap.tc.buildplugin.PrepareContextBuildStep.setupBuildFileCreatorContext(PrepareContextBuildStep.java:95)<br>
         at com.sap.tc.buildplugin.PrepareContextBuildStep.execute(PrepareContextBuildStep.java:56)<br>
         at com.sap.tc.buildplugin.DefaultPlugin.handleBuildStepSequence(DefaultPlugin.java:196)<br>
         at com.sap.tc.buildplugin.DefaultPlugin.performBuild(DefaultPlugin.java:168)<br>
         at com.sap.tc.buildplugin.DefaultPluginV3Delegate$BuildRequestHandler.handle(DefaultPluginV3Delegate.java:66)<br>
         at com.sap.tc.buildplugin.DefaultPluginV3Delegate.requestV3(DefaultPluginV3Delegate.java:48)<br>
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
         at java.lang.reflect.Method.invoke(Method.java:597)<br>
         at com.sap.tc.buildtool.v2.impl.PluginHandler2.maybeInvoke(PluginHandler2.java:400)<br>
         at com.sap.tc.buildtool.v2.impl.PluginHandler2.request(PluginHandler2.java:149)<br>
         at com.sap.tc.buildtool.v2.impl.PluginHandler2.build(PluginHandler2.java:87)<br>
         at com.sap.tc.buildtool.PluginHandler2Wrapper.execute(PluginHandler2Wrapper.java:59)<br>
         at com.sap.tc.devconf.impl.DCProxyMake.make(DCProxyMake.java:260)<br>
         at com.sap.tc.devconf.impl.DCProxy.make(DCProxy.java:1574)<br>
         at com.sap.tc.devconf.impl.DCProxy.make(DCProxy.java:4537)<br>
         at com.sap.ide.dii05.lib.internal.commands.dc.BuildJob.build(BuildJob.java:370)<br>
         at com.sap.ide.dii05.lib.internal.commands.dc.BuildJob.doInWorkerThread(BuildJob.java:187)<br>
         at com.sap.ide.dii05.util.api.job.JdiJob$1.doInWorkerThread(JdiJob.java:75)<br>
         at com.sap.ide.dii05.util.internal.job.InternalJdiJob$3$1.run(InternalJdiJob.java:224)<br>
         at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)<br>
         at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1779)<br>
         at com.sap.ide.dii05.util.internal.job.InternalJdiJob$3.run(InternalJdiJob.java:233)<br>
         at com.sap.ide.dii05.util.internal.job.BusyBackgroundIndicator.showWhile(BusyBackgroundIndicator.java:74)<br>
         at com.sap.ide.dii05.util.internal.job.InternalJdiJob.internalRun(InternalJdiJob.java:214)<br>
         at com.sap.ide.dii05.util.internal.job.InternalDiiJob.run(InternalDiiJob.java:275)<br>
         at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)<br>
    Error: Build stopped due to an error: Validation of MCD file failed. Description of component 'order_sv' version '1.0' not found in <br>MCD file.  Please update the MCD file by calling the option 'Update deployment descriptors' in the components context menu.<br>
    Error: Build stopped due to an error: Validation of MCD file failed. Description of component 'order_sv' version '1.0' not found in <br>MCD file.  Please update the MCD file by calling the option 'Update deployment descriptors' in the components context menu.<br>
    Build plugin finished at 2009-11-03 12:45:31 GMT+05:30 (IST)<br>
    Total build plugin runtime: 0.469 seconds<br>
    Build finished with ERROR<br>
    ==== Post-Processing ====   started at 2009-11-03 12:45:31.618 IST<br>
    Copy the build logs<br>
      from: C:\Documents and Settings\nharit\workspace.jdi\LocalDevelopment\t2<br>\44750CB853388BD98C14319CE2D2842A\default\logs\<br>
      to:   C:\Documents and Settings\nharit\workspace.jdi\LocalDevelopment\DCs\demo.sap.com\order_ui\_comp\gen\default\logs\<br>
    Build results in folder C:\Documents and <br>Settings\nharit\workspace.jdi\LocalDevelopment\DCs\demo.sap.com\order_ui\_comp\gen\default\ remain unchanged.<br>
    <br><br>
    Please Suggest.<br>
    <br>
    It will be great Help.<br>
    <br>
    Regards<br><br>
    Nitesh
    <br>

  • Howto make created folders/ files from one teacher, read only for other teachers?

    Hello there,
    as an admin @ school I was wondering how to make created folders/ files from one teacher, read only for other teachers?
     - In a 2008domain, created a group "teachers"
     - created a folder "teacher data" where all teachers have read/write permissions
    ideal,a teacher who make's a folder in "teacher data" should be the only oen who is able to add file's to that folder and dele that folder or files. Other teachers may be able to read the content of the folder.
    Is this possible to set up and how?
    many thanks.
    Nico.
    rds

    Hi Nico,
    You could set the permissions below to resolve the issue:
    For the root folder "teacher data": give the full control permission to CREATOR OWNER – "Subfolders and files only" and give the read/write permissions to the group "teachers"– "This folder only".
    Best 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.

  • How can I create Folders in iPod and keep all bands & artists separate?

    Hi guys,
    How can I create folders for different artists and keep them separate? Is it somthing that I need to do in iTunes in my Mac or import them a certain way?
    Anyone please,
    Thanks in advance,
    Zia

    If you have the artist information entered in iTunes, then they should already be organized like that on iPod.
    Go to music-->artists
    btabz

  • Need help creating a folder action for creating folders based on filenames.

    I want to create a folder action that will monitor a folder and every time a file is added to the folder it will create a directory using the filename (minus the extension) and move the file the that directory

    on run {input, parameters} -- create folders from file names and move
      set output to {} -- this will be a list of the moved files
      repeat with anItem in the input -- step through each item in the input
        set {theContainer, theName, theExtension} to (getTheNames from anItem)
        try
          set destination to (makeNewFolder for theName at theContainer)
          tell application "Finder"
            move anItem to destination
            set the end of the output to the result as alias -- success
          end tell
        on error errorMessage -- duplicate name, permissions, etc
          log errorMessage
          # handle errors if desired - just skip for now
        end try
      end repeat
      return the output -- pass on the results to following actions
    end run
    to getTheNames from someItem -- get a container, name, and extension from a file item
      tell application "System Events" to tell disk item (someItem as text)
        set theContainer to the path of the container
        set {theName, theExtension} to {name, name extension}
      end tell
      if theExtension is not "" then
        set theName to text 1 thru -((count theExtension) + 2) of theName -- just the name part
        set theExtension to "." & theExtension
      end if
      return {theContainer, theName, theExtension}
    end getTheNames
    to makeNewFolder for theChild at theParent -- make a new child folder at the parent location if it doesn't already exist
      set theParent to theParent as text
      if theParent begins with "/" then set theParent to theParent as POSIX file as text
      try
        return (theParent & theChild) as alias
      on error errorMessage -- no folder
        log errorMessage
        tell application "Finder" to make new folder at theParent with properties {name:theChild}
        return the result as alias
      end try
    end makeNewFolder
    This script almost does what I need except for the fact that it screws up on files with periods in them
    for example
    1.2.3.4.txt
    will create the directorys 1, 2, 3, and 4 instead of 1.2.3.4

  • OS command to access the non SAP server to create folders in the server

    Hi All,
    For the Pre press screen ABAP team need to create some WIP folders in 10.10.10.215.So I want to try out the option of using OS command to access that server to create folders at a specific location in that server.
    Can you please tell me the which OS command is used in this case.
    Thanks in advance.
    Regards,
    jhansi.

    these are very basic things. You should do a search before posting your question here.
    Thanks
    Sunny

  • How do you create folders in your email?

    I want to organize my email but I can't figure out how to create folders on my iPhone.

    The manual for iPhones running iOS 8 contains the following:
    Organize your mail with mailboxes. Tap Edit in the Mailboxes list to create a new one, or to rename or delete one. (Some built-in mailboxes can’t be changed.) There are several smart mailboxes, such as Unread, that show messages from all your accounts. Tap the ones you want to use.
    This is on page 58. For the manual itself, visit http://manuals.info.apple.com/MANUALS/1000/MA1565/en_US/iphone_user_guide.pdf .

  • How do you create folders in mail app? Is there a way in 3GS IOS 5?

    How do you create folders in mail app? Is there a way in 3GS IOS 5?

    Russell D wrote:
    This is very disappointing, and i find it hard to believe that Apple would do this intentionally. It worked on previous versions of email application. Apple please don't dishonor the image of Steve Jobs this way. Fix this right away. I can't think of anything more basic than being able to organize the email that you download into folders. This absolutely ***** ... What a stinker.....
    I can't think of anything more idiotic than invoking the memory of Jobs here. Are you truly unaware that the iPad and iOS is pretty much exactly the way he wanted it to be, just like about everything else Apple?
    As to your claim of "previous email applications", certainly none in iOS ever did that, and the only folders you can create and manipulate in POP accounts are those local to only that single machine or platform, not particularly helpful or desirable in today's environments.

  • How do you create folders in photo's

    In an IPOD4 (or IPhone for that matter) how do you create folders within Photo's to segregate your pictures in to meanigfull collections, rather than just random bunches.
    Thanks

    Bummer - seems like wasted effort - to move all the photo's to a computer, delete then from the IPOD/IPHONE,  organize them, and then move back to IPOD/IPHONE. Oh well, is what it is.
    Thanks
    Mike

  • How to create folders in mail?

    How do I create folders in Mail?

    This discussion is just about one year old. I suggest you start a new discussion.
    Please include details about your Macbook Pro, the version of the operating system and  the version of Mail you have.
    https://discussions.apple.com/community/notebooks/post!input.jspa?containerType= 14&container=2097

Maybe you are looking for

  • Leopard For My G4?

    I have a MDD G4 running Tiger and am considering going to Leopard. I have the minimum requirement 867DP.I have 2 hard drives...the main is 60gig with Tiger and the other is a self-installed Seagate 120 gig partitioned into 2, one for data and the oth

  • JMS and COBOL

    I have an environment as follows: - SCO Unix Oper Server Enterprise 5.05 - Micro Focus COBOL 4.1 - Suprix 2.6.3 - QMS SPOOL and I want to communicate JMS with COBOL, but I don�t know what is necessary to implement JMS in that configuration (for examp

  • Why is my DVD project freezing when a video clip plays?

    Hi - I have a simple Encore(CS5 Mac) project that is that is "stalling" when played.   The content of the DVD is made from an After Effects(CS5.5 Mac) project so I think I should provide information on that.  The 30sec AE project is mostly timeline a

  • Re-activate account

    I am logging this request on behalf of customer Gerhard Graumann at BAE Systems. Please re-activate account [email protected] Please also reset the password. Thanks, Alicia

  • How to process Partial lot accepted & rejected.

    Hi Team, I have scenario where in say lot quantity is 100, of which only 70 is accepted & 30 is rejected. How to handle this scenario. Is it a partial lot confirmation? Please suggest me steps to handle this situation. Thanks