How to insert a new accessory through java code

Hello world

I need to add a new accessory through java code. I found the service EDIT_RENDITIONS in the add attachments page. But this service is not documented. Does anyone have an example how to add attachments?

Thank you

Martin

Martin,

Try the following code:

final IdcClientManager clientManager = new IdcClientManager();

Customer IdcClient;

try {}

client = clientManager.createClient (IDC_PROTOCOL + RIDC_SERVER + ":" + RIDC_PORT);

final String username = 'sysadmin ';

final DataBinder dataBinderReq = client.createBinder ();

ServiceResponse severiceResponse = null;

dataBinderReq.putLocal ("IdcService", "EDIT_RENDITIONS");

dataBinderReq.putLocal ("a", '1560'); as integer

dataBinderReq.putLocal ("dDocName", "DEV2_001509"); AsString

dataBinderReq.putLocal ("renditionKeys", "addRendition0"); AsString

dataBinderReq.putLocal ("addRendition0.name", "theFileName");

dataBinderReq.putLocal ("addRendition0.description", "theFileDescription");

dataBinderReq.putLocal ("addRendition0.action", "modify");

final String fileName = "c:\\test.txt";

final file = new File (fileName);

final TransferFile tf = new TransferFile (queue);

dataBinderReq.addFile ("addRendition0.file", tf); as bytes

severiceResponse = client.sendRequest (new IdcContext ("username"), dataBinderReq);

final DataBinder dataBinderResp = severiceResponse.getResponseAsBinder ();

DataBinder resultado = severiceResponse.getResponseAsBinder ();

System.out.println (dataBinderResp.ToString ());

} catch (final IdcClientException e) {}

System.out.println (e.getMessage ());

e.printStackTrace (System.out);

}

Jonathan

http://jonathanhult.com

Tags: Fusion Middleware

