WebCenter Sites REST API: How to add multiple attributes to Active?

I created an asset with a multiple attribute, as for example, a set of images.

I would like to insert images of this asset with the Webcenter Sites REST API but I Don t know how.

Single attribute is like this:

sourceAssetAttribute = new Attribute();
  sourceAssetAttributeData = new Data();
  sourceAssetAttribute.setName("FSIILongDescription");
  sourceAssetAttributeData.setStringValue("Test Long Description");
  sourceAssetAttribute.setData(sourceAssetAttributeData);
  sourceAsset.getAttributes().add(sourceAssetAttribute);

And multiple is how?

I finally got.

https://support.Oracle.com/epmos/faces/DocumentDisplay?_afrLoop=563491042188574&parent=document&SourceID=1528601.1&ID=1510322.1&_afrWindowMode=0&_adf.CTRL-State=m55lxhl4z_58

It s like this:

sourceAssetAttribute = new Attribute();

sourceAssetAttributeData = new Data();

sourceAssetAttribute.setName ("attribute_name");

sourceAssetAttributeData.getStringLists (.add(0,"Asset_type:"+asset_id));))

sourceAssetAttributeData.getStringLists (.add(1,"Asset_type:"+asset_id));))

sourceAssetAttribute.setData (sourceAssetAttributeData);

sourceAsset.getAttributes () .add (sourceAssetAttribute);

Tags: Fusion Middleware

