You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Jeff Pierce <ha...@gmail.com> on 2010/04/05 22:24:39 UTC

Renaming a folder using API

Is it possible to rename a folder using the Jetspeed API? I have looked at
the PageManager and Folder classes and didn't see anything.  I not only want
the short title and title to get updated but the actual physical folder name
on the disk (or in the DB if you are configured that way, which we are not).


Is there a recommended way to do such an action?  I am considering doing a
deep copy and then deleting the original folder structure if there isn't any
direct support.

I did see in the minimal JS install for JS 2.2.0 there is a Change folder
name action in the Page/Folder Customizer.  However, I did see some odd
behavior when trying to use it.  It seems the "commits" to my name changes
were 1 behind.  I made a change, didn't see any differences.  Then I made
another change and saw the change appear from try 1.  Made another change
(try 3) and saw the change from try 2 show up.  The PSML files on disk
seemed to contain the correct, last changed information, but the interface
was not showing the correct information.  It was not until I logged out and
restarted my server that the changes displayed in the interface "caught up"
with the changes I had made using the interface and what was actually stored
in the PSML files.  The physical names on disk never changed.

We are using Jetspeed 2.2.0.

Let me know if I am headed in the wrong direction here!
Thanks.

Re: Renaming a folder using API

Posted by Randy Watler <wa...@wispertel.net>.
Jeff,

One should use the deep copy/delete to rename a folder: this is what the 
Portal Site Manager administration portlet does.

As I noted in the JIRA issue, (JS2-1174), the customizer operations do 
not change the name of the page or folder, only the displayed title or 
short title. The updating issue appears to behave significantly better 
in 2.2.1 trunk, (to be released soon).

Randy

Randy Watler wrote:
> Jeff,
>
> The rename operation, (changing a folder/page name attribute), may 
> indeed have issues, especially in the file based PSML PageManager. 
> Please file a JIRA issue ASAP since we are in the process of 
> finalizing the 2.2.1 release.
>
> In the interim, a more commonly used operation that should work in all 
> cases would be a deep copy and delete. Can you verify whether that is 
> a possible workaround in your case?
>
> Randy
>
> Jeff Pierce wrote:
>> Is it possible to rename a folder using the Jetspeed API? I have 
>> looked at
>> the PageManager and Folder classes and didn't see anything.  I not 
>> only want
>> the short title and title to get updated but the actual physical 
>> folder name
>> on the disk (or in the DB if you are configured that way, which we 
>> are not).
>>
>>
>> Is there a recommended way to do such an action?  I am considering 
>> doing a
>> deep copy and then deleting the original folder structure if there 
>> isn't any
>> direct support.
>>
>> I did see in the minimal JS install for JS 2.2.0 there is a Change 
>> folder
>> name action in the Page/Folder Customizer.  However, I did see some odd
>> behavior when trying to use it.  It seems the "commits" to my name 
>> changes
>> were 1 behind.  I made a change, didn't see any differences.  Then I 
>> made
>> another change and saw the change appear from try 1.  Made another 
>> change
>> (try 3) and saw the change from try 2 show up.  The PSML files on disk
>> seemed to contain the correct, last changed information, but the 
>> interface
>> was not showing the correct information.  It was not until I logged 
>> out and
>> restarted my server that the changes displayed in the interface 
>> "caught up"
>> with the changes I had made using the interface and what was actually 
>> stored
>> in the PSML files.  The physical names on disk never changed.
>>
>> We are using Jetspeed 2.2.0.
>>
>> Let me know if I am headed in the wrong direction here!
>> Thanks.
>>
>>   
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Renaming a folder using API

Posted by Randy Watler <wa...@wispertel.net>.
Jeff,

The rename operation, (changing a folder/page name attribute), may 
indeed have issues, especially in the file based PSML PageManager. 
Please file a JIRA issue ASAP since we are in the process of finalizing 
the 2.2.1 release.

In the interim, a more commonly used operation that should work in all 
cases would be a deep copy and delete. Can you verify whether that is a 
possible workaround in your case?

Randy

Jeff Pierce wrote:
> Is it possible to rename a folder using the Jetspeed API? I have looked at
> the PageManager and Folder classes and didn't see anything.  I not only want
> the short title and title to get updated but the actual physical folder name
> on the disk (or in the DB if you are configured that way, which we are not).
>
>
> Is there a recommended way to do such an action?  I am considering doing a
> deep copy and then deleting the original folder structure if there isn't any
> direct support.
>
> I did see in the minimal JS install for JS 2.2.0 there is a Change folder
> name action in the Page/Folder Customizer.  However, I did see some odd
> behavior when trying to use it.  It seems the "commits" to my name changes
> were 1 behind.  I made a change, didn't see any differences.  Then I made
> another change and saw the change appear from try 1.  Made another change
> (try 3) and saw the change from try 2 show up.  The PSML files on disk
> seemed to contain the correct, last changed information, but the interface
> was not showing the correct information.  It was not until I logged out and
> restarted my server that the changes displayed in the interface "caught up"
> with the changes I had made using the interface and what was actually stored
> in the PSML files.  The physical names on disk never changed.
>
> We are using Jetspeed 2.2.0.
>
> Let me know if I am headed in the wrong direction here!
> Thanks.
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org