Moving Content Item Using API

Hi Everyone,
I'm try to create winform application with control tree that enable the users to move item from source folder to destination folder.
I tried to use the CopyContentItem Method and then delete the source item but I found that this mothod creates the item in the same folder.
Does anyone have experience with such task and does it mean that I need to create new content item in the target folder and getAllProperties from the source item and set for each property his value manually???? It's insane....
Guy

Hi,
To create your own custom scheduler task, check this:
https://forums.sdn.sap.com/thread.jspa?threadID=28955
So in your code you should perform a copy/replace operation of your xml with KM Api.
Check this for an example:
https://forums.sdn.sap.com/thread.jspa?threadID=100695
Greetings,
Praveen Gudapati

Similar Messages

  • Publishing Content Items through API

    Hello,
    I am currently using EDK 5.3 for publishing content items. I have been sucessful in editing an existing content item using APIS. However It looks like APIS doesn't have a way to schedule to publish content items for a future date.
    I tried to do some reverse engineering and found out that this information is stored in pcsscheduledcontent and pcsscheduleitems tables. I was able to figure out how to change the dates as this are stored in pcsscheduleitems table,however can't find out where are the values are being stored for time.
    Say, I want to publish the content item for 08/28/2008 4:00 pm using the APIS, I am able to get to the date from the above 2 tables but really can't find out where the time is stored. I have tested from the User interface that the time is also retained based on the options we pick.
    And also I have seen that the Loadid keeps on increasing for every change I make.
    Can someone please help me/ guide me in the right direction?
    Thanks.

    pcsscheduledContent table. schedule something to be published in the future and then do a select on that table with an order by clause of :
    ORDER BY ITEMBEGINDATE DESC
    The itembegindate column contains the date AND time of the publishing schedule. you may just not be converting the value correctly.
    hth,
    Robert

  • Displaying content item -(IContentItem) in portlet using Content Server API

    Hi,
    I am using the latest Content server API in my remote server to get the published content items. I have to display the content item in the JSP portlet.
    So how to display the content item in the portlet, if you have the IContentItem Object retrieved from the content server ? Is there any mechanism to get the HTML code/JSP code that corresponds to the IContentItem object?(All the content item will be an html or jsp )
    Currently we are extracting the publish url and opening an http connection to retrieve the html, which is not a good solution if you have mutiple portlets in the same page. So please suggest how can I display the content item (IContentItem Object) in the portlet.?

    Hi Anand,
    I am facing the same problem on IBM WebSphere Portal 5.1.
    Did you find a solution to your problem ?
    Thanks
    Ganesh

  • How to update 500 list items using Rest API

    Hi All,
    i have requirement that is "required to update 500 list items using rest Api".
    how can i do it,please share your thoughts with me.
    Thanks,
    Madhu.

    Didn't get you correctly, if you asking reference for REST API to update list items please refer below links
    http://msdn.microsoft.com/en-us/library/office/jj164022(v=office.15).aspx
    Destin -MCPD: SharePoint Developer 2010, MCTS:SharePoint 2007 Application Development

  • Graphics using graphic API are drawn below the loaded content created using Flash authoring tool

    Here is my problem.
    I am developing a Analog Dial component. Here , I am
    extending UIComponent and loading a swf file generated using Flash
    CS3 authoring tool ( the swf basically has the circle and needle)
    and adding the loaded content as child of Dial class.
    Next I use Graphics API to draw the major and minor ticks on
    the dial.
    As mentioned in the curveTo method of flash.display.Graphics
    class documentation (
    http://livedocs.adobe.com/flex/201/langref/index.html),
    if you are using graphics api and also loading content created
    using the flash authoring environment the vector graphics will be
    drawn underneath the loaded content.
    Well , Is there any way to make the graphics appear on top of
    the loaded contents?

    It appears that this may be accomplished more easily if I do something similar to the StrobeMediaPlayback implementation. Looking at the StrobeMediaPlayback source code it looks like Adobe has done something a little different than their ControlBarPlugin, placing the controlbar and root media element inside separate MediaContainers and then adding those containers to the display list. Is this recommended over using the frameworks ParallelElements? If so, is communication between the control bar and root media element still a matter of just updating the target reference via metadata?

  • WebCenter Sites Query Content using API

    Hi all,
    I have created a asset called "TVLContent" and for this asset, I created 2 attributes: "Question" and "Answer".
    I need to create a query search using API, to get any content where "Question" or "Answer" attribute contains "Why".
    I'm using the line code below, for searching, but doesn't work.
    -----Code
    Session ses = SessionFactory.getSession();
    Condition c1 =ConditionFactory.createCondition("Question", OpTypeEnum.LIKE, "%Why%");
    Condition c2 =ConditionFactory.createCondition("Answer", OpTypeEnum.LIKE, "%Why%" );
    Query query = new SimpleQuery( "TVLContent", "FAQs", c1.or(c2) , Arrays.asList("name", "id", "Question", "Answer"));
    query.getProperties().setIsBasicSearch(true);
    AssetDataManager mgr = (AssetDataManager) ses.getManager(AssetDataManager.class.getName());
    List<Long> firstResults = new ArrayList<Long>();
    for(AssetData data : mgr.read(query)) {
    //read data, e.g. data.getAttributeData("Question").getData()
    ------Code
    If I change the query condition to c1 only, the query works fine,
    e.g. Query query = new SimpleQuery( "TVLContent", "FAQs", c1 , Arrays.asList("name", "id", "Question", "Answer"));
    If I change the query condition to c2 only, the query works fine.
    e.g. Query query = new SimpleQuery( "TVLContent", "FAQs", c2 , Arrays.asList("name", "id", "Question", "Answer"));
    But when I create a new condition (c1.or(c2)) doesn't work.
    e.g. Query query = new SimpleQuery( "TVLContent", "FAQs", c1.or(c2) , Arrays.asList("name", "id", "Question", "Answer"));
    How to fix this?
    What's the best way to create this query using API?
    See below the attribute definition:
    Name: Question
    Attribute Type: text
    Attribute Editor: TVLTextArea
    TVLTextArea XML (
    <?XML VERSION="1.0"?>
    <!DOCTYPE PRESENTATIONOBJECT SYSTEM "presentationobject.dtd">
    <PRESENTATIONOBJECT NAME="TEXTAREA">
    <TEXTAREA WRAPSTYLE ="SOFT"></TEXTAREA >
    </PRESENTATIONOBJECT>
    Name: Answer
    Attribute Type: text
    Attribute Editor: TVLCKEditor
    TVLCKEditor XML (
    <?XML VERSION="1.0"?>
    <!DOCTYPE PRESENTATIONOBJECT SYSTEM "presentationobject.dtd">
    <PRESENTATIONOBJECT NAME="TEXTAREA">
    <TEXTAREA WRAPSTYLE ="SOFT"></TEXTAREA >
    </PRESENTATIONOBJECT>
    }

    Hello,
    Can you share the condition which you are trying to pass?
    Try something like this example;
    Condition condition = ConditionFactory.createCondition( <ATTRIBUTE NAME>, OpTypeEnum.EQUALS, <ATTRIBUTE VALUE> );
    List<String> attributes = new ArrayList<String>();
    attributes.add(<ATTRIBUTE NAMES>); // add as many as required
    SortOrder sortOrder = new SortOrder(<Attribute Name to sortby>, <ORDER - Ascending or Descending>);
    Query query = new SimpleQuery( <Asset Type>, null, condition, attributes, Collections.singletonList(sortOrder));
    for( AssetData data : assetDataManager.read( query ) ) {
    // get all the data as mentioned here: http://docs.oracle.com/cd/E29542_01/doc.1111/e29634/asset_api_tutorial.htm#WBCSD2395
    Note: Import correct classes in your template or CSElement.
    Regards,
    Guddu

  • Create List Item using REST API

    Hi All
      I try create list item using REST in SharePoint 2013.  when code is try add new item in list , getting error :
    A node of type 'EndOfInput' was read from the JSON reader when trying to read the start of an entry. A 'StartObject' node was expected.
    Please help me
    function addData() {
    var title = $('#txtTitile').val();
    //alert(title);
    var items = {
    __metadata: { "Type": "SP.Data.OrderDetailsListItem"},
    Title:title
    var exec = new SP.RequestExecutor(appweburl);
    exec.executeAsync(
    url: appweburl + "/_api/SP.AppContextSite(@target)/web/lists/getbytitle('OrderDetails')/Items?@target='" + hostweburl + "'",
    method: "POST",
    data: JSON.stringify(items),
    headers: {
    Accept: "application/json;odata=verbose",
    "Content-Type": "application/json;odata=verbose",
    "X-RequestDigest": $("#__REQUESTDIGEST").val()
    success: function (data) { alert(JSON.parse(data)); },
    error: function (error)
    { alert(JSON.stringify(error)); }
    with Regards Sivam

    Hi,                                                             
    Here is a demo which works in my environment for your reference:
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function()
    $("#Button1").click(function(){
    createListItemWithDetails("list2", "http://sp2013sps", "item1");
    // Getting the item type for the list
    function GetItemTypeForListName(name) {
    //alert("GetItemTypeForListName: "+name);
    return"SP.Data." + name.charAt(0).toUpperCase() + name.slice(1) + "ListItem";
    // CREATE Operation
    // listName: The name of the list you want to get items from
    // siteurl: The url of the site that the list is in. // title: The value of the title field for the new item
    // success: The function to execute if the call is sucesfull
    // failure: The function to execute if the call fails
    function createListItemWithDetails(listName, siteUrl, title) {
    var itemType = GetItemTypeForListName(listName);
    //alert("itemType :"+itemType);
    var item = {
    "__metadata": { "type": itemType },
    "Title": title
    $.ajax({
    url: siteUrl + "/_api/web/lists/getbytitle('" + listName + "')/items",
    type: "POST",
    contentType: "application/json;odata=verbose",
    data: JSON.stringify(item),
    headers: {
    "Accept": "application/json;odata=verbose",
    "X-RequestDigest": $("#__REQUESTDIGEST").val()
    success: function (data) {
    location.href=location.href;
    //success(data);
    error: function (data) {
    alert("error");
    //failure(data);
    </script>
    <input id="Button1" type="button" value="Run Code"/>
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to create new XML file using retreived XML content by using SAX API?

    hi all,
    * How to create new XML file using retreived XML content by using SAX ?
    * I have tried my level best, but output is coming invalid format, my code is follows,
    XMLFileParser.java class :-
    import java.io.StringReader;
    import java.io.StringWriter;
    import javax.xml.transform.OutputKeys;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMResult;
    import javax.xml.transform.sax.SAXSource;
    import javax.xml.transform.sax.SAXTransformerFactory;
    import javax.xml.transform.sax.TransformerHandler;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.xml.sax.Attributes;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.xml.sax.helpers.XMLFilterImpl;
    public class PdfParser extends XMLFilterImpl {
        private TransformerHandler handler;
        Document meta_data;
        private StringWriter meta_data_text = new StringWriter();
        public void startDocument() throws SAXException {
        void startValidation() throws SAXException {
            StreamResult streamResult = new StreamResult(meta_data_text);
            SAXTransformerFactory factory = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
            try
                handler = factory.newTransformerHandler();
                Transformer transformer = handler.getTransformer();
                transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
                transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                handler.setResult(streamResult);
                handler.startDocument();
            catch (TransformerConfigurationException tce)
                System.out.println("Error during the parse :"+ tce.getMessageAndLocation());
            super.startDocument();
        public void startElement(String namespaceURI, String localName,
                String qualifiedName, Attributes atts) throws SAXException {
            handler.startElement(namespaceURI, localName, qualifiedName, atts);
            super.startElement(namespaceURI, localName, qualifiedName, atts);
        public void characters(char[] text, int start, int length)
                throws SAXException {
            handler.characters(text, start, length);
            super.characters(text, start, length);
        public void endElement(String namespaceURI, String localName,
                String qualifiedName) throws SAXException {
            super.endElement("", localName, qualifiedName);
            handler.endElement("", localName, qualifiedName);
        public void endDocument() throws SAXException {
        void endValidation() throws SAXException {
            handler.endDocument();
            try {
                TransformerFactory transfactory = TransformerFactory.newInstance();
                Transformer trans = transfactory.newTransformer();
                SAXSource sax_source = new SAXSource(new InputSource(new StringReader(meta_data_text.toString())));
                DOMResult dom_result = new DOMResult();
                trans.transform(sax_source, dom_result);
                meta_data = (Document) dom_result.getNode();
                System.out.println(meta_data_text);
            catch (TransformerConfigurationException tce) {
                System.out.println("Error occurs during the parse :"+ tce.getMessageAndLocation());
            catch (TransformerException te) {
                System.out.println("Error in result transformation :"+ te.getMessageAndLocation());
    } CreateXMLFile.java class :-
    Sax.startDocument();
    Sax.startValidation();
    Sax.startElement("", "pdf", "pdf", new AttributesImpl());
    Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());          
    String xmp_str = new String(meta_data.getByteArray(),"UTF8");
    char[] xmp_arr = xmp_str.toCharArray();
    Sax.characters(xmp_arr, 0, xmp_arr.length);
    Sax.endElement("", "pdf", "pdf");
    Sax.endValidation();
    Sax.endDocument();
    Sax.endElement("", "basic-metadata", "basic-metadata");* In CreateXMLFile.java
    class, I have retreived the xml content in the meta_data object, after that i have converted into character array and this will be sends to SAX
    * In this case , the XML file created successfully but the retreived XML content added as an text in between basic-metadata Element, that is, retreived XML content
    is not an XML type text, it just an Normal text Why that ?
    * Please help me what is the problem in my code?
    Cheers,
    JavaImran

    Sax.startDocument();
    Sax.startValidation();
    Sax.startElement("", "pdf", "pdf", new AttributesImpl());
    Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());          
    String xmp_str = new String(meta_data.getByteArray(),"UTF8");
    char[] xmp_arr = xmp_str.toCharArray();
    Sax.characters(xmp_arr, 0, xmp_arr.length);
    </code><code>Sax.endElement("", "basic-metadata", "basic-metadata");</code>
    <code class="jive-code jive-java">Sax.endElement("", "pdf", "pdf");
    Sax.endValidation();
    Sax.endDocument();     
    * I HAVE CHANGED MY AS PER YOUR SUGGESTION, NOW SAME RESULT HAS COMING.
    * I AM NOT ABLE TO GET THE EXACT OUTPUT.,WHY THAT ?
    Thanks,
    JavaImran{code}

  • Error Add Item using DI API 2007  B

    Sirs,
         I gettin a error on add a item using a follow code:
                       If m_Item.GetByKey('100') = True Then
                            m_Item.ItemType = ItemTypeEnum.itItems
                            m_Item.ItemsGroupCode = 1
                            m_Item.ItemClass = ItemClassEnum.itcMaterial 
    'This line ocorred a error 'oToBP.ItemClass = {"Property 'ItemClass' of 'Item' is invalid"}
                            lErrorCode = m_Item.Update()
                        Else
                            lErrorCode = 1
                        End If
    Please,
    I'm waiting a urgent response .
    Great.
    Fábio Nascimento

    Fabio,
    In 2007 A the ItemsgroupCode start at 100 and not 1.
    Perhaps this is your problem.
    Christophe

  • Getting V2 style Step Trigger Content using API

    I have written a C++ code for getting forms trigger text using API. In which, I am not able to get V2 style step trigger text from Forms6/6i API. Can anyone help me to sort this out?
    Thanks
    Kannan M.

    Kannan,
    V2-Trigger-Steps are sub-objects of pl/sql triggers. They are exposed from Forms6i patch 3 (or 4?) and onwards. For an example on how to get to them checkout FormsAPI Master from www.orcl-toolbox.com ... in there you will find a script that does this.
    Regards, Stefan

  • Display content items into custom remote portlets

    Hi, I need to dinamically display content server items in a custom portlet, using the EDK, but I did not find any way to get this result. Is it poossible to get an object (in my case a published content item) within an ObjectManager and display it's content (in our case a simple HTML content).
    I need to do this because whe have to format the home page of the portal in order to display the first half in three columns and the second half in two columns and we are trying to do this implementing a custom portlet (in the content canvas area) containing a three columns table displaying each a different content item.
    Thank you.

    There are basically two ways that I have done to open the content item editor.1) From a content presentation template you would call a JavaScript function like:
    <script>
    function edit_article$$TOKEN$$() {
    var width = 700;
    var height = 527;
    var left;
    var top;
    left = window.screenLeft + 10;
    top = window.screenTop - 30;
    if ( (left + width/2) > screen.availWidth ||
    (top + width/2) > screen.availHeight ) {
    left = 0;
    top = 0;
    var params = "height=" + height + ",width=" + width + ",left=" + left + ",top=" + top + ",screenX=" + left + ",screenY=" + top + "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1";
    window.open("<pcs:value expr='pcs_location'></pcs:value>/published_tools/content_item.jsp?ciid=<pcs:value expr='pcs_id'></pcs:value>&title=ContentItemEditArticleTitle", '', params);
    </script>
    2) The other way is using the content Item API. You get the editor url from the content item, which you already have. Now what you are doing below is almost correct. The importance of the pt:objectid is crucial. Take a look at the web docs on Plumtree ([url[/url]http://www.plumtree.com/edoc/Enterprise_Web_Development_Documentation.htm) under portlets/adaptive portlets/transformer tags/links. So the reason yours is not working is that you are missing some ptargs. The pt:objectid needs to be the objected of the "Content Administrator" portlet. This is for 2 reasons. One is so that you get the correct PTargs and the second is that it will use the basic auth information stored in its web service. So if your objectid of the portlet was 201 then it would look like this:
    lblHref.Text = "<pt:gatewayLink xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/'pt:ObjectID='201' pt:href=\""+ url + "\" target='TinyURL' onclick=window.top.open('','TinyURL'," + WindowOpenParams + ");>"+myContentItem.Name + "</pt:gatewayLink>";
    Andrew Morris | bdg | [email protected]| www.bdg-online.com
    Like blogs? Check out bdg's Plumtree blog at http://bdg-plumtree.blogspot.com.

  • Content Item

    Is there a way to retrieve an item from the content server using the server API?  I know it can be done in the remote client but I don't have access to the request/response.

    There is currently no item type that does a tree-style navigation.
    A new tree-style navigation portlet is coming soon from the Portal Integration Solutions team.
    There are also a couple of navigation portlets available from the Knowledge Exchange. I've tried this one and it works great.
    There are also some great navigation and search extensions available from Oracle Consulting.
    To find the Portal version number, look on the Builder Page, Admin tab, General Settings. Scroll to the bottom of the page.
    Regards,
    Jerry
    PortalPM

  • Customized content item / type

    Hi there,
    I would like to know what is the best way to store a content
    item in my project.
    I'm working on a portal which need to group the course
    information into categories. Each course should be a content
    item in this case. Each course has its own course
    information. What is the best way to store each course as
    content item which allow publisher to update the course info and
    can make use of the category feature from the Portal ?
    In 9iPortal, it allows us to store it as file, folder, text,
    PL/SQL, image etc. I believe it's not a good idea and doesn't
    fit my purpose. All these are static objects.
    Can I make use of the custom type ? If so, how can I generate
    page with the info stored in the attributes of the custom type ?
    Say, I have created a new custom type named course and then it
    has attributes like course title, course dates etc.
    I would like to allow my user to type in the course information
    and then we can generate dynamic pages from the information.
    I'd used other Portal product which allow developer to define the
    content type attribute easily and provide API to retrieve
    the content and category item. Then we can write jsp to retrieve
    the item. But I can't find the same thing from Oracle9iAS
    Portal.
    Can someone give me some clue ?
    Thanx
    Regards,
    Maggie

    Custom item types are a good solution.
    Custom types allow you to call procedures (either a stored
    procedure or a servlet via a URL) - the procedure can in turn
    generate a custom presentation for your item. Procedures can be
    passed any of the attributes of your item, including custom
    attributes.
    Folder styles can also be used to specify which attributes are
    displayed for an item.
    So try the style first. If you don't like what you are able to
    achieve with the style, use a procedure to render your custom
    item type any way you want.
    Regards,
    Jerry

  • Error when doing checkin of content item programatically

    Hi,
    I am using CHECKIN_NEW and CHECKIN_SEL services for creating or updating a content item programatically.
    Called these services via executeServiceSimple("CHECKIN_NEW") or executeServiceSimple("CHECKIN_SEL") api calls from my service, based on whether the content to be checked in is new or to be updated. I have set all the metadata values of the content file in the m_binder local data of the service object.
    When I executed them I am getting the below error
    ============================================
    at intradoc.server.IdcServerThread.run(IdcServerThread.java:197)
    Caused by: intradoc.data.DataException: !csCheckinFileKeyNotSpecified,primaryFile
    at intradoc.server.DocServiceHandler.addFile(DocServiceHandler.java:3251)
    at intradoc.server.DocServiceHandler.addFiles(DocServiceHandler.java:410)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at intradoc.common.IdcMethodHolder.invokeMethod(ClassHelperUtils.java:617)
    at intradoc.common.ClassHelperUtils.executeMethodReportStatus(ClassHelperUtils.java:293)
    at intradoc.server.ServiceHandler.executeAction(ServiceHandler.java:79)
    at intradoc.server.Service.doCodeEx(Service.java:490)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at sitestudio.SSClassHelper.invokeRaw(Unknown Source)
    ======================================================
    I have printed out all the local data in the m_binder object. The primaryFile value is pointing to the right file path. The file is also been created in the correct location.
    The dID, dDocName, dOriginalFile, dRevLabel values are all set properly. But still I am getting this error. I am not able to figure out the cause of this. Please help. Is this approach incorrect?
    -Pratap

    I'd use CHECKIN_UNIVERSAL & add primaryFile:path to the binder.
    See the services reference guide for full service details.
    Thanks,
    -ryan
    Ryan Sullivan | ECMconsultant
    http://www.ecmconsultant.net/

  • How to search a content item based on content id?

    I'm having a requirement to search a document based on an Id. (something similar to KB search based on KB id)
    I'm aware that a document uploaded to publisher has two Id's that get generated
    1) UUID 2) ITEMID (DA_*****)
    I'm planning to develop a portlet to search documents based on it's Id's
    I have the following queries.
    1) Can i make use of the itemid (DA_****) to search? But i dont find any IDK API to do that. am i missing some thing here?
    2) I found that by making use of pcs database we can get UUID from the ITEMID, is that a right approach to get hold of a content item?
    3) Is there any other better approach?
    Guide me
    Thanks,
    Bharat

    You can use InDesign for this.

Maybe you are looking for