Need design hints for Managed class

I need help understanding the underlying LCDS mechanisms when a complex object hierarchy is managed in LCDS.  I have a custom Assembler because I have specialized persistence requirements.  My object hierarchy is basically the following:
Document
    Chapter
        Page
            Text
Document is the [Managed] class.  When a new Document is created, it is initialized with a Chapter.  Pages and Text are created when the document is edited.  I create new instance of Document and initialize it with an instance of Chapter.  On the client, I invoke the DataService using the createItem method.  My custom Assembler is called, I do the necessary persistence operation and return.  Back on the client I receive the ItemReference containing the AS Document.  This all works ok.  I am now faced with the runtime operations when the user starts creating Chapters, Pages and entering text.
Given that I start the editing session with a single ItemReference, I don't understand how to handle the Document sub-tree.  The LCDS documentation says the purpose of the [Managed] class tag is so the entire object tree does not need to be transmitted when a property changes on a child object.  Its the responsibility of the sub class to keep the remote object in sync.  But, I don't know the best way to go about doing this.
The [Managed] annotation makes the properties of the managed class bindable.  I can add an event listener to the ItemReference to handle property changes on the Document, but what about the rest of the object tree?    Do I explicitly make the properties of the child objects bindable?  Do I make each parent object an event listener for its child object properties and propagate the event up the tree?
Any suggestions or patterns to make this a little more understandable would be greatly appreciated.

If Hibernate cannot read/write your persistence layer (i.e. its not a database) then you probably wont be able to deploy a model and have the server side 'just work'.  You can specify the assembler class in the model annotations and we will configure a destination of that type for each entity (you can specify a custom assembler for each different entity).  This may not be a road that you want to go down, as manually configuring each assembler for each association will give you more transparency and control.
But you can still use the model in FlashBuilder to generate all of your client side value objects and you may be able to use the generated service wrappers.
Note that for each association, you will need an assembler.  So there is the Document assembler, the Chapter assembler and the Page assembler.  Each one is responsible for managing the persistence of each item type.  You would then define the <one-to-many> relationships in the destination config, along with the destination that manages that type of item:
<destination id="DocumentAssembler">
  <metadata>
    <identity property="id">
    <one-to-many property="chapters" destination="ChapterAssembler" lazy="true" paged="true" page-size="10" />
  </metadata>
</destination>
<destination id="ChapterAssembler">
  <metadata>
    <identity property="id">
    <one-to-many property="pages" destination="PageAssembler" lazy="true"  paged="true" page-size="10" />
  </metadata>
</destination>
And so on for PageAssembler.  This is how the system can manage each item class.  I made the associations lazy and paged, but you don't have to do this if you don't need it.
On the client, each of the managed collections (Documents, Chapters, Pages) is monitored for changes and the appropriate create/update/delete in the assembler is performed when a commit() is called.  You perform a DataService.fill() on the "DocumentAssembler" destination to start things off, you get back a managed collection and just go to town, modifying the whole object tree as you see fit, then calling DataService.commit() on the Document, and all of the nested 'stuff' that you did will be persisted to each assembler for each type of collection (documents, chapters, pages).  It is pretty powerfull.
To help reduce the work, you can use a model to generate code, then never generate it again.  Or just define the AS value objects manually, using the generated code as a guide.  The trick is to make sure the collection properties like "chapters" and "pages" are labeled with the [Managed] metadata.
There are plenty of 2 level association examples on the DevCenter and out in the web (check out Tour De LiveCycle for instance).  You are just going down one more level.
All this being said, you can skip most of this and just have a single destination that does Documents and takes a full object graph of stuff each time.  This will be pretty 'blunt force' as the whole Document will be handed to the updateItem function and you have to figure out how to persist it and all its sub-properties.  I am not familiar with Jackrabbit, so I don't know how fine grained your persistence is.
Anyway, let us know what you come up with!

