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.

Tags: Fusion Middleware

Similar Questions

  • 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);

  • How get/set the value of the DataObject object in the task of the API?

    How get/set the value of the DataObject object in the task of the API?

    Are there examples of code availible?

    Hello

    You are here: http://docs.oracle.com/cd/E23943_01/dev.1111/e10224/bp_worklistcust.htm

    Antonis

  • How to set the different HTML (site) page in the workspace during the backup?

    Hello
    How to set the different HTML (site) page in the workspace during the backup?

    For example:
    A user connects to the workspace.
    If you have already started the procedure for backup database administrators, the user sees the HTML page that reads "don't touch anything, need a backup procedure.

    Thank you to
    Marek

    Hi Marek,

    I have not tried, but it seems the most logical way:

    Rename the BpmLauncher.jsp to BpmLauncher.jsp.orig

    Then, create a new file called BpmLauncher.jsp and put the following inside:

    
    

    Do not touch anything, it takes a backup procedure

    Kind regards
    Robb Salzmann

  • How to set the default android home page.

    How to set the home page in the latest browser of firefox for android?

    Hello:

    Unfortunately you can not remove the top sites home page but you can pin a site, remove a site from unpin it and change the url of a pinned site.

    Please read this article for instructions.

    I hope this helps!

  • How to set the parameter of the BIOS under XP?

    I'm trying to boot into the recovery console windows using a bootable XP Recovery console CD. But I do not know how to set the BIOS to achieve this. Can someone give me instructions step by step? Thanks in advance.

    A quick search on Google for

    For Lenovo 3000 change boot sequence

    .. .finds a message in the forum of the Lenovo users who said you choose Start and adjust it.

    I can't check it works, but maybe someone who knows the Lenovo will verify that or tell you what to do.

    It seems like a simple process, but some of the discussions on how to boot from a CD are ridiculously long and full of trail and error.  When you get your job, let know us the good way that works and I'll put it in my notes!

    Here is a link to the Lenovo's Support Page:

    http://www-307.IBM.com/PC/support/site.WSS/homeLenovo.do?country=us

    Do, or do not. There is no test.

    I need YOUR voice and the points for helpful answers and propose responses. I'm saving for a pony!

  • How to set the character encoding in Blackberry

    Hello

    In my application, I get the data using http server methods...

    now my question is that, in that the data is seen some like that

    ex: Córdoba, but inside, I do not like this...

    After some R and D, I thought that I have to set the character encoding...

    can someone tell me how to set the character encoding and how I can get all languges in my application

    See below the code for reference

     HttpConnection c = null;
                        InputStream is = null;
                        DataOutputStream os = null;
                        int rc;
        c = (HttpConnection)Connector.open("http://10.10.10.00012:8585CountryDatar;deviceside=true;");
                                c.setRequestMethod(HttpConnection.POST);
                                c.setRequestProperty("If-Modified-Since", "29 Oct 1999 19:43:31 GMT");
                                c.setRequestProperty("User-Agent", "Profile/MIDP-2.0 Configuration/CLDC-1.0");
                                c.setRequestProperty("Content-Language", "en-US");
                               /* Getting the output stream may flush the headers */
    
                                os = (DataOutputStream)c.openDataOutputStream();
                                byte[] res = net.rim.device.api.system.GPRSInfo.getIMEI();
                                os.writeUTF(net.rim.device.api.system.GPRSInfo.imeiToString(res));
    
                                os.flush();
                                /* Optional, getResponseCode will flush
                                    Getting the response code will open the connection,
                                    send the request, and read the HTTP response headers.
                                    The headers are stored until requested.
                                */
                                rc = c.getResponseCode();
    
                                if (rc != HttpConnection.HTTP_OK) {
                                   throw new IOException("HTTP response code: " + rc);
                                }
    
                                is =(DataInputStream)c.openDataInputStream();
                                 byte[] data1 = new byte[256];
                                 int len = 0;
                                 int size = 0;
    
                                int ch;
                                StringBuffer sb = new StringBuffer();
                               while ( -1 != (len = is.read(data1)) )
                               {
                                    sb.append(new String(data1, 0, len));
                                }                
    
                             data = sb.toString();       //Here data is a string storing all data came from server
    

    Give us a break please.  I have other things to do!

    You set the encoding here:

    SB. Append (new String (data1, 0, len));

    Most of the servers give you UTF - 8, but you know that.  Anyway, if it is UTF - 8 follow these steps:

    SB. Append (new String (data1, 0, len, "UTF - 8"));

  • How to set the alignment of the centre on TextField?

    Hi guys.

    I have not found how to set the alignment of the centre on TextField?

    Do you know how to set the alignment of the centre on TextField?

    Please share your knowledge.

    Thank you.

    Hello

    Hope this will help you

    Import net.rim.device.api.ui.component.BasicEditField;

    class CustomTextField extends BasicEditField {}
    {CustomTextField()}
    Super(BasicEditField.FIELD_HCENTER |) BasicEditField.FIELD_VCENTER);
    }
       
    public void layout (int width, int height) {}
    Super.Layout (getPreferredWidth (), getPreferredHeight ());
    setExtent (getPreferredWidth (), getPreferredHeight ());
    }
       
       
       
    public int getPreferredHeight() {}
    System.out.println("---");
    beginning 50;
    }
       
    public int getPreferredWidth() {}
    System.out.println("###");
    Back to 120;
    }
       
    }

    Now in your class that extends the screen or full screen add this class object.

  • How to set the width of layout desktop screen in fluidlayout?

    For the flow layout of RWD, Web site design page I have is 960px wide. While working on DW CC, the width of sizes of support are:

    Mobile: width: 86,45%;

    Shelf width: 90.675%;

    Desktop width: 960px;

    When I set a percentage for desktop (for 960px), 68.6% (which is less mobile and the width of the Tablet), the browser displays more width 960px. Use a screen resolution of 1680X1050px.

    Now how to set the size of layout as 960px for desktop, in percentage?


    Or should I keep it as 960px for office and percentage for mobile and Tablet?

    68.6% of 1680px equals 1152px, then Yes, he is bigger than 960px

    If you want to stop at the 960px available, then set max-width: 960px to the container as well as width: 68.6%.

  • How to set the permissions so I can read the documents?

    How to set the permissions so I can read the documents?

    OK, this seems to be something 'Chrome '. Sometimes chromium is, he won't even close Adobe Reader. So it must be fixed with Chrome. Unfortunately, everything I can find on the web suggests that "always run for this site" should work. However, if the page closes, it sounds as if Chrome itself crashes! I suggest you only watch for a forum of Chrome, they can learn more on this subject.

  • How to set the height width for an Image field in a web App?

    I have a webApp to save the image of user with description, title. But when I display all items pictures are great, I want to know how to set the height and width for images?

    Hello

    To do this properly, you need to resize the image. Prefably before you put it in British Colombia. While you can to scale the image in CSS, you don't want to do. Why? Because the images are still very large and probably not optimized properly for the web.

    This means that the page with these images will take a long time to load for people, and people will not be happy on the display of your site.

    You must use a software such as photoshop, if you or iphoto on a mac for example for editing, crop and size of the images before uploading. If you do everything you can use free web based tools such as this one:
    http://Pixlr.com/editor/

    You can also do in British Colombia itself in the file manager. If you click on the image you can see options to resize. The downside to this is's done it by pure mathematics. He doesn't know what is in the picture and the results can make the image etc. shrivelled.

  • How to set the number of e-mail messages that are stored on my iPhone

    How to set the number of e-mail messages that are stored on my iPhone – so when I don't have a network connection I can see a 'large' number of messages in my Inbox etc.

    This is series is not defined in the world

    You must go to settings-> mail, contacts, and calendars and check the settings of your e-mail provider offers in this area

  • How to set the time that my screen stays on?

    How to set the time that my screen lights up.  I have an iPod Touch 6?

    Settings > general > auto-lock

  • How to set the time between slides in a slideshow (iPhoto, el capitan)

    How to set the time to say - 5 seconds or 20 seconds - between slide show photos in iPhoto. I use el capitan.

    See the Settings button at the bottom right of the toolbar (at the bottom of the slide show). Click on it and you have a small window with two tabes, refers to all the slides, the other to the selected slide. You can make your choice

  • Satellite C660 - how to set the focus of the webcam?

    Hello

    Just bought this laptop, the built-in webcam looks very blurry when I use Skype. Does anyone know how to set the focus to the subject?

    See you soon
    Jules

    Hello

    to be honest, I have no idea on your model of lap... Try to update driver webcamd and play with Skype video settings.

Maybe you are looking for