How to uploading custom document instance with content

What's the best (easiest) way to upload the content and attributes of an instance of a custom document from a JSP? For example a subclass of Document with extra attributes? The bit I am finding tricky is how to deal with the content part. There are some nice examples of custom docs without content in the iFS documentation, and an example of uploading content for a standard document, using the putDocument method of IfsFileSystem, but neither of these are quite what I want.
Any suggestions or references to gratefully received.
Bill Roberts

Joyce - thanks for your advice and time. I have got that to work - what I didn't realise was that you have to upload the content first, then refer to it in the XML upload for the custom document. I haven't seen anything that explains what you just told me in the documentation and it seems quite a fundamental thing. Is there something I've missed? Perhaps you could pass on a comment to the iFS documentation guys at Oracle.
A supplementary question: to create custom doc instances via Java, I understand that I need to create a document definition first. Which method do I use to set content in that case (given that the content file will originate on a client machine, not on the server)?
Thanks very much
Bill

Similar Messages

  • Batch uploading to a document library with content types

    Hi,
    I have a document library with two content types. Now I need to upload documents to this document library. However, if I have large number of files, then uploading through web UI is a pain as metadata will not be attached. How should I automate it  from
    my computer using powershell without relying on Administrator to run the powershell script. Or is there any other way to do it without using powershell? or  can powershell be run remotely from an end user computer?
    Note I am using SharePoint 2010.

    Hi,
    According to your post, my understanding is that you want to butch upload files to document library with content types.
    There are two good tools in CodePlex which can batch upload files with content types, you can have a look at them.
    DocMetaMan : Bulk document Upload and MetaData (Taxonomy) Setter
    SharePoint Multiple File Upload Script
    There are some third-party tools which can achieve the same scenario, you can refer to it.
    http://sharepoint.stackexchange.com/questions/74694/uploading-multiple-files-with-metadata
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • How to manage custom document properties (e.g., company name, project name)

    Hi,
    How to manage custom document properties (e.g., company name, project name, event date...) in Apple iWork Pages like it is possible in Microsoft Office Word ?
    The idea is to simplify the management of multiple instances of same piece of information in a document by writing them once as a "properties" of the document that can be referencing in different places of the document. Changing the property value, will automatically change all its instances.
    Thanks in advance for your help

    Thanks for your help Peter.
    Search-Replace and Auto-Substitution are not requivalent for me since I'm looking for something more complex.
    Suppose you have a document about an Event which occur on a specific date (e.g., 11-09-2003).
    In your document, you may be interested in...
    - sometimes display the date as '11-09-2003',
    - sometimes display the date as 'Novembre, 2003',
    - sometimes display the date as 'Sunday, November 9, 2003'.
    With a document property, you would be able to define the EventDate as 11-09-2003, and then define different specific format (e.g., 'mm-dd-yyyy', 'mmmm, yyyy'...) for each reference to the EventDate document property.
    Using Search-Replace of Auto-Substitution, it will be painful since you will have to define as one token per format of a document property (e.g., EventDateAsMMDDYYY, EventDateAsMMMMYYYY...).
    More than that, suppose you have a Numbers table inserted in your Pages document.
    You may be interested in using some document properties in formulas.
    This can't be solved using Search-Replace.
    But its ok, I will wait until this feature will be supported in Pages.

  • Why iCloud only allows store documents created by Pages, Numbers or Key Note ? How can I "iCloud" documents created with Word Mac or Excel mac??

    Why iCloud only allows store documents created by Pages, Numbers or Key Note ? How can I "iCloud" documents created with Word Mac or Excel mac??

    Oscar66 wrote:
    Why iCloud only allows store documents created by Pages, Numbers or Key Note ? How can I "iCloud" documents created with Word Mac or Excel mac??
    iwork for ios accepts for upload and also happily opens all your Microsoft office files, from Office97 standard doc/xls/ppt to the 2011 versions of docx,xlsx,pptx and various other of these format extensions.
    Notice : the upload feature in www.icloud.com is only active if you in fact own these apps on your iPhone/Pad/pod. it is not a feature of iWork for the Mac ( iwork09 ) which itself is not icloud capable at all.

  • How to upload the documents like PDF, EXCEL and WORD

    Hi,
    I am working on UI, I am tracking the COREMODS data using this UI. My requirement is need to maintain the related documents also in database using this UI. I think SLM system have that functionality. If any one know about this functionality, explain about
    How to upload the documents into database.
    How to maintain this documents in database.
    Is there any standard methods/function modules to upload this documents ( I am not asking about content of document, I am expecting about total file).
    i.e. I want to maintain the all core mod related test cases and other documents in SAP database.
    How to handle this functionality?        
    Rayudu

    Hi Rayudu,
    For office documents we can use [Business Document Service|http://help.sap.com/saphelp_nw70/helpdata/EN/3d/90a9371c726343e10000009b38f842/frameset.htm]
    Cheers,
    Jose.

  • Content from my Apple TV only displays on about 50% of the screen on my 40" 1080p flatcreen.  How do I fill the screen with content?

    Content from Apple TV 2 only displays in about 50% of the screen on my 40" 1080p flatscreen.  How do I fill the screen with content?

    Check  TV remote for an aspect ratio control (occssionally zoom) and set to 16:9.

  • Illustrator CC how to setup custom document profile

    How do I set up a custom document profile in Illustrator CC and save it for future use?
    I do not see any way to save it.

    1.  Re: Illustrator CC how to setup custom document profile
           Francesco Della Peruta     Sep 11, 2013 11:31 AM  (in response to dinnys)   
    I think you have to create a new document, set all your preferred options, leave it empty, and save it as a template file, ready to reuse .
    Otherwise you can:
    Create a new document, set all your preferred options, leave it empty, and save it in the same folder of the adobe preset.
    To find the correct path select the preset profile menu, in the new document window, and choose browse.
    I hope this help"

  • How to upload a document with values related to document properties in to document set at same time using Javascript object model

    Hi,
          Problem Description: Need to upload a document with values related to document properties using custom form in to document set using JavaScript Object Model.
        Kindly let me know any solutions.
    Thanks
    Razvi444

    The following code shows how to use REST/Ajax to upload a document to a document set.
    function uploadToDocumentSet(filename, content) {
    appweburl = decodeURIComponent(getQueryStringParameter('SPAppWebUrl'));
    hostweburl = decodeURIComponent(getQueryStringParameter('SPHostUrl'));
    var restSource = appweburl +
    "/_api/SP.AppContextSite(@target)/web/GetFolderByServerRelativeUrl('/restdocuments/testds')/files/add(url='" + filename + "',overwrite=true)?@target='" + hostweburl + "'";
    var dfd = $.Deferred();
    $.ajax(
    'url': restSource,
    'method': 'POST',
    'data': content,
    processData: false,
    timeout:1000000,
    'headers': {
    'accept': 'application/json;odata=verbose',
    'X-RequestDigest': $('#__REQUESTDIGEST').val(),
    "content-length": content.byteLength
    'success': function (data) {
    var d = data;
    dfd.resolve(d);
    'error': function (err,textStatus,errorThrown) {
    dfd.reject(err);
    return dfd;
    Then when this code returns you can use the following to update the metadata of the new document.
    function updateMetadataNoVersion(fileUrl) {
    appweburl = decodeURIComponent(getQueryStringParameter('SPAppWebUrl'));
    hostweburl = decodeURIComponent(getQueryStringParameter('SPHostUrl'));
    var restSource = appweburl +
    "/_api/SP.AppContextSite(@target)/web/GetFolderByServerRelativeUrl('/restdocuments/testds')/files/getbyurl(url='" + fileUrl + "')/listitemallfields/validateupdatelistitem?@target='" + hostweburl + "'";
    var dfd = $.Deferred();
    $.ajax(
    'url': restSource,
    'method': 'POST',
    'data': JSON.stringify({
    'formValues': [
    '__metadata': { 'type': 'SP.ListItemFormUpdateValue' },
    'FieldName': 'Title',
    'FieldValue': 'My Title2'
    'bNewDocumentUpdate': true,
    'checkInComment': ''
    'headers': {
    'accept': 'application/json;odata=verbose',
    'content-type': 'application/json;odata=verbose',
    'X-RequestDigest': $('#__REQUESTDIGEST').val()
    'success': function (data) {
    var d = data;
    dfd.resolve(d);
    'error': function (err) {
    dfd.reject(err);
    return dfd;
    Blog | SharePoint Field Notes Dev Tools |
    SPFastDeploy | SPRemoteAPIExplorer

  • BPEL Custom Workflow (DocumentReviewWorkflow) with Content Services

    Hi All,
    Anybody working on BPEL Custom Workflows got Success in using the DocumentReviewWorkflow with the Content Services Development Kit 10.1.2.3.0
    Please update..
    Many Thanks in advance..!!!
    Prasant

    The DocumentReviewWorkflow that ships with the Content Services web services places the documents in the comments field.
    There are examples in the sample code - DocumentReviewWorkflowAction.java file demonstrates how to get the URLs from Oracle Content Services
    // Initialize the various Web Service Manager classes.
    StringBuffer sb = new StringBuffer(100);
    String endpoint = session.getServiceEndPoint();
    setUpManagers(session);
    try
    // Obtain the new/updated document items.
    Item[] documents = WorkflowUtils.getTargetDocuments(session,
    m_WorkflowId);
    int len = (documents == null) ? 0 : documents.length;
    for (int i = 0; i < len; i++)
    AttributeRequest[] pathar = WsUtil.newAttributeRequestArray(
    Attributes.URL);
    Item tmp =
    (Item) m_CommonManager.getItem(documents.getId(), pathar);
    String filepath = (String) WsUtil.getAttributesMap(
    tmp)
    .get(Attributes.URL);
    // Convert the String list to a single string for convenience.
    sb.append(filepath);
    sb.append("\n");
    finally
    session.logout();
    You can then add the document links as attachments by creating a list of attachments and then inserting the URLs for the documents in the URI - I've done it using a combination of Java and BPEL. Here is an excerpt
    <bpelx:exec name="countAttachments" language="Java" version="1.4"><![CDATA[/*Write your java code below e.g.
                   System.out.println("Hello, World");
              // Note that the documents come back as a list of
              // documents with a line break between them
              String filename = (String) getVariableData("filename");      
              String[] docnames = filename.split("\n");
    setVariableData("numberofdocuments", new Integer(docnames.length));
    ]]>
    </bpelx:exec>
    <assign name="initCounter">
    <copy>
    <from expression="0"/>
    <to variable="counter"/>
    </copy>
    <copy>
    <from>
    <attachment xmlns="http://xmlns.oracle.com/pcbpel/taskservice/task">
    <name/>
    <URI/>
    <content/>
    </attachment>
    </from>
    <to variable="ParallelVar1" query="/task:task/task:attachment"/>
    </copy>
    </assign>
    <while name="While_1" condition="bpws:getVariableData('counter') &lt; (bpws:getVariableData('numberofdocuments') - 1)">
    <assign name="createAttachmentList">
    <bpelx:append>
    <bpelx:from>
    <attachment xmlns="http://xmlns.oracle.com/pcbpel/taskservice/task">
    <name/>
    <URI/>
    <content/>
    </attachment>
    </bpelx:from>
    <bpelx:to variable="ParallelVar1" query="/task:task"/>
    </bpelx:append>
    <copy>
    <from expression="bpws:getVariableData('counter') + 1"/>
    <to variable="counter"/>
    </copy>
    </assign>
    </while>
    <bpelx:exec name="AddAttachmentsToList" language="Java" version="1.4"><![CDATA[/*Write your java code below e.g.
                   System.out.println("Hello, World");
              String filename = (String) getVariableData("filename");
              checkpoint();
              String[] docnames = filename.split("\n");
    for (int i = 0; i < docnames.length; i++) {
    int strlen = docnames[i].length();
    int slash = docnames[i].lastIndexOf('/');
    String filenameonly = docnames[i].substring(slash + 1, strlen);
    int item = i + 1;
    String varname = "/task:task/task:attachment[" + item + "]/task:name";
    String varuri = "/task:task/task:attachment[" + item + "]/task:URI";
    setVariableData("ParallelVar1", varname, filenameonly);
    setVariableData("ParallelVar1", varuri, docnames[i]);
    ]]>
    </bpelx:exec>
    This uses the fact that the document URLs are returned as a \n delimited string.

  • How to print custom documents through custom program

    Hi,
    I am printing custom documents like Commercial Invoice, Shipper's Letter of Instructions,  Shipper's Export Declaration , using communication tab of custom declarations. SInce user wanted output with a changed layout( different from standard), so new Activity messages ( like ZP100 in place of standard P100) are created to call Z forms ( new PDF from created using SFP and called for this Message type). This part is done our fucntional team. This customize message type is calling my custom Z forms. But all these Z forms are not allowing printing of the document from Preview of PDF. Print Icon become disabled in the preview. Used wants to print from preview of PDF itself.
    There is a parameter in BADI  DOC_PERSONALIZE_BCS method parameter 'NOPRINT', which is passed with value 'X' in the function module to create PDF. SInce this is set to 'X' it is not letting us print from preview.
    So, can anyone help me in finding what can I do to get this print enabled from preview. If I need to change this method, then what are the steps and how standard configurations will be changed to call Zprogram in place of standard.

    Hi Swati,
    The Badi you mentioned should help you, try changing the importing parameter in your local structure and pass this local variable, instead of the imported (IS_outputparams-noprint = 'X' ) to the function below. This is an example, you`ll need to declare data as well :
    Method IF_EX_DOC_PERSONALIZE_BCS~PERSONALIZE_PDF_DOC_PDFIF
    ls_output_options = is_outputparams.
      IF NOT ls_output_options-preview IS INITIAL.
        ls_output_options-noprint = ' ' .    " Allow printing
       ENDIF.
    call function '/SAPSLL/PRN_FORM_PROCESS_PDF'
        exporting
          iv_guid_cuhd       = lv_guid_cuhd
          iv_function_name   = ip_function_name
          iv_form_name       = ip_form_name
          iv_appl_log_handle = ip_application_log
          is_output_options  = ls_outputparams " put your LOCAL structure here ....
        importing
          es_formoutput      = es_formoutput
          es_joboutput       = es_joboutput
        changing
          cs_docparams       = cs_docparams
        exceptions
          output_canceled    = 1
          others             = 2.
    Hope this helps,
    Regards,
    Branislav Petricek

  • Upload / Download document to KM Content Server from WebDynpro Application

    I have a requirement where I need to upload / download document into / from KM Content Server from my WebDynpro Application.
    Is it technically possible and if Yes, can I get any Sample code for this.

    Hi Tahzeeb,
    first of all i would point you to the JavaDocs for KMC API.
    https://media.sdn.sap.com/javadocs/NW04/SPS15/km/index.html
    And here is a small example of reading and storing KM resources.
    For reading:
         * Returns a resource as an InputStream from the KM repository
         * at the given path. The IUser is needed for authorization.
         * @param user      IUser for checking authorisation.
         * @param resPath   Path to the KM resource.
         * @return          Requested resource as a stream.
        private InputStream getKmResource(final IUser user, final String resPath)
            throws ResourceAccessException {
            try {
                final IResourceFactory factory = ResourceFactory.getInstance();
                final RID rid = RID.getRID(resPath);
                final IResource kmResource =
                    factory.getResource(
                        rid,
                        new ResourceContext(getDeprecatedIUser(user)));
                if (kmResource == null) {
                    throw new ResourceNotFoundException(
                        "KM resource not found: " + resPath,
                        resPath);
                return kmResource.getContent().getInputStream();
            catch (WcmException e) {
                throw new ResourceAccessException("Error accessing KM resource: " + resPath, e, resPath);
    And for writing:
         * Stores a resource in the KM repository at the given path with the given name and mimetype.
         * Content is taken from the given inputstream.
         * @param user          IUser for checking authorisation.
         * @param resName   Name of the resource
         * @param resPath     Path to the resource
         * @param mimeType MimeType of the resource
         * @param inputStream  Resource content
         * @throws ResourceAccessException
        private void putKmResource(
            final IUser user,
            final String resName,
            final String resPath,
            final String mimeType,
            final InputStream inputStream)
            throws ResourceAccessException {
            try {
                final ResourceContext rContext = new ResourceContext(getDeprecatedIUser(user));
                final RID rid = RID.getRID(resPath);
                final ICollection kmCollection =
                    (ICollection) ResourceFactory.getInstance().getResource(rid, rContext);
                if (kmCollection == null) {
                    throw new ResourceNotFoundException(
                        "KM resource not found: " + resPath,
                        resPath);
                else {
                    IContent kmContent = new Content(inputStream, mimeType, -1);
                    IResource kmResource = kmCollection.createResource(resName, null, kmContent);
            catch (ResourceException e) {
                throw new ResourceAccessException("Error accessing KM resource: " + resPath, e, resPath);
            finally {
                try {
                    inputStream.close();
                catch (IOException e1) {
                    throw new ResourceAccessException("Error closing InputStream when accessing " + resPath, e1, resPath);
    Hope that helps for a start.
    Best regards,
      ok

  • How to publish custom web site with own domain name?

    Hey out there. I wonder if anyone can give me any tips on how to publish a web site with my own domain name.
    I have a web site I'm building and I want to purchase a domain name and then publish the site using that domain name.
    I know how to buy a domain name. I have a .mac account so I'm hoping that .mac can host the site. What I don't quite understand how to do is get .mac to host the site using that domain name. I looked through Apple Support but couldn't find what I was looking for. Just wondering if anyone has been in this situation. Thanks in advance.
    Dave
    [email protected]

    Dave ~ Welcome to the discussions. .Mac was re-branded as MobileMe last July. If you're not building your site with iWeb, it's considered to be a "custom" website. These Apple docs may help:
    MobileMe: How to publish a custom website
    iWeb ’08: Using your own domain name
    ...Use this search page to find such documents:
    http://support.apple.com/kb/index?page=search
    Note that you don't need to have iLife '08 to be able to direct your domain name to your custom website published to MobileMe. As someone wrote on another thread:
    "My personal domain is linked to my MM but i don't even have ilife on my mac. When you go to the options in MM to link your personal domain to your MM it provides directions that will guide you with setting up your godaddy settings."
    ...Where "MM" is MobileMe here:
    http://me.com/account
    ...+Personal Domain+ tab, and "godaddy" is wherever your domain name is registered.

  • How to create custom java class in Content Server

    Hi All,
    I want to develop a custom java class (.class) file and upload in the UCM(Stellent Content Server). The problem is that I have to use some objects like DataResultSet, SharedObjects etc in my java class file. Since these class files resides in the Content Server I am not able to create a custom java class with these objects.
    Can any one help me to solve the above issue
    With thanks and regards
    Mohan

    Hey there,
    All of the core content server class files are included in a single jar file. This jar is in one of 2 places in the 10gr3 version of UCM:
    1. If you have an unpatched content server include $IntradocDir/shared/classes/server.zip in your classpath
    2. If you have a patched content server include $IntradocDir/custom/CS10gR35CoreUpdate/classes.jar in your classpath.
    In UCM 11g the jar file is located in %MIDDLEWARE_HOME%/Oracle_ECM1/ucm/idc/jlib/idcserver.jar
    P.S. Venkat is correct, post UCM specific questions in the ECM forum.
    Hope that helps,
    Andy Weaver - Senior Software Consultant
    Fishbowl Solutions < http://www.fishbowlsolutions.com?WT.mc_id=L_Oracle_Consulting_amw_OTN_WCS >

  • How to upload HR documents in archivinglink

    Hi Gurus,
    How to upload all types of HR documents in archivinglink? and where to display these documents? How to retrieve a particular document?
    Thanks in advance.
    CNU

    Hello,
    In ArchiveLink. There is a content repository defined for documents and files are stored in tables defined in those repositories.
    Usually table for HR documents is SDOKCONT1. Check Tcode OAC0.
    Kind Regards
    Christine

  • How to use custom iometer icf with multiple io analyzers

    so here's my setup
    I have deployed to the IO analyzer ova to 3 VMs
    1 controller and 2 workers
    on the controller I have created custom Iometer workloads, gave them proper names and placed them in
    /var/www/configs/
    then i did
    /etc/init.d/tomcat6 restart
    when I load up the analyzer webui, my custom workload shows up in the dropdown menu
    next I proceeded to add my workers using my custom workload
    but when I hit run and check each console session, IOmeter only loads up on the controller but not the 2 workers..
    did I miss something?
    thanks

    Hi,
    Sorry that we didn't make it clear in our User's Guide. For new/modified ICF files, please manually SCP them to all the worker VMs. The backend script starting Iometer doesn't verify whether an ICF file exists.
    We'll be updating the document along with our next release.
    Thanks,
    Chien-Chia

Maybe you are looking for