Similar Questions

  • WebCenter Sites REST API: How to set the active model?

    How can I set the model for the asset, I create.

    AssetBean sourceAsset = new AssetBean();

    sourceAsset.setName (value);

    sourceAsset.setName (prod_name);

    sourceAsset.setCreatedby (value);

    sourceAsset.setStatus (value);

    sourceAsset.setSubtype (value);

    ...

    but no set model?

    Hello

    The model on an asset is defined as an attribute:

    List attributes = sourceAsset.getAttributes()
    for(Attribute attribute: attributes) {
        if(attribute.getName().equals("template")) {
            attribute.getData().setStringValue("ArticleLayout2");
        }
    }
    

    or if you create a new item of assets:

    List attributes = sourceAsset.getAttributes()
    Attribute templateAttribute = new Attribute();
    templateAttribute.setName("template");
    templateAttribute.setData(new Data());
    templateAttribute.getData().setStringValue("ArticleLayout2");
    attributes.add(a);
    

    Kind regards

    Stephan.

  • How to add multiple lines when the button is clicked

    How to add multiple lines when the click on button now is just add a row .plz give me idea how... waiting for answer

    / public final class screen extends MyScreen
    {
    /**
    * Creates a new object of MyScreen
    */
    ObjectChoiceField obj1 obj2, obj3, obj4.
    Table of String() = {'101 ', ' 102'};
    String of shadow [] = {"Shade1", "Shade2"};
    Rolls of string [] = {'101 ', ' 102'};
    String cutting [] = {"100-150", "150-200"};
    Chain of selectedindex1, selectedindex2, selectedindex3, selectedindex4;
    LabelField lbl1 lbl2, lbl3, lbl4;
        
    GFM LinedGridFieldManager;
    HFM HorizontalFieldManager, hfm1, hfm2 hfm3;
    VerticalFieldManager vfmMain;
        
    public MyScreen()
    {
        
    Set the displayed title of the screen
    hfm1 = new HorizontalFieldManager (HorizontalFieldManager.NO_VERTICAL_SCROLL |) HorizontalFieldManager.NO_VERTICAL_SCROLLBAR);
    hfm2 = new HorizontalFieldManager (HorizontalFieldManager.NO_VERTICAL_SCROLL |) HorizontalFieldManager.NO_VERTICAL_SCROLLBAR);
    hfm3 = new HorizontalFieldManager (HorizontalFieldManager.NO_VERTICAL_SCROLL |) HorizontalFieldManager.NO_VERTICAL_SCROLLBAR);
    HFM = new HorizontalFieldManager (HorizontalFieldManager.FIELD_RIGHT);
    vfmMain = new VerticalFieldManager (Manager.NO_VERTICAL_SCROLL |) Manager.NO_HORIZONTAL_SCROLLBAR);
            
    obj1 = new ObjectChoiceField ("", graph, 0, FIELD_LEFT);
    obj2 = new ObjectChoiceField ("", blind, 0, FIELD_LEFT);
    Obj3 = new ObjectChoiceField ("", rolls, 0, FIELD_LEFT);
    Obj4 = new ObjectChoiceField ("", cuts, 0, FIELD_LEFT);
            
    LBL1 = new LabelField("");
    LBL2 = new LabelField("");
    lbl3 = new LabelField("");
    lbl4 = new LabelField("");
            
    ButtonField btnAdd = new ButtonField ("ADD", FIELD_RIGHT);
            
    GFM = new LinedGridFieldManager (4, LinedGridFieldManager.VERTICAL_SCROLL);
            
    hfm1.setMargin (20, 0, 10, 0);
    hfm1. Add (new LabelField ("Chart"));
    hfm1. Add (obj1);
    hfm1. Add (new LabelField ("Shade"));
    hfm1. Add (obj2);
            
    hfm2. Add (new LabelField ("Rolls"));
    hfm2. Add (Obj3);
    hfm2. Add (new LabelField ("Cuts"));
    hfm2. Add (Obj4);
    HFM. Add (btnAdd);
            
    GFM. Add (new LabelField ("Chart"));
    GFM. Add (new LabelField ("Shade"));
    GFM. Add (new LabelField ("Rolls"));
    GFM. Add (new LabelField ("Cuts"));
            
    vfmMain.add (hfm1);
    vfmMain.add (hfm2);
    vfmMain.add (hfm3);
    vfmMain.add (hfm);
    vfmMain.add (new SeparatorField());
    vfmMain.add (gfm);
    Add (vfmMain);
            
    btnAdd.setChangeListener (new FieldChangeListener()
    {
    ' Public Sub fieldChanged (field field, int context) {}
    TODO self-generating method stub
    selectedindex1 = chart [obj1.getSelectedIndex ()];
    selectedindex2 = shade [obj2.getSelectedIndex ()];
    selectedindex3 = rolls [obj3.getSelectedIndex ()];
    selectedindex4 = cuts [obj4.getSelectedIndex ()];
                    
    While (LBL1. GetText(). Equals("") | LBL2. GetText(). Equals("") | lbl3. GetText(). Equals("") | lbl4. GetText(). Equals(""))
    {
    LBL1. SetText (selectedindex1);
    LBL2. SetText (selectedindex2);
    lbl3. SetText (selectedindex3);
    lbl4. SetText (selectedindex4);
                    
    GFM. Add (LBL1);
    GFM. Add (LBL2);
    GFM. Add (lbl3);
    GFM. Add (lbl4);
                    
    }
    }
    });
    }
    }

    Hi Piya,

    I run your code, and according to your logic that it works correctly.

    It's adding that line only once because according to your logic that one line can be added to MDT, if you do not want to add line on each click on the button, follow these steps:

    selectedindex1 = chart [obj1.getSelectedIndex ()];
    selectedindex2 = shade [obj2.getSelectedIndex ()];
    selectedindex3 = rolls [obj3.getSelectedIndex ()];
    selectedindex4 = cuts [obj4.getSelectedIndex ()];

    Lbl1 LabelField = new LabelField("");
    Lbl2 LabelField = new LabelField("");
    LabelField lbl3 = new LabelField("");
    LabelField lbl4 = new LabelField("");
    If (LBL1. GetText(). Equals("") | LBL2. GetText(). Equals("") | lbl3. GetText(). Equals("") | lbl4. GetText(). Equals(""))
    {
    LBL1. SetText (selectedindex1);
    LBL2. SetText (selectedindex2);
    lbl3. SetText (selectedindex3);
    lbl4. SetText (selectedindex4);
                    
    GFM. Add (LBL1);
    GFM. Add (LBL2);
    GFM. Add (lbl3);
    GFM. Add (lbl4);
                    
    }

  • REST API: How to create e-mail/landing page with static/dynamic content?

    With the REST API, it seems that you can create/update the contents of an e-mail or a landing page by specifying html with the type "RawHtmlContent". How it works when this e-mail or a landing page includes a shared or dynamic content? What is the recommended method to create or update an e-mail/landing page and add a new shared or dynamic, content or update the "reference"?

    Unfortunately this is not currently supported by our API.  However, we are building a new point extension called content Cloud that can solve your use case.

  • How to add multiple roles: the form-based authentication.

    Hi all

    I want to do an authentication.in form based my web.xml I added a role called admin.

    My question is how to add another role of 'support '.

    my content from web.xm here
    ----------------------------
    <? XML version = "1.0" encoding = "UTF - 8"? >
    < web - app xmlns = "http://java.sun.com/xml/ns/j2ee" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" >

    < Welcome-file-list >
    Welcome < file > welcome.jsp < / welcome-file >
    < / Welcome-file-list >

    < security constraint >
    < display name > constraint-0 < / name >
    < web-resource-collection >
    constraint-0 < web-resource-name > < / web-resource-name >
    <>protected url-pattern / * < / url-pattern >
    < / web-resource-collection >
    <>auth-constraint
    Admin > role name < < / role name >
    < / auth-constraint >
    < user-data-constraint >
    > transport security < NONE < / transport-guarantee >
    < / user-data-constraint >
    < / security constraint >

    <>login-config
    FORM < auth-method > < / auth-method >
    < form-login-config >
    login.jsp < form-login-page > < / form-login-page >
    failedlogin.html < form-error-page > < / form-error-page >
    < / form-login-config >
    < / login-config >

    <-security role >
    Admin > role name < < / role name >
    < / security role >

    < / web - app >

    --------------------

    my content here weblogic.xml:
    --------------------------------------------

    <? XML version = "1.0" encoding = "UTF-8"? >
    < wls:weblogic - web - app xmlns:wls = "http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.2/weblogic-web-app.xsd" >
    < wls:security - role-assignment >
    < wls:role - name > admin < / wls:role - name >
    < wls:principal - name > weblogic < / wls:principal - name >
    < / wls:security - role-assignment >

    < / wls:weblogic - web - app >


    Any suggestion is appreciated...

    Thank you
    knockaert

    You can use something like:

    
         
              All
              *.xhtml
         
         
              MANAGER
              EMPLOYEE
         
         
              NONE
         
    
    ...
    
         MANAGER
    
    
         EMPLOYEE
    
    

    Note that you can also define several constraints, for example,

    
            
                /employee/*
            
            
                *
            
    
    
            
                /manager/*
            
            
                MANAGER
            
    
    ...
    
         MANAGER
    
    
         EMPLOYEE
    
    
  • Add multiple attributes to the element via the conversion table?

    Hello...

    I'm sure I know the answer to this question, but am looking for validation.

    Is it possible to add multiple values of the attribute to an element using a conversion table? Table following conversion creates the < some-elem > element with the attribute @attrname to "attrval"... but what happens if I wanted to put two attributes? I tried this... Some-elem [attrname = "attrval"] [otherattrname = "attrval2"]... but the second definition is ignored. Is it possible to do (with conversion tables)?

    Wrap this object This element of With this qualifier
    P: some-para-tagSome-elem [attrname = "attrval"]



    Thank you!

    .. .Scott

    Scott,

    The structured reference apps said to separate assignments of two attribute with an ampersand, as in

    Some-elem [atttrname = "attrval" & otherattrname = "attrval2"]

    I've never done, so it is not tested.

    Van

  • How to add the attribute authorization 4.2 GBA

    Dear experts, ACS,

    I am using 4.2 ACS to authenticate and authorize the GANYMEDE + traffic from the appliance Steelhead of Riverbed WAN Optimizers.  One of the tasks of configuration is to add the attribute authorization following the 4.2 ACS.

    Service = {rbt-exec
    local-user-name = 'monitor '.
    }

    After reviewing all options on ACS configuration, I am at lost.  I don't know where to put this attribute.  Please point me in a good direction.

    Thank you very much!

    Hi Kevin - I can steer you in the right direction-

    1. Go to Configuration of the Interface > GANYMEDE + (Cisco)
    2. Under the terms of new Services, check the option box and type "rtb-exec" to the terms of Service and "Unknown" under the Protocol
    3. Press send
    4. Go to your ACS group and under settings GANYMEDE + it must be a new Service
    5. Fill in service as follows:

    This should help some of the way-this article suggests a problem where it won't give you full access, but I have not tested:

    http://community.riverbed.com/T5/Steelhead-appliance/TACACS-authentication-monitor-access/m-p/7417

  • How to add multiple images to a JLabel since the jar file

    I want to add more than one image in a JLabel, but the icon property only allows me to add a. I thought I could use the rendered html to add the images I need using the < img > tab, but I need to use a URL that points to the image.

    How do I point to an image in the jar file? If I can't do it, is there another way to display multiple images in a JLabel since the jar file?

    Discover camickr [http://tips4java.wordpress.com/2009/03/29/compound-icon/ url] composed icon.

    DB

  • How to add multiple clickTags HTML5 Banner in Animate

    Hello

    Is it possible to add several "clickTAG" to a banner of HTMl5 in Animate?

    Yes, first of all, in Animate create multiple buttons with instance different names for example btn1, btn2, btn2... and write code in the actions, for example:

    This.Btn1.on ("click", function () {}

    Window.Open (window.clickTag1, '_blank')

    });

    This.btn2.on ("click", function () {}

    Window.Open (window.clickTag2, '_blank')

    });

    This.btn3.on ("click", function () {}

    Window.Open (window.clickTag3, '_blank')

    });

    Second, write HTML code for example:

  • Captivate 9 - How to add multiple actions to a button

    HI all, on Captivate 9 I have created a status display slide with four buttons, so when the user clicks on each button, they will see different content.

    I want to force the navigation to make sure that the user clicks on THE 4 buttons (in order that), before being able to see the button "NEXT" will appear on the screen that will allow them to move to the next slide.

    I think I need to create variables and stocks advanced on each button to create this logic, but how do I add additional actions on the same button? Under 'The ACTION', I see that all the buttons have an action to open the contents of the status display when you click on:

    action-captivate.jpg

    Is it possible to add another action to the same button?  Please share instructions to help me create the logic to do this? Thank you very much.

    You need user variables and conditional action with two decision for each of your buttons. I posted this workflow many times, but it's so hard to find the wire. Another try:

    1. Create 4 variables v_one, v_two... v_four with a default value of 0. they will be changed to 1 when the user clicks on the associated button.
    2. Create a conditional advanced action for each button, with two decisions:
      1. First decision 'Always' is a standard simulated action
        IF 1 is equal to 1
        Assign the v_one with 1
        Change the State of...             the action that you had one this time
      2. Second decision "CheckVars".
        IF v_one is equal to 1 AND
        v_two is equal to 1...
        ....
        is equal to 1
        See the Bt_Next
        Select Bt_Next

    Create a similar action to each button, only the first decision will have to be modified (the variable and the state change).

    The Bt_Next button should be hidden in the output to start with. Don't forget to define points of suspension of the 4 buttons at this very moment. For the next button, you can have a break at the same time or later.

  • How to add multiple tabStops at the same time...

    Hello

    I know it's a bit basic, but I fight

    I am trying to create four tabStops in a paragraph style. That's what I have so far... but when it comes to tabStops [1], he died... I think that something is wrong with how I create the four tabStops, but I do not know what... Do you think what I am doing wrong?

    Thank you!
    Christopher

    try {}

    myParagraphStyle = myDocument.paragraphStyles.item ("Verse");

    myName = myParagraphStyle.name;

    }

    {} catch (e)

    myParagraphStyle = myDocument.paragraphStyles.add({name:"Verse"});)

    myParagraphStyle.tabStops.add ();

    myParagraphStyle.tabStops.add ();

    myParagraphStyle.tabStops.add ();

    myParagraphStyle.tabStops.add ();

    with (myParagraphStyle) {}

    appliedFont = "Lexicon No1 A tab";

    fontStyle = "Normal";

    pointSize = 8.75;

    head = 10;

    alignToBaseline = true;

    Justification = Justification.LEFT_JUSTIFIED;

    keepFirstLines = 2;

    tabStops [0] .alignment = TabStopAlignment.CENTER_ALIGN;

    .leader tabStops = [0] ";

    tabStops .position [0] = 5;

    crashes here

    tabStops [1] .alignment = TabStopAlignment.CENTER_ALIGN;

    .leader tabStops [1] = ";

    tabStops [1] .position = 10;

    tabStops [2] .alignment = TabStopAlignment.CENTER_ALIGN;

    .leader tabStops [2] = ";

    tabStops [2] .position = 15;

    tabStops [3] .alignment = TabStopAlignment.CENTER_ALIGN;

    .leader tabStops [3] = ";

    tabStops [3] .position = 20;

    }

    }

    It is possible using tabList. Here is a code that did this and sets all the properties at the same time. "with" does NOT define the properties at the same time and should always be avoided.

    var myParagraphStyle = app.documents[0].paragraphStyles.item("Verse");
    myParagraphStyle.properties = {
      tabList:[
        {
          position: 5,
          alignment: TabStopAlignment.CENTER_ALIGN,
          leader: ""
        },
        {
          position: 10,
          alignment: TabStopAlignment.CENTER_ALIGN,
          leader: ""
        },
        {
          position: 15,
          alignment: TabStopAlignment.CENTER_ALIGN,
          leader: ""
        }
      ],
      appliedFont: "Lexicon No1 A Tab",
      fontStyle: "Normal",
      pointSize: 8.75,
      leading: 10,
      alignToBaseline: true,
      justification: Justification.LEFT_JUSTIFIED,
      keepFirstLines: 2
    };
    
  • How to add multiple quads to a single annotation?

    Hello.

    Question: Can I add several quads to a single annotation? If so, I hope to learn more.

    Task: to the highlight (with commentary) full sentences or paragraphs in a PDF document.

    Problem: I can't find a way to add several "quad" to a single annotation. If the sentence spans 3 lines, it seems that I need 3 separate quads that are somehow related and act as one (i.e. If the user deletes a quad, others are removed too). A large nail is not enough that the sentence can cover only 2.5 lines.

    The overall Structure of Script: I already have a script that provides a range of words that should be highlighted as a single group (e.g., nth Word 12 to 25 and 28 to 35). I'll get the quad of each word in the sector and create a unique quad that covers as many words as possible. However, each new line will require a new quad. Once I have the quads I will create a single annotation, with one comment and I hope that several quads.

    What I tried: I did a lot of research (with different approaches) but no luck. I found another post titled 'How to combine quads?' but I couldn't see a working solution. I have tried many forms of code, with the following being the most logical (the code is a replica because I don't have Acrobat on this machine); but nothing has worked so far.

    var quadArray = new Array();

    quadArray [0] = this.getPageNthWordQuads (1, 2);

    quadArray [1] = this.getPageNthWordQuads (1, 6);

    var annot = this.addAnnot({)

    page: 1.

    type: "Highlight",

    quads: quadArray;

    Author: 'Test ',.

    content: "second and fifth word on the second page."

    });

    This is my first post, so please let me know if I've left out important information. As usual, any help would be appreciated.

    Thank you

    Yes, it is an array of arrays, and each subarray has only 8 points inside.

    You can see by running this code:

    getPageNthWordQuads (0,0) .length / / result is 1 (or more, if that Word can extend over several areas, but it's unlikely)

    getPageNthWordQuads (0,0) [0] .length / / the result is 8

  • How to add multiple photos to iCloud drive?

    L.S.

    I want to use iCloud drive to share some of my photos with my mother. I used Dropbox for that so far, but now that I have the upgrade to 50 GB of storage iCloud, which seems the best choice.

    However, unlike Dropbox seems only able to select one photo at a time for iCloud Drive (Photos > select > add to iCloud by car). Am I missing something here?

    With sincere friendships.

    Repelstale

    First, iCloud drive is different from your photo library from iCloud, and your photos are stored in the second, not the first.

    I think what you're looking for is - iCloud, sharing photos - Apple Support

  • How to add multiple fields values

    I think it's simple, but I don't see how. I have 5 or 6 entered by the user different market values that I need to calculate a total for.

    Example of

    1 cleaning $10.00 fee

    2 deposit $10.00

    3 company $10.00 deposit

    4 total amount of the rent $70.00

    5 total $100.00

    If a user would enter values for 1-4 and it calculates the total in zone 5. If we assume that $0.00, it would be great if a user left an empty field. I'm leaving the script somehow, but looking for a little guidance? Thank you all...

    Greetings,

    Place it inside the event, calculate the total by using FormCal field option

    yourfieldname + yourfieldname + yourfieldname + yourfieldname

    Here is a link to a form that contains an example of adding:

    http://www.shingleme.com/AdditionTest.PDF

    Justin

  • How to add multiple Meta tags?

    I work for one allows large education State to add meta tags to the header to the Dublin Core metadata initiative. In this case, not having not meta tags is not an option.

    The metadata must be unique for each page. Using the keywords / Description provided in the menu settings will not work.

    Files of "ccKeywordsAndDescription.htm" "ccKeywordsAndDescription.js" piracy is not an option because different meta tags data are required on each page, and sometimes several of the same meta tags data are required on a single page
    (ex: name meta = "DC. Schema of the object"="Keyword"content =" #">

    For this reason, adding a template parameter for each editable meta data tag seems not to work as well.

    This question was raised once before in this form by another but no response. I thought I would check again.

    It doesn't look like this is doable in Contribute, so we're going outside a solution.

    Users create the page they need in Contribute, from a model with an editable header. Then the users return the page with a program of creation of tag Meta called Tag Gen which has the same editable according to its preferences area. They can add the necessary tags save and close the page without ever dealing with the code of the page. Then, they'll be back to post the page in Contribute.

    It's kind of a lot of Mickey Mouse, but it's the only solution we could find.

Maybe you are looking for