Shallow copying and Deep copying ???

hi,
what is meant by shallow copying and deep copying in context to clone() method found in Object class?
thanks,
swapnaja

swapnaja wrote:
Shallow copying: only cloneable object is copied but any object references within that object would not be copied but would rather be shared.
Deep copying: cloneable object along with any object references contained within that object will also be copied.
Am i right?Yep; when you want to make a deep copy you have to watch out for circular references, i.e. if you have made a copy of an object already you shouldn't make another one during the deep copying process; (see how the ObjectOutputStream does things).
kind regards,
Jos

Similar Messages

  • Passing collection or array to function: shallow copy or not?

    Hello all,
    When passing a collection or an array to a function, what is most used practice to store the given collection in some class member field: reference-copy or a shallow copy?
    I believe it's frustrating to see that there is no real 'standard' about this: some developers copy the whole collection/array, others prefer to simply copy the reference. I tend to agree with the latter group:
    - it's the user's responsibility if he wants the class to use a copied version instead of the 'original' version of the collection/array.
    - most of the times, a copy is not needed, and therefor a shallow copy is pure waste of resources.
    - when nothing is known about the given collection, and there are also no restrictions on the collection to be given, it could be everything: ArrayList? HashSet? SortedSet? AnUnknownImplementation?
    reference copy:
    class ComeClass
        private ArrayList list;
        public SomeClass(ArrayList list) { this.list = list; }
    }shallow copy:
    class ComeClass
        private List list;
        public SomeClass(List list) { this.list = new ArrayList(list); }
    }What are your thoughts about this?

    basically, it's how much access you want to provides.
    public SomeClass(ArrayList list) { this.list = list; }to me, if some other class has a reference to the list object and start modifying it..Someclass internal data (the list) is also modified...thus breaking encapsulation.
    yes, in multithread enviroment, sharing the list(by reference can lead to some hard bug to debug), so it;s much safer to copy (clone) the list. Java does this and provides you the MultiCaster class to make thing easier for you.
    even with synchronization, there are issues you have to look at (such as deadlock)..you can synchronize the list, but can still run into a dead lock
    list is synchronized in class A
    class B have object (that's in list and call the list (wait due to class A synchronization)
    list tries to invoke method of class B, but wait (class B is lock)..thus..deadlock.
    it's a crued exapmle..but i think you get the point.
    the saying is that to make a safer application..declare all you object immutable or restrict access to your private data. Of course, performance wise, we have to comprise sometime.
    example..a list with over 500,000 objects..you might not want to to clone the reference.

  • Is it OK to use clone when you only need shallow copy?

    I created copy contructors for all of my libraries classes because I was afraid of using the clone() method.
    However, my copy constructors create shallow copies of the objects - which is probably the same as using clone().
    Before I go deleting all the copy constructors from all of my classes...
    Is there any reason not to use clone() in this case? Are there any gotchas with clone() when it comes to just a simple shallow copy (perhaps with simple arrays, simple object arrays, or collections) ?
    Thanks

    Another thing worth mentioning is that if you really need to have more control of the clone process, then just over-ride the clone method. In most cases the default Object.clone() method should be enough. BTW don't forget to use the Clonable interface for your class.
    The whole notion of a copy constructor is much more a C++ thing.

  • How can i print deep black and deep white without any other pale grey color being printed

    i want to print deep back and deep white
    how can i edit the whole pdf to that kind
    like this
    if i print the grey normal way it looks like this

    Hey sinfulslave,
    Could you please let me know what version of Acrobat are you using.
    For Acrobat XI, you might choose 'Advanced' under Printer Properties and enable 'Print all Text as Black' option.
    Refer the below mentioned KB doc link as well if that might help:
    Print in black and white | Acrobat, Reader
    Let me know.
    Regards,
    Anubha

  • Diimensional design (long and deep!)

    Hi, could I have some comments here please, on best practice, and the one that is being proposed? I need a sanity check, please!!!
    Consider this situation: there are two input files . . .
    FILE1 contains
    LEVEL1ID number
    LEVEL1DESC varchar2
    FILE2 contains
    LEVEL2ID number
    LEVEL2DESC varchar2
    So, I want to create a dimension object in OWB, and at the Table level, it will look like
    CREATE TABLE "DIM_2LEVELS" (
    "L1_LEVEL1DESC" VARCHAR2(1),
    "L1_LEVEL1ID" NUMBER, ..... (from FILE1 and renamed from 'ID' in OWB)
    "L2_INTERNAL_END_DATE" NUMBER, ... (populated with NULL or some arbitrary high value)
    "L2_INTERNAL_KEY" NUMBER, .......(populated from a SEQUENCE)
    "L2_INTERNAL_START_DATE" DATE, ... (populated with SYSDATE from a CONSTANT)
    "L2_LEVEL2DESC" VARCHAR2(1),
    "L2_LEVEL2ID" NUMBER) ..... (from FILE2 and renamed from 'ID' in OWB)
    (1). Is everyone in agreement with me that this is how it will look?
    (2). And this for the Dimension object itself?
    CREATE DIMENSION "DIM_2LEVELS"
    LEVEL "LEVEL1" IS "DIM_2LEVELS"."L1_LEVEL1ID"
    LEVEL "LEVEL2" IS "DIM_2LEVELS"."L2_INTERNAL_KEY"
    HIERARCHY "HIER1"("LEVEL2" CHILD OF "LEVEL1" )
    ATTRIBUTE "LEVEL1" DETERMINES ("L1_LEVEL1DESC" )
    ATTRIBUTE "LEVEL2" DETERMINES ("L2_INTERNAL_END_DATE","L2_INTERNAL_START_DATE","L2_LEVEL2DESC","L2_LEVEL2ID" );
    (3). Is this or is this not bog standard OWB so far? (Please check me every step of the way here).
    Next, I go to Editor, Table Properties, Constraints Tab, and I change the UK of INTERNAL_KEY to a PK, and add a UK on LEVEL2ID (the Natural Key), giving these two SQL scripts:
    ALTER TABLE "DIM_2LEVELS" ADD CONSTRAINT "LEVEL2_NK" UNIQUE("L2_LEVEL2ID");
    ALTER TABLE "DIM_2LEVELS" ADD NSTRAINT "DIM12_LEVEL2_UK" PRIMARY KEY("L2_INTERNAL_KEY");
    (4). Am I still OK, so far?
    So, the implication is that at the lowest level of the hierarchy, this line drives the dimensional structure:
    LEVEL "LEVEL2" IS "DIM_2LEVELS"."L2_INTERNAL_KEY"
    The important point here is the "LEVEL2 IS . . . L2_INTERNAL_KEY". Please focus on this point.
    Now,as I understand it, the purpose of the dimensional object is to aid in OLAP. The team where I am now working has seized on this point and feels that there must be a DIMENSION object (level) where there is something like "LEVEL2 IS . . . L2_LEVEL2ID'.
    (5). So, the intent is to have a new policy whereby new lowest levels will be created in all dimension hierarchies, as follows:
    * The lowest level in the hierarchy will be the surrogate key
    * This is signified by a key symbol against the surrogate key ID in this level
    * The surrogate key is the primary key and is distinct
    * The data items associated with the surrogate key will become attributes in this level (typically control data)
    * So the lowest level will only contain the surrogate key ID, dh_create_date, dh_update_date, SQ_Start_Date, SQ_End_Date
    * The name of the surrogate key level is the same as the overall dimension name
    * The next lowest level in the hierarchy is the natural key
    * The natural key will have many surrogate keys (as the hierarchy changes over time)
    * The data items associated with the natural key will become attributes in this level (typically descriptive or related business data)
    This will also mean that the lowest level of the dimensional hierarchy will now explicitly correspond to a Start/End 'slice' of the fact table.
    (6). What I have described in (1) to (4) is the way I have always handled building dimensions. To select the appropriate facts, I have constrained the join by adding start/end dates to the join selection parameters. The lowest level of the hierarchy is the lowest level that makes sense as an individual business 'thing', rather than as a data warehouse 'slice-in-time' of a slowly changing business 'thing'. To put it another way, the (1) to (4) method has at it's lowest level a business 'thing' (e.g. a customer) and selection on that (say) customer's natural key reveals all facts for that customer. (5) will do the same, but I feel that this is not what dimensions were intended to do.
    So my ultimate question becomes . . . what actually are dimensions and the DIMENSION object intended to achieve? It is to support OLAP? After re-reading the OWB Users, Guide, the Data Warehousing Guide, and the OLAP manual, I cannot see where the 'LEVEL . . . IS' has any concrete value. Is it perhaps for Express? Ooops! Analytical Workspaces and CWM2?
    As I said, there are two parts to this topic.
    The first part is on best practices. I have described how I build Dimensions. Would others agree with me on this, or do you have a better way? In particular, would you add this additional 'basement' level to dimensional hierarchies?
    The second part is around object representation, the designer's intent, and the repercussions on warehouse use in terms of business intelligence capabilities. My view has always been to represent Dimensions from the Business viewpoint - if a level makes sense from that viewpoint, it goes in. If it does not, then there is no place for it. When using summary tools like MVs, or BI tools like Discoverer or Business Objects, there have been no problems. Would there be if I were using AWM?
    Looking forward to your deep thoughts!
    Best,
    Donna

    Good afternoon Donna,
    Have looked at this post a number of times, it surely is long and deep. I don't have any experience in using Oracle OLAP so I won't elaborate very much in that respect; neither have I actually looked at all code generated by OWB, especially dimensions. But since this thread is not getting started while the topic is certainly interesting, I'll give my few cents worth to maybe trigger the long and deep conversation you're looking for ;-)
    @1 looks like what OWB generates for a dimension (the table bit)
    @2 haven't really looked at that code before but looks valid
    @3 indeed, looks like standard OWB
    @4 that's also how I do it, the lowest level UK is the only physical one, and I add a UK on the natural key
    @5 The reasoning for level-separation of SK and NK is the SCD nature of the dimension, yes? Why is that necessary? Strictly speaking the NK in combination with startdate will be unique, and both (in my opinion) are lowest level attributes. I don't see the necessity of creating separate levels, as far as I can see there's not really a hierarchy between those levels.
    @6 a dimension to me is a table with an 'inbuilt' hierarchy; when used to generate a business area for Oracle Discoverer it creates hierarchies from that information. I guess it supports OLAP in a similar fashion (dimensions and cubes can be exported to generate an OLAP-cube).
    Regards, Patrick
    ps This is making me realise that in an SCD the natural key is going to occur more than once as soon as a record gets "SCD'd";
    I better check my UK-naturalkey-definition, I might need to add 'startdate' to the natural key

  • Difference between Safe and Deep Sleep?

    Hello everyone!
    I recently added the Deep Sleep widget for times when I want to force my laptop to hibernate with some battery left and not completely shut it down, but recently it's just been going into hibernation mode when I leave my laptop alone for a few minutes. I clicked on the "info" button in the corner of the widget and discovered the reason: the "Regular Sleep Mode" was set to "deep".
    I know quick sleep is the normal "pulsing/breathing" sleep function, but what's the difference between "Safe Sleep" and "Deep Sleep"?

    http://support.apple.com/kb/HT1757
    Deep Sleep is the equivalent of Windows hibernation.  The state of the machine is written to the hard disk and the power is turned off.
    Safe Sleep is the first part of Deep Sleep.  Before the MBP goes into regular sleep the state of the machine is written to the hard disk.  That's why it takes a while for the indicator to begin pulsing.  If the battery dies while in regular sleep nothing is lost because of the write to the hard disk.  Regular sleep becomes Deep sleep if the battery dies.

  • Shallow vs. Deep Clone... Getting in Deep

    I have created a custom "Node" class to be used in my JTrees. The class is called "KataNode" ... cuz my name is "K"urt .. they represent "Data" and the class extends DefaultMutableTree"Node" ... clever name huh? Anyway, I would like to create clones or copies of some selected nodes ... which may or may not have children in the JTree (also KataNodes), to be moved elsewhere ... like into another tree... without messing up the "original nodes". The documentation for Object.clone() in the Object class, states that the method that I am actually calling... ...(meaning the one that was overwritten by DefaultMutableTreeNode)... is actually going to only provide me with a shallow clone .. hence the resulting cloned node "on the surface" is actually a good copy ... but its underlying children refrences remain pointing to ... NOT new clones .. but the original children nodes of the "original parent". In other words... I am attaining a "shallow" clone (as noted via the documntation in the Object class) Thus my plan is: (.. and please comment / criticize it)Create some sort of recursive clone method to create "Deep" clones of my custom Nodes ... with refrences to children clones as well.
    However .. upon further inspection of the documentation for the Object.clone() method, it suggests an interface "Cloneable" ... however this interface has no method declairations in it. Thus my first question is: Does "implementing Cloneable" simply mean that you overwrite the "clone()" method? ... and if that is the case .. then can I correctly assume that any class that "implements Cloneable" will handle making either a "shallow" or "deep" ... or even "semi-shallow" clone, respective to the class context .. right?
    My last question is: What is the"depth" of the DefaultMutableTreeNode.clone() method? The documentation states only "primitives fields" and "immutable object references" are granted new instances during a clone() call. What about things like ... elements of a Vector .. for instance? ...which my KataNode class maintains ... would I need to clone those as well? My guess is yes, I would need to copy that manually for a successful "deep" clone. I would like to verify that answer with a second opinion .. if I could.
    If that didn't make sense .. please let me know and I'll reword it. But for now .. any thoughts, comments, suggestions etc. on the topic are greatly encouraged.
    Thanks in advance ... Kurt

    This is the JNI forum. I don't believe your post fits.
    then
    can I correctly assume that any class that
    "implements Cloneable" will handle making either a
    "shallow" or "deep" ... or even "semi-shallow" clone,
    respective to the class context .. right?
    It probably does something. The implementor might not have implemented anything though. And you have no idea what they implemented.
    No idea about your other question.
    You might want to think carefully about why you are cloning though.

  • "Next Steps" and "Deep Cuts" tabs not displaying in iTunes Essentials

    New problem for a long-time iTunes user here. On every iTunes Essentials set that I view, only the "The Basics" tab is working. When I click on the "Next Steps" or "Deep Cuts" or "Complete Set" tabs, they change from gray/blue to white but the list of songs does not change. It's still showing the "The Basics" list. When I view the same Essentials list on the web version of iTunes Store, they work fine.
    In my screencap below, we are looking at the iTunes Essentials for Alex Chilton. Note the header "The Basics" above the text. But "Deep Cuts" is the selected tab. "September Gurls" and "The Letter" are definitely not "Deep Cuts." Those are his biggets hits.

    I'm having the same problem and appreciate the workaround, but this is clearly a bug of some sort.  If it matters, I'm running iTunes 10.7 on Windows 7.  Glad to see that I'm not the only one.

  • External authentication and deep linking

    Can someone explain deep linking to me? All of the information I can find on this seems to come from a time before session info was required in the links. How do I link into an APEX app when I don't know the session info? This app has an "automatic" login based on the headers that are tacked on by the security proxy that handles logins.
    I have a custom page sentry; my Apex app is only accessible via a security proxy that sets a username in the header. So, if you can get to my app, you're authenticated. My page sentry then just checks if that authenticated user is in it's user table, inserts if not, and then sets some application items with some info from the user table. I just modified the mod_nmlt example to do this (and I have noooooo idea what some of that example is doing, so I left it alone as much as possible).
    I can make a link that has a recent sessionid in it, and then a new sessionid gets generated and it works as I hope, but otherwise I get "null sessionid" or "page not found" errors, depending on what I try to stick in for bogus sessionid.
    Here's my page sentry:
    create or replace FUNCTION Custom_Page_Sentry_Func (p_htmldb_user VARCHAR2 DEFAULT 'APEX_PUBLIC_USER' )RETURN BOOLEAN AS
    l_authenticated_username VARCHAR2(256) := nvl(UPPER(OWA_UTIL.GET_CGI_ENV('HTTP_IV_USER')),'NOT_AF_AUTH');
    IS_USER NUMBER := 0;
    L_CURRENT_SID NUMBER;
    v_userid NUMBER;
    v_user_baseid NUMBER;
    v_user_basename VARCHAR2(4000);
    BEGIN
    --The server is behind the login system, so if the ApEx pages are shown, the login has succeeded (and we will find the cookie)
    -- If logged in user is not a app user (doesn't exists in USERS table)
    -- THEN insert into app user table
    SELECT COUNT(*)
    INTO IS_USER
    FROM USERS
    WHERE UPPER(USERNAME) = l_authenticated_username ;
    IF IS_USER = 0 THEN
    INSERT INTO USERS (USERNAME,USERSTUFF) VALUES (l_authenticated_username,'111111111');
    END IF;
    apex_application.g_user := l_authenticated_username;
    SELECT USERID, BASEID, BASENAME INTO v_userid, v_user_baseid, v_user_basename FROM USERS
    LEFT OUTER JOIN CONTACT_PROFILES USING (USERID)
    LEFT OUTER JOIN BASES USING (BASEID)
    WHERE upper(USERNAME) = l_authenticated_username;
    apex_util.set_session_state('F105_USERID', v_userid);
    apex_util.set_session_state('F105_USER_BASEID', v_user_baseid);
    apex_util.set_session_state('F105_USER_BASENAME', v_user_basename);
    L_CURRENT_SID := WWV_FLOW_CUSTOM_AUTH_STD.GET_SESSION_ID_FROM_COOKIE;
    IF WWV_FLOW_CUSTOM_AUTH_STD.IS_SESSION_VALID THEN
    -- session is valid
    WWV_FLOW.G_INSTANCE := L_CURRENT_SID;
    IF l_authenticated_username = WWV_FLOW_CUSTOM_AUTH_STD.GET_USERNAME THEN
    WWV_FLOW_CUSTOM_AUTH.DEFINE_USER_SESSION(P_USER => l_authenticated_username ,
    P_SESSION_ID => L_CURRENT_SID);
    RETURN TRUE;
    ELSE
    -- username mismatch. Unset the session cookie and redirect back here to take other branch
    WWV_FLOW_CUSTOM_AUTH_STD.LOGOUT(P_THIS_FLOW => V('APP_ID'),
    P_NEXT_FLOW_PAGE_SESS => V('APP_ID') || ':' ||
    NVL(V('APP_PAGE_ID'),
    0) || ':' ||
    L_CURRENT_SID);
    WWV_FLOW.G_UNRECOVERABLE_ERROR := TRUE; -- tell htmldb engine to quit
    RETURN FALSE;
    END IF;
    ELSE
    -- application session cookie not valid; we need a new htmldb session
    WWV_FLOW_CUSTOM_AUTH.DEFINE_USER_SESSION(P_USER => l_authenticated_username ,
    P_SESSION_ID => WWV_FLOW_CUSTOM_AUTH.GET_NEXT_SESSION_ID);
    WWV_FLOW.G_UNRECOVERABLE_ERROR := TRUE; -- tell htmldb engine to quit
    IF OWA_UTIL.GET_CGI_ENV('REQUEST_METHOD') = 'GET' THEN
    WWV_FLOW_CUSTOM_AUTH.REMEMBER_DEEP_LINK(P_URL => 'f?'
    || WWV_FLOW_UTILITIES.URL_DECODE2(OWA_UTIL.GET_CGI_ENV('QUERY_STRING')));
    ELSE
    WWV_FLOW_CUSTOM_AUTH.REMEMBER_DEEP_LINK(P_URL => 'f?p=' ||
    TO_CHAR(WWV_FLOW.G_FLOW_ID) || ':' ||
    TO_CHAR(NVL(WWV_FLOW.G_FLOW_STEP_ID,
    0)) || ':' ||
    TO_CHAR(WWV_FLOW.G_INSTANCE));
    END IF;
    WWV_FLOW_CUSTOM_AUTH_STD.POST_LOGIN( -- register session in apex sessions table, set cookie, redirect back
    P_UNAME => l_authenticated_username ,
    P_FLOW_PAGE => WWV_FLOW.G_FLOW_ID || ':' ||
    NVL(WWV_FLOW.G_FLOW_STEP_ID,
    0));
    RETURN FALSE;
    END IF;
    --RETURN TRUE;
    END Custom_Page_Sentry_Func;

    Great, maybe I'm just composing links wrong? So, if I use a link like so:
    https://www.my.host.com/pls/apex/f?p=105:1
    I get:
    ORA-01400: cannot insert NULL into ("FLOWS_030000"."WWV_FLOW_DATA"."FLOW_INSTANCE")
    ERR-1029 Unable to store session info. session= item=2217309821144750
    But, if I use a link like so:
    https://www.my.host.com/pls/apex/f?p=105:1:1529940631702824
    (where that sessionID is one that was recently used)
    Then I get redirected to the page with a new sessionid, like so:
    https://www.my.host.com/pls/apex/f?p=105:1:1992194699278121
    But, if I use a link like so:
    https://www.my.host.com/pls/apex/f?p=105:1:1111111111111111
    (just trying to use a generic bogus sessionid, to hardcode in my link)
    Then I get an http404-file not found (The page cannot be found) error.
    Am I doing something wrong?

  • Anyone have ios7 freezing and deep sleep?

    Last week I noticed my iPhone draining power fast and saw a genius who said he saw software crashing and wiped it clean and instructed me to set it up as a new iPhone. Today I installed iOS 7 and besides power draining fast, it froze when imputing the password, became unresponsive and went into deep sleep. It would not turn on until a period of time. It did the same thing again so I turned off the password and made an appointment to see a genius tomorrow.
    Anyone have this problem with a 4s?

    Thanks for the help however i i tried to connect my phone to itunes via my mac. It automatically backed up my iphone aftere wich i restored it,  it restored it with the same ios. Perhaps i did not follow your recommendations correctly.
    currently my phone is frozen again and not resetting. When i plugged it in to my laptop it says my phone is currently in recovery mode the option provided is to restore it to factory settings with the latest apple software, which i assume include ios 7.0.6.
    please help i dont  know if that will make things better. Can i fix this myself or should i return to where i got the phone for a fix or exchange

  • Deep and Shallow array copy  again

    I am a Computer Analyst and a Java tutor.
    I am trying to understand the terms Shallow and Deep copy
    for arrays, using an example.
    Can you please tell me if my shallow and deep copy below is correct?
    Does the shallow copy not need any memory allocation?
    public Security( int paramAccountNumbers[], String paramPasswords[] ){
    String passwords[];
    int accountNumbers[];
    // INT ARRAY SHALLOW COPY
    accountNumbers = paramAccountNumbers;
    // STRING ARRAY DEEP COPY
    passwords = new String[paramPasswords.length];
    for( int i=0; i<paramPasswords.length; i++ ){
    passwords[i] = paramPasswords;

    You should use clone to copy arrays that contain only references to immutable objects or primitives.
    // "shallow" copy
    final String[] orig = new String[] {"a", "b", "c"};       
    final String[] copy = orig.clone();
    // or java 6 "shallow" copy
    final String[] orig = new String[] {"a", "b", "c"}; 
    final String[] copy = Arrays.copyOf(orig, orig.length, String[].class);If the array contains references to mutable objects you need to clone each element in the array
    // "deep" copy
    final Date[] orig = new Date[] {new Date()};
    final Date[] copy = new Date[orig.length];       
    for (int i = 0; i < orig.length; i++) copy[i] = (Date) orig.clone();However even this may not be sufficient in some cases, which is why cloning is a bit of a minefield.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Deep and Shallow array copy

    Can someone please give me a simple example of
    1- int array shallow copy
    2- string array deep copy
    Thank you

    Google on the key words in your post and you'll find mucho información in the first couple of hits.

  • Shadow copy vs deep copy

    hi,
    any body tell me what is the difference between shadow copy and deep copy of a object.

    would you tell me any prectical example of this. i
    mean when i should use shallow copy and when i should
    use deep copy of object.I'm hoping someone else will step in here, because in my OO thinking, there's seldom a need for copying an object at all.
    One practical example, though: Say you're copying a list of objects. After the copy, you want to alter the objects in the copied list, but you don't want the objects in the original list altered. In this case, you need a deep copy. Had you only done a shallow copy, both lists would have referred to the same objects, and therefore, any change in an object would be visible through both lists.
    clone() method makes shallow copy or deep copy.You'd have to consult the doc for the class you are cloning. For example, the doc for LinkedList.clone() says "Returns a shallow copy of this LinkedList."

  • Deep copy a PriorityQueue

    Dear all,
    I am struggle with deep copying a priorityQueue. Anybody has a clue about his. It seems onyl swallow copy is allowed.
    Cheers,
    Ke

    See
    http://java.sun.com/docs/books/tutorial/java/IandI/objectclass.html
    http://www.google.com/search?num=100&hl=en&c2coff=1&q=java+deep+shallow+copy&btnG=Search

  • Copying folders as a custom component

    Hi,
    I've a customer requirement to copy the folders, child folders and their content to another folder at a user's discretion. Looking to do this as a custom component I'm assuming that I would need to create a component using service classes vs. a java filter...Any thoughts, pointers would be most appreciated.
    Thanks.

    I would be very careful with this sort of component.
    It is easily achieved but the results can be catastrophic.
    Imagine a user copies a folder near the root with 10,000 child folders and 100,000 content items. What is the customers actual requirement - perhaps there is an alternative way to solve this (Windows Explorer Integration).
    Anyhow if you do want to do it...
    So perhaps consider restricting the functionality to a shallow copy not a deep copy (i.e. only copy content and direct child folders not grandchildren etc.)
    Consider using links/shortcuts to content items instead of copying them (obviously this depends on what the customer really wants)
    I think you will need to create a service class as this action is not really a side effect on some other event (what filters are best used for) but an explicit request to copy the folders.
    Tim

Maybe you are looking for

  • Help on GR/IR GL Account Clearing

    Hi Experts, We are having problem with clearing GR/IR Account. Following is the scenario; PO -  Item 10 -  MXN 4700 (Amt in LC USD 3500) & Item 20 -  MXN 2300 (Amt in LC USD 175) Entries at GR  Debit GL (Exp)  - MXN 4700 (Amt in LC USD 3500) Credit 

  • Mm r/3_xi_srm

    Hi experts, i am extracting the PO msgs mm r/3_xi_srm and get the responce from srm to r/3.i have maintained the xi settings & rfc destinations & http destinations.before activating the objects in ID.i got the following errors.pls tell the solution o

  • Tutorial Error: Model binding context not initialized

    While examining the new JHeadstart Tutorial I got the following error when I try to start the application: Model binding context not initialized What does it mean?

  • Can I have Photoshop CC and Lightroom 5 on 2 computers? How do I do this?

    Currently I have Photoshop CS5 and Lightroom 4 on both my Mac Pro and my Macbook Pro. I also have Photoshop CC and Lightroom 5 on my Mac Pro. I now have an iMac and would like to have Photoshop CC and Lightroom 5 on it. Do I need to deactivate it fro

  • Home cable wireless network doesn't show up in available networks

    Hi, I've just arrived in a new apartment with an iBook G4. I travel a lot and am able to easily pick up and connect to wireless networks. The apartment I've moved into has Time Warner Cable service, including a cable modem and a Belkin wireless route