Similar Messages

  • Need a hint for home office / 871 does not support port-security - FPM ?

    Hi,
    i want to realize the following setup:
    - Central Site 871 with Internet Connection and static IP
    - Home office 871 with Internet Connection and static IP. On that home office router, there should be 2 Vlans: 1 for the office work and one for the user's private PC. All Traffic from the "office" Vlan is being put into a VPN to the central site. All Traffic on the other interface is being natted and goes straight to the internet.
    To minimize security issues, i tried to configure port-security, so that the user cannot connect with his private PC to the office LAN ports and vice versa. Unfortunately, port-security seems not to be supported on the 871 (advanced ip services image).
    Now i looked for an alternative...and came over to FPM (flexible packet matching).
    If i understood right, you can classify packets for example by their source MAC address and if this field matches a specific value (the mac of the work pc), packets can be dropped by a policy.
    Of course i cannot avoid that the user connects the work pc together with his private pc (this is then related to the OS Security to keep out viruses, worms, trojans, etc). But i could/want to restrict the internet access with the work pc through "normal" Internet access - the users should not be able to do that (must use the company's proxy).
    I did the follwing config:
    class-map type access-control match-any c2
    match start l2-start offset 48 size 6 regex "0xabcd1234fedc"
    match field ETHER source-mac regex "abcd1234fedc"
    policy-map type access-control p2
    class c2
    drop
    interface Vlan1
    ip address 192.168.20.1 255.255.255.0
    ip nat inside
    ip virtual-reassembly
    service-policy type access-control input p2
    service-policy type access-control output p2
    As this feature is quite new, i'm not familiar with it's syntax.
    I also tried to use "string" instead of regexp, but i'm still able to connect the office pc to the private Lan and i am able to access the "Internet" (currently it's only setup in a lab).
    As i understood so far, the offset is the value in bits, and size is in bytes. is that correct?
    Has anyone yet some experience with FPM or maybe any hint for me how to realize the requested setup with the 871 routers?
    bets regards,
    Andy

    For the FPM feature to work you will need PHDF files for the protocols you want to scan for to be loaded on your routers. The files can be downloaded from cisco's website. In your case you will have to download ether.phdf file.

  • I need java decompiler for multiple class

    Hello, i need a java decompiler for multiple class.
    avoiding of decompile one to one.
    Thanks

    Use JAD it has recursive decompiles.

  • Design patterns for Dynamic Class Loading

    Hi,
    I have to develop a program for uni that dynamically loads classes based on names in a text file. All the classes subclass an abstract class with a constructor that takes one argument. This means I can't use the Class.forName(className).newInstance() method of class loading. I have researched some design patterns I could use and have come up with the following 3:
    Factory pattern; "Robocode" pattern (not it's real name, but Robocode uses it); and, the "one I made up myself" pattern.
    The robocode pattern instantiates a class using the default no-argument constructor then immediately sets all properties that shoud have been provided in the constructor:
    Object o = Class.forName(myClass).newInstance();
    o.setProperty(property);Personally I think this is ugly and a cheap fix instead of doing it properly.
    My own pattern finds the constructor that takes the arguments I need then calls it to create the object:
    Class c = Class.forName(myClass);
    Constructor cons = c.getConstructor(new Class[]{Class.forName("java.lang.String")});
    Object o = cons.newInstance(new Object[]{"hello"});What's the best to use? Are there any other patterns I should consider?

    My own pattern finds the constructor that takes the
    arguments I need then calls it to create the object:
    Class c = Class.forName(myClass);
    Constructor cons = c.getConstructor(new
    Class[]{Class.forName("java.lang.String")});
    Object o = cons.newInstance(new Object[]{"hello"});
    I have followed this basic 'pattern' several times though I would use
    Constructor cons = c.getConstructor(new Class[]{String.class});
    It works great.

  • Need design Docs for Business One.

    HI All,
    Background: I  am from a SCM background and wanted to familiarize myself with SCM software of SAP specifically for the SMB market.
    What I want to learn: As mentioned above, the SCM solution of SAP for SMB market...all modules related to WM (Warehouse Management).
    My interest in Architecture/Application: Both - technical as well as functional aspects of the SCM with a focus on WM.
    From my perspective for SCM all modules of WM - Receiving, Putaway, Wave, Cross-Docking etc.
    Will it be possible for you to assist me find some relevant documents/ppts regarding the same?
    Thanks in advance,
    Harsh.

    Hello Harsh,
    Good to learn about your interest in knowing the WM side of SAP B1.
    SAP Business One (out of the box) does not really have a WM / WMS module to handle the different aspects of the warehouse function.
    This is being supplimented by a few Add-ons which provide this functionality to SAP B1.
    RadioBeacon is one such addon from a company called Accellos based out of Toronto, Canada.
    CitiXsys also has a WMS solution for Business One and that apart there are a few.
    Pretty much all software would handle the basic WMS functions of Receiving, Putaway, Picking, Cross dock, Replenishment etc.
    Unless you work with the specific Addon you would not have anything to learn on the SCM / Logistics / WMS side right out of Business One.
    Let me know if you need more details
    Suda

  • Need a link for ADF class hierarchy diagrams

    Hi,
    For some reasons i m not able to find via google or in documentation I need class hierarchy diagrams of the following
    - ADF Binding e.g Faces* to AttributeBinding etc etc.
    - ADF Model e.g ApplicationModule > Entity > View to Rowset etc etc
    these diagrams frequently used by Frank Nimphius in his presentations.
    Best Regards,
    Zeeshan Baig

    Hi,
    I created the binding diagram using Oracle JDeveloper class diagrammer. You don't need the source code for this. Create a new class diagram in JDeveloper, use right mouse context menu and choose "Add to diagram". Browse the class path to the classes you want to see (e.g. adf | model | binding) and select them. It takes a few seconds for the diagrammer to layout the classes, but then you have the diagram you are looking for.
    Frank

  • Looking for a tutorial/design-pattern for Manage User and Permissions.

    Hello,
    I wonder if anyone knows a good tutorial/blog with reference to security - howto Manage Users and Permissions.
    In my application I have GROUPS and each group has access to different RECORDS and CASES.
    Example:
    Groups: Alfa, Beta, Gamma
    Record: R1, R2, R3...
    Case: C100, C200, C300
    Group Alfa can view: R1, R2 and C300
    Group Beta can view: R1, R3, C200, C100, C300,
    Group Gamma can view: R3
    My question is this: what should be the best way (design-pattern?) to force a policy to securing the Records/Cases?
    What should every case/record implemented to verify that a user (part of a group) has the right to access the entity.
    Thank You!

    Sorry if this one is too basic for you but as I do not know your level of experience try:
    http://www.adobe.com/devnet/dreamweaver/articles/first_dynamic_site_pt3_print.html
    HTH
    There are also many other tutorials on:
    http://www.adobe.com/devnet/dreamweaver/application_development.html

  • Need a strategy for managing email on multiple devices

    I have multiple email addresses and multiple devices (iPad, iPhone, and MacBook Pro). I currently have all mail pushed to all devices. The problem I have is managing messages from one device to another.
    I would like to be able to delete a message on one device and have it deleted across all devices. I am thinking the only way this is possible is by stopping the push of messages to my devices and reading email only via iCloud. Or, is there another way?
    Suggestions?

    If you want to keep the same addresses, you will need to contact the providers for each and see if they offer an IMAP service.
    It's a fairly simply concept, IMAP accounts do exactly what you want, POP accounts don't. Whether or not all your providers offer an IMAP account is another matter.

  • Need design Patter for GUI

    Hi Guys,
    I am developing GUIs using Swings. Is there any design patterns available for the GUIs. I know there is good design patterns are available for J2ee. Can any body give me the URL from where I can get the design patterns?
    Thanks in advance.

    Model / View / Controller is the classic.
    It's described here, along with an explanation of how it relates to Swing:
    http://www.javaworld.com/javaworld/jw-04-1998/jw-04-howto.html

  • Need some hints for evaluating data from Central Performance History

    Hi Experts,
    I am pretty new to all the BI-stuff and hopefully someone can provide some hints. I got the requirement to read data (CPU usage/peaks) from central performance history of "system a" into "bi system" to generate overviews/charts/etc
    Now I guess there might be a standard report/info cubes and stuff which will help to solve this.
    I would really appreciate if someone could throw me a few keywords about this topic.
    Thanks in advance!

    Hi David,
    Thanks, I hadn't looked at the note.
    Section 2 - history of all connected systems showed me what to do to collect the data. I had seen that in the setup but not understood the implications of it fully. The note explained it much clearly than the SAP help.
    Thanks again,
    Gareth

  • Code hinting for all classes

    I used flash cs5 trial. I don't see fl.controls or button, datagrid, combobox .v.v in show code hint.
    Please help me

    Please try deleting your user config folder and then drag a component to your library (checkbox,DataGrid,etc..).
    Mac :
    Macintosh HD/Users/<username>/Library/Application Support/Adobe/Flash CS5/
    Windows XP:
    boot drive\Documents and Settings\<username>\Local Settings\Application Data\Adobe\Flash CS5\
    Windows Vista:
    boot drive\Users\<username>\Local Settings\Application Data\Adobe\Flash CS5\
    Windows 7 :
    boot drive\Users\<username>\AppData\Local\Adobe\Flash CS5
    thanks,
    Tareq

  • Known Oracle Thin Driver Issue :: Need an Equivalent for the Class

    Hi,
    We are working on an effort to migrate a J2EE application from WebLogic to OC4J. We noticed that one of the classes used the WebLogic implementation of the BLOB Data Type ( weblogic.jdbc.vendor.oracle.OracleThinBlob ). The original developers decided to use this class against the Oracle SQL API after reading this link :-
    http://support.bea.com/application_content/product_portlets/support_patterns/wls/CLOBBLOBDataTypeHandlingIssuesPattern.html#Known_Oracle_Thin_Driver_Issue
    We are porting our code to Oracle Application Server 10.1.3.1.0 that uses the latest JDBC Implemation Code ( The Manifest FIle lists the version as Oracle JDBC Driver version - 10.1.0.5.0 ).
    Can you please tell me if We may have a serious impact is using Oracle SQL API instead of the WebLogic BLOB Implementation ?
    Regards,
    Sandeep

    As mentionned in the link, this issue is fixed in 9.2 and 10g driver.
    Kuassi

  • Anyone knows simple, easy to use, design apps for iPad ?

    I am now using "numbers" for my iPad, it is easy to learn, use and very useful also cheap price. I love it.
    Now I need design apps for making simple  lay out of a 5 storey building.
    Auto cad maybe too complicated.
    Can anyone tell me what good design apps for iPads but as ease of use as the "numbers" ? Thx.

    Here is their list of compatible apps and I do not see ibooks on it.
    http://airturn.com/ipad-apps/apps/ipad-apps

  • [svn:bz-4.0.0_fixes] 20651: Some MBean tests needed flex.management. jmx stuff in the allow classes list for the class deserialization validator so adding it in on BlazeDS 4 .0.0_fixes.

    Revision: 20651
    Revision: 20651
    Author:   [email protected]
    Date:     2011-03-07 12:21:11 -0800 (Mon, 07 Mar 2011)
    Log Message:
    Some MBean tests needed flex.management.jmx stuff in the allow classes list for the class deserialization validator so adding it in on BlazeDS 4.0.0_fixes.
    Modified Paths:
        blazeds/branches/4.0.0_fixes/qa/apps/qa-regress/WEB-INF/flex/services-config.mods.validat ors.xml

    Thank you very much!
    I cant believe this little comment has been so helpful!
    But yes it is:
    I explain, despite my efforts to find, googled it, forums, faqs, etc...
    no where it mentionned the manifest.fm file is... INSIDE the .jar!
    Your comment "a zip" made me attempt to open it with winrar, and I found a manifest.fm file inside!
    So far I was editing the one at the "source" of my project and rebuilding it with netbeans.
    I am going to try that now.
    Actually.... :( no its mentionning my main class!
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.0
    Created-By: 10.0-b19 (Sun Microsystems Inc.)
    Main-class: courseworkjava3d.Simple3D
    Class-Path:
    X-COMMENT: Main-Class will be added automatically by buildWell I have no problems uploading you the .jar, it is for a coursework it is not a private project or whatever:
    http://www.uploading.com/files/CM2LKWYU/BetaCourseworkJava3d_Final.jar.html
    Oh and I felt on your comment "dont ask us" as if I was suppose to know... i'm a beginner, I did not know that! And I tried to give you so many infos so you dont lose your time if you want to help, especially as after my own research I found many, many results for this "main class" and I tried a few solutions!
    Edited by: CupofTea on Apr 13, 2008 3:28 AM

  • [svn:bz-trunk] 20650: Some MBean tests needed flex.management. jmx stuff in the allow classes list for the class deserialization validator so adding it in on BlazeDS trunk .

    Revision: 20650
    Revision: 20650
    Author:   [email protected]
    Date:     2011-03-07 12:20:03 -0800 (Mon, 07 Mar 2011)
    Log Message:
    Some MBean tests needed flex.management.jmx stuff in the allow classes list for the class deserialization validator so adding it in on BlazeDS trunk.
    Modified Paths:
        blazeds/trunk/qa/apps/qa-regress/WEB-INF/flex/services-config.mods.validators.xml

    Thank you very much!
    I cant believe this little comment has been so helpful!
    But yes it is:
    I explain, despite my efforts to find, googled it, forums, faqs, etc...
    no where it mentionned the manifest.fm file is... INSIDE the .jar!
    Your comment "a zip" made me attempt to open it with winrar, and I found a manifest.fm file inside!
    So far I was editing the one at the "source" of my project and rebuilding it with netbeans.
    I am going to try that now.
    Actually.... :( no its mentionning my main class!
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.0
    Created-By: 10.0-b19 (Sun Microsystems Inc.)
    Main-class: courseworkjava3d.Simple3D
    Class-Path:
    X-COMMENT: Main-Class will be added automatically by buildWell I have no problems uploading you the .jar, it is for a coursework it is not a private project or whatever:
    http://www.uploading.com/files/CM2LKWYU/BetaCourseworkJava3d_Final.jar.html
    Oh and I felt on your comment "dont ask us" as if I was suppose to know... i'm a beginner, I did not know that! And I tried to give you so many infos so you dont lose your time if you want to help, especially as after my own research I found many, many results for this "main class" and I tried a few solutions!
    Edited by: CupofTea on Apr 13, 2008 3:28 AM

Maybe you are looking for

  • Creating Multiple Resource Objects for OOTB Connectors

    All, I am trying to create a second AD User resource object for the OOTB connector. I would like to think that the AD Connector (and all connectors, for that matter) was designed to handle the creation of multiple Resource Objects for the same Resour

  • RTFEditorKit: Incorrect handling of characters with caron (bug?)

    Hi, some characters with carons are handled incorrectly when converting rtf to plain text. e.g. řčě are converted to øèì. š is handled correctly. I'm using this sample code: import org.apache.commons.io.FileUtils; import javax.swing.text.DefaultStyle

  • Is there a way to safely delete a backup session from Time Machine?

    I'm trying to free up internal hard drive space and need to remove old photos from internal HD that have been backed up. I hadn't renamed or keyworded many photos yet and want to remove that backup session and replace with newly updated versions. Tha

  • Renting a movie

    I rented a movie on my iMac (Lion Mountain) from iTunes(last version) the movie "Die Hard: A good day to die" on SD, when downloaded on my iMac, couldn't find it on my AppleTV(last version hardware and software), help !

  • APE  crashes after welcome screen

    My Adobe Premiere Elements 12 crashes as soon as I try to open a new project.  Here is the error message. Unhandled exception at 0x08A98B6 (dvacore.dll) in Adobe Premiere Elements.exe 0xC00000FD: Stack overflow (parameters: 0x00000001, 0x16C83FE0).