Creating auto increment custom metadata field in UCM

Hello,
Can anyone tell how to create a metadata Integer field with Auto Increment option?
Also while creating users, I have a custom Department field. I want this field to be displayed in my profile. How can i achieve this?
Richa

SHort of paying someone else to do the work for you I am afraid there is no shortcut.
However writing a component need not be difficult or complex if you take a sensible approach.
There are some excellent blogs out there, at least one comprehensive book and even the documentation will get you started
http://download.oracle.com/docs/cd/E10316_01/cs/cs_doc_10/documentation/developer/sdk_getting_started_10en.pdf
I recommend you get Bex's book and you should be able to get a new component like this up and running in a day or two.
Tim

Similar Messages

  • Batch process to create large number of metadata fields in UCM?

    Is there any kind of scripting available to create a large number of metadata fields in UCM?.
    thanks

    I can give you a code in java, which adds two metadata fields. It's quite hardcoded, but you could use it as a basis for a script:
    String FIELD1_NAME = "xsecretKey";
    String FIELD2_NAME = "xattachmentID";
    if (binder == null)
    binder = new DataBinder(SharedObjects.getSafeEnvironment());
    String maxOrderQuery = "select MAX(dOrder) as dOrder from DocMetaDefinition";
    try
    String val = loader.getDBConfigValue(COMPONENT_NAME, COMPONENT_SUBNAME, null);
    //binder.putLocal("dName", FIELD1_NAME);
    binder.putLocal("dName", FIELD2_NAME);
    ResultSet tempRs = ws.createResultSet("Qmetadef", binder);
    if (val == null || tempRs.isEmpty())
    ResultSet rset = ws.createResultSetSQL(maxOrderQuery);
    String orderStr = ResultSetUtils.getValue(rset, "dOrder");
    int order = NumberUtils.parseInteger(orderStr, 0);
    setNewFieldParams(binder, "BigText", "secretKey", "<$dateCurrent()*1$>");
    addNewMetadataField(FIELD1_NAME, binder, ++order, null, null, ws, cxt);
    setNewFieldParams(binder, "Text", "attachmentID", null);
    addNewMetadataField(FIELD2_NAME, binder, ++order, null, null, ws, cxt);
    rset = ws.createResultSetSQL("select * from DocMeta where dID=0");
    if (!testResultSetFieldExists(rset, FIELD1_NAME))
    FieldInfo fi[] = loader.createFieldInfo(new String[] {
    FIELD1_NAME
    }, 200);
    //fi[0].m_type = 5;
    ws.alterTable("DocMeta", fi, null, new String[] {
    "dName"
    if (!testResultSetFieldExists(rset, FIELD2_NAME))
    FieldInfo fi[] = loader.createFieldInfo(new String[] {
    FIELD2_NAME
    }, 30);
    //fi[0].m_type = 3;
    ws.alterTable("DocMeta", fi, null, new String[] {
    "dName"
    loader.setDBConfigValue(COMPONENT_NAME, COMPONENT_SUBNAME, "7.0", "1");
    catch (Exception e)
    SystemUtils.dumpException(null, e);
    }

  • Editing Autofill List for Custom Metadata Fields

    I have 13,000+ photographs cataloged in Aperture 2.1 In an effort to better manage these photographs, I have added custom metadata for my own use. The fields let me know whether I have printed for my portfolio, watermarked, added to my web site, status of release, etc. All of this data is manually entered and at times my fingers don't always hit the correct keys on the keyboard so I end up with autofill data that is incorrect. I have been unable to find a way to edit the autofill data for custom metadata fields. Selecting 'Edit Autofill List' does not give me access to my custom field autofill information. Am I missing something? Is this an oversight on my part or on the part of the application?

    Unfortunately I'm not using presets to do this. I don't think presets will help me with this, but it could be just that I don't understand presets that well. I use presets for entering Metadata from a shoot as I 'import' the raw files into Aperture. Maybe I'm trying to do something that Aperture was never intended to do, yet I need to have as few locations where I track
    As an example, as I print a photograph for my portfolio I mark one of the custom fields labelled 'Printed' as 'Yes'. Later I can locate those 4 or 5 star photographs that haven't been printed and decide if I want to print them. I use the same type of arrangement for my website with an 'Added to web' indicator as 'Yes'. I may also mark that 'Printed' field as 'N/A'. The reason follows. For watermarking photographs before adding them to my site via iWeb, I export and the photographs and then reimport the watermarked photographs into a separate project but since these photographs are at a lower resolution, have a different color profile and are jpegs, I never print them for my portfolio so I mark them 'N/A' in the 'Printed' field. Well my fingers do slip on the keys and before I realize it the nifty autofill now requires that I type not just the 'N' to get an 'N/A', but I must type it all, because one time I typed 'N and a space' or some such and that is what autofills. It even happens with 'Yes'. I suppose the real answer is to be more careful as I type, but that is not my reality.
    So, all I'm looking for is a way to have access to the autofill list that is created for my custom metadata fields so that I can delete the erroneous autofill entry. I've thought about deleting the field entirely and recreating it, but that would remove all those indicators or flags that I have already entered for my photographs.
    Alternatively I could find an IPTC field that I am not using and find a way to use it, (because those fields have autofill lists that can be edited). However my record keeping would be exported with the photograph. Some of the information that I collect is private and should not be included in the metadata while other information should be; that is why I've settled on custom metadata fields.
    I hope there is a simple answer to this that I'm overlooking.
    If someone else has another way of tracking this same information that is better than the custom metadata fields, I would like to hear about it. However, it would mean reworking all my photographs that Aperture currently manages.

  • Retrieve a list of different values of custom metadata field of an UCM connection

    Hi
    I am planning to create a custom search document functionality for my UCM and Portal integration. Basically, I am planing to create CMIS queries dynamically. In order to create the CMIS query, I need the possible values of custom metadata for the user to select from and through a backing bean construct the cmis query based on this selection.
    I have created a custom metadata field (lets say, 'KindOf'). So I want to show the user a list of all possible 'KindOf' values, so user selects the values he wants and I use those values to build the cmis query and show the results.
    What is the easiest, best practices, how would you do it, way of achieving this?
    I have little experience with UCM.
    Regards

    Hi,
    As rightly pointed out by jiri machotka, you want that option list .
    if you create a option list metadata, you have to publish schema to get the values. You can do it by two ways:
    1) Wait for the event which publish the schema automatically.
    2)Select "Publish schema" in the options menu of the Configuration Manager.
    Some good implementation info about searching can be found at - Students at Oracle: UCM: Creating search and check-in profiles with custom metadata
    and http://www.slideshare.net/heikim/effective-strategies-for-searching-oracle-ucm
    Otherwise if you want faceted search or something near to enterprise searching capabilities, then go for enterprise search engines.
    I have recently worked on Enterprise Search Engines on various CMS products for better,intuitive and relevant search results.
    Hope, above information can help you out.
    Regards,
    Hoque

  • Creating auto-increment field in SharePoint List

    In SharePoint, we can create the auto-incremental field by many ways, I am going to discuss two ways of doing it.
    Calculated field
    Item Event Receiver
    1. Using Calculated field:
    Using this we can accomplish it without doing any programing and it is a relatively simple way of doing it. By using “Calculated” column in SharePoint List we can create auto-increment field. We can accomplish this by creating a new column and choosing the
    column type as “Calculated (calculation based on other columns)”. And in Formula field, we have to enter [ID]
    In fact this will be using the values from “ID” field from SharePoint list that starts from 1.
    For example, if we want to start our auto-increment column from 100, we can modify the “Formula” field of Create New column screen, we can have to enter [ID] + 99
    For detailed info please follow the blog I wrote here: http://faisalrafique.wordpress.com/2011/03/19/creating-auto-increment-field-in-sharepoint-list/
    2. Using Item Event Receiver:
    By using this strategy, users have advantage to edit the existing values, we can also avoid it by making field read-only on feature activation. Using item event receiver, on ItemAdded event, we have to find the highest value among previously added items
    and then save the incremented value to current newly created auto-incremental column.
    For code of event reciever please follow the blog I wrote here:
    http://faisalrafique.wordpress.com/2011/03/19/creating-auto-increment-field-in-sharepoint-list/
    Happy Coding

    Use Sharepoint Designer to create a Workflow for the list containing the field to increment. For my project I had an Invoice field that I wanted to start with 1001 and increment from there so I made the following workflow to do this.
    In the new workflow screen in Sharepoint Designer create two actions in Step 1:
    Calculate Current Item:ID plus 1000 (Output to Variable: calc)
    then Set AutoIncrementNumber to Variable: calc
    This is just a guide. If you just want the auto-increment to start with 1 then you can just use this step
    Set AutoIncrementNumber to Current Item:ID
    Also, make sure you select the correct name for your field in the Workflow action instead of AutoIncrementNumber.
    Save the Workflow, close it, and then open it again in Sharepoint Designer. Check the box for "Start workflow automatically when an item is created." Save it again and then click on the Publish button to make it active on the sharepoint site. The value should
    now increment for each new item created in the list.

  • Select Button beside custom metadata field on Check In Form

    Hi
    In Oracle Content Server 10gR3, is there a way to add a "Select" button to User Alias Applet for a new Meta data field on New Check In Form? I tried creating a component but I don't see a select button being shown up. The button does shows up if it's a standard metadata fields but not for the custom one. Here is the component code. Any idea what I am doing wrong and how to fix it.
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>
    CustomMetaData htmlIncludeOrString
    </title>
    </head>
    <body>
    <@dynamichtml std_meta_fields@>
    <textarea name="xClbraAliasList" rows=3 cols=40 wrap=virtual></textarea>
    <input type="button" value="Select..."
    onClick="popupSelectAlias(document.Checkin);">
    <script language="JavaScript">          
         var aliasForm;
         function popupSelectAlias(frm)
              var selUser = document.selectAliasApplet;
              aliasForm = frm;
              selUser.createFrame();
         function setAliasString(val)
              if (val.length == 0)
                   return;
              var str = aliasForm.xClbraAliasList.value;
              str.trim;
              if (str.length > 0)
                   str += ",";
              str += val;
              aliasForm.xClbraAliasList.value=str;
         </script>
         <applet name="selectUserApplet"
        code=com.intranetsol.utilities.SelectUserApplet.class
          codebase="/idc/common/"
         archive=suapplet.zip
        id=selectUser
        width=0
        height=0
         MAYSCRIPT>
              <param name=CGI-URL value="/idc/idcplg">
              <param name=JsDisplaySeparator value=",">
              <param name=IsPaged value="1">
              <param name=IsUserList value="1">
              <param name=JsFunction value="setUserString">
    </applet>
    <applet name="selectAliasApplet"
        code=com.intranetsol.utilities.SelectUserApplet.class
          codebase="/idc/common/"
         archive=suapplet.zip
        id=selectAlias
        width=0
        height=0
         MAYSCRIPT>
              <param name=CGI-URL value="/idc/idcplg">
              <param name=JsDisplaySeparator value=",">
              <param name=IsPaged value="1">
              <param name=IsAliasList value="1">
              <param name=JsFunction value="setAliasString">
    </applet>
    <@end@>
    </body></html>
    Then I tried using the same code as above but instead used the built-in dDocType to show a "Select" button. This works but the button obviously shows besides dDocType but when I try for custom metadata as shown above it doesn't. Here is the sample code for dDocType:<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>
    CustomMetaData3 htmlIncludeOrString
    </title>
    </head>
    <body>
    <@dynamichtml std_doc_page_definitions@>
    <$include super.std_doc_page_definitions$>
    <$include custom_modify_comments_definitions$>
    <@end@>
    <@dynamichtml custom_modify_comments_definitions@>
    <$if isCheckin$>
    <$xComments:isHidden = 1$>
    <$xComments = "some preset and hidden comments"$>
    <$elseif isUpdate$>
    <$xComments:isInfoOnly = 1$>
    <$endif$>
    <@end@>
    <@dynamichtml compute_std_field_includes@>
    <$include super.compute_std_field_includes$>
    <$if fieldName like "dDocType"$>
    <$if isCheckin or isUpdate$>
    <$fieldEntryInclude = "custom_doc_type_popup_field_entry"$>
    <$endif$>
    <$endif$>
    <@end@>
    <@dynamichtml custom_doc_type_popup_field_entry@>
    <input type="text" name="dDocType" value="<$fieldValue$>">
    <input type="button" value="Select..."
    onClick="popupSelectAlias(document.Checkin);">
    <script language="JavaScript">          
         var aliasForm;
         function popupSelectAlias(frm)
              var selUser = document.selectAliasApplet;
              aliasForm = frm;
              selUser.createFrame();     
         function setAliasString(val)
              if (val.length == 0)
                   return;
              var str = aliasForm.xClbraAliasList.value;
              str.trim;
              if (str.length > 0)
                   str += ",";
              str += val;
              aliasForm.xClbraAliasList.value=str;
         </script>
    <applet name="selectAliasApplet"
    code=com.intranetsol.utilities.SelectUserApplet.class
         codebase="/idc/common/"
         archive=suapplet.zip
    id=selectAlias
    width=0
    height=0
         MAYSCRIPT>
              <param name=CGI-URL value="/idc/idcplg">
              <param name=JsDisplaySeparator value=",">
              <param name=IsPaged value="1">
              <param name=IsAliasList value="1">
              <param name=JsFunction value="setAliasString">
    </applet>
    <@end@>
    </body>
    </html>
    Can someone please let me know what is in my above code that I am missing that is preventing the button not being shown in-front of the custom metadata field.
    Any help would be greatly appreciated.
    Thanks
    Edited by: guest0012 on Aug 29, 2009 4:24 PM

    Interesting!
    You'll need a component. You already mentioned you had a custom metadata field. You will also need to add a counter to the counters table for your component. During a check in you will need to fetch the next value from the counters table, increment the counter and store the new number back in the table. The year portion of the id is easy, get the current year and grab the last two characters. Then, put this all togther to get the data for your metadata field.
    The big question now is where in the check in process will you do all this? You will need something called filters probably. Maybe addFiles, maybe validateStandard, there are several that this could work with.
    Check out the how-to-components:
    http://www.oracle.com/technology/products/content-management/ucm/samples/index.html
    -Jason
    http://www.corecontentonly.com

  • Custom metadata field with autonumbering sequence

    I have created a custom metadata field and I need it to be able to start a zero and then increase by one with each checkin. There were other qualifications for this particular field as well, which I have managed to do. Currently, the field is V99_99999 where V is a constant, and the 99 immendiately after the V is the current two digit year. all that works great. the issue I am having is with the second half of this. I have it going against the content_id currently, which is at 003856 right now, so when I check in my first content, it will look like V09_003857. what I need it to look like is V09_00001 and then increase by one with each checkin, and then for the really tricky part...when the year changes, on Jan 1, the counter needs to start over at all zeroes again.
    I am fairly new to UCM and this seems huge to me. I purchased a book called "The Definitive Guide to Stelelnt Content Server Development" hoping to find the answer, but am still struggling, so I am using another life line and reaching out to you all.
    Thanks,
    Patti

    Interesting!
    You'll need a component. You already mentioned you had a custom metadata field. You will also need to add a counter to the counters table for your component. During a check in you will need to fetch the next value from the counters table, increment the counter and store the new number back in the table. The year portion of the id is easy, get the current year and grab the last two characters. Then, put this all togther to get the data for your metadata field.
    The big question now is where in the check in process will you do all this? You will need something called filters probably. Maybe addFiles, maybe validateStandard, there are several that this could work with.
    Check out the how-to-components:
    http://www.oracle.com/technology/products/content-management/ucm/samples/index.html
    -Jason
    http://www.corecontentonly.com

  • Get value based on column names for custom metadata field of Webcenter Content

    In UCM, I created a custom metadata field of type Text.  I then enabled optlist in that field.  I populate values to the optList, I am using a View.  The View has three columns.  Let us call them ID, Key, Value.  OptList displays the Keys in its list.  I then create a Content (Content ID: MyContent) in Webcenter Content and choose values from OptList for my new metadata field (MyField).
    From Webcenter Portal, I am populating a selectOneChoice with values of MyField in the Content ID: MyContent.  Remember from previous step, the values populated in selectOneChoice is the list of values selected from optList field MyField.  This optList is in-turn populated from View.  After the user selects a value in selectOneChoice, in Javascript, I need to alert a message in this format "value chosen - corresponding value from View of optList that populates MyField"
    I think an example will be useful:
    Here is a View that I created in Configuration Manager applet in Admin Applets of Webcenter Content:
    ID | State | Capital
    1 | North Carolina | Raleigh
    2 | California | Sacramento
    3 | Illinois | Chicago
    Then, I create a Custom Field (Name: MyField).  MyField is an optList the values are populated from View created above.  The internal value and display value are both State.  Then I Check-In a new content with Content Id: MyContent.  For MyContent, I select these values from OptList for MyField: {North Carolina, Illinois}.
    In my Webcenter Portal application, I create a Content Presenter Taskflow.  I configure it as a single item content presenter.  I assign MyContent as Content Id.  Then, in templateView, I get all values of MyField in MyContent and display them as selectOneChoice.  I created a javascript function that would get the value that user selected in selectOneChoice.  In the View created in Webcenter Content's Configuration Manager (above), there is a value corresponding to each value displayed.  So, for the selected value, I need to get the corresponding Capital and display it in my alert message.
    From Javascript, how can I get the value of Capital, given I have the value of State.

    Hi.
    The idea to achieve your requirement is next:
    Create a helper manage bean that will be call as Map access: #{stateUtil['Calofironia']} (it will return Raleigh). This value will be get calling GET_SCHEMA_VIEW_VALUES IDC service using RIDC in your manage bean.
    Pass the result of #{stateUtil['statename']} to your JavaScript function using <af:clientAttribute.../>
    I hope this information help you.
    Regards,

  • How to rename Custom Metadata Field?

    I have some pics with custom metadata field "gadget brand", i with to rename the field name to "brand", how can i do that? I tried to rename in the custom metadata manager, but it doesn't apply the change.

    Don't believe you it will allow you to rename it.
    You're going to have to create a new field with the name you want and copy the data over. Unfortunately Aperture doesn't have any built in means of copying metadata from one field to another. Applescript however could do it fairly easily.

  • How to export custom metadata fields

    How do I export custom metadata fields (or even the DATE) to a text or spreadsheet? Why does Aperture have dozens of metadata choices, but only allows a few to be exported?

    You can try Automator which must be installed already in your computer. Create a new workflow, on the left pane select Aperture to see a list of actions, select "get selected items" and "extract metadata", and drag both to the right most pane. there you'll choose the Tag names to extract from the images already selected inside aperture and choose an output method, tabbed text should work fine for a spreadsheet. Hope it works.

  • Custom metadata fields?

    I'm trying to find a way to create custom metadata fields so I can better organize my footage.  For example, say I'm filming a bunch of old cars, and I want to sort them by make and model, obviously there's no make and model field by default.  I've read articles that say this is possible, but I can't seem to find a way to do it.  Thanks!
    Edit:  And related to that, is there a way to delete any of the metadata fields?  Since I'm doing video, I'd rather not have to scroll through things like Album and Artist, etc.  Thanks.

    In the Metadata panel open the flyout menu in the upper right and choose "Metadata Display..."
    Now you can turn off the metadata schemas you're not interested in seeing.
    Now click the New Schema button.
    Give your new Schema a name.
    Now click the Add Property button next to your new custom schema.
    Give it a name, like "Make", of type "Text".
    Then do the same again for "Model".
    Now you can select a set of clips all of the same make then enter what you'd like into the "Make" field and that metadata will be applied to the selected clips.
    This is searchable, so in the Project panel you can search for the text you've entered into one of these fields and only clips containing that metadata will appear in the list (next to the search box Prelude reports "(filtered)" to let you know you're not currently seeing all of your clips.
    I hope this helps!

  • Custom metadata fields wont export

    I have created two custom metadata fields but they dont export when you export meta for excel, how can I do this?

    You can't.
    Note: See the "more like this" to the right; this question has been asked many times.
    For example, here's one thread where the question is answered with a link to the manual:
    https://discussions.apple.com/message/22067500#22067500
    Consulting the manual first (it's quite comprehensive) is always a good idea, too ;-)

  • Mandatory custom metadata field with current system date as default value.

    I want to create a custom metadata field of type Date. I want to make it mandatory and want to set its default value as system date.
    I have already created field of type Date. What expression I should write to make system date as default value?
    Because its a mandatory field, what would happen to existing content. Will there metadata get updated?
    Thanks
    Sanjeev

    I want to create a custom metadata field of type Date. I want to make it mandatory and want to set its default value as system date.
    I have already created field of type Date. What expression I should write to make system date as default value?
    See http://docs.oracle.com/cd/E23943_01/doc.1111/e10726/c08_config_ref.htm#CSIDO710
    >
    Because its a mandatory field, what would happen to existing content. Will there metadata get updated?No, it will not be updated - profiles are active only for new or updated items (in fact, they work on front-end).
    >
    Thanks
    Sanjeev

  • How to hide custom metadata field in custom profies ??

    hi,
    how to hide custom metadata dropdown list in a custom profile based on choosing the security group.
    ex: if i choose xxx security group, custom metadata dropdown should not appeared, for remaining security groups it should be visible.
    so, Based on criteria, custom metadata should be hidden in custom profiles..
    how to achieve it ?? where and how to configure ??
    Detail guidance should be required
    Thanks in advance

    You cannot do this through profiles alone if I understand you correctly.
    If I load a check in page, choose a security group and at this moment want a custom metadata field to disappear then you are beyond what profiles offers.
    Rules evaluation can only be based on information that is know at the time the page is requested. That means in order for this to work you would need to make security group an non editable field and have a set of profiles for each security group.
    The alternative is to customize the UI with soem DHTML or AJAX
    Tim

  • How to use ADD_METADEF to add a custom metadata field

    Hi All,
    I am trying to add a custom metadata field to check in profile, and this I want to do using RIDC library through my java program. I have tried the following code, but some how I could not see its getting added to Information Fields and also to Standard check in profile.
    Can you let me know what am I missing?
                myIdcClient = myIdcClientManager.createClient("idc://XXXX:4444"); // just commented out
                IdcContext myIdcContext = new IdcContext("weblogic", "weblogic1");
                ServiceResponse myServiceResponse = null;
                  DataBinder myRequestDataBinder = myIdcClient.createBinder();
                    myRequestDataBinder.putLocal("IdcService", "UPDATE_OPTION_LIST");
                    myRequestDataBinder.putLocal("dKey", "xLocationList123");
                  myRequestDataBinder.putLocal("OptionListString", "Madrid\nTokyo\nLondon\nWashington");
                    myServiceResponse = myIdcClient.sendRequest(myIdcContext, myRequestDataBinder);
                    myRequestDataBinder = myIdcClient.createBinder();
                    myRequestDataBinder.putLocal("IdcService", "ADD_METADEF");
                    myRequestDataBinder.putLocal("dName", "xLocations123123");
                    myRequestDataBinder.putLocal("dIsRequired", "0");
                    myRequestDataBinder.putLocal("dOptionListKey", "xLocationList123");
                    myRequestDataBinder.putLocal("dOptionListType", "choice");
                    myRequestDataBinder.putLocal("dIsOptionList", "1");                    
                    myRequestDataBinder.putLocal("dIsSearchable", "1");
                    myRequestDataBinder.putLocal("dIsEnabled", "1");
                    myRequestDataBinder.putLocal("dType", "Text");
                    myRequestDataBinder.putLocal("FieldName", "xLocations123123");
                    myRequestDataBinder.putLocal("dCaption", "Locations");
                    myServiceResponse = myIdcClient.sendRequest(myIdcContext, myRequestDataBinder);
                    myRequestDataBinder = myIdcClient.createBinder();
                    //IdcService=UPDATE_META_TABLE
                    myRequestDataBinder = myIdcClient.createBinder();
                    myRequestDataBinder.putLocal("IdcService", "UPDATE_META_TABLE");
                    myServiceResponse = myIdcClient.sendRequest(myIdcContext, myRequestDataBinder);
                    myRequestDataBinder = myIdcClient.createBinder();
                    myRequestDataBinder.putLocal("IdcService", "START_SEARCH_INDEX");
                    myRequestDataBinder.putLocal("IsRebuild", "1");
                    myServiceResponse = myIdcClient.sendRequest(myIdcContext, myRequestDataBinder);
                    myRequestDataBinder = myIdcClient.createBinder();
                    myRequestDataBinder.putLocal("IdcService", "PUBLISH_SCHEMA");
                    myServiceResponse = myIdcClient.sendRequest(myIdcContext, myRequestDataBinder);
    Thanks in advance.

    Try calling the following code:
    import static intradoc.shared.MetaFieldUtils.hasDocMetaDef;
    import static intradoc.shared.MetaFieldUtils.updateMetaDataFromProps;
    import intradoc.common.ServiceException;
    import intradoc.data.DataBinder;
    import intradoc.data.DataException;
    import intradoc.data.Workspace;
        protected static void addMetadataFields(final Workspace workspace, final DataBinder binder) {
            traceVerbose("Start addMetadataFields");
            // Parameters for metadata field
            final String[] parameters = new String[] { "dsdComponentName", "dComponentName", "dsdVersion", "dType", "dIsRequired", "dIsEnabled", "dIsSearchable", "dIsOptionList", "dOptionListKey", "dOptionListType", "dDefaultValue", "dOrder", "dIsPlaceholderField", "dsdCheckFlag",
                    "dsdDisableOnUninstall" };
            // Common values for primary and alternate field values
            final String[] values = new String[] { "ComponentName", ComponentName, "build_1_20131206", "BigText", "0", "1", "1", "0", "", "", "", "2500", "0", "", "" };
            // Primary file checksum field parameters and values
            final Properties field = new Properties();
            for (int i = 0; i < parameters.length; i++) {
                field.put(parameters[i], values[i]);
            // Setup primary file specific parameters
            field.put("dName", "Metadata field name");
            field.put("dCaption", "Metadata field caption");
            try {
                // Name of metadata field
                final String fieldName = field.getProperty("dName");
                trace("dName: " + fieldName);
                if (fieldName != null && fieldName.length() > 0 && !hasDocMetaDef(fieldName)) {
                    try {
                        updateMetaDataFromProps(workspace, null, field, fieldName, true);
                        trace("Successfully added metadata field " + fieldName);
                    } catch (final ServiceException e) {
                        warn("Metadata field " + fieldName + " was not installed.", e);
                    } catch (final DataException e) {
                        warn("Metadata field " + fieldName + " was not installed.", e);
                } else {
                    trace("Metadata field already exists; will not modify");
            } finally {
                traceVerbose("End addMetadataFields");
    Jonathan
    http://jonathanhult.com

Maybe you are looking for

  • File will not open in Design View

    I needed to add new file types, which I have done before with CS4 and CS5, but it doesn't seem to be working with CS6. I've followed the instructions here: http://helpx.adobe.com/dreamweaver/kb/change-add-recognized-file-extensions.html but after res

  • Help Moving iWeb site to a windows PC

    My objective is to create a site using iWeb and move that site to a standalone PC and use Firefox to read the site folder and run the site. Not needing any internet. The files are too large anyway. I have created the iWeb site with many videos from i

  • Embedded fonts not displaying Correctly

    I have exported a 100+ page document from InDesign CS5.5 All fonts not in the system fonts are displaying as Minion Pro. The fonts are listed as embedded (subset) and the fonts allow for embedding. View the original discussion as necessary in InDesig

  • ITunes refusing to allow sync

    After having a system recovery on our computer and losing all music on board, I went back to iTunes, redownloaded music store, etc and hooked up my iPod mini. All was okay as first after I agreed to the "synching of only the purchased music" and they

  • Why cant I send mail since resetting my hotmail password?

    I logged onto my hotmail on a laptop but couldnt remember my password so had to reset it. I changed it on my ipad in settings, and am receiving emails but for some reason i cant send any. I get an error msg saying my password is incorrect, but ive de