Similar Questions

  • How do the archiving of content through java code

    I need consignment content through java code.

    Summary of the problem: If someone send an email to a specific account this attachment automatically checkin to content server and the required metadata is read from the subject and message body.

    Now I have the problem that I'm not able to record of attachment to the content server. I have all the required metadata and the attachment that is extracted from an e-mail.

    Please someone help me, how I'm going to call the consignment through java code.

    Hello Deepak,

    Try the code below and let me know how it goes, I wrote all code example for you

    Note: When you find '<>> ', you need to write real values.

    import java.io.BufferedReader;

    import java.io.DataInputStream;

    Import oracle.stellent.ridc.IdcClientManager;

    import java.io.File;

    import java.io.FileInputStream;

    to import java.io.FileNotFoundException;

    to import java.io.FileOutputStream;

    import java.io.IOException;

    import java.io.InputStream;

    import java.io.InputStreamReader;

    Import oracle.stellent.ridc.IdcClient;

    Import oracle.stellent.ridc.IdcClientException;

    Import oracle.stellent.ridc.IdcClientManager;

    Import oracle.stellent.ridc.IdcContext;

    Import oracle.stellent.ridc.model.DataBinder;

    Import oracle.stellent.ridc.model.DataObject;

    Import oracle.stellent.ridc.model.DataResultSet;

    Import oracle.stellent.ridc.model.TransferFile;

    Import oracle.stellent.ridc.model.impl.DataObjectEncodingUtils;

    Import oracle.stellent.ridc.protocol.ServiceResponse;

    public class servicesTest {}

    The University Complutense of MADRID soldev3 connection string

    Private final public static String idcConnectionURL = "idc://UCM path";

    private public final static String username = "weblogic";

    public IdcClient getUCMConnection()

    throws IdcClientException, IOException {}

    ClientManager IdcClientManager = new IdcClientManager ();

    Customer IdcClient = clientManager.createClient (idcConnectionURL);

    UserContext IdcContext = new IdcContext ("username");

    customer feedback;

    }

    ' public void checkinFile (String Filename, String Filepath) survey IdcClientException, IOException {}

    System.out.println ("in the createUser method..");

    IdcClient client = getUCMConnection();

    DataBinder binding = client.createBinder ();

    System.out.println ("in the checkinFile method...");

    binder.putLocal ("IdcService", "CHECKIN_UNIVERSAL");

    binder.putLocal ("dDocTitle", ""> "");

    binder.putLocal ("dDocName", ""> "");

    binder.putLocal ("dDocType", ""> "");

    binder.putLocal ('dDocAuthor', 'sysadmin');

    binder.putLocal ('dSecurityGroup', 'Public');

    binder.putLocal ('xlanguage', ""> "");

    binder.putLocal ("dOriginalName", Filename);

    binder.addFile ("primaryFile", new TransferFile (new File (Filepath + Filename)));

    UserContext IdcContext = new IdcContext ("username");

    client.sendRequest (binder, userContext);

    System.out.println ("After checkinFile method...");

    }

    Public Shared Sub main (String [] args) throws IdcClientException,

    FileNotFoundException,

    IOException, Exception {}

    MAK servicesTest = new servicesTest();

    mak.checkinFile (">",">" ");

    }

    }

    Thank you

    MAK

  • Hello. I just know that the muse and I need an organization of customers in alphabetical order. The problem is that you will always get new clients. I need to know how to insert a new customer (square), and it is already in alphabetical order on the page.

    Hello.

    I just know that the muse and I need guests alphabetical organization. The problem is that you will always get new clients. I need to know how to insert a new customer (square), and it is already in alphabetical order on the page. The site will be as in the link below, and each customer will have a window of these: http://www.connary.com/. I look back.

    A hug, Murilo.

    I believe you are referring to the rectangles of tile as visitors on the page? not exactly customer database?

    You can add rectangle with different effects with rollover State of mouse and about adding new, you must do this manually in design mode.

    Thank you

    Sanjit

  • How to simulate BlackBerry options/commands from java code?

    Hi friends,

    For wipe/erase of personal data, we have the following option on BlackBerry phone (model: 9930)
    Options of-> Security-> Security Wipe

    I want to give the same option in my BlackBerry App (e.g.. A button marked "clear data")
    How can I simulate the same functionality through java code

    Can someone please provide some help or provide a reference to the entire API

    Thank you

    Laughing out loud
    You can enter simulation (clicks, presses), and you can launch native applications, if you know their module name, but both approaches have their limitations.

    See http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/ApplicationManager.html... or http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/ApplicationManager.html... to see how to apply.

  • How to insert the new line char in sticky c# code?

    Hi all

    I paste the code complete c# on a line of string as follows.

    int _intUserID = 0; string _strUserName = string. Empty; string _strEmployeeID = string.empty;
     
    c# VS2005 .cs file code should stick as follows.

    int _intUserID = 0;
    String _strUserName = string. Empty;
    String _strEmployeeID = string. Empty;

    So how do you achieve this. by inserting the new line char in c#?

    Hi Murthy,

    Thanks for posting your query in Microsoft Community.

    I understand that you have problems with the code in Visual studio.

    The question you posted corresponds to the coding software, it would be better suited to the MSDN Community.

    Please visit the link below to find a community that will provide the support you want.

    http://social.msdn.Microsoft.com/forums/en-us/category/VisualStudio

    Hope it will be useful. If you still have questions, please reply and we will be happy to help you.

  • How to insert only new registrations in GR 11, 1 material

    Hi friends,

    Every hour, I have a few records in a table that has a unique primary key.

    I want to insert only new records up to and ignore duplicate keys (meaning it shouldn't fail with "forced to uniqueness (TEST.) TEST_PK) violated" . Is there an easy way to do it? (I read that we can use MERGE, but did not understand how to rewrite my request accordingly)

    Note: DB is on 11 GR 1 material so I can't use IGNORE_ROW_ON_DUPKEY_INDEX (introduced in 11 GR 2).

    Query : for example hard-coded Date

    Insert / * + append parallel(TEST12,8) * / into TEST TEST12

    SELECT

    /*+

    Leading (a.c)

    Full (a.c) parallel (a.c, 2)

    parallel of full (a.m.) (a.m., 2)

    Full (a.d) parallel (a.d, 2)

    Full (a.n) parallel (a.n, 2)

    PQ_DISTRIBUTE (hash of hash a.n)

    */ *

    OF DATA_VIEW one

    WHERE the st_date BETWEEN TO_DATE (16 March 14 00:00:00 ',' DD-MON-RR HH24:MI:SS')

    AND TO_DATE (16 MARCH 14 23:59 ',' DD-MON-RR HH24:MI:SS');

    What did I try?

    DBMS_ERRLOG.create_error_log, but still it gives the same error.

    The ERRORS IN err LOG $ _dest2 ('1 comment') REJECTS LIMIT UNLIMITED;

    Insert / * + append parallel(TEST12,8) * / into TEST TEST12

    *

    ERROR on line 1:

    ORA-12801: error reported in the parallel query P005 Server

    ORA-00001: unique constraint (TEST.) TEST_PK) violated

    Can you please suggest what is the effective way to do it?

    This should work for you (change column lists to match the column names in your version of these tables):

    SQL> create table test12(
      2          st_id number not null,
      3          st_stuff varchar2(40),
      4          st_date date);
    
    Table created.
    
    SQL>
    SQL> create table test1(
      2          st_id number not null,
      3          st_stuff varchar2(40),
      4          st_date date);
    
    Table created.
    
    SQL>
    SQL> create view data_view as select * from test1;
    
    View created.
    
    SQL>
    SQL> begin
      2          for i in 1..100 loop
      3                  insert into test1
      4                  values(i,'Stuff '||i, sysdate-mod(i,9));
      5          end loop;
      6
      7          commit;
      8  end;
      9  /
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL> merge into test12 t12
      2  using (SELECT
      3    /*+
      4      leading(a.c)
      5      full(a.c) parallel (a.c,2)
      6      full(a.m) parallel (a.m,2)
      7      full(a.d) parallel (a.d,2)
      8      full(a.n) parallel (a.n,2)
      9      pq_distribute(a.n hash hash)
     10    */ *
     11  FROM DATA_VIEW a
     12  WHERE st_date BETWEEN TO_DATE('16-MAR-14 00:00:00','DD-MON-RR HH24:MI:SS')
     13                      AND TO_DATE('16-MAR-14 23:59:00','DD-MON-RR HH24:MI:SS')) dv
     14  on (dv.st_id = t12.st_id)
     15  when not matched then
     16          insert (t12.st_id, t12.st_stuff, t12.st_date)
     17          values (dv.st_id, dv.st_stuff, dv.st_date);
    
    12 rows merged.
    
    SQL>
    SQL> select count(*) from test12;
    
      COUNT(*)
    ----------
            12
    
    SQL>SQL> begin
      2          for i in 101..200 loop
      3                  insert into test1
      4                  values(i,'Stuff '||i, sysdate-mod(i,9));
      5          end loop;
      6
      7          commit;
      8  end;
      9  /
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL> merge into test12 t12
      2  using (SELECT
      3    /*+
      4      leading(a.c)
      5      full(a.c) parallel (a.c,2)
      6      full(a.m) parallel (a.m,2)
      7      full(a.d) parallel (a.d,2)
      8      full(a.n) parallel (a.n,2)
      9      pq_distribute(a.n hash hash)
     10    */ *
     11  FROM DATA_VIEW a
     12  WHERE st_date BETWEEN TO_DATE('16-MAR-14 00:00:00','DD-MON-RR HH24:MI:SS')
     13                      AND TO_DATE('16-MAR-14 23:59:00','DD-MON-RR HH24:MI:SS')) dv
     14  on (dv.st_id = t12.st_id)
     15  when not matched then
     16          insert (t12.st_id, t12.st_stuff, t12.st_date)
     17          values (dv.st_id, dv.st_stuff, dv.st_date);
    
    11 rows merged.
    
    SQL>
    SQL> select count(*) from test12;
    
      COUNT(*)
    ----------
            23
    
    SQL>
    
    David Fitzjarrell
    
  • How to provide the value of a field defined by the user through java code

    I use OIM 11.1.1.5.
    I have a single-customer-number called user-defined field. This field must be pre-filled in the course of the creation of the user (using the interface user Web of IOM) and the value is a java code.

    Does anyone of you can tell me the high level steps to implement this.

    Thank you!
    Kabi

    You can view them in the tables...

    The tables you need are latest_plugins, plugin_metadata, plugin_zip

  • How to call trial task of custom Java code directly

    I'm a java code write Victorian where I want to call the process task directly "Delete user" resource AD. Then, I'll put this java class as part of a scheduled task.

    No API to IOM for this?

    Pls suggest.

    -Thank you

    This is why I told you that to see the API with care:

    You will have to pass256 in the first place and alternation task Instance key, to the second place.

    You're done!

  • How to insert a new line with text()

    I have a piece of text on the stage and I want to insert text that contain more line with text(). Is this possible?

    Something like:

    SYM. $('myTextElement') .text ("text string of the first line" + "string of text from second line");

    I just tried this

    SYM. $('_58Txt') .html ("|" + r1.toString () + "|")<  |"="" +="" r2.tostring()="" +="" "|="">
    numerator<>

    and I got what I wanted:

    | 3.<>

    numerator<>

    Thank you. It worked

  • How to insert a new line in a table?

    I have a table of basic bit of lines and columns.

    In excel if I want to insert a blank line in the Middle, I just click right and do it.

    In DW, I am at a loss what to do. Thank you.

    It is very similar to the DW.  Right-click in a cell, and then click Table-> Insert a row or a column.  There is options to add several lines above or below.

  • How to insert a new record or update existing record by using a view complex?

    Currently, I created this screen, there is no problem on display data, on the update feature (average TI insert / update / delete on the table for which the view is based on).

    I have a table and a view complex in order to display the information in the table in a form of tabellar (IE up to 70 record in same "record" in the form, one for each article)

    The view is like this



    Select a.f1, a.f2, get_value(a.pk1,1) a1, a2 get_value(a.pk1,2), get_value(a.pk1,3) a3...

    from my_table a

    where a.proj_id = user





    and I want to allow the update of the field a1, a2, a3 in a multiplace (tabellar) canvas.

    I created a TRIGGER INSTEAD.

    But it works not only in the form. I get FRM-40654 error when I try to change the existing value in the form running based on this point of view.

    The view is woking and editable using sql-plus.

    If I have question
    Select * from ALL_UPDATABLE_COLUMNS where table_name = 'SPV_BOQ_BOM_POS_ACTIVITIES ';

    where "SPV_BOQ_BOM_POS_ACTIVITIES" is the name of my point of view.

    The question is: why if the view is updatable using SQL * Plus, is not editable using the Oracle 10 g 2 form?

    Could someone help me ASAP?

    Thank you

    Forms to lock the record when you start editing. It is is by a statement of the type

    SELECT 
      FROM 
     WHERE =
       FOR UPDATE NOWAIT;
    

    If this attempt fails, the error you are getting is displayed. As solution to create a trigger-LOCK-ON on the block and with which replace standard logic.

  • I lost my password to a family environment on the Xbox. How can insert a new

    Could someone help me please. My son installed a password on Xbox and he forgot it.we cannot access the Xbox for more than 16 games

    Hello Conorcannon,

    This question of fact in the game's forum:

    http://answers.Microsoft.com/en-us/Windows/Forum/gaming

    (1) go to the system settings recover gamertag reset the endings of survey for the console and it should have your gamer tag back

    (2) disconnect all your logged in then press the x in the middle of your controller that you tells your reader 1,2,3,4 then go recover gamertag your info and the happy game

    3) turn on your Xbox console to access the menu "Account Management." Make sure that there is no disc in the status bar.

    Type an expression in the password field. Basically, you want to appear the guest with two options: "Try Again" and "I forgot my Access Code," with a CLEAR"" button.

    Select the 'CLEAR' option, then press the ' - A '. When you are prompted, type the last four digits of the credit card that you used to sign up for xbox live, and then send it.

    Reset your password.

    http://www.ehow.com/how_6116969_reset-Xbox-Live-password.html

    I hope this helps.

  • How to add convertNumber in inputText in java code

    jdev 12 c

    I need to dynamically add inputText with convertNumber in backing bean.

    RichInputText riText = new RichInputText();
    riText.setLabel (label);
    riText.setId ('it' + ind);
    riText.setVisible (true);
    riText.setRendered (true);
    riText.setSimple (true);

    How to add convertNumber to riText? Thank you.

    I thought about it how do in java. I need to use NumberConverter.

    RichInputText riText = new RichInputText();
    riText.setLabel (label);
    riText.setId ("it" + itind + "_" + ind);
    riText.setVisible (true);
    riText.setRendered (true);
    riText.setSimple (true);
               
               Application = FacesContext.getCurrentInstance () .getApplication ();
    NumberConverter nc =
    Application.createConverter ("oracle.adf.rich.Number") (NumberConverter);
    nc.setType ("number");
    nc.setMaxFractionDigits (2);
    nc.setMaxIntegerDigits (11);
    riText.setConverter (nc);

  • I downloaded Safari 10 and now every page that uses Java asks me to activate or not. How to avoid this new feature? I have problems to access my bank account.

    I downloaded Safari 10 and now every page that uses Java asks me to activate or not. How to avoid this new feature? I have problems to access my bank account.

    I think they mean JavaScript.

    In your Safari menu bar, click Safari > Preferences and then select the Security tab, and then select: Enable JavaScript

  • How to complete the implementation of process after inserting the new sim card to unlock the phone

    Try to unlock the phone more 6s with ATT, but do not know how to perform the implementation of process after inserting the new sim card. I got the unlock code confirmed att.

    After the unlock code is confirmed, you will have to restore the unit to the factory via iTunes settings.  He must inform you that the device is unlocked, THEN you change sim cards.

Maybe you are looking for

  • Can I recover my old account of synchronization?

    I recently bought a new laptop after trading in my old laptop to store credit. I install Firefox and go to download all my passwords, bookmarks, etc, only to find out that there is a new version of sync that I needed to be upgraded to do so! So, basi

  • The browser window does not whole screen, despite the actual program in doing so.

    At one point, I opened FF and the browser window has stopped picking up full-screen. The program actually fills the screen, but the current browser window has some sort of right margin. Do a right click in the right margin produced no popup menu. Bro

  • iPhone virus

    Recently, when I was using safari I sometimes shaded redicected. I don't know why this is happening. Its probably not a virus, more an adware as I have experienced it on my mac, but I can't imagine how and why this appeared on my phone, as I was unde

  • L50-B-1 p 1 satellite graphical artifacts when you play.

    Nice day Bought a refurbished Satellite P L50-B-1 1 almost 3 weeks (20 days to be precise). At startup, the laptop preform as expected, however if left running for a period of time and you can start any application that allows the secondary GPU, AMD

  • Compatibility of motherboards for HP laptop.

    Agin Hello my friends HP experienced! At that time, I have a question on 2 laptops. First of all, I have a HP DV9910 us. It had Vista, which has been upgraded to win. 7. now, I had posted this question before, on the noise problem, it works well, how