Creating properties and namespaces with WD4J

Hello,
In several tutorials (like one of building a bulletin board, .. ) the properties are always customizied by hand. The thing is that I need to create them via program. In this way I don't know if it is possible to create the properties and the namespace (like I can do it in the metadata administration).
I just want the following:
- I have a entry for an article (name, title, category, description, ... )
- I want to add some documents to the entry
- For this entry I have several (own) properties
Later on (and I think that I know how to do this) I want:
- to display an overview of the articles with some filter capabilities
- showing a detail page
- Develop some renderer for being used be the enterprise search
The thing I don't get is how to create the properties with WD4J?
Could someone help and bring some light into my darkness?
Thank you,
  Vanessa

Hi Vanessa,
Why do you want to create the property through WD4J?
You can have this one time  task done through metadata administration.
Later in your application you can set/get the values for these properties.
IResource res = ResourceFactory.getInstance().getResource(path,context);
//Create Property Names...
IPropertyName propNameName = new PropertyName("http://sap.com/xmlns/cm","name");
IPropertyName propNameTitle = new PropertyName("http://sap.com/xmlns/cm","title");
IPropertyName propNameCategory = new PropertyName("http://sap.com/xmlns/cm","category");
IPropertyName propNameDescription = new PropertyName("http://sap.com/xmlns/cm","description");
//Create properties
IProperty propertyName = new Property(propNameName , "your Name Value");
IProperty propertyTitle = new Property(propNameTitle , "your Title Value");
IProperty propertyCategory = new Property(propNameCategory , "your Category Value");
IProperty propertyDescription = new Property(propNameDescription , "your Desc Value");
//Create a map to put all properties
IMutablePropertyMap newPropertiesMap = new MutablePropertyMap();
newPropertiesMap.put(propertyName );
newPropertiesMap.put(propertyTitle );
newPropertiesMap.put(propertyCategory );
newPropertiesMap.put(propertyDescription );
//Set the properties to the resource at one go.
res.setProperties(newPropertiesMap );
Also use [Java Docs|https://help.sap.com/javadocs/NW04s/current/km/com/sapportals/wcm/repository/IResource.html] this along with your development...
Regards
BP

Similar Messages

  • Creating Properties and Methods for an exe built in LabVIEW

    Hi all,
    How do we create properties and methods for an executable built in LabVIEW.
    I know when building an exe, the "Enable ActiveX server" option in advanced has to be enabled.
    But after that how do we create Properties and methods for the activeX component.
    Your help is greatly appreciated.
    Regards,
    Muthuraman S
    Regards,
    Muthuraman

    You cannot build your own COM specific properties and methods for the ActiveX interface in LabVIEW, the only thing exposed are the normal VI server properties and methods.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • How to Create Company and link with Plant

    Dear All
    Kindly help me to create Company and link with Plant and Storage Location through SPRO.
    Kindly trll me TCODE.
    Waiting for Reply
    Thanks & Regards
    Alok

    HI,
    Go to OX02 and create a company code by copying the standard company code 0001 / 1000
    Then go to OX10 and create a plant by copying the standard plant 0001 / 1000
    OX09 - maintain storage loaction for the created plant
    OX08 - create purchase org copying from standrard 0001 / 1000
    Go to OX18 and assign your plant to company code
    OX17 assign purchase org to plant
    In order to get the tcode go to SPRO and in the top menu click on additional informations - additional information - display key - IMG activity.
    After you select this then in the SPRO you have a column additional information comes up. each and every activity in SPRO will have and additional informatiom, in the additional information the last 4 characters is tcode.
    Eg : SIMG_CFMENUSAPCOX02 this is the additional information for CC. the last 4 characters OX02 is the tcode
    Thanks
    Kiran

  • How to create database and table with GUI?

    How to create database and table with GUI?
    for linux can do that?
    or have only way to create table by use sql*plus.
    everyone please help me.
    thanks

    go to www.orasoft.org
    here is a gui tool.
    null

  • Create community and pages with my application

    Hello,
    Can I automatically create community and pages with my application?
    Where can I find an example to create an java application to automatically create community, pages and Portel using an XML file that describes the structure?

    Hello,
    Can I automatically create community and pages with my application?
    Where can I find an example to create an java application to automatically create community, pages and Portel using an XML file that describes the structure?

  • App-V 5.0 SP2 (Office Deployment Toolkit) - Unable to create Project and Visio with different package ID

    We would like to create 2 App-V packages with the
    Office Deployment Tool
    - Visio Std 2013
    - Project Std 2013.
    The App-V packages are created successfully, the problem is that the package-id of both packages is the same.
    When we deploy for example, Visio to a client and afterwards Project, Visio gets replaced in App-V by Project.
    Is anyone else facing this issue ?

    So I wanted to bring everybody up to speed on some changes. You can manage multiple Office packages by generating different PACKAGEGUID attributes (https://technet.microsoft.com/en-us/library/jj219426.aspx?f=255&MSPPError=-2147217396)
    using the Office Deployment Toolkit BUT - the following still applies:
    Only one Office package can be deployed to a machine at a time.
    Only VL and Subscription Pro options are available for packaging via App-V.
    Steve Thomas, Senior Consultant, Microsoft
    App-V/MED-V/SCVMM/Server App-V/MDOP/AppCompat
    http://blogs.technet.com/gladiatormsft/
    The App-V Team blog: http://blogs.technet.com/appv/
    The MED-V Team Blog: http://blogs.technet.com/medv
    The SCVMM Team blog: http://blogs.technet.com/scvmm/
    “This posting is provided "AS IS" with no warranties, and confers no rights. User assumes all risks.”
    Steve is there any chance this stance may change, or is there any feedback we can give (we have already followed up with our TAM and have also put in tickets but effectively have not gone anywhere other then to explain what the model of support is)? 
    To be perfectly honest its a very hard model to support since users are licenses for Visio and Project separately, not to mention the lack of user publishing (targeting) and Office Standard support.
    We have put in advisory and problem tickets with MS for months in hopes of using the ODT packages in our non persistent VDI environment but I don't believe it will possible.
    In short if we have to separate our images or pools to support the various possibilities we are losing what App-V gains us: on demand (per user) publishing to limit the number of gold images we need.
    The loss of Office Standard support also leaves us in a tricky spot, because at the end of the day we have to find a way to support those users.
    Not looking to put you on the spot, just hoping there is a way to give effective feedback or discuss how to use the ODT packages in a way that makes life easier, not more restrictive.

  • Issue with create user and issue with Java Development tab

    I have two issues with EP,
    1. When i login with Super Admin user, i am unable to Create any user from User Admin tab. Do i have to change the settings of the Super Admin? or is there any criteria for creating the user?
    2. How to assign any user the Java Development tab. Though i login with a super admin user i am unable to see the Java Development role and when tried to assign the role, there were no searches for that Java....

    Hi Adi,
    by default the super administrater has got all permissions. Thus you should be able to create portal users when using a user assigned to the portal group Administrators.
    In order to help you with your first question we need more information. Please describe the malfunction in detail. Have a look into the log files and post related error messages.
    Regarding your second question: You will find the java development role in PCD
    pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.pct.pdk/Roles/com.sap.pct.pdk.JavaDeveloper.
    If not, then you haven't installed the PDK business package in your portal.
    Go to service.sap.com, choose downloads and search the package (PDK should do it). Download the package, and deploy on your portal using SDM.
    Best regards,
    Martin

  • How to Create Logo and Favicon with CS6 Quickly ?

    Hello,
    Shout to Designers !
    Hello friends,
    I'm Piyush and I wanted to create one logo and favicon for SolveMyHow.com
    Right now you can check it out, the logo looks really bad Plus it doesn't have favicon yet.
    So, can somebody here suggest me to create one for SolveMyHow ?
    Thank You

    Logo are best design using vector graphics Shapes and text for they will scale perfectly. These came be made into custom shapes which can be enhances with layer style effects.  Photoshop can no save ico files. There are third party plug-ins for Photoshop that can save ico files.

  • Creating invoice and posting  with FB60 (Without PO reference)

    Hi All,
    I need to create vendor invoice (without PO reference) as we do using FB60.
    How it can be done?
    Is there any BAPI which can be used ?
    I have used BAPI_INCOMINGINVOICE_CREATE to create vendor invoice with PO reference.
    Is the same BAPI we can use for creating invoice without PO reference? how to use ? or any other solution.
    Thank you very much....

    Hi Ashvender,
    Thanks for Replying....
    You are right we create IV with PO reference using MIRO and
    We create FI invoice by FB60 i.e without PO reference. But i want to upload data from excel sheet for without PO reference for FB60 as per given template below
    <b>Invoices with no reference to PO - FB60 format</b>
    Vendor       Date         reference        header txt    Bus area    G/L account    
    tax code   TAX amnt   Amount     WBS code                  Cost centre   Value 
    5000000    20.09.06    reference123     headertxt      1001          418002             v2             17.50         117.5        0506-PR-000001-CAP   4100             117.5
    Apart from BDC is there any BAPI we can use?

  • Creating Packages and Namespace for Webdynpro Java applications in NWDS

    Hi Experts,
    I am working on a stand alone application and using NWDS for the same. This application consist of some Webdynpro Java apps, Dictionary perspective DC's and BPM applications.
    I need to create a package and name space for all the applications. I have read some documents on creating SC in SLD and using it in NWDI. But since I am working on NWDS i am not able to see the SC.
    May be I am not following a correct procedure. Can some one provide a basic document or can tell me steps in short that i need to follow, for Name space and package creation and how to use them in NWDS.
    I am working on CE7.1 ehp1.
    Regards
    Pranav

    HI,
    This blog expalins how to Setup and configure NWDI System land scape:
    /people/bhavana.gupta/blog/2007/01/23/installation-and-configuration-of-netweaver-development-infrastructure-was-64
    NWDI Post installation:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/419b479b-0801-0010-f8a1-c26208b4b209
    http://help.sap.com/saphelp_nw70/helpdata/en/44/60dc1943c2311ce10000000a155369/frameset.htm
    Complete NWDI Resources:
    NWDI Resources [original link is broken]
    Thanks
    SrinivaS

  • Create User and Password with PHP

    I have a PHP script that can create a user in eDirectory using the
    ldap_add function. I can successfully add the user, but I don't know how
    to set the password. How can I accomplish this with PHP? I know I can
    use the ICE utility, but I would prefer not to. Can I do this with the
    native functions that are builtin to PHP?
    blntskul
    blntskul's Profile: http://forums.novell.com/member.php?userid=10433
    View this thread: http://forums.novell.com/showthread.php?t=370448

    Found it. It's the 'userpassword' attribute.
    blntskul
    blntskul's Profile: http://forums.novell.com/member.php?userid=10433
    View this thread: http://forums.novell.com/showthread.php?t=370448

  • Adding a guest book to an iweb created site and problems with counter

    Hi, can anyone tell me if it's possible to add a guest book to a website created on iweb? I can find the html to insert, but can't find out how to insert it on the page.
    Also, I have tried adding the counter to see how many visitors I have, but it does not show up when the site is published.
    Thanks very much, in advance.

    You might have better luck asking in the iWeb forums here:
    http://discussions.apple.com/category.jspa?categoryID=188

  • Create Delivery and billing in MM

    Hi friends,
    Iam doing the MM flow. now i want to create the delivery with referenece To purchase order. please tell me How to create delivery and billing with reference to PO.
    regards,
    dhanush

    Hi,
    whats the transaction codes for delivery, pgi, billing in MM
    For creating delivery use T.code;Vl04 for foreground, if you want to run in back ground use VL10b,Vl10H,Vl10G
    For PGI use VL02n & do PGI
    For billing in MM as usual use MIRO do invoice.
    Regards
    Ravi Shankar.

  • How to create a text Component With Certain Properties

    I need to create a text component with the following properties:
    Has Capability to be italic, right/left aligned, have different background / foreground colors, and most importantly, the ability to have a fixed width and a height that is set by the amount of text in it (ie line wrapping expands the field vertically).
    It should be a simple exercise, but I cannot seem to figure out how to do it.

    Here is the correct syntax :
    private static JEditorPane constructPane(String text, int normWidth, int normHeight, boolean rightAlign, boolean italic,boolean isWhite) {
              JEditorPane pane = new JEditorPane();
              pane.setEditable(false);
              pane.setContentType("text/html");
              pane.setText(
                   "<html><head></head><body>"
                   + (italic?"<i>":"")
                   + "<table><COLGROUP><COL width=\""+normWidth+"\"><THREAD><tr><td valign=\"top\" align="+(rightAlign?"\"right\"":"\"left\"")+">"
                   + text+"</td></tr></table>"
                   + (italic?"</i>":"")
                   + "</body></html>");
              pane.setSize(normWidth,normHeight);
              if(isWhite)
                   pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(1,0,1,0,Color.WHITE),BorderFactory.createEmptyBorder(0,1,0,1)));
                   pane.setForeground(Color.WHITE);
              else {
                   pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(1,0,1,0,Color.BLACK),BorderFactory.createEmptyBorder(0,1,0,1)));
                   pane.setForeground(Color.BLACK);
              return pane;
         }

  • How to create members and properties in BPC for Excel...

    Hello,
    Is it possible to maintain and create members and properties from an input schedule of BPC for Excel?
    We want to give access to the end users to maintain one dimension (invoices) from an input schedule of BPC for Excel,  in order that they will create new invoices and give properties for them... (But not accesing using BPC for Administration Console) they must access using an Excel input schedule.
    Thanks,
    Jorge

    BPC is a Business Warehouse tool rather than an Accounting system. In other words, BPC is designed to do data analysis and planning, not creating sales documents, etc.
    You should use an ERP system or at least, an Access database or Excel to create your Invoice documents. Then you load to BPC for data analysis or for planning/budgeting.
    It is critical to understand the values and functions of BPC before implementing into your Business Processes, otherwise you WILL spend hundred of thousands of dollars and end up with negative ROI or loss of time and money. To give you an analogy, no matter how well a Ferrari is designed, you don't drive it in off-road conditions. There are many case studies online that try to tell us the importance of recognizing and understanding the purposes/functions/values of the products before we use it in real world, especially in SAP environment.
    Hope this helps...

Maybe you are looking for