created branch incorrectly first time, moving from within 'trunk'

git-svn-id: https://svn.apache.org/repos/asf/portals/pluto/branches/1.1.0-ADMIN_PORTLET@482006 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/trunk/KEYS b/trunk/KEYS
deleted file mode 100644
index 29e456b..0000000
--- a/trunk/KEYS
+++ /dev/null
@@ -1,214 +0,0 @@
-(instructions copied from forrest's KEYS file)
-
-This file contains the PGP keys of various developers.
-Please don't use them for email unless you have to. Their main
-purpose is code signing.
-
-Users: pgp < KEYS
-Developers:
-        pgp -kxa <your name> and append it to this file.
-        (pgpk -ll <your name> && pgpk -xa <your name>) >> this file.
-        (gpg --list-sigs <your name>
-             && gpg --armor --export <your name>) >> this file.
-------------------------------------------------------------------------
-
-pub  1024D/E41EDC7E 2003-09-26 Carsten Ziegeler <cziegeler@apache.org>
-sig 3       E41EDC7E 2003-09-26   Carsten Ziegeler <cziegeler@apache.org>
-sig 3       EE56550E 2003-12-01   Cliff Schmidt <cliff@alum.mit.edu>
-sig 3       CC78C893 2003-11-18   Rich Bowen <rbowen@rcbowen.com>
-sig 3       EE65E321 2003-11-24   Martin Kraemer <martin@apache.org>
-sig         40581837 2003-11-27   Nick Kew <nick@webthing.com>
-sig 3       142B509B 2003-11-25   Glenn L. Nielsen (Sign jakarta.apache.org distributions) <glenn@apache.org>
-sig 3       CE19D5C6 2003-11-18   Jamie Wallingford (legobuff) <jamie@legobuff.com>
-sig 3       D147B776 2003-11-28   Mitch Comstock (RAID) <mcomstock@raidworks.com>
-sig 2       65FDCDEE 2003-11-20   James Howison <james@freelancepropaganda.com>
-sig         FD093C41 2003-11-23   James M. Turner <turner@blackbear.com>
-sig 2       A1D69759 2003-11-24   Michael Kellen <idsfa@visi.com>
-sig 2       76D83CC6 2003-11-22   Manoj Kasichainula <manoj@apache.org>
-sig 3       A54DA2DF 2003-11-18   Erin Mulder <meara@alumni.princeton.edu>
-sig         152924AF 2003-11-22   Sander Temme <sander@temme.net>
-sig         964F31D9 2003-11-22   [User id not found]
-sig         B6B45F1F 2003-11-19   Chengetai Masango <chengetai@masango.net>
-sig 2       4C9165B6 2003-11-18   Aaron Mulder <ammulder@alumni.princeton.edu>
-sig 3       F5FC4B42 2003-11-21   Theodore W. Leung <twl@sauria.com>
-sig 2       F88341D9 2003-11-30   Lars Eilebrecht <lars@eilebrecht.org>
-sig 3       A11D56FB 2003-12-03   Geoffrey Young (http://www.modperlcookbook.org/~geoff/) <geoff@modperlcookbook.org>
-sub  1024g/0F6ED732 2003-09-26
-sig         E41EDC7E 2003-09-26   Carsten Ziegeler <cziegeler@apache.org>
-
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.2.3 (MingW32)
-
-mQGiBD90V4MRBAC1lbNdQ9fvvooWXlFx9u/C3Vtsgc+ZsukqBRQRuSEBNZKQr3XC
-NmOy6rlLKan0brlr8L+6xmkQgJCgsNGnjqwIHRe8irMLEqK+uGhpoQ9z4zgc6JVl
-CLarZPvqe7GOifOKlheadWrkkRQMOuKjDF8Nuy10S4jaIEVMhPcorakbYwCgqXzA
-GD/327IVU2SEfL2ezVC1nc0D/Rj43bqn/GzB6pBUIaG2LNAfPtVfdmnqjKa/0PDF
-/hxyGN2Pb5BBlBAZe/ysNRNpGi+kVqGxweccugco6atDRv/INPVQ1dSKAoX/zuuE
-rMeTCaXYE45uBXYhvSsGM2iNJYcS/VW10ZW5RD3F5eWVSo50Xin4obmJmlfr8BTp
-VoxNBACjYrCo9f2MI30fxCgKu9ugyz/rFA7Zja/Hq18jyUWUA8oIQ6VonNvnEu80
-9jf1c23HtKQu+f4yHBDKR6RKsas5kCQDZJncQCn8PHRqSkLWRsAnl2e8fY72QnVI
-pSL7HZ4AnOAaO9sMONQMADq3q9muQofNQDS79IRAWXP7kDT5pbQnQ2Fyc3RlbiBa
-aWVnZWxlciA8Y3ppZWdlbGVyQGFwYWNoZS5vcmc+iF4EExECAB4FAj90V4MCGwMG
-CwkIBwMCAxUCAwMWAgECHgECF4AACgkQEy5J1OQe3H4aLwCdEP8ARIZxOvFITQ7I
-nee1qC85BbsAnjnKXQaUm1unAnNHwN7fNyZnnIuEiEYEExECAAYFAj/K5J0ACgkQ
-aFp3yu5WVQ43XwCfahn9RObiYcvqRFXPtze303XMRQIAoIvStwGIypv7YrjeS/70
-EpaQMPn5iEYEExECAAYFAj+6hk0ACgkQXP03+sx4yJOqUwCg17eCYJCnmzDw9GTe
-/BKGPZj12LYAoMnIahWcyIFLlLOP9ISlMKlr5EkWiJwEEwECAAYFAj/Cd1AACgkQ
-N+P0X+5l4yE+dQQArTUZsgHjZE1M9DRQhZQkU20/WzW4NVxWaYdW2/tIy/a293Zd
-RWG9QDe1VPT7KUoAT306N5HqM4TUjg2QjAyg6ou6J76yk62j1Hsj0RJskf0IMXiF
-NZICn7z+y6FsCI60flgpOKI11GZeAI6FLGppcsF5NCnAP9PKv20EQ07kUeqIRgQQ
-EQIABgUCP8YSFAAKCRBtC8c6QFgYN2IOAJ4lgeI6pvXBeEM13xq9WSplyS9z7gCc
-CO/dGO4i7M9rcDp9B79sy/Qpnk6IRgQTEQIABgUCP8OFGQAKCRD6PI0mFCtQm93V
-AKCMJi0mWq0PLehrhpGwJKrzdt6DSgCgiRqkfD1u4lj6rezjCxH9GR6b9HqIRgQT
-EQIABgUCP7mp+AAKCRCoHuZJzhnVxkHGAJ4moSSBBtV6ynXFk+k26ca1M5Lx5QCd
-G8MrlXJ5ThRD4ZecP79x5x8CmTeIRgQTEQIABgUCP8e9LgAKCRCkdA850Ue3dsVa
-AJ9h8CF7Tj68kwbzhY0/RjkA2pA94gCfQH1azsf2LYhOvObOrknpk1ZALOGIRgQS
-EQIABgUCP7xjvgAKCRDsmT1jZf3N7jUmAJ41pjcLgAkHvGnfv9jZYz4CqvrGfgCd
-ERE/EX2IX0bYOraPIcuhcHaHCQ2IRgQQEQIABgUCP8BjyAAKCRAaCdGD/Qk8QVAN
-AKCMesKnneWni3IardexYlkChRaLXACgtmgMT0KWnWAwk3zji3zkVgk72HqIRgQS
-EQIABgUCP8FOvQAKCRDMITAgodaXWbO0AKCPOmm3BjK/OrGzsu+04g6SfuV8fQCf
-b0SDGLgnslcqkzU02ZxT+hHWAbCJARwEEgECAAYFAj+/wxYACgkQBurPqnbYPMbJ
-ugf/X7I18RgC6uFsPXsCMQh/EQdDO3Cll8SnmCmNz08jlE89cDiHAgJZ6b7n+p+G
-v44DaO5Ofkb+iwtTHuFuvG50qY45X2/oyBJHllXlbxMEyjWfhny6hD84WYnM7PS2
-a6gww0+beCz77ESw6RdHgIFNvZnn0Ca58QLKixlKfNxqaqrR6EG6zUI9qdNX1XVc
-Wfu70EZfaZ0Kx5jTDz4h7TGw59oH+NBDRpGvU213NFyckbcGav11GgLBCwR6Iyzx
-nFTrowWXR2QXfX8akSFg6Oz1k818Pjwolr1l3JF5YAaDxwJ4qZo/ldHSF4/+fAmC
-JLJfRco6ndv8rFr6FV0+SVv5dIhGBBMRAgAGBQI/uaDwAAoJEBD6TIilTaLfcHoA
-oOl0OsrJQ1JAgtyCXTs0VxJAXshnAKDXdDvK0ZevnovRoZvMW6RYv0+STYhGBBAR
-AgAGBQI/v6F3AAoJELK+vEAVKSSvF/8AnjieEHBnFWQQNrZtknhXQeyzkS9eAJ9U
-I6CHLstOQAIQj6dgQIfXS6oaHohGBBARAgAGBQI/v6OIAAoJEMEee0eWTzHZlWIA
-oLPh3TMdnARqbnzFpHQV0BN1Y+53AKDm7WOQM+PUUOcXrlYw63CVC9QPP4hGBBAR
-AgAGBQI/u6D5AAoJEKRZJPC2tF8fWigAoMOg9N7DfgZCaMDH/uiZPeVDYLx1AKD4
-H4Cv3wOrBC9gsfOz8vPc+psGu4hGBBIRAgAGBQI/uc+fAAoJELkkUqxMkWW2D0oA
-nilUs/fdruISz7OcUHSYoFb5lxxpAJ0SbzM82p96RMGjtMtLWdDNm3AKz4hGBBMR
-AgAGBQI/vcjeAAoJEL66K4f1/EtCILwAn2x9+QkXNkfTt5LEHmJAXXzkr2aFAJ9l
-vz17ctX04GyH0E2p7lMU9qJvWoiZBBIBAgAGBQI/ym6tAAoJED6Pt/L4g0HZKPED
-51Q8rmnCha+FQi8+42sTbBjWSkYmsB/84mjddFlK40AfmKpXNnF5lpHCPBfdtuG7
-/r3mnQrT/T5PBlWA088zyQhzBTsCNObNQE/5cwoKv2sOuWMZ/HW5JFYJgfQoqb4b
-hTkSy7d0ncIW4Rq+heZc/E8xWmUpQH1CrFzvB2bsiEYEExECAAYFAj/N+agACgkQ
-CVpF3KEdVvtdTwCgtbh65s6vDfxmgVqxdkqsi3Nak20AmgM7hfMHhUcn+Y8PAyYv
-0OrVvODkuQENBD90V4QQBACNBis1jev/dbIOmVHw096OO2p/R0tuXSx2q0wfjRtE
-qkBOBz/Wdr0gCTJMMOWAYlKhM3ZPbs3bcrT8HXYK5GCpvWQj5SGe2E/Mreolvl+i
-1U4GGhZVVDQziZdImmSDsqCHPj4s5KWJhnkSrE3asWennYqLAEuv62SF/rOawEfr
-2wADBQP9EmVJEG9mDpwj4SZ0kFbBbbqc6t1ntRjx8PkW49znU0NOCM2lIaOM3leM
-8bm5zgbnD4kS7gDItOwzPaHepLrh7a7OVUTpf/HxUgtLAjazF445mjKk1/KQ7oU5
-SR5j3nJZwaI6wTBoI94fk/BBZtxZ4EcdgcJhQABI9LoKr+vTa2eISQQYEQIACQUC
-P3RXhAIbDAAKCRATLknU5B7cfgWMAJ9w/IX0FwxyOhwCveM1PDrVWxT4dQCfaG22
-PDGaBFWsUIyQDUGS56dkC0k=
-=4pJn
------END PGP PUBLIC KEY BLOCK-----
-
-pub  1024D/320B4FB4 2004-12-05 Nick Lothian (Apache) <nlothian@apache.org>
-sig 3       320B4FB4 2004-12-05   Nick Lothian (Apache) <nlothian@apache.org>
-sub  1024g/5436F884 2004-12-05
-sig         320B4FB4 2004-12-05   Nick Lothian (Apache) <nlothian@apache.org>
-
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.2.5 (MingW32)
-
-mQGiBEGy7V4RBACHbTfwKP3tYgujjVlgIuH6O/kZAZkGr5BlK6t3aZxWxn1hnZUb
-u9fNdFK6TuVxLN8/clRHw6SqKjfFsFl0ximws9ArgvAZtOB7lAwI8Dun7cqLiQ92
-4h/FivOXumqsFmUNWLtbbyzlbbjOs6yuUTUMn94X+sjR1BdJ61jHsX27HwCg+gYJ
-C8sC9azTSP520s+QDIqqqC0D/0Ixw9E1ioTREC+DKTl0Yc67NttrRja860eyJ5gW
-3EbADK57jaHUJbUpGkuJhGKnNlCbE4Zg+j//kTKU8RdO/DO9h61MfIAjSjAlI880
-I4GqQcVKN1cRwFCW1qiZHjqMxeDv+SUVuTde6ZmFT7pCpQGy3/vq3H/29ejkVnVn
-EmJsA/4vwczcvXfCt2j2hyq8p/70TO9fm/tWaPLfYZ9s61M2wCXT5414L+K/KS+L
-+ucXCNumVQSMmsAg4rCS9vE+WPxaT/KqvDyEeSpfNA9KK0tgL2pAT+J/ikDqmiFV
-SSwYLdFfmKpfhL1OUHoInmFzhJB0sKFJ2xPY2B5WyKXSPRGUerQrTmljayBMb3Ro
-aWFuIChBcGFjaGUpIDxubG90aGlhbkBhcGFjaGUub3JnPoheBBMRAgAeBQJBsu1e
-AhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAAoJEJIfsKkyC0+0c6cAoOP9ObcM2kMD
-iEFWoW9btpC6+6RNAJ9fls4oHGsbY63s2NDPe0jMTMGrC7kBDQRBsu1fEAQAg1ys
-XC9D+Gyh33sxe4CD/lQGi0EeFMmsoKB9ZGsKy3BOy9bkYq6QFP4K1+ylYoiQ6Tb3
-BN2IiFqzP2MO8rLq1Gh7XFzbXEidj1xe9kXct5KAE8DnkQ7WTsqj9hpuae1Ipd3P
-dMaAnmGz38pEPezXrR5sUJQF9bg7q7XUWDmZ1HcAAwUD/jl89B8FOXDaNIl/Fb1S
-Kb3DQxbRJ2wQlbXi/td61sS9rznnv4bo2CoJ/Du5EYUoM4QDfj0Q/6eLEMSvz2VI
-b66kU2nLK7ERgk6I8be0ODpeU0XNMtFly7kg51uAhDg9Z0j+sFzbWRCr+zY2NUoo
-hRIdPJ55WPTQBZWaEBCikeEHiEkEGBECAAkFAkGy7V8CGwwACgkQkh+wqTILT7To
-AgCeIYQjWxrjd4c2jsB/ytfDVBBJZiUAn2LByyqYsMAQQVRyJaWF1E8b4TD4
-=Z3c0
------END PGP PUBLIC KEY BLOCK-----
-pub   1024D/DD4200EA 2004-11-02
-uid                  David H. DeWolf <david@daviddewolf.com>
-sig 3        DD4200EA 2004-11-02  David H. DeWolf <david@daviddewolf.com>
-uid                  David H. DeWolf <ddewolf@apache.org>
-sig 3        DD4200EA 2004-11-02  David H. DeWolf <david@daviddewolf.com>
-uid                  David H. DeWolf <ddewolf@rocketmail.com>
-sig 3        DD4200EA 2004-11-02  David H. DeWolf <david@daviddewolf.com>
-uid                  David H. DeWolf <ddewolf@gmail.com>
-sig 3        DD4200EA 2004-11-02  David H. DeWolf <david@daviddewolf.com>
-uid                  David H. DeWolf <david.dewolf@digitalfocus.com>
-sig 3        DD4200EA 2005-06-25  David H. DeWolf <david@daviddewolf.com>
-sub   1024g/F7DE5A9C 2004-11-02
-sig          DD4200EA 2004-11-02  David H. DeWolf <david@daviddewolf.com>
-
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.4.0 (Cygwin)
-
-mQGiBEGHzhMRBACVBP2u+rePvFsGWoSnlpbXUJO3EyEHSlRKNeu+5MMLp2tYpP6k
-zM9zBFNHf0elbA8KESVkv6D6/YilYfogxvw+dgVy2sFsSDDxplaIOEumX783aiGS
-fYi7KM3W61co2g9RlKZm8Ho8ZVV0WoTD2L/OPKm1PRvlqM6eh6Pmr5fZhwCg88ZE
-jjtjg92j77t/ciZZ9a6YKrcD/0RDdIQl408krXfbCLK6AQXnzu5mJUjWit0HCtXr
-cN2UsAwX1KAANNV54N0IxxBWw1CpUIolIhZBpgE8Se5hNU90sTvvGjieWkiL1rET
-SolKIJT+cqzf6C9dzIydxuR2X+W6l6IKlytk0AYwaup9scAij0Zexx1qxHxjxylU
-Ief9A/9+lVQZ7Wd04Ul6/Wt+tcguP5OIr6fWVoD7+xRH5JtBGurUsm7eRsky65SJ
-OkNxJYsfXR4g7LygCMBZSG/nAx5Eus+Ah4mEHgHJ0h+AZOCY1EDs4K3LN47AkW/D
-+vRbvfvMmh7J1pizubwyo0iyYniraQNI1zCWWrEereB/L3S9FLQnRGF2aWQgSC4g
-RGVXb2xmIDxkYXZpZEBkYXZpZGRld29sZi5jb20+iGEEExECACECGwMGCwkIBwMC
-AxUCAwMWAgECHgECF4AFAkGH1CgCGQEACgkQshdj+t1CAOrZygCgj41mE/x1iVew
-oqXBWdCTA+GYjX4AnRVodDBzkWCndt9n7HfNCL1nFL4vtCREYXZpZCBILiBEZVdv
-bGYgPGRkZXdvbGZAYXBhY2hlLm9yZz6IXgQTEQIAHgIbAwYLCQgHAwIDFQIDAxYC
-AQIeAQIXgAUCQYfUJgAKCRCyF2P63UIA6g9lAJ4i2NY+zD4bxJi0h2EpNkO+rgVF
-/ACgmL2VgAi8/lU8LXQDrLO3F30nrKi0KERhdmlkIEguIERlV29sZiA8ZGRld29s
-ZkByb2NrZXRtYWlsLmNvbT6IXgQTEQIAHgUCQYfSHwIbAwYLCQgHAwIDFQIDAxYC
-AQIeAQIXgAAKCRCyF2P63UIA6gEiAKCU58ktQAUGOMwpJXluG95mhhrCIwCg6bFe
-atZ5JvPoJwwiXBmbbZC3Oeq0I0RhdmlkIEguIERlV29sZiA8ZGRld29sZkBnbWFp
-bC5jb20+iF4EExECAB4FAkGH0jwCGwMGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQ
-shdj+t1CAOqIRACgxA80v9zy9y+Aco3UNsC9DLHkwJ0AnRJPuPkt89NE/opcbgNH
-uI3+ylFbtC9EYXZpZCBILiBEZVdvbGYgPGRhdmlkLmRld29sZkBkaWdpdGFsZm9j
-dXMuY29tPoheBBMRAgAeBQJCvLVHAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAAoJ
-ELIXY/rdQgDqCyAAmwf4gVzRpTaAFoSYp6ZmDAR8Qt5JAKCYMvybti9CFzYsa96D
-P7G0aRuxxLkBDQRBh84TEAQA6zybsVGREjBQ+wKLT764hWjR7SkBaIjYLZJHUOwl
-6TNXhl9302lT+DeQAQXeBGUIg79QR/JHjLL5MoMHeQ+xPbY/EtrlGL9O67Nn/gtq
-AqLjlGEwlKBhae9A3bzxViKEHyi2X9Qtib+lgW3jsJta33ifgGC8TWNSxCrBGnPb
-6pMAAwYEAM54Z0pEX7SnW38QomN6qn+JrJ5Kp5R3A2QCkeqTWuykTHZbI4I3vO2q
-TXiHVI8Rz0soAEFLMr+95SnpInf0jm/gBPBaKHS2DHcLMqLZvut3TH8Vs50pBlP3
-KnWqi9xqaJq2TwgWCNh1RFydcd+aC3bCHTNWq9M7B2sxM6hNaEkkiEkEGBECAAkF
-AkGHzhMCGwwACgkQshdj+t1CAOph4gCgpxV7iVMhaAHYaGFWT9m/opl9b+UAnRWl
-X5guSzlwPBtoCQ0rjtIIHGiL
-=k+ts
------END PGP PUBLIC KEY BLOCK-----
-pub   1024D/917DD857 2006-04-27
-uid                  Craig Doremus <cdoremus@apache.org>
-sig 3        917DD857 2006-04-27  Craig Doremus <cdoremus@apache.org>
-sub   2048g/5AA44BC4 2006-04-27
-sig          917DD857 2006-04-27  Craig Doremus <cdoremus@apache.org>
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.4.3 (MingW32)
-
-mQGiBERRLT0RBAD6viO/WGm7UJ1yh/ZiGw1DeG2KXU0BKcIoXSFl/bfwkmB3/Vim
-096aUU2Q/TvWjKqrdM9WJ8RGcmzGZWmZRaLff+fLSz8Qj3o+65a0OE899KD5okpW
-6lEA7j8gniKbm0lN25tQt6j+9LLDJlzuk4ywxWvf7sH7cWZcKfHR5wsF2wCglIZK
-ev3TIrWciMIQcHc5dbukVAcEAMnj3rUVnNyBQ3nmwxbQ8tMEdNnYyTbXQAKuwzwT
-dWOiZE9ggS4N3hkgcVRlm0Eat6kLlNa9IikaVn8Oe1jt8W+O33lSIuyFyA/lznkh
-3UlIeC3qI9jp8/WjFGKORLG3xu3Xdk0JcXRroPBQHJH1Xm0dcei/z3PDem5xgX9x
-ywDLA/4hde+KTPVin/smXSh98ZmqEjKpcvpfWp5SW5Sg86YdEZyyADIQJDl4+E5g
-s7FryP6GvdO8krFvAmG55kPJV3BB5vplHCSe9suI/VB5ssp6+RTf7Ll7s/fqYojC
-7hXt539vkiXd6XP0s52C9eOWmIcezGwKudezC7K/pvrSOBAE8rQjQ3JhaWcgRG9y
-ZW11cyA8Y2RvcmVtdXNAYXBhY2hlLm9yZz6IYAQTEQIAIAUCRFEtPQIbAwYLCQgH
-AwIEFQIIAwQWAgMBAh4BAheAAAoJEFA40leRfdhX1f4An0d3MutZ47VR3/1hmY41
-mCdas3OWAJ9kqHzA70Q6dE/ZmbllFbpjAQG1ibkCDQREUS1MEAgAxfMGzTD5bs8w
-3lL5b8lmEd3iga3aGjzAn04QGyrZy475cKum5hBLY1lzfRW10nTudIunFe/fNauG
-/BrKrcQD2ebzXW5VWgG39oaoP219PJXCfCKNcg6ZcbxlBFmKcCmpHoyYJpkO3uup
-tL3LQpozNw+Bz48g8X3AMxRVJlqK2wdp6DR9MAifevVi7NdMhjdLrM4In9t72fTD
-+hwUKAIOThxIgQlHOamNzxHKGS8RLxhAhK1O+yV1T254a3z/y3vwZkZrobcBq4pf
-MpK2IZdLpoO+9CDklpxUXS9Pk/sBiHgsI9Ik14aETs2xOiB6fxPbtKJAYHdF0G1i
-5kfGOBbjYwADBQf9HLe+NdU0C/AgueHlQPYTJfTQGNeHyMczefYzPepQkPSNVWGS
-vg9QDXCbdbvDaYTD0Qostuojhvs89UXpCwY3K33xwzkczTZWnbfAiehjTH6ClufD
-c8DQ69Mw+xgF38UbmezY13jpBNmk/nkiL5Nxq5Bd3bc9+40WY+ahqJ5Dzvv6cZ0d
-/USXmEd0lDn8Z0ArNqdruzqmWlsRQnUHfUQw1O+ZXQJj07WwKxQ1EWsPKMHsUCnh
-PyK5fxiQP/WNwC7EAKTpSjOJBGz05SdXpw6Du9ZhUHYVNk8GaCGGBJoR1gaOggmH
-gTtg+IbEjbg1RZGqr/NYPHkXfx3gVqA1HhTkxIhJBBgRAgAJBQJEUS1MAhsMAAoJ
-EFA40leRfdhX36YAn271wqmQdnwlsVg1U6IolfNT9PiTAKCPVWyr211pg1I+CBKX
-BphAwkntjw==
-=1L2C
------END PGP PUBLIC KEY BLOCK-----
diff --git a/trunk/LICENSE b/trunk/LICENSE
deleted file mode 100644
index 29f81d8..0000000
--- a/trunk/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License

-                           Version 2.0, January 2004

-                        http://www.apache.org/licenses/

-

-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

-

-   1. Definitions.

-

-      "License" shall mean the terms and conditions for use, reproduction,

-      and distribution as defined by Sections 1 through 9 of this document.

-

-      "Licensor" shall mean the copyright owner or entity authorized by

-      the copyright owner that is granting the License.

-

-      "Legal Entity" shall mean the union of the acting entity and all

-      other entities that control, are controlled by, or are under common

-      control with that entity. For the purposes of this definition,

-      "control" means (i) the power, direct or indirect, to cause the

-      direction or management of such entity, whether by contract or

-      otherwise, or (ii) ownership of fifty percent (50%) or more of the

-      outstanding shares, or (iii) beneficial ownership of such entity.

-

-      "You" (or "Your") shall mean an individual or Legal Entity

-      exercising permissions granted by this License.

-

-      "Source" form shall mean the preferred form for making modifications,

-      including but not limited to software source code, documentation

-      source, and configuration files.

-

-      "Object" form shall mean any form resulting from mechanical

-      transformation or translation of a Source form, including but

-      not limited to compiled object code, generated documentation,

-      and conversions to other media types.

-

-      "Work" shall mean the work of authorship, whether in Source or

-      Object form, made available under the License, as indicated by a

-      copyright notice that is included in or attached to the work

-      (an example is provided in the Appendix below).

-

-      "Derivative Works" shall mean any work, whether in Source or Object

-      form, that is based on (or derived from) the Work and for which the

-      editorial revisions, annotations, elaborations, or other modifications

-      represent, as a whole, an original work of authorship. For the purposes

-      of this License, Derivative Works shall not include works that remain

-      separable from, or merely link (or bind by name) to the interfaces of,

-      the Work and Derivative Works thereof.

-

-      "Contribution" shall mean any work of authorship, including

-      the original version of the Work and any modifications or additions

-      to that Work or Derivative Works thereof, that is intentionally

-      submitted to Licensor for inclusion in the Work by the copyright owner

-      or by an individual or Legal Entity authorized to submit on behalf of

-      the copyright owner. For the purposes of this definition, "submitted"

-      means any form of electronic, verbal, or written communication sent

-      to the Licensor or its representatives, including but not limited to

-      communication on electronic mailing lists, source code control systems,

-      and issue tracking systems that are managed by, or on behalf of, the

-      Licensor for the purpose of discussing and improving the Work, but

-      excluding communication that is conspicuously marked or otherwise

-      designated in writing by the copyright owner as "Not a Contribution."

-

-      "Contributor" shall mean Licensor and any individual or Legal Entity

-      on behalf of whom a Contribution has been received by Licensor and

-      subsequently incorporated within the Work.

-

-   2. Grant of Copyright License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      copyright license to reproduce, prepare Derivative Works of,

-      publicly display, publicly perform, sublicense, and distribute the

-      Work and such Derivative Works in Source or Object form.

-

-   3. Grant of Patent License. Subject to the terms and conditions of

-      this License, each Contributor hereby grants to You a perpetual,

-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable

-      (except as stated in this section) patent license to make, have made,

-      use, offer to sell, sell, import, and otherwise transfer the Work,

-      where such license applies only to those patent claims licensable

-      by such Contributor that are necessarily infringed by their

-      Contribution(s) alone or by combination of their Contribution(s)

-      with the Work to which such Contribution(s) was submitted. If You

-      institute patent litigation against any entity (including a

-      cross-claim or counterclaim in a lawsuit) alleging that the Work

-      or a Contribution incorporated within the Work constitutes direct

-      or contributory patent infringement, then any patent licenses

-      granted to You under this License for that Work shall terminate

-      as of the date such litigation is filed.

-

-   4. Redistribution. You may reproduce and distribute copies of the

-      Work or Derivative Works thereof in any medium, with or without

-      modifications, and in Source or Object form, provided that You

-      meet the following conditions:

-

-      (a) You must give any other recipients of the Work or

-          Derivative Works a copy of this License; and

-

-      (b) You must cause any modified files to carry prominent notices

-          stating that You changed the files; and

-

-      (c) You must retain, in the Source form of any Derivative Works

-          that You distribute, all copyright, patent, trademark, and

-          attribution notices from the Source form of the Work,

-          excluding those notices that do not pertain to any part of

-          the Derivative Works; and

-

-      (d) If the Work includes a "NOTICE" text file as part of its

-          distribution, then any Derivative Works that You distribute must

-          include a readable copy of the attribution notices contained

-          within such NOTICE file, excluding those notices that do not

-          pertain to any part of the Derivative Works, in at least one

-          of the following places: within a NOTICE text file distributed

-          as part of the Derivative Works; within the Source form or

-          documentation, if provided along with the Derivative Works; or,

-          within a display generated by the Derivative Works, if and

-          wherever such third-party notices normally appear. The contents

-          of the NOTICE file are for informational purposes only and

-          do not modify the License. You may add Your own attribution

-          notices within Derivative Works that You distribute, alongside

-          or as an addendum to the NOTICE text from the Work, provided

-          that such additional attribution notices cannot be construed

-          as modifying the License.

-

-      You may add Your own copyright statement to Your modifications and

-      may provide additional or different license terms and conditions

-      for use, reproduction, or distribution of Your modifications, or

-      for any such Derivative Works as a whole, provided Your use,

-      reproduction, and distribution of the Work otherwise complies with

-      the conditions stated in this License.

-

-   5. Submission of Contributions. Unless You explicitly state otherwise,

-      any Contribution intentionally submitted for inclusion in the Work

-      by You to the Licensor shall be under the terms and conditions of

-      this License, without any additional terms or conditions.

-      Notwithstanding the above, nothing herein shall supersede or modify

-      the terms of any separate license agreement you may have executed

-      with Licensor regarding such Contributions.

-

-   6. Trademarks. This License does not grant permission to use the trade

-      names, trademarks, service marks, or product names of the Licensor,

-      except as required for reasonable and customary use in describing the

-      origin of the Work and reproducing the content of the NOTICE file.

-

-   7. Disclaimer of Warranty. Unless required by applicable law or

-      agreed to in writing, Licensor provides the Work (and each

-      Contributor provides its Contributions) on an "AS IS" BASIS,

-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or

-      implied, including, without limitation, any warranties or conditions

-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A

-      PARTICULAR PURPOSE. You are solely responsible for determining the

-      appropriateness of using or redistributing the Work and assume any

-      risks associated with Your exercise of permissions under this License.

-

-   8. Limitation of Liability. In no event and under no legal theory,

-      whether in tort (including negligence), contract, or otherwise,

-      unless required by applicable law (such as deliberate and grossly

-      negligent acts) or agreed to in writing, shall any Contributor be

-      liable to You for damages, including any direct, indirect, special,

-      incidental, or consequential damages of any character arising as a

-      result of this License or out of the use or inability to use the

-      Work (including but not limited to damages for loss of goodwill,

-      work stoppage, computer failure or malfunction, or any and all

-      other commercial damages or losses), even if such Contributor

-      has been advised of the possibility of such damages.

-

-   9. Accepting Warranty or Additional Liability. While redistributing

-      the Work or Derivative Works thereof, You may choose to offer,

-      and charge a fee for, acceptance of support, warranty, indemnity,

-      or other liability obligations and/or rights consistent with this

-      License. However, in accepting such obligations, You may act only

-      on Your own behalf and on Your sole responsibility, not on behalf

-      of any other Contributor, and only if You agree to indemnify,

-      defend, and hold each Contributor harmless for any liability

-      incurred by, or claims asserted against, such Contributor by reason

-      of your accepting any such warranty or additional liability.

-

-   END OF TERMS AND CONDITIONS

-

-   APPENDIX: How to apply the Apache License to your work.

-

-      To apply the Apache License to your work, attach the following

-      boilerplate notice, with the fields enclosed by brackets "[]"

-      replaced with your own identifying information. (Don't include

-      the brackets!)  The text should be enclosed in the appropriate

-      comment syntax for the file format. We also recommend that a

-      file or class name and description of purpose be included on the

-      same "printed page" as the copyright notice for easier

-      identification within third-party archives.

-

-   Copyright [yyyy] [name of copyright owner]

-

-   Licensed under the Apache License, Version 2.0 (the "License");

-   you may not use this file except in compliance with the License.

-   You may obtain a copy of the License at

-

-       http://www.apache.org/licenses/LICENSE-2.0

-

-   Unless required by applicable law or agreed to in writing, software

-   distributed under the License is distributed on an "AS IS" BASIS,

-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-   See the License for the specific language governing permissions and

-   limitations under the License.

diff --git a/trunk/README b/trunk/README
deleted file mode 100644
index 4b141ee..0000000
--- a/trunk/README
+++ /dev/null
@@ -1,90 +0,0 @@
-#  Copyright 2006 The Apache Software Foundation

-#

-#  Licensed under the Apache License, Version 2.0 (the "License");

-#  you may not use this file except in compliance with the License.

-#  You may obtain a copy of the License at

-#

-#      http://www.apache.org/licenses/LICENSE-2.0

-#

-#  Unless required by applicable law or agreed to in writing, software

-#  distributed under the License is distributed on an "AS IS" BASIS,

-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-#  See the License for the specific language governing permissions and

-#  limitations under the License

-

-README for Pluto 1.1-beta2

-

-To run the Pluto Portal Driver deployed in Tomcat 5.5.17:

-1. Unzip the binary distribution into a directory.

-	a. <PLUTO-HOME> will be the pluto-1.1.0-beta2 subdirectory.

-2. Execute startup.bat (Windows) or startup.sh (Unix)

-in <PLUTO-HOME>/bin.

-	a. Use shutdown.bat/shutdown.sh to stop the portal

-3. Browse to http://localhost:8080/pluto/portal

-4. Login as tomcat user (password=tomcat).

-

-For information on deploying portlets, building the portal from source

- and for the most up to date documentation please go to: 

-  http://portals.apache.org/pluto

-  

-***********************************************************

-* RELEASE NOTES: 1.1.0-beta2 Sept 26, 2006                *

-***********************************************************

-* Fixed or Resolved Issues                                *

-***********************************************************

-** Bug ****************************************************

- PLUTO-191  Dynamic Inclusion of dependencies in Maven Plugin

- PLUTO-232  Maximize window state does not work properly

- PLUTO-233  Exception thrown if edit or help mode is not supported by portlet

- PLUTO-242  Portlet session is invalidated when maxInactiveInterval < 0

- PLUTO-243  PortalURLParser drops '/' characters when building render path

- PLUTO-245  Parsing of portlet.xml strips space from init-param values

- PLUTO-246  PortalURLParser should URLEncode query string parameters 

- PLUTO-248  PortalUrlParser should encode '#' character

- PLUTO-251  Pluto fails when navigating between pages using the drop-downs

- PLUTO-254  NPE in PortalDriverServlet when requesting a resource that doesn't exist 

-***********************************************************

-

-** New Feature ********************************************

- PLUTO-214  Add logout link to portal page.

- PLUTO-255   Seperate portal-driver into portal-driver-api and portal-driver-impl

-***********************************************************

-***********************************************************

-

-***********************************************************

-***********************************************************

-* Open Issues                                             *

-***********************************************************

-

-** Bug ****************************************************

- PLUTO-124  POST Data gets truncated due to internal redirect by pluto

- PLUTO-122  Portlet Preferences need to be user specific

- PLUTO-257  Pluto 1.1 plugin for the deployment of custom portlets does not work

- PLUTO-200  Missing Resource Exception from PortletConfig.getResourceBundle

- PLUTO-234  Session Timeout Test in testsuite fails

-***********************************************************

-    

-** New Feature ********************************************

- PLUTO-215  Create admin portlet for Pluto portal driver

- PLUTO-252  Custom Tags with response.encodeUrl( url ) and Render hidden portlet mode.

- PLUTO-38   user profile attribute support

- PLUTO-186  ToolTips to Portlet Controls

-***********************************************************

-    

-** Improvement ********************************************

- PLUTO-204  Add spec PLT number to TestResult in portlet tests

- PLUTO-247  PortalURLParser: Avoid putting '?' and '&' characters in query string if unnecessary

-***********************************************************

-    

-** Task ***************************************************

- PLUTO-218  [1.1] Script to package source release

- PLUTO-217  [1.1] Script to package binary release

-***********************************************************

-

-** Test ***************************************************

- PLUTO-206  Improve pluto-testsuite to test more aspects

-***********************************************************

-    

-** Wish ***************************************************

- PLUTO-153  Jetty Deployment Support

-***********************************************************
\ No newline at end of file
diff --git a/trunk/dist-build.xml b/trunk/dist-build.xml
deleted file mode 100644
index 5571f85..0000000
--- a/trunk/dist-build.xml
+++ /dev/null
@@ -1,196 +0,0 @@
-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<!--

-	Builds a binary and source distribution of Pluto 1.1, bundling it into zip, gzip and bzip2 files.

-	

-	Run the binary build using the command line:

-		ant -f dist-build.xml

-				

-	The binary distribution is done in the following way:

-	1. Downloads Tomcat from Apache and unzips it into a working directory. To this distribution, the

-		build:

-		a. Adds emptySessionPath="true" to server.xml.

-		b. Adds a pluto user with pluto role to tomcat-users.xml.

-		c. Adds a pluto role to the tomcat user in tomcat-users.xml.

-	2. Runs 'mvn install' and 'mvn pluto:install' to create the	Pluto driver and testsuite 

-		and installs them into the Tomcat dist in the working directory.

-	3. Bundles up the altered Tomcat dist with Pluto into a zip, gzip and bzip2 file.

-	

-	Run the source build using the command line:

-		ant -f dist-build.xml src-dist	

-

-	All built distributions end up in target/dist.				

--->

-<project name="PlutoDistributions" default="bin-dist">

-

-	<property name="pluto.version" value="1.1.0-SNAPSHOT" description="Version of Pluto 1.1 to build"/>

-	<property name="tomcat.version" value="5.5.17" description="Version of Tomcat to deploy Pluto"/>

-

-	<property name="dist.basedir" value="target/dist" description="Base working directory"/>

-	<property name="base.name" value="apache-tomcat-${tomcat.version}"/>

-	<property name="dist.dir" value="${dist.basedir}/${base.name}"/>

-	<property name="pluto.name" value="pluto-${pluto.version}"/>

-	<property name="pluto.dir" value="${dist.basedir}/${pluto.name}"/>

-	<property name="unzip.file" value="${dist.basedir}/${base.name}.tar.gz"/>

-	<property name="tar.file" value="${dist.basedir}/${base.name}.tar"/>

-

-	<fileset dir="." id="src.fileset">

-		<include name="**/*"/>

-		<exclude name="**/*.class"/>

-		<exclude name="**/*.zip"/>

-		<exclude name="**/*.tar.gz"/>

-		<exclude name="**/*.tar.b2"/>

-		<exclude name="**/target/**/*"/>

-		<exclude name="**/.svn/*"/>

-		<exclude name="bin/**/*"/>

-		<exclude name=".classpath"/>

-		<exclude name=".project"/>

-	</fileset>					

-	

-	<target name="src-dist" depends="prepare-src-dist">

-		<zip destfile="${dist.basedir}/${pluto.name}-src.zip">

-			<zipfileset refid="src.fileset"/>							

-		</zip>

-

-		<antcall target="srctar-nocompress"/>

-		

-		<gzip src="${dist.basedir}/${pluto.name}-src.tar" 

-			destfile="${dist.basedir}/${pluto.name}-src.tar.gz"/>

-		

-		<bzip2 src="${dist.basedir}/${pluto.name}-src.tar" 

-			destfile="${dist.basedir}/${pluto.name}-src.tar.bz2"/>

-		

-		<antcall target="clean"/>	

-	</target>

-

-	<target name="srctar-nocompress" description="Creates tar source distributions">

-		<tar destfile="${dist.basedir}/${pluto.name}-src.tar">

-				<tarfileset dir="."> <!-- refid does not work -->

-					<include name="**/*"/>

-					<exclude name="**/*.class"/>

-					<exclude name="**/*.zip"/>

-					<exclude name="**/*.tar.gz"/>

-					<exclude name="**/*.tar.bz2"/>

-					<exclude name="**/target/**/*"/>

-					<exclude name="**/.svn/*"/>

-					<exclude name="bin/**/*"/>

-					<exclude name=".classpath"/>

-					<exclude name=".project"/>

-				</tarfileset>	

-		</tar>	

-	</target>

-

-	<target name="prepare-src-dist">

-		<mkdir dir="${dist.basedir}"/>		

-	</target>

-

-	<target name="bin-dist" depends="prepare-bin-dist,run-maven" description="Creates zip, gzip, and bzip2 distributions">

-		<!-- Copy over jars needed to deploy custom portlets -->

-		<copy file="pluto-util/target/pluto-util-${pluto.version}.jar" todir="${dist.dir}/PlutoDomain"/>			

-		<copy file="pluto-descriptor-api/target/pluto-descriptor-api-${pluto.version}.jar" todir="${dist.dir}/PlutoDomain"/>			

-		<copy file="pluto-descriptor-impl/target/pluto-descriptor-impl-${pluto.version}.jar" todir="${dist.dir}/PlutoDomain"/>			

-

-		<!-- Zip everything up -->

-		<zip destfile="${dist.basedir}/${pluto.name}-bin.zip">

-			<zipfileset prefix="${pluto.name}" dir="${dist.dir}" includes="**/*"/>

-		</zip>

-

-		<antcall target="tar-nocompress"/>

-		

-		<gzip src="${dist.basedir}/${pluto.name}-bin.tar" 

-			destfile="${dist.basedir}/${pluto.name}-bin.tar.gz"/>

-		

-		<bzip2 src="${dist.basedir}/${pluto.name}-bin.tar" 

-			destfile="${dist.basedir}/${pluto.name}-bin.tar.bz2"/>

-				

-		<antcall target="clean"/>	

-	</target>

-	

-	<target name="tar-nocompress" description="Creates tar binary distributions">

-		<tar destfile="${dist.basedir}/${pluto.name}-bin.tar">

-			<tarfileset prefix="${pluto.name}" dir="${dist.dir}" mode="755" username="pluto" group="pluto">

-		    	<include name="bin/*.sh"/>

-			</tarfileset>

-			<tarfileset prefix="${pluto.name}" dir="${dist.dir}" username="pluto" group="pluto">

-				<include name="**/*"/>

-				<exclude name="bin/*.sh"/>

-			</tarfileset>

-		</tar>		

-	</target>

-	

-	<target name="prepare-bin-dist">

-		<exec executable="mvn" vmlauncher="false" dir="${basedir}">

-			<arg line="clean:clean"/>

-		</exec>

-		<mkdir dir="${dist.basedir}"/>

-		

-		<get src="http://archive.apache.org/dist/tomcat/tomcat-5/v${tomcat.version}/bin/${base.name}.tar.gz"

-		     dest="${unzip.file}"

-		/>

-		

-		<gunzip src="${unzip.file}"

-			dest="${dist.basedir}"

-			description="Creates tar from tar.gz tomcat dist"

-		/>

-		

-		<untar src="${tar.file}"

-			dest="${dist.basedir}"

-			description="Untars tomcat dist"

-		/>		

-

-		<!-- Copy over README -->

-		<copy file="README" todir="${dist.dir}"/>

-

-		<!-- Add emptySessionPath="true" to Connector element in server.xml -->

-		<replace file="${dist.dir}/conf/server.xml"

-			token="connectionTimeout=&quot;20000&quot; disableUploadTimeout=&quot;true&quot; /&gt;" 

-			value="connectionTimeout=&quot;20000&quot; disableUploadTimeout=&quot;true&quot; emptySessionPath=&quot;true&quot; /&gt;" 

-			summary="true"

-		/>

-

-		<!-- Put tomcat user in 'pluto' role in tomcat-users.xml -->

-		<replace file="${dist.dir}/conf/tomcat-users.xml"

-			token="roles=&quot;tomcat&quot;" 

-			value="roles=&quot;tomcat,pluto&quot;" 

-			summary="true"

-		/>

-		

-		<!-- Add 'pluto' user to tomcat-users.xml -->

-		<replace file="${dist.dir}/conf/tomcat-users.xml"

-			token="&lt;/tomcat-users&gt;" 

-			value="&lt;user name=&quot;pluto&quot; password=&quot;pluto&quot; roles=&quot;pluto&quot; /&gt;${line.separator}&lt;/tomcat-users&gt;" 

-			summary="true"

-		/>

-	</target>

-

-	<target name="run-maven" description="Runs maven2 goals">

-		<exec executable="mvn" vmlauncher="false" dir="${basedir}">

-			<arg line="install"/>

-		</exec>

-		<exec executable="mvn" vmlauncher="false" dir="${basedir}">

-			<arg line="pluto:install -DinstallDir=${user.dir}/${dist.dir}"/>

-		</exec>

-	</target>

-		

-	<target name="clean">

-		<delete dir="${dist.dir}"/>

-		<delete file="${unzip.file}"/>	

-		<delete file="${tar.file}"/>	

-   	    <delete file="${dist.basedir}/${pluto.name}-src.tar"/>

-   	    <delete file="${dist.basedir}/${pluto.name}-bin.tar"/>

-	</target>

-

-</project>

diff --git a/trunk/maven-pluto-plugin/pom.xml b/trunk/maven-pluto-plugin/pom.xml
deleted file mode 100644
index d275d92..0000000
--- a/trunk/maven-pluto-plugin/pom.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<project xmlns="http://maven.apache.org/POM/4.0.0"

-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

-  

-  <parent>

-    <groupId>org.apache.pluto</groupId>

-    <artifactId>pluto</artifactId>

-    <version>1.1.0-SNAPSHOT</version>

-  </parent>

-  <modelVersion>4.0.0</modelVersion>

-  <artifactId>maven-pluto-plugin</artifactId> 

-  <packaging>maven-plugin</packaging>

-  <name>Maven Pluto Installer Plugin</name>

-  

-  <dependencies>

-    <dependency>

-      <groupId>org.apache.pluto</groupId>

-      <artifactId>pluto-util</artifactId>

-      <version>${pom.version}</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.maven</groupId>

-      <artifactId>maven-core</artifactId>

-      <version>${maven.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.maven</groupId>

-      <artifactId>maven-artifact</artifactId>

-      <version>${maven.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.maven</groupId>

-      <artifactId>maven-model</artifactId>

-      <version>${maven.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.maven</groupId>

-      <artifactId>maven-project</artifactId>

-      <version>${maven.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.maven</groupId>

-      <artifactId>maven-plugin-api</artifactId>

-      <version>${maven.version}</version>

-    </dependency>

-    

-    <!-- Do not remove this dep: See MNG-1178 -->

-    <dependency>

-      <groupId>junit</groupId>

-      <artifactId>junit</artifactId>

-      <version>${junit.version}</version>

-      <scope>test</scope>

-    </dependency>

-    

-  </dependencies>

-  

-  <build> 

-    <scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>    

-    <resources>

-      <resource>

-        <directory>src/main/scripts</directory>

-        <includes>

-          <include>**/*.mmld</include>

-        </includes>

-      </resource>

-      <resource>
-        <directory>src/main/resources</directory>        

-        <filtering>true</filtering>

-      </resource>

-    </resources>

-    <plugins>

-      <plugin>

-        <artifactId>maven-site-plugin</artifactId>

-        <configuration>

-          <resourcesDirectory>${basedir}/../pluto-site/src/site/resources</resourcesDirectory>

-        </configuration>

-      </plugin>

-      <plugin>

-        <artifactId>maven-plugin-plugin</artifactId>        

-        <configuration>

-          <goalPrefix>pluto</goalPrefix>

-        </configuration>

-      </plugin>

-    </plugins>

-  </build>

-  

-</project>

-

-

-

diff --git a/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractManagementMojo.java b/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractManagementMojo.java
deleted file mode 100644
index 83c6fd8..0000000
--- a/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractManagementMojo.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.maven;

-

-import org.apache.maven.artifact.factory.ArtifactFactory;

-import org.apache.maven.artifact.Artifact;

-import org.apache.maven.artifact.repository.ArtifactRepository;

-import org.apache.maven.artifact.resolver.ArtifactResolver;

-import org.apache.maven.artifact.resolver.ArtifactNotFoundException;

-import org.apache.maven.artifact.resolver.ArtifactResolutionException;

-import org.apache.maven.plugin.MojoExecutionException;

-import org.apache.pluto.util.install.ServerConfig;

-import org.apache.pluto.util.install.InstallationConfig;

-import org.apache.pluto.util.install.PortalInstallerFactory;

-import org.apache.pluto.util.install.PortalInstaller;

-

-import java.io.File;

-import java.util.ArrayList;

-import java.util.List;

-import java.util.Iterator;

-import java.util.Collection;

-import java.util.Map;

-import java.util.HashMap;

-

-/**

- * Abstract Mojo for installation tasks.

- *

- * @since 07/29/2005

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- */

-public abstract class AbstractManagementMojo extends AbstractPlutoMojo {

-

-    /**

-     * @parameter expression="${domain}"

-     */

-    protected String domain = "PlutoDomain";

-

-    /**

-     * @parameter expression="${server}"

-     */

-    protected String server = "PlutoServer";

-

-    /**

-     * @parameter expression="${host}"

-     */

-    protected String host = "localhost";

-

-    /**

-     * @parameter expression="${port}"

-     */

-    protected int port;

-

-    /**

-     * @component

-     */

-    protected ArtifactFactory artifactFactory;

-

-    /**

-     * @component

-     */

-    protected ArtifactResolver artifactResolver;

-

-    /**

-     * @parameter expression="${localRepository}

-     */

-    protected ArtifactRepository artifactRepository;

-

-    /**

-     * @parameter expression="${project.remoteArtifactRepositories}"

-     */

-    protected List remoteRepositories;

-

-    /**

-     * @parameter expression="${ctx}" default-value="pluto"

-     *

-     */

-    protected String portalContext;

-

-    /**

-     * @parameter expression="${pom.currentVersion} default="1.0-SNAPSHOT"

-     */

-    protected String version;

-

-    /**

-     *  at parameter expression="${portletApps}"

-     */

-    protected Map portletApps = new HashMap();

-

-    protected AbstractManagementMojo() {

-    	// Do nothing.

-    }

-

-    protected List getSharedDependencies() throws ArtifactNotFoundException, ArtifactResolutionException {

-       return getDependencies(InstallationDependency.getSharedDependencies());

-    }

-

-    protected List getEndorsedDependencies() throws ArtifactNotFoundException, ArtifactResolutionException {

-       return getDependencies(InstallationDependency.getEndorsedDependencies());

-    }

-

-    private List getDependencies(Collection artifacts) throws ArtifactNotFoundException, ArtifactResolutionException {

-        List list = new ArrayList();

-        Iterator it = artifacts.iterator();

-        while(it.hasNext()) {

-            InstallationDependency dep = (InstallationDependency)it.next();

-            Artifact artifact = artifactFactory.createArtifactWithClassifier(

-                    dep.getGroupId(), dep.getArtifactId(), dep.getVersion(), dep.getType(), null

-            );

-

-            artifactResolver.resolve(artifact, remoteRepositories, artifactRepository);

-            if(artifact.getFile() == null) {

-                getLog().warn("Unable to find file for artifact: "+artifact.getArtifactId());

-            }

-

-            list.add(artifact.getFile());

-        }

-        return list;

-    }

-

-    protected ServerConfig getServerConfig() {

-        ServerConfig config = new ServerConfig();

-        config.setDomain(domain);

-        config.setHost(host);

-        config.setPort(port);

-        config.setServer(server);

-        return config;

-    }

-

-    protected PortalInstaller getHandler() {

-        return PortalInstallerFactory.getAppServerHandler(installationDirectory);

-    }

-

-    protected InstallationConfig createInstallationConfig() throws ArtifactNotFoundException, ArtifactResolutionException {

-        InstallationConfig config = new InstallationConfig();

-        config.setInstallationDirectory(installationDirectory);

-        config.setPortalContextPath(portalContext);

-        config.setPortalApplication(getPortalApplication());

-        config.setPortletApplications(getPortletApplications());

-        config.setEndorsedDependencies(getEndorsedDependencies());

-        config.setSharedDependencies(getSharedDependencies());

-        config.setServerConfig(getServerConfig());

-        return config;

-    }

-

-    private File getPortalApplication() throws ArtifactNotFoundException, ArtifactResolutionException  {

-        InstallationDependency dep = InstallationDependency.PORTAL;

-        Artifact artifact = artifactFactory.createBuildArtifact(

-           dep.getGroupId(), dep.getArtifactId(), dep.getVersion(), dep.getType()

-        );

-        artifactResolver.resolve(artifact, remoteRepositories, artifactRepository);

-        return artifact.getFile();

-    }

-

-    private Map getPortletApplications() throws ArtifactNotFoundException, ArtifactResolutionException {

-        Map files = new HashMap();

-        InstallationDependency dep = InstallationDependency.TESTSUITE;

-        Artifact artifact = artifactFactory.createBuildArtifact(

-                dep.getGroupId(), dep.getArtifactId(), dep.getVersion(), dep.getType()

-        );

-        artifactResolver.resolve(artifact, remoteRepositories, artifactRepository);

-

-        files.put("testsuite", artifact.getFile());

-        /*

-        Iterator apps = portletApps.iterator();

-        while(apps.hasNext()) {

-            //files.add(artifactFactory.createBuildArtifact(

-            //    InstallMojo.GROUP_ID, apps.next().toString(), version, "war"

-            //).getFile());

-        }

-        */

-        return files;

-    }

-

-    protected void doValidate() throws Exception {

-        if(installationDirectory == null || !installationDirectory.exists()) {

-            throw new MojoExecutionException("A valid installation directory must be provided in order to install pluto.");

-

-        }

-    }

-}

diff --git a/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractPlutoMojo.java b/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractPlutoMojo.java
deleted file mode 100644
index 336fa9a..0000000
--- a/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractPlutoMojo.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.maven;

-

-import org.apache.maven.plugin.AbstractMojo;

-import org.apache.maven.plugin.MojoExecutionException;

-import org.apache.maven.project.MavenProject;

-

-import java.io.File;

-

-/**

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @todo Document

- * @since Jul 30, 2005

- */

-public abstract class AbstractPlutoMojo extends AbstractMojo {

-

-    /**

-     * @parameter expression="${installDir}"

-     */

-    protected File installationDirectory = null;

-

-    /**

-     * @parameter expression="${project}"

-     * @required

-     * @readonly

-     */

-    protected MavenProject project = null;

-

-    public void execute() throws MojoExecutionException {

-        // Validation of the installDir property is done by maven.

-        try {

-            doValidate();

-            doExecute();

-        } catch (MojoExecutionException ex) {

-            throw ex;

-        } catch (Exception ex) {

-            throw new MojoExecutionException("Error Installing Pluto", ex);

-        }

-    }

-

-    /**

-     * Process the actual execution.

-     * @throws Exception

-     */

-    protected abstract void doExecute() throws Exception;

-

-    protected abstract void doValidate() throws Exception;

-}

diff --git a/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractPortletMojo.java b/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractPortletMojo.java
deleted file mode 100644
index 51508e4..0000000
--- a/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AbstractPortletMojo.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.maven;

-

-/**

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @todo Document

- * @since Jul 30, 2005

- */

-public abstract class AbstractPortletMojo extends AbstractPlutoMojo {

-

-

-}

diff --git a/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AssembleMojo.java b/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AssembleMojo.java
deleted file mode 100644
index de812d6..0000000
--- a/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/AssembleMojo.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.maven;

-

-import org.apache.pluto.util.assemble.Assembler;

-import org.apache.pluto.util.assemble.AssemblerConfig;

-import org.apache.pluto.util.assemble.AssemblerFactory;

-import org.apache.maven.plugin.MojoExecutionException;

-import org.apache.maven.plugin.logging.Log;

-

-import java.io.File;

-

-/**

- * TODO: Document

- * TODO: Refactor this and the assembler to model deployer and allow no arg constructor

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @since Jul 30, 2005

- * @see org.apache.pluto.util.assemble.Assembler

- * 

- * @goal assemble

- * @description prepares a web application as a portlet application

- * @phase process-resources

- */

-public class AssembleMojo extends AbstractPortletMojo {

-	

-	// Private Member Variables ------------------------------------------------

-	

-    /**

-     * The portlet application descriptor (<code>WEB-INF/portlet.xml</code>).

-     * @parameter expression="${basedir}/src/main/webapp/WEB-INF/portlet.xml"

-     * @required

-     */

-    private File portletXml = null;

-

-    /**

-     * The original webapp descriptor (<code>WEB-INF/web.xml</code>).

-     * @parameter expression="${basedir}/src/main/webapp/WEB-INF/web.xml"

-     * @required

-     */

-    private File webXml = null;

-    

-    /**

-     * The file to which the updated webapp descriptor is written. 

-     * @parameter expression="${project.build.directory}/pluto-resources/web.xml"

-     */

-    private File webXmlDestination = null;

-    

-    

-    // AbstractPlutoMojo Impl --------------------------------------------------

-    

-    protected void doExecute() throws Exception {

-        // Log parameter values.

-    	Log log = getLog();

-        if (log.isInfoEnabled()) {

-            log.info("Reading web.xml from :" + webXml.getAbsolutePath());

-            log.info("Reading portlet.xml from: " + portletXml.getAbsolutePath());

-            log.info("Writing web.xml to: " + webXmlDestination.getAbsolutePath());

-        }

-        // Assemble portlet app by updating web.xml.

-        AssemblerConfig config = createAssemblerConfig();

-        Assembler assembler = AssemblerFactory.getFactory()

-        		.createAssembler(config);

-        assembler.assemble(config);

-    }

-

-    protected void doValidate() throws MojoExecutionException {

-        if (webXml == null || !webXml.exists()) {

-            throw new MojoExecutionException("Web application descriptor must be a valid web.xml");

-        }

-        if (portletXml == null || !portletXml.exists()) {

-            throw new MojoExecutionException("Portlet descriptor must be a valid portlet.xml");

-        }

-    }

-    

-    // Private Methods ---------------------------------------------------------

-    

-    private AssemblerConfig createAssemblerConfig() {

-        AssemblerConfig config = new AssemblerConfig();

-        config.setPortletDescriptor(portletXml);

-        config.setWebappDescriptor(webXml);

-        config.setDestination(webXmlDestination);

-        return config;

-    }

-    

-}

diff --git a/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/DeployMojo.java b/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/DeployMojo.java
deleted file mode 100644
index 40c6527..0000000
--- a/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/DeployMojo.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.maven;

-

-import org.apache.maven.plugin.MojoExecutionException;

-import org.apache.pluto.util.deploy.Deployer;

-import org.apache.pluto.util.deploy.DeploymentConfig;

-import org.apache.pluto.util.deploy.file.Tomcat5FileSystemDeployer;

-

-import java.util.Properties;

-import java.io.File;

-

-

-/**

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @todo Document

- * @since Jul 30, 2005

- *

- * @goal deploy

- * @requiresDependencyResolution runtime

- */

-public class DeployMojo extends AbstractPortletMojo {

-	

-	// Private Member Variables ------------------------------------------------

-	

-    /**

-     * @parameter expression="${project.build.outputDirectory}/${maven.final.name}

-     */

-    private File deployment = null;

-

-    /**

-     * @parameter expression="${pluto.deploy.file}"

-     */

-    private String deployerClass = Tomcat5FileSystemDeployer.class.getName();

-

-    /**

-     * @parameter expression="${pluto.deploy.tomcat5.service}"

-     */

-    private String tomcatService = "Catalina";

-    

-    /**

-     * @parameter expression="${pluto.deploy.tomcat5.host}"

-     */

-    private String tomcatHost = "localhost";

-    

-    

-    // AbstractPlutoMojo Impl --------------------------------------------------

-    

-    protected void doValidate() throws MojoExecutionException {

-    	System.err.println("installationDirectory: " + installationDirectory);

-    	if (deployment != null) {

-    		System.err.println("deployment: " + deployment.getAbsolutePath());

-    	} else {

-    		System.err.println("deployment: null");

-    	}

-    	System.err.println("DeployerClass: " + deployerClass);

-    	

-        if (deployment == null || !deployment.exists()) {

-            throw new MojoExecutionException("Deployment must be specified.");

-        }

-    }

-    

-    protected void doExecute() throws Exception {

-        if (!deployment.getName().endsWith(".war")) {

-            throw new MojoExecutionException(deployment.getName()

-            		+ " is not a valid deployment. Please specify a war.");

-        }

-

-        Deployer deployer = createDeployer();

-        //deployer.deploy(createConfig(), createInputStream());

-

-    }

-

-

-    private DeploymentConfig createConfig() {

-        return new DeploymentConfigImpl();

-    }

-

-

-    private Deployer createDeployer() throws Exception {

-        Class clazz = Class.forName(deployerClass);

-        return (Deployer) clazz.newInstance();

-    }

-

-    private class DeploymentConfigImpl extends DeploymentConfig {

-        private Properties props;

-

-        public DeploymentConfigImpl() {

-            super(deployment.getName().substring(0, deployment.getName().lastIndexOf(".")));

-            props = new Properties(project.getProperties());

-            props.putAll(System.getProperties());

-            props.setProperty("tomcat5.home", installationDirectory.getAbsolutePath());

-            props.setProperty("tomcat.service", tomcatService);

-            props.setProperty("tomcat.host", tomcatHost);

-        }

-

-        public String getDeploymentProperty(String key) {

-            String property = props.getProperty(key);

-            return property;

-        }

-    }

-}

diff --git a/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/InstallMojo.java b/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/InstallMojo.java
deleted file mode 100644
index c03b483..0000000
--- a/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/InstallMojo.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.maven;

-

-/**

- * @goal install

- * @description the pluto ApplicationServerHook goal installs the pluto portal into the specified application server

- * @requiresDependencyResolution runtime

- *

- */

-public class InstallMojo extends AbstractManagementMojo {

-

-    protected void doExecute() throws Exception {

-        getHandler().install(createInstallationConfig());

-    }

-}

diff --git a/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/InstallationDependency.java b/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/InstallationDependency.java
deleted file mode 100644
index 9894a7f..0000000
--- a/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/InstallationDependency.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.maven;

-

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.Collections;

-import java.util.List;

-import java.util.Properties;

-

-/**

- *

- */

-class InstallationDependency {    

-    

-    private static final Properties VERSION_PROPERTIES = new Properties();

-    private static final String PROPERTIES_FILE = "/versions.properties";

-    static

-    {

-        try 

-        {

-            VERSION_PROPERTIES.load(InstallationDependency.class.getResourceAsStream(PROPERTIES_FILE));

-        } 

-        catch (IOException e) 

-        {

-            throw new RuntimeException("Cannot load " + PROPERTIES_FILE + " from the classpath!", e);

-        }

-    }

-

-    public static final InstallationDependency PORTLET_API =

-        new InstallationDependency("javax.portlet", "portlet-api", 

-                VERSION_PROPERTIES.getProperty("portlet-api.version"));

-

-    public static final InstallationDependency  DESCRIPTOR_API =

-        new InstallationDependency("org.apache.pluto", "pluto-descriptor-api", 

-                VERSION_PROPERTIES.getProperty("pluto.version"));

-

-    public static final InstallationDependency  DESCRIPTOR_IMPL =

-            new InstallationDependency("org.apache.pluto", "pluto-descriptor-impl", 

-                    VERSION_PROPERTIES.getProperty("pluto.version"));

-

-    public static final InstallationDependency  CONTAINER =

-            new InstallationDependency("org.apache.pluto", "pluto-container", 

-                    VERSION_PROPERTIES.getProperty("pluto.version"));

-

-    public static final InstallationDependency  TAGLIB =

-            new InstallationDependency("org.apache.pluto", "pluto-taglib", 

-                    VERSION_PROPERTIES.getProperty("pluto.version"));

-

-    public static final InstallationDependency  PORTAL =

-            new InstallationDependency("org.apache.pluto", "pluto-portal", 

-                    VERSION_PROPERTIES.getProperty("pluto.version"), "war");

-

-    public static final InstallationDependency  TESTSUITE =

-            new InstallationDependency("org.apache.pluto", "pluto-testsuite", 

-                    VERSION_PROPERTIES.getProperty("pluto.version"), "war");

-

-    public static final InstallationDependency  CASTOR =

-            new InstallationDependency("castor", "castor", 

-                    VERSION_PROPERTIES.getProperty("castor.version"));

-

-    public static final InstallationDependency  XERCES =

-            new InstallationDependency("xerces", "xercesImpl", 

-                    VERSION_PROPERTIES.getProperty("xercesImpl.version"));

-

-    public static final InstallationDependency  XML_PARSER_APIS =

-            new InstallationDependency("xerces", "xmlParserAPIs", 

-                    VERSION_PROPERTIES.getProperty("xmlParserAPIs.version"));

-

-    private static final List ENDORSED = new ArrayList();

-    private static final List SHARED = new ArrayList();

-

-    static {

-//        ENDORSED.add(XERCES);

-//        ENDORSED.add(XML_PARSER_APIS);

-        SHARED.add(XERCES);

-        SHARED.add(XML_PARSER_APIS);

-

-        SHARED.add(PORTLET_API);

-        SHARED.add(DESCRIPTOR_API);

-        SHARED.add(DESCRIPTOR_IMPL);

-        SHARED.add(CONTAINER);

-        SHARED.add(TAGLIB);

-        SHARED.add(CASTOR);

-    }

-

-

-    public static Collection getEndorsedDependencies() {

-        return Collections.unmodifiableCollection(ENDORSED);

-    }

-

-    public static Collection getSharedDependencies() {

-        return Collections.unmodifiableCollection(SHARED);

-    }

-

-    private String groupId;

-    private String artifactId;

-    private String version;

-    private String type;

-

-    public InstallationDependency(String groupId, String artifactId, String version) {

-        this(groupId, artifactId, version, "jar");

-    }

-

-    public InstallationDependency(String groupId, String artifactId, String version, String type) {

-        if (version == null || version.trim().equalsIgnoreCase(""))

-        {

-            throw new RuntimeException("Missing or invalid property for artifact " + 

-                    artifactId + " in " + PROPERTIES_FILE + "!");

-        }

-        

-        this.groupId = groupId;

-        this.artifactId = artifactId;

-        this.version = version;

-        this.type = type;

-    }

-

-

-    public String getGroupId() {

-        return groupId;

-    }

-

-    public void setGroupId(String groupId) {

-        this.groupId = groupId;

-    }

-

-    public String getArtifactId() {

-        return artifactId;

-    }

-

-    public void setArtifactId(String artifactId) {

-        this.artifactId = artifactId;

-    }

-

-    public String getVersion() {

-        return version;

-    }

-

-    public void setVersion(String version) {

-        this.version = version;

-    }

-

-    public String getType() {

-        return type;

-    }

-

-    public void setType(String type) {

-        this.type = type;

-    }

-    

-}

diff --git a/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/PublishMojo.java b/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/PublishMojo.java
deleted file mode 100644
index 8df0543..0000000
--- a/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/PublishMojo.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.maven;

-

-import org.apache.maven.plugin.AbstractMojo;

-import org.apache.maven.plugin.MojoExecutionException;

-import org.apache.maven.plugin.MojoFailureException;

-import org.apache.maven.project.MavenProject;

-import org.apache.pluto.util.publish.PortletPublishConfig;

-import org.apache.pluto.util.publish.PortletPublishServiceFactory;

-import org.apache.pluto.util.publish.PortletPublishService;

-import org.apache.pluto.util.UtilityException;

-

-/**

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:

- * @version 1.0

- * @since Dec 5, 2005

- *

- * @goal publish

- * @requiresDependencyResolution runtime

- */

-public class PublishMojo extends AbstractMojo {

-

-    /**

-     * @parameter expression="${host}"

-     */

-    protected String host = "localhost";

-

-    /**

-     * @parameter expression="${port}"

-     */

-    protected int port = 8080;

-

-    /**

-     * @parameter  expression="${protocol}"

-     */

-    protected String protocol = "http";

-

-    /**

-     * @parameter expression="${portalContext}"

-     */

-    protected String portalContextPath = "pluto";

-

-    /**

-     * @parameter expression="${username}"

-     */

-    protected String username = "pluto";

-

-    /**

-     * @parameter expression="${password}"

-     */

-    protected String password = "pluto";

-

-    /**

-     * @parameter expression="${project.build.finalName}"

-     */

-    protected String portletApplicationContext;

-

-    /**

-     * @parameter expression="${project}"

-     */

-    protected MavenProject project;

-

-    public void execute() throws MojoExecutionException, MojoFailureException {

-

-        PortletPublishConfig config = new PortletPublishConfig();

-        config.setHost(host);

-        config.setPort(port);

-        config.setProtocol(protocol);

-        config.setUsername(username);

-        config.setPassword(password);

-        config.setContext(portalContextPath);

-        config.setPortletApplicationContext(portletApplicationContext);

-

-        PortletPublishService publisher =

-            PortletPublishServiceFactory.getFactory().createPortletPublishService(config);

-

-        try {

-            publisher.publish(config);

-        }

-        catch(UtilityException ue) {

-            throw new MojoExecutionException(ue.getMessage());

-        }

-    }

-}

diff --git a/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/ReinstallMojo.java b/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/ReinstallMojo.java
deleted file mode 100644
index 532ccd4..0000000
--- a/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/ReinstallMojo.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.maven;

-

-import org.apache.pluto.util.install.InstallationConfig;

-

-

-/**

- * @goal reinstall

- * @requiresDependencyResolution runtime

- */

-public class ReinstallMojo extends AbstractManagementMojo {

-

-    public ReinstallMojo() {

-

-    }

-

-    protected void doExecute() throws Exception {

-        InstallationConfig config = createInstallationConfig();

-        getHandler().uninstall(config);

-        getHandler().install(config);

-    }

-}

diff --git a/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/UninstallMojo.java b/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/UninstallMojo.java
deleted file mode 100644
index fc5f8b9..0000000
--- a/trunk/maven-pluto-plugin/src/main/java/org/apache/pluto/maven/UninstallMojo.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.maven;

-

-/**

- * @goal uninstall

- * @requiresDependencyResolution runtime

- */

-public class UninstallMojo extends AbstractManagementMojo {

-

-    protected void doExecute() throws Exception {

-        getHandler().uninstall(createInstallationConfig());

-   }

-}

diff --git a/trunk/maven-pluto-plugin/src/main/resources/versions.properties b/trunk/maven-pluto-plugin/src/main/resources/versions.properties
deleted file mode 100644
index f6bb6c8..0000000
--- a/trunk/maven-pluto-plugin/src/main/resources/versions.properties
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-#  Copyright 2005-2006 The Apache Software Foundation
-#
-#  Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-#  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-
-
-# The properties defined in this file should align with the names of the 
-# <property> elements of Pluto's parent POM. This property file is 
-# interpolated and placed in the maven-pluto-plugin jar, and is 
-# used by the InstallationDependency class.
-portlet-api.version=${portlet-api.version}
-servlet-api.version=${servlet-api.version}
-jsp-api.version=${jsp-api.version}
-jstl.version=${jstl.version}
-taglibs.standard.version=${taglibs.standard.version}
-xerces.version=${xerces.version}
-xercesImpl.version=${xerces.version}
-xmlParserAPIs.version=${xerces.version}
-castor.version=${castor.version}
-commons-digester.version=${commons-digester.version}
-commons-cli.version=${commons-cli.version}
-commons-httpclient.version=${commons-httpclient.version}
-commons-beanutils.version=${commons-beanutils.version}
-commons-logging.version=${commons-logging.version}
-log4j.version=${log4j.version}
-springframework.version=${springframework.version}
-plexus.version=${plexus.version}
-maven.version=${maven.version}
-ant.version=${ant.version}
-junit.version=${junit.version}
-jmock.version=${jmock.version}
-# The version of Pluto's parent POM.
-pluto.version=${pom.version}
diff --git a/trunk/maven-pluto-plugin/src/main/scripts/hello.mmld b/trunk/maven-pluto-plugin/src/main/scripts/hello.mmld
deleted file mode 100644
index 7dfee5b..0000000
--- a/trunk/maven-pluto-plugin/src/main/scripts/hello.mmld
+++ /dev/null
@@ -1,33 +0,0 @@
-<!--

-Copyright 2004 The Apache Software Foundation.

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<mojo xmlns="marmalade:mojo">

-  <metadata>

-    <goal>hello</goal>

-    <description>Say Hello to the World.</description>

-    <parameters>

-      <parameter>

-        <name>salutation</name>

-        <expression>#project.build.directory</expression>

-        <description>Description of what this parameter is used for.</description>

-      </parameter>

-    </parameters>

-  </metadata>

-  <execute>

-    <c:out xmlns:c="marmalade:core">Hello, World</c:out>

-  </execute>

-</mojo>

-

diff --git a/trunk/maven-pluto-plugin/src/site/site.xml b/trunk/maven-pluto-plugin/src/site/site.xml
deleted file mode 100644
index 95adf3f..0000000
--- a/trunk/maven-pluto-plugin/src/site/site.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>

-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<project name="Maven">

-  <bannerLeft>

-    <name>Pluto Maven Plugin</name>

-    <src>http://portals.apache.org/pluto/images/pluto.png</src>

-    <href>http://portals.apache.org/pluto</href>

-  </bannerLeft>

-  <bannerRight>

-    <src>http://portals.apache.org/pluto/images/banner.png</src>

-  </bannerRight>

-  <body>

-    <links>

-      <item name="Pluto Home" href="http://portals.apache.org/pluto"/>

-      <item name="JSR 168" href="http://jcp.org/en/jsr/detail?id=168"/>

-	  <item name="Chinese Translation" href="http://heavyz.sourceforge.net/pluto_zh/pluto-container"/>

-    </links>

-

-	<menu name="Pluto Ant Tasks">

-      <item name="Getting Started" href="/getting-started.html"/>

-	</menu>

-

-    ${reports}

-  </body>

-</project>

diff --git a/trunk/pluto-ant-tasks/pom.xml b/trunk/pluto-ant-tasks/pom.xml
deleted file mode 100644
index cbb7cd8..0000000
--- a/trunk/pluto-ant-tasks/pom.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<project xmlns="http://maven.apache.org/POM/4.0.0"

-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

-  

-  <parent>

-    <groupId>org.apache.pluto</groupId>

-    <artifactId>pluto</artifactId>

-    <version>1.1.0-SNAPSHOT</version>

-  </parent>

-  <modelVersion>4.0.0</modelVersion>

-  <artifactId>pluto-ant-tasks</artifactId> 

-  <packaging>jar</packaging>

-  <name>Pluto Ant Tasks</name> 

-  <description>The Pluto Ant Tasks are used to assemble, deploy, and publish portlets to the Pluto Portal Driver.</description>

-  

-  <dependencies>

-    <dependency>

-      <groupId>org.apache.pluto</groupId>

-      <artifactId>pluto-util</artifactId>

-      <version>${pom.version}</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>ant</groupId>

-      <artifactId>ant</artifactId>

-      <version>${ant.version}</version>

-      <scope>provided</scope>

-    </dependency>

-  </dependencies>

-

-  <build> 

-    <scriptSourceDirectory>src/main/scripts</scriptSourceDirectory> 

-    <plugins>

-      <plugin>

-        <artifactId>maven-site-plugin</artifactId>

-        <configuration>

-          <resourcesDirectory>${basedir}/../pluto-site/src/site/resources</resourcesDirectory>

-        </configuration>

-      </plugin>

-      <plugin>

-        <artifactId>maven-assembly-plugin</artifactId>

-        <configuration>

-          <descriptor>src/assemble/bin.xml</descriptor>

-        </configuration>

-      </plugin>

-    </plugins>

-  </build>

-  

-</project>

-

-

diff --git a/trunk/pluto-ant-tasks/src/assemble/bin.xml b/trunk/pluto-ant-tasks/src/assemble/bin.xml
deleted file mode 100644
index d5d6c50..0000000
--- a/trunk/pluto-ant-tasks/src/assemble/bin.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<assembly>

-  <id>bin</id>

-  <formats>

-    <format>tar.gz</format>

-    <format>tar.bz2</format>

-    <format>zip</format>

-  </formats>

-  <fileSets>

-    <fileSet>

-      <directory>../</directory>

-      <outputDirectory>/</outputDirectory>

-      <includes>

-        <include>README*</include>

-		<include>LICENSE*</include>

-		<include>NOTICE*</include>

-      </includes>

-    </fileSet>

-    <fileSet>

-      <directory>target</directory>

-	  <outputDirectory></outputDirectory>

-      <includes>

-        <include>*.jar</include>

-      </includes>

-    </fileSet>

-    <fileSet>

-      <directory>target/site</directory>

-	  <outputDirectory>docs</outputDirectory>

-      <includes>

-        <include>**/*.*</include>

-      </includes>

-    </fileSet>

-  </fileSets>

-  <dependencySets>

-    <dependencySet>

-	  <outputDirectory>lib</outputDirectory>

-      <scope>runtime</scope>

-    </dependencySet>

-  </dependencySets>

-</assembly>

-

diff --git a/trunk/pluto-ant-tasks/src/assemble/src.xml b/trunk/pluto-ant-tasks/src/assemble/src.xml
deleted file mode 100644
index e6d6b4c..0000000
--- a/trunk/pluto-ant-tasks/src/assemble/src.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<assembly>

-  <id>src</id>

-  <formats>

-    <format>tar.gz</format>

-    <format>tar.bz2</format>

-    <format>zip</format>

-  </formats>

-  <fileSets>

-    <fileSet>

-      <includes>

-        <include>README*</include>

-        <include>LICENSE*</include>

-        <include>NOTICE*</include>

-        <include>pom.xml</include>

-      </includes>

-    </fileSet>

-    <fileSet>

-      <directory>src</directory>

-    </fileSet>

-  </fileSets>

-</assembly>

diff --git a/trunk/pluto-ant-tasks/src/main/java/org/apache/pluto/ant/AssembleTask.java b/trunk/pluto-ant-tasks/src/main/java/org/apache/pluto/ant/AssembleTask.java
deleted file mode 100644
index 4f36fb7..0000000
--- a/trunk/pluto-ant-tasks/src/main/java/org/apache/pluto/ant/AssembleTask.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.ant;

-

-import org.apache.tools.ant.Task;

-import org.apache.tools.ant.BuildException;

-import org.apache.pluto.util.UtilityException;

-import org.apache.pluto.util.assemble.Assembler;

-import org.apache.pluto.util.assemble.AssemblerFactory;

-import org.apache.pluto.util.assemble.AssemblerConfig;

-

-import java.io.File;

-

-/**

- * TODO JavaDoc

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:

- * @version 1.0

- * @since Nov 23, 2005

- */

-public class AssembleTask extends Task {

-

-    private File portletxml;

-

-    private File webxml;

-

-    private File destfile;

-

-    private File webapp;

-

-    public File getPortletxml() {

-        if(webapp != null)

-            return new File(webapp, "WEB-INF/portlet.xml");

-        return portletxml;

-    }

-

-    public void setPortletxml(File portletxml) {

-        this.portletxml = portletxml;

-    }

-

-    public File getWebxml() {

-        if(webapp != null)

-            return new File(webapp, "WEB-INF/web.xml");

-        return webxml;

-    }

-

-    public void setWebxml(File webxml) {

-        this.webxml = webxml;

-    }

-

-    public File getDestfile() {

-        if(destfile != null)

-            return destfile;

-        return getWebxml();

-    }

-

-    public void setDestfile(File destfile) {

-        this.destfile = destfile;

-    }

-

-    public File getWebapp() {

-        return webapp;

-    }

-

-    public void setWebapp(File webapp) {

-        this.webapp = webapp;

-    }

-

-    public void execute() throws BuildException {

-

-        validateArgs();

-

-        try {

-            AssemblerConfig config = new AssemblerConfig();

-            config.setPortletDescriptor(getPortletxml());

-            config.setWebappDescriptor(getWebxml());

-            config.setDestination(getDestfile());

-

-            Assembler assembler =

-                AssemblerFactory.getFactory().createAssembler(config);

-

-           assembler.assemble(config);

-        }

-

-        catch(UtilityException ue) {

-            throw new BuildException(ue);

-        }

-    }

-

-    private void validateArgs() throws BuildException {

-        if(webapp != null) {

-            if(!webapp.exists()) {

-               throw new BuildException("webapp "+webapp.getAbsolutePath()+ " does not exist");

-            }

-            return;

-        }

-

-        if(portletxml == null || !portletxml.exists()) {

-            throw new BuildException("portletxml "+portletxml+" does not exist");

-        }

-

-        if(webxml == null || !webxml.exists()) {

-            throw new BuildException("webxml "+webxml + " does not exist");

-        }

-    }

-}

diff --git a/trunk/pluto-ant-tasks/src/main/java/org/apache/pluto/ant/PublishTask.java b/trunk/pluto-ant-tasks/src/main/java/org/apache/pluto/ant/PublishTask.java
deleted file mode 100644
index 19a5fb4..0000000
--- a/trunk/pluto-ant-tasks/src/main/java/org/apache/pluto/ant/PublishTask.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.ant;

-

-import org.apache.tools.ant.Task;

-import org.apache.tools.ant.BuildException;

-import org.apache.pluto.util.UtilityException;

-import org.apache.pluto.util.publish.PortletPublishConfig;

-import org.apache.pluto.util.publish.PortletPublishServiceFactory;

-import org.apache.pluto.util.publish.PortletPublishService;

-

-/**

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:

- * @version 1.0

- * @since Nov 23, 2005

- */

-public class PublishTask extends Task {

-

-    private String host;

-

-    private int port;

-

-    private String portalContext;

-

-    private String username;

-

-    private String password;

-

-    private String portletApplicationContext;

-

-    public String getHost() {

-        return host;

-    }

-

-    public void setHost(String host) {

-        this.host = host;

-    }

-

-    public int getPort() {

-        return port;

-    }

-

-    public void setPort(int port) {

-        this.port = port;

-    }

-

-    public String getPortalContext() {

-        return portalContext;

-    }

-

-    public void setPortalContext(String portalContext) {

-        this.portalContext = portalContext;

-    }

-

-    public String getUsername() {

-        return username;

-    }

-

-    public void setUsername(String username) {

-        this.username = username;

-    }

-

-    public String getPassword() {

-        return password;

-    }

-

-    public void setPassword(String password) {

-        this.password = password;

-    }

-

-    public String getPortletApplicationContext() {

-        return portletApplicationContext;

-    }

-

-    public void setPortletApplicationContext(String portletApplicationContext) {

-        this.portletApplicationContext = portletApplicationContext;

-    }

-

-    public void execute() throws BuildException {

-

-        validateArgs();

-

-        try {

-            PortletPublishConfig config = new PortletPublishConfig();

-            config.setHost(getHost());

-            config.setPort(getPort());

-            config.setContext(getPortalContext());

-            config.setUsername(getUsername());

-            config.setPassword(getPassword());

-            config.setPortletApplicationContext(getPortletApplicationContext());

-

-            PortletPublishService publisher = PortletPublishServiceFactory.getFactory()

-                .createPortletPublishService(config);

-            publisher.publish(config);

-        }

-        catch(UtilityException ue) {

-            throw new BuildException(ue);

-        }

-    }

-

-    private void validateArgs() throws BuildException {

-

-    }

-}

diff --git a/trunk/pluto-ant-tasks/src/site/apt/getting-started.apt b/trunk/pluto-ant-tasks/src/site/apt/getting-started.apt
deleted file mode 100644
index c1014c0..0000000
--- a/trunk/pluto-ant-tasks/src/site/apt/getting-started.apt
+++ /dev/null
@@ -1,59 +0,0 @@
-~~

-~~ Copyright 2005-2006 The Apache Software Foundation.

-~~

-~~ Licensed under the Apache License, Version 2.0 (the "License");

-~~ you may not use this file except in compliance with the License.

-~~ You may obtain a copy of the License at

-~~

-~~      http://www.apache.org/licenses/LICENSE-2.0

-~~

-~~ Unless required by applicable law or agreed to in writing, software

-~~ distributed under the License is distributed on an "AS IS" BASIS,

-~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-~~ See the License for the specific language governing permissions and

-~~ limitations under the License.

-~~

- 

- ------

- Getting Started

- ------

- David H. DeWolf

- ------

- 23 Nov 2005

- ------

-

-Getting Started

-

-  The Pluto Ant Tasks have been created to assist those not using

-  maven with the assembly, deployment, and publishing of Maven.

-  A usage example is shown below:

-

----------------

-

-  <path id="classes">

-    <!--

-      Pluto Ant Tasks depend upon the following libraries:

-        * pluto-ant-tasks-${version}.jar

-        * pluto-util-${version}.jar

-        * pluto-descriptor-api-${version}.jar

-        * pluto-descriptor-util-${version}.jar

-        * commons-logging-1.0.4.jar

-        * castor-0.9.6

-      -->

-    <fileset dir="/path/to/pluto-libraries" includes="**/*.jar"/>

-    <fileset dir="/path/to/commons-logging" includes="**/*.jar"/>

-    <fileset dir="/path/to/castor" includes="**/*.jar"/>

-  </path>

-

-  <typedef name="passemble" classname="org.apache.pluto.ant.AssembleTask"

-		  classpathref="classes"/>

-

-   <target name="passemble">

-     <passemble 

-       webxml="src/config/web.xml" 

-       portletxml="src/config/portlet.xml" 

-       destfile="src/webapp/WEB-INF/web.xml"/>

-   </target>

-

----------------

-

diff --git a/trunk/pluto-ant-tasks/src/site/site.xml b/trunk/pluto-ant-tasks/src/site/site.xml
deleted file mode 100644
index ca0aad8..0000000
--- a/trunk/pluto-ant-tasks/src/site/site.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>

-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<project name="Maven">

-  <bannerLeft>

-    <name>Pluto Ant Plugin</name>

-    <src>http://portals.apache.org/pluto/images/pluto.png</src>

-    <href>http://portals.apache.org/pluto</href>

-  </bannerLeft>

-  <bannerRight>

-    <src>http://portals.apache.org/pluto/images/banner.png</src>

-  </bannerRight>

-  <body>

-    <links>

-      <item name="Pluto Home" href="http://portals.apache.org/pluto"/>

-      <item name="JSR 168" href="http://jcp.org/en/jsr/detail?id=168"/>

-	  <item name="Chinese Translation" href="http://heavyz.sourceforge.net/pluto_zh/pluto-container"/>

-    </links>

-

-	<menu name="Pluto Ant Tasks">

-      <item name="Getting Started" href="/getting-started.html"/>

-	</menu>

-

-    ${reports}

-  </body>

-</project>

diff --git a/trunk/pluto-container/pom.xml b/trunk/pluto-container/pom.xml
deleted file mode 100644
index ed1816f..0000000
--- a/trunk/pluto-container/pom.xml
+++ /dev/null
@@ -1,128 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 2005-2006 The Apache Software Foundation
-
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-    <parent>
-        <groupId>org.apache.pluto</groupId>
-        <artifactId>pluto</artifactId>
-        <version>1.1.0-SNAPSHOT</version>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>org.apache.pluto</groupId>
-    <artifactId>pluto-container</artifactId>
-    <packaging>jar</packaging>
-    <name>Pluto Portlet Container</name>
-    <description>The pluto portlet container.</description>
-
-
-    <dependencies>
-
-        <!-- Pluto Support Libraries =========================================== -->
-        <dependency>
-            <groupId>org.apache.pluto</groupId>
-            <artifactId>pluto-descriptor-api</artifactId>
-            <version>${pom.version}</version>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.pluto</groupId>
-            <artifactId>pluto-descriptor-impl</artifactId>
-            <version>${pom.version}</version>
-            <scope>runtime</scope>
-        </dependency>
-
-        <!-- Other Support Libraries =========================================== -->
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>${commons-logging.version}</version>
-            <scope>compile</scope>
-        </dependency>
-
-        <!-- Specification Libraries =========================================== -->
-        <dependency>
-            <groupId>javax.portlet</groupId>
-            <artifactId>portlet-api</artifactId>
-            <version>${portlet-api.version}</version>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>servlet-api</artifactId>
-            <version>${servlet-api.version}</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <!-- Testing Libraries ================================================= -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>${junit.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.easymock</groupId>
-            <artifactId>easymock</artifactId>
-            <version>2.2</version>
-        </dependency>
-        <dependency>
-            <groupId>jmock</groupId>
-            <artifactId>jmock</artifactId>
-            <version>${jmock.version}</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <!-- Assembly Plugin: Create Distributions =========================== -->
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <descriptor>src/assemble/bin.xml</descriptor>
-                </configuration>
-            </plugin>
-            <!-- Surefire Plugin: Exec Tests ===================================== -->
-            <plugin>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <includes>
-                        <include>**/*Test.java</include>
-                    </includes>
-                    <excludes>
-                        <!-- Abstract -->
-                        <exclude>**/PlutoTestCase.java</exclude>
-                    </excludes>
-                </configuration>
-            </plugin>
-            <plugin>
-                <artifactId>maven-site-plugin</artifactId>
-                <configuration>
-                    <resourcesDirectory>${basedir}/../pluto-site/src/site/resources</resourcesDirectory>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
-
-
-
-
diff --git a/trunk/pluto-container/src/assemble/bin.xml b/trunk/pluto-container/src/assemble/bin.xml
deleted file mode 100644
index 29e85b7..0000000
--- a/trunk/pluto-container/src/assemble/bin.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<assembly>

-  <id>bin</id>

-  <formats>

-    <format>tar.gz</format>

-    <format>tar.bz2</format>

-    <format>zip</format>

-  </formats>

-  <fileSets>

-    <fileSet>

-      <directory>../</directory>

-      <outputDirectory>/</outputDirectory>

-      <includes>

-        <include>README*</include>

-		<include>LICENSE*</include>

-		<include>NOTICE*</include>

-      </includes>

-    </fileSet>

-    <fileSet>

-      <directory>target</directory>

-	  <outputDirectory>/</outputDirectory>

-      <includes>

-        <include>*.jar</include>

-      </includes>

-    </fileSet>

-    <fileSet>

-      <directory>target/site</directory>

-	  <outputDirectory>docs</outputDirectory>

-      <includes>

-        <include>**/*.*</include>

-      </includes>

-    </fileSet>

-  </fileSets>

-  <dependencySets>

-    <dependencySet>

-	  <outputDirectory>lib</outputDirectory>

-      <scope>runtime</scope>

-    </dependencySet>

-  </dependencySets>

-</assembly>

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/Constants.java b/trunk/pluto-container/src/main/java/org/apache/pluto/Constants.java
deleted file mode 100644
index 5bdf223..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/Constants.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto;

-

-/**

- * Constant values used to bind internal portlet objects as attributes,

- * typically to a request.

- * @version 1.0

- */

-public class Constants {

-

-    /**

-     * The key used to bind the <code>PortletRequest</code> to the underlying

-     * <code>HttpServletRequest</code>.

-     */

-    public final static String PORTLET_REQUEST = "javax.portlet.request";

-

-    /**

-     * The key used to bind the <code>PortletResponse</code> to the underlying

-     * <code>HttpServletRequest</code>.

-     */

-    public final static String PORTLET_RESPONSE = "javax.portlet.response";

-

-    /**

-     * The key used to bind the <code>PortletConfig</code> to the underlying

-     * PortletConfig.

-     */

-    public final static String PORTLET_CONFIG = "javax.portlet.config";

-

-    /**

-     *

-     */

-    public final static String TITLE_KEY = "javax.portlet.title";

-

-    /**

-     *

-     */

-    public final static String SHORT_TITLE_KEY = "javax.portlet.short-title";

-

-    /**

-     * 

-     */

-    public final static String KEYWORDS_KEY = "javax.portlet.keywords";

-

-    /**

-     * The key used to bind the method of processing being requested by the

-     * container to the underlying <code>PortletRquest</code>.

-     */

-    public final static String METHOD_ID = "org.apache.pluto.core.method";

-

-    /**

-     * The unique method identifier for render requests.  Render requests are

-     * requested through a call to the {@link PortletContainer#doRender(org.apache.pluto.PortletWindow,

-        * javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)}

-     * method.

-     */

-    public final static Integer METHOD_RENDER = new Integer(1);

-

-    /**

-     * The unique method identifier for render requests.  Render requests are

-     * requested through a call to the {@link PortletContainer#doAction(org.apache.pluto.PortletWindow,

-        * javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)}

-     * method.

-     */

-    public final static Integer METHOD_ACTION = new Integer(3);

-

-    /**

-     * The unique method identifier for render requests.  Render requests are

-     * requested through a call to the {@link PortletContainer#doLoad(org.apache.pluto.PortletWindow,

-        * javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)}

-     * method.

-     */

-    public final static Integer METHOD_NOOP = new Integer(5);

-

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/OptionalContainerServices.java b/trunk/pluto-container/src/main/java/org/apache/pluto/OptionalContainerServices.java
deleted file mode 100644
index 901bd59..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/OptionalContainerServices.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto;

-

-import org.apache.pluto.spi.optional.PortletPreferencesService;

-import org.apache.pluto.spi.optional.PortletEnvironmentService;

-import org.apache.pluto.spi.optional.PortletInvokerService;

-import org.apache.pluto.spi.optional.PortletRegistryService;

-import org.apache.pluto.internal.InternalPortletWindow;

-

-/**

- * Defines the services necessary for integration between the Pluto Container

- * and a Portal.

- *

- * @since 1.1.0

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- */

-public interface OptionalContainerServices {

-

-    /**

-     * Returns the portlet preferences service implementation

-     * used by the container.

-     *

-     * @return portlet preferences service implementation.

-     */

-    PortletPreferencesService getPortletPreferencesService();

-

-    /**

-     * Returns the environment services implementation

-     * used by the container.

-     *

-     * @return portlet environment services implementation.

-     */

-    PortletEnvironmentService getPortletEnvironmentService();

-

-    /**

-     * Returns the portlet registry services implementation

-     * used by the container.

-     *

-     * @return registry service implementation

-     */

-    PortletRegistryService getPortletRegistryService();

-

-    

-    /**

-     * Returns an invoker for the specified PortletWindow.

-     *

-     * @param portletWindow  the InternalPortletWindow used for invocation.

-     * @return an invoker which can be used to service the indicated portlet.

-     */

-    PortletInvokerService getPortletInvokerService(InternalPortletWindow portletWindow);

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/PlutoConfigurationException.java b/trunk/pluto-container/src/main/java/org/apache/pluto/PlutoConfigurationException.java
deleted file mode 100644
index e94e238..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/PlutoConfigurationException.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto;

-

-/**

- * Exception thrown when Pluto configuration fails.

- *

- * @author ddewolf@apache.org

- * @since Jul 2, 2005

- */

-public class PlutoConfigurationException extends RuntimeException {

-

-    public PlutoConfigurationException(String message) {

-        super(message);

-    }

-

-    public PlutoConfigurationException(String message, Throwable cause) {

-        super(message, cause);

-    }

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/PortletContainer.java b/trunk/pluto-container/src/main/java/org/apache/pluto/PortletContainer.java
deleted file mode 100644
index 141d104..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/PortletContainer.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto;

-

-import java.io.IOException;

-import java.util.Iterator;

-

-import javax.portlet.PortletException;

-import javax.servlet.ServletContext;

-import javax.servlet.http.HttpServletRequest;

-import javax.servlet.http.HttpServletResponse;

-

-import org.apache.pluto.descriptors.portlet.PortletAppDD;

-

-/**

- * The publicized entry point into Pluto. The base functionality of the portlet

- * container can be enhanced or even modified by PortletContainerServices.

- * <p/>

- * <P> The methods of this class have to be called in the following order:

- * <TABLE> <TR><TH>Method</TH><TH>Description</TH><TH>Constraints</TH></TR>

- * <TR><TD>{@link #init(javax.servlet.ServletContext)}</TD> <TD>Initialized the

- * portlet container.</TD> <TD>Performed only once per container

- * lifecycle.</TD></TR>

- * <p/>

- * <TR><TD>{@link #doAction(org.apache.pluto.PortletWindow,

-    * javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)}</TD>

- * <TD>Perform the action for the targeted portlet</TD> <TD>Optionally performed

- * for a single portlet per request</TD></TR>

- * <p/>

- * <TR><TD>{@link #doRender(org.apache.pluto.PortletWindow,

-    * javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)}</TD>

- * <TD>Render the portlet</TD> <TD>Performed once for each portlet per

- * request.</TD></TR>

- * <p/>

- * <TR><TD>{@link #destroy()}</TD> <TD>Destroy and remove container from

- * service.</TD> <TD>Performed only once per container lifecylce</TD></TR>

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:esm@apache.org">Elliot Metsger</a>

- * @version $Id: PortletContainer.java 36010 2004-07-30 14:16:06Z ddewolf $

- */

-public interface PortletContainer {

-

-    /**

-     * Initializes the container for use within the given servlet context.

-     * @param servletContext  the servlet context.

-     * @throws PortletContainerException if an error occurs.

-     */

-    public void init(ServletContext servletContext)

-    throws PortletContainerException;

-

-    /**

-     * Shuts down the container. After calling this method it is no longer valid

-     * to call any method on the portlet container.

-     * @throws PortletContainerException if an error occurs while shutting down

-     *                                   the container

-     */

-    public void destroy() throws PortletContainerException;

-

-    /**

-     * Calls the render method of the given portlet window.

-     * @param internalPortletWindow the portlet Window

-     * @param request               the servlet request

-     * @param response              the servlet response

-     * @throws PortletException          if one portlet has trouble fulfilling

-     *                                   the request

-     * @throws IOException               if the streaming causes an I/O problem

-     * @throws PortletContainerException if the portlet container implementation

-     *                                   has trouble fulfilling the request

-     */

-    public void doRender(PortletWindow internalPortletWindow,

-                         HttpServletRequest request,

-                         HttpServletResponse response)

-        throws PortletException, IOException, PortletContainerException;

-

-

-    /**

-     * Indicates that a portlet action occured in the current request and calls

-     * the processAction method of this portlet.

-     * @param internalPortletWindow the portlet Window

-     * @param request               the servlet request

-     * @param response              the servlet response

-     * @throws PortletException          if one portlet has trouble fulfilling

-     *                                   the request

-     * @throws PortletContainerException if the portlet container implementation

-     *                                   has trouble fulfilling the request

-     */

-    public void doAction(PortletWindow internalPortletWindow,

-                         HttpServletRequest request,

-                         HttpServletResponse response)

-        throws PortletException, IOException, PortletContainerException;

-

-    /**

-     * Indicates that the portlet must be initialized

-     * @param internalPortletWindow the portlet Window

-     * @param servletRequest        the servlet request

-     * @param servletResponse       the servlet response

-     * @throws PortletException          if one portlet has trouble fulfilling

-     *                                   the request

-     * @throws PortletContainerException if the portlet container implementation

-     *                                   has trouble fulfilling the request

-     */

-    public void doLoad(PortletWindow internalPortletWindow,

-                       HttpServletRequest servletRequest,

-                       HttpServletResponse servletResponse)

-        throws PortletException, IOException, PortletContainerException;

-

-    /**

-     * Returns whether the container is already initialized or not.

-     * @return <code>true</code> if the container is initialized

-     */

-    public boolean isInitialized();

-

-    /**

-     * Retrieve the unique container name

-     * @return the container name.

-     */

-    public String getName();

-

-    /**

-     * Retreive the required container services associated with this container.

-     * @return the required container services associated with this container.

-     */

-    public RequiredContainerServices getRequiredContainerServices();

-

-    /**

-     * Retrieve the optional container services associated with this contianer.

-     * @return the container services provided by either the portal or the defaults.

-     */

-    public OptionalContainerServices getOptionalContainerServices();

-    

-    /**

-     * Retrieve the {@link PortletAppDD} for the portlet

-     * located at the supplied context.

-     * 

-     * Must not return null.

-     * 

-     * @param context the context of the portlet

-     * @return the portlet application descriptor

-     * @throws PortletContainerException if the container has trouble obtaining

-     *                                   the context of the portlet, or retrieving

-     *                                   the <code>PortletAppDD</code>

-     */    

-    public PortletAppDD getPortletApplicationDescriptor(String context)

-        throws PortletContainerException;

-

-

-    

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/PortletContainerException.java b/trunk/pluto-container/src/main/java/org/apache/pluto/PortletContainerException.java
deleted file mode 100644
index fe9d159..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/PortletContainerException.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto;

-

-/**

- * Thrown when an internal portlet container exception occurs within Pluto.

- * This type of exception indicates an error from which the container is not

- * able to recover.

- *

- * @version 1.0

- */

-public class PortletContainerException extends Exception {

-    private Throwable cause;

-

-    /**

-     * Constructs a new PortletContainerException.

-     * This exception will have no message and no root cause.

-     */

-    public PortletContainerException() {

-

-    }

-

-    /**

-     * Constructs a new PortletContainerException with the given message.

-     * @param text the message explaining the exception occurance

-     */

-    public PortletContainerException(String text) {

-        super(text);

-    }

-

-    /**

-     * Constructs a new PortletContainerException with the given message and

-     * root cause.

-     * @param text  the message explaining the exception occurance

-     * @param cause the root cause of the is exception

-     */

-    public PortletContainerException(String text, Throwable cause) {

-        super(text);

-        this.cause = cause;

-    }

-

-    /**

-     * Constructs a new portlet invoker exception when the portlet needs to

-     * throw an exception. The exception's message is based on the localized

-     * message of the underlying exception.

-     * @param cause the root cause

-     */

-    public PortletContainerException(Throwable cause) {

-        super(cause.getLocalizedMessage());

-        this.cause = cause;

-    }

-

-    /**

-     * Returns the exception that cause this portlet exception.

-     * @return the <CODE>Throwable</CODE> that caused this portlet exception.

-     */

-    public Throwable getRootCause() {

-        return (cause);

-    }

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/PortletContainerFactory.java b/trunk/pluto-container/src/main/java/org/apache/pluto/PortletContainerFactory.java
deleted file mode 100644
index 86b593b..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/PortletContainerFactory.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.core.DefaultOptionalContainerServices;

-import org.apache.pluto.core.PortletContainerImpl;

-import org.apache.pluto.util.ArgumentUtility;

-

-/**

- * Factory used to create new PortletContainer instances.  The factor constructs

- * the underlying pluto container implementation by using the the given

- * container services.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since Sep 18, 2004

- */

-public class PortletContainerFactory {

-

-    /** Logger. */

-    private static final Log LOG = LogFactory.getLog(PortletContainerFactory.class);

-

-

-    /** Singleton instance of the <code>PortletContainerFactory</code>. */

-    private static final PortletContainerFactory FACTORY =

-    		new PortletContainerFactory();

-

-    /**

-     * Accessor method for the singleton instance of the

-     * <code>PortletContainerFactory</code>.

-     * @return singleton instance of the PortletContainerFactory

-     */

-    public static PortletContainerFactory getInstance() {

-    	return FACTORY;

-    }

-

-    /**

-     * Private constructor that prevents external instantiation.

-     */

-    private PortletContainerFactory() {

-    	// Do nothing.

-    }

-

-    /**

-     * Create a container with the given containerName, initialized from the given

-     * servlet config, and using the given container services.

-     * @param containerName  the name of the portlet container.

-     * @param requiredServices  the required portlet container services.

-     * @return newly created PortletContainer instance.

-     * @throws PortletContainerException

-     */

-    public PortletContainer createContainer(

-    		String containerName,

-    		RequiredContainerServices requiredServices)

-        throws PortletContainerException {

-        return createContainer(containerName,

-                               requiredServices,

-                               new DefaultOptionalContainerServices());

-   }

-

-    public PortletContainer createContainer(

-    		String containerName,

-    		RequiredContainerServices requiredServices,

-    		OptionalContainerServices optionalServices) {

-    	

-        ArgumentUtility.validateNotNull("requiredServices", requiredServices);

-        ArgumentUtility.validateNotEmpty("containerName", containerName);

-        

-        DefaultOptionalContainerServices optionalServicesWrapper =

-        		new DefaultOptionalContainerServices(optionalServices);

-        PortletContainer container = new PortletContainerImpl(

-        		containerName, requiredServices, optionalServicesWrapper);

-        

-        if (LOG.isInfoEnabled()) {

-            LOG.info("Portlet Container [" + containerName + "] created.");

-        }

-        return container;

-    }

-}

-

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/PortletContainerRuntimeException.java b/trunk/pluto-container/src/main/java/org/apache/pluto/PortletContainerRuntimeException.java
deleted file mode 100644
index cabdae8..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/PortletContainerRuntimeException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto;

-

-/**

- * Runtime exception thrown when an unexpected condition is encountered.

- *

- * @version 1.0

- */

-public class PortletContainerRuntimeException extends RuntimeException {

-

-    public PortletContainerRuntimeException() {

-

-    }

-

-    public PortletContainerRuntimeException(String message) {

-        super(message);

-    }

-

-    public PortletContainerRuntimeException(String message, Throwable cause) {

-        super(message, cause);

-    }

-

-    public PortletContainerRuntimeException(Throwable cause) {

-        super(cause);

-    }

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/PortletWindow.java b/trunk/pluto-container/src/main/java/org/apache/pluto/PortletWindow.java
deleted file mode 100644
index 359839b..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/PortletWindow.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto;

-

-import javax.portlet.PortletMode;

-import javax.portlet.WindowState;

-

-/**

- * Thin representation of the portlet window for which the container

- * request should be processed.  The PortletWindow is used internally

- * to map the request to the configured Portlet Application and Portlet.

- *

- * @see org.apache.pluto.core.PortletWindowImpl

- * @see org.apache.pluto.descriptors.portlet.PortletDD

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- * @since Sep 22, 2004

- */

-public interface PortletWindow {

-

-    /**

-     * Retrieve this windows unique id which will be

-     *  used to communicate back to the referencing portal.

-     * @return unique id.

-     */

-    public PortletWindowID getId();

-

-    /**

-     * Retrieve the context path in which the Portlet resides.

-     * @return context path

-     */

-    public String getContextPath();

-

-    /**

-     * Retrieve the name of the portlet as configured in the

-     * <code>portlet.xml</code>.

-     * @return the name of the portlet.

-     */

-    public String getPortletName();

-

-    /**

-     * Retrieve the current window state for this window.

-     * @return the current window state.

-     */

-    public WindowState getWindowState();

-

-    /**

-     * Retrieve the current portlet mode for this window.

-     * @return the current portlet mode.

-     */

-    public PortletMode getPortletMode();

-    

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/PortletWindowID.java b/trunk/pluto-container/src/main/java/org/apache/pluto/PortletWindowID.java
deleted file mode 100644
index a5f8783..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/PortletWindowID.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto;

-

-/**

- * The portlet window ID.

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- */

-public interface PortletWindowID {

-	

-	/**

-	 * Returns the unique string ID of the portlet window.

-	 * <p>

-	 * Depending on the implementation of <code>toString()</code> is dangerous,

-	 * because the original implementation in <code>Object</code> is not

-	 * qualified.

-	 * </p>

-	 * @return the unique string ID of the portlet window.

-	 */

-	public String getStringId();

-	

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/RequiredContainerServices.java b/trunk/pluto-container/src/main/java/org/apache/pluto/RequiredContainerServices.java
deleted file mode 100644
index f7b19c0..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/RequiredContainerServices.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto;

-

-import org.apache.pluto.spi.PortalCallbackService;

-

-import javax.portlet.PortalContext;

-

-/**

- * This interface defines the services required for integration between the

- * Pluto Portlet Container and a Portal.

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- */

-public interface RequiredContainerServices {

-

-    /**

-     * Returns the PortalContext instance associated with this group of

-     * portlet container services.

-     * @return a PortalContext implementation.

-     */

-    public PortalContext getPortalContext();

-

-    /**

-     * Returns the portal callback service implementation instance associated

-     * with this group of portlet container services. 

-     * @return a PortalCallbackService implementation.

-     */

-    public PortalCallbackService getPortalCallbackService();

-    

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalContainerServices.java b/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalContainerServices.java
deleted file mode 100644
index e96e23f..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalContainerServices.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.core;

-

-import org.apache.pluto.OptionalContainerServices;

-import org.apache.pluto.internal.InternalPortletWindow;

-import org.apache.pluto.spi.optional.PortletPreferencesService;

-import org.apache.pluto.spi.optional.PortletEnvironmentService;

-import org.apache.pluto.spi.optional.PortletInvokerService;

-import org.apache.pluto.spi.optional.PortletRegistryService;

-

-/**

- * Default Optional Container Services implementation.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- * @since Sep 18, 2004

- */

-public class DefaultOptionalContainerServices implements OptionalContainerServices {

-

-    private PortletPreferencesService preferenceService;

-    private PortletRegistryService portletRegistryService;

-    

-    

-    /**

-     * Constructs an instance using the default portlet preferences service

-     * implementation.

-     */

-    public DefaultOptionalContainerServices() {

-        preferenceService = new DefaultPortletPreferencesService();

-        portletRegistryService = PortletContextManager.getManager();

-    }

-    

-    /**

-     * Constructs an instance using specified optional container services

-     * implementation. If the portlet preferences service is provided, it will

-     * be used. Otherwise, the default portlet preferences service will be used.

-     * @param root  the root optional container services implementation.

-     */

-    public DefaultOptionalContainerServices(OptionalContainerServices root) {

-        this();

-        if (root.getPortletPreferencesService() != null) {

-            preferenceService = root.getPortletPreferencesService();

-        }

-

-        if (root.getPortletRegistryService() != null) {

-            portletRegistryService = root.getPortletRegistryService();

-        }

-    }

-    

-    

-    // OptionalContainerServices Impl ------------------------------------------

-    

-    public PortletPreferencesService getPortletPreferencesService() {

-        return preferenceService;

-    }

-

-

-    public PortletRegistryService getPortletRegistryService() {

-        return portletRegistryService;

-    }

-

-    /**

-     * TODO:

-     */

-    public PortletEnvironmentService getPortletEnvironmentService() {

-        return null;

-    }

-    

-    /**

-     * TODO:

-     */

-    public PortletInvokerService getPortletInvokerService(

-    		InternalPortletWindow window) {

-        return null;

-    }

-    

-}

-

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletPreferencesService.java b/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletPreferencesService.java
deleted file mode 100644
index 1062c08..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletPreferencesService.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.core;

-

-import java.util.HashMap;

-import java.util.Map;

-

-import javax.portlet.PortletRequest;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.PortletContainerException;

-import org.apache.pluto.PortletWindow;

-import org.apache.pluto.internal.InternalPortletPreference;

-import org.apache.pluto.spi.optional.PortletPreferencesService;

-

-/**

- * Default implementation of the portlet preferences service. The portlet

- * preferences service is a singleton held by the pluto portlet container.

- * 

- * @see javax.portlet.PortletPreferences

- * @see org.apache.pluto.internal.impl.PortletPreferencesImpl

- * @see javax.portlet.PortletPreferences

- * 

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class DefaultPortletPreferencesService

-implements PortletPreferencesService {

-	

-	/** Logger. */

-	private static final Log LOG = LogFactory.getLog(

-			DefaultPortletPreferencesService.class);

-	

-	

-	// Private Member Variables ------------------------------------------------

-	

-	/**

-	 * The in-memory portlet preferences storage: key is the preference name as

-	 * a string, value is an array of PortletPreference objects.

-	 */

-	private Map storage = new HashMap();

-	

-	

-	// Constructor -------------------------------------------------------------

-	

-	/**

-	 * Default no-arg constructor.

-	 */

-	public DefaultPortletPreferencesService() {

-		// Do nothing.

-	}

-	

-	

-	// PortletPreferencesService Impl ------------------------------------------

-	

-	/**

-	 * Returns the stored portlet preferences array. The preferences managed by

-	 * this service should be protected from being directly accessed, so this

-	 * method returns a cloned copy of the stored preferences.

-	 * 

-	 * @param portletWindow  the portlet window.

-	 * @param request  the portlet request from which the remote user is retrieved.

-	 * @return a copy of the stored portlet preferences array.

-	 * @throws PortletContainerException

-	 */

-	public InternalPortletPreference[] getStoredPreferences(

-			PortletWindow portletWindow,

-			PortletRequest request)

-	throws PortletContainerException {

-        String key = getFormattedKey(portletWindow, request);

-        InternalPortletPreference[] preferences = (InternalPortletPreference[])

-        		storage.get(key);

-        if (preferences == null) {

-            if (LOG.isDebugEnabled()) {

-                LOG.debug("No portlet preferences found for: " + key);

-            }

-            return new InternalPortletPreference[0];

-        } else {

-        	if (LOG.isDebugEnabled()) {

-        		LOG.debug("Got " + preferences.length + " stored preferences.");

-        	}

-        	return clonePreferences(preferences);

-        }

-    }

-	

-	/**

-	 * Stores the portlet preferences to the in-memory storage. This method

-	 * should be invoked after the portlet preferences are validated by the

-	 * preference validator (if defined).

-	 * <p>

-	 * The preferences managed by this service should be protected from being

-	 * directly accessed, so this method clones the passed-in preferences array

-	 * and saves it.

-	 * </p>

-	 * 

-	 * @see javax.portlet.PortletPreferences#store()

-	 *

-	 * @param portletWindow  the portlet window

-	 * @param request  the portlet request from which the remote user is retrieved.

-	 * @param preferences  the portlet preferences to store.

-	 * @throws PortletContainerException

-	 */

-    public void store(PortletWindow portletWindow,

-                      PortletRequest request,

-                      InternalPortletPreference[] preferences)

-    throws PortletContainerException {

-        String key = getFormattedKey(portletWindow, request);

-        storage.put(key, clonePreferences(preferences));

-        if (LOG.isDebugEnabled()) {

-            LOG.debug("Portlet preferences stored for: " + key);

-        }

-    }

-    

-    

-    // Private Methods ---------------------------------------------------------

-    

-    /**

-     * Formats the preference key for the portlet preference using specified

-     * portlet window and remote user.

-     * @param portletWindow  the portlet window.

-     * @param request  the remote request.

-     */

-    private String getFormattedKey(PortletWindow portletWindow,

-                                   PortletRequest request) {

-    	StringBuffer buffer = new StringBuffer();

-    	buffer.append("user=").append(request.getRemoteUser()).append(";");

-    	buffer.append("portletName=").append(portletWindow.getPortletName());

-    	return buffer.toString();

-    }

-    

-    /**

-     * Clones a PortletPreference array. This method performs a deep clone on

-     * the passed-in portlet preferences array. Every PortletPreference object

-     * in the array are cloned (via the <code>PortletPreference.clone()</code>

-     * method) and injected into the new array.

-     * 

-     * @param preferences  the portlet preferences array to clone.

-     * @return a deep-cloned copy of the portlet preferences array.

-     */

-    private InternalPortletPreference[] clonePreferences(

-    		InternalPortletPreference[] preferences) {

-    	if (preferences == null) {

-    		return null;

-    	}

-    	InternalPortletPreference[] copy =

-    			new InternalPortletPreference[preferences.length];

-    	for (int i = 0; i < preferences.length; i++) {

-    		if (preferences[i] != null) {

-    			copy[i] = (InternalPortletPreference) preferences[i].clone();

-    		} else {

-    			copy[i] = null;

-    		}

-    	}

-    	return copy;

-    }

-    

-}

-

-

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java b/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java
deleted file mode 100644
index 2572470..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java
+++ /dev/null
@@ -1,380 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.core;

-

-import java.io.IOException;

-import java.util.Map;

-

-import javax.portlet.PortletException;

-import javax.servlet.ServletContext;

-import javax.servlet.http.HttpServletRequest;

-import javax.servlet.http.HttpServletResponse;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-

-import org.apache.pluto.descriptors.portlet.PortletAppDD;

-import org.apache.pluto.internal.InternalPortletWindow;

-import org.apache.pluto.internal.PortletDescriptorRegistry;

-import org.apache.pluto.internal.impl.ActionRequestImpl;

-import org.apache.pluto.internal.impl.ActionResponseImpl;

-import org.apache.pluto.internal.impl.PortletWindowImpl;

-import org.apache.pluto.internal.impl.RenderRequestImpl;

-import org.apache.pluto.internal.impl.RenderResponseImpl;

-import org.apache.pluto.spi.PortletURLProvider;

-import org.apache.pluto.OptionalContainerServices;

-import org.apache.pluto.PortletContainer;

-import org.apache.pluto.PortletContainerException;

-import org.apache.pluto.PortletWindow;

-import org.apache.pluto.RequiredContainerServices;

-

-/**

- * Default Pluto Container implementation.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @author <a href="mailto:esm@apache.org">Elliot Metsger</a>

- * @version 1.0

- * @since Sep 18, 2004

- */

-public class PortletContainerImpl implements PortletContainer {

-

-    /** Internal logger. */

-    private static final Log LOG = LogFactory.getLog(PortletContainerImpl.class);

-    

-    

-    // Private Member Variables ------------------------------------------------

-    

-    /** The portlet container name. */

-    private String name = null;

-    

-    /** The required container services associated with this container. */

-    private RequiredContainerServices requiredContainerServices = null;

-    

-    /** The optional container services associated with this container. */

-    private OptionalContainerServices optionalContainerServices = null;

-    

-    /** The servlet context associated with this container. */

-    private ServletContext servletContext = null;

-

-    /** Flag indicating whether or not we've been initialized. */

-    private boolean initialized = false;

-    

-    

-    // Constructor -------------------------------------------------------------

-    

-    /** Default Constructor.  Create a container implementation

-     *  whith the given name and given services.

-     *

-     * @param name  the name of the container.

-     * @param requiredServices  the required container services implementation.

-     * @param optionalServices  the optional container services implementation.

-     */

-    public PortletContainerImpl(String name,

-                                RequiredContainerServices requiredServices,

-                                OptionalContainerServices optionalServices) {

-        this.name = name;

-        this.requiredContainerServices = requiredServices;

-        this.optionalContainerServices = optionalServices;

-    }

-    

-    

-    // PortletContainer Impl ---------------------------------------------------

-    

-    /**

-     * Initialize the container for use within the given configuration scope.

-     * @param servletContext  the servlet context of the portal webapp.

-     */

-    public void init(ServletContext servletContext)

-    throws PortletContainerException {

-    	if (servletContext == null) {

-    		throw new PortletContainerException(

-    				"Unable to initialize portlet container [" + name + "]: "

-    				+ "servlet context is null.");

-    	}

-        this.servletContext = servletContext;

-        this.initialized = true;

-        infoWithName("Container initialized successfully.");

-    }

-

-    /**

-     * Determine whether this container has been initialized or not.

-     * @return true if the container has been initialized.

-     */

-    public boolean isInitialized() {

-        return initialized;

-    }

-

-    /**

-     * Destroy this container.

-     */

-    public void destroy() {

-        this.servletContext = null;

-        this.initialized = false;

-        infoWithName("Container destroyed.");

-    }

-

-

-    /**

-     * Renders the portlet associated with the specified portlet window.

-     * @param portletWindow  the portlet window.

-     * @param request  the servlet request.

-     * @param response  the servlet response.

-     * @throws IllegalStateException  if the container is not initialized.

-     * @throws PortletException

-     * @throws IOException

-     * @throws PortletContainerException

-     * 

-     * @see javax.portlet.Portlet#render(javax.portlet.RenderRequest,javax.portlet.RenderResponse)

-     */

-    public void doRender(PortletWindow portletWindow,

-                         HttpServletRequest request,

-                         HttpServletResponse response)

-    throws PortletException, IOException, PortletContainerException {

-    	

-    	ensureInitialized();

-    	

-        InternalPortletWindow internalPortletWindow =

-        		new PortletWindowImpl(servletContext, portletWindow);

-        debugWithName("Render request received for portlet: "

-        		+ portletWindow.getPortletName());

-        

-        RenderRequestImpl renderRequest = new RenderRequestImpl(

-        		this, internalPortletWindow, request);

-        RenderResponseImpl renderResponse = new RenderResponseImpl(

-        		this, internalPortletWindow, request, response);

-

-        PortletInvoker invoker = new PortletInvoker(internalPortletWindow);

-        invoker.render(renderRequest, renderResponse);

-        debugWithName("Portlet rendered for: "

-        		+ portletWindow.getPortletName());

-    }

-

-    /**

-     * Process action for the portlet associated with the given portlet window.

-     * @param portletWindow  the portlet window.

-     * @param request  the servlet request.

-     * @param response  the servlet response.

-     * @throws PortletException

-     * @throws IOException

-     * @throws PortletContainerException

-     * 

-     * @see javax.portlet.Portlet#processAction(javax.portlet.ActionRequest,javax.portlet.ActionResponse)

-     */

-    public void doAction(PortletWindow portletWindow,

-                         HttpServletRequest request,

-                         HttpServletResponse response)

-    throws PortletException, IOException, PortletContainerException {

-    	

-    	ensureInitialized();

-    	

-        InternalPortletWindow internalPortletWindow =

-            	new PortletWindowImpl(servletContext, portletWindow);

-    	debugWithName("Action request received for portlet: "

-    			+ portletWindow.getPortletName());

-    	

-        ActionRequestImpl actionRequest = new ActionRequestImpl(

-        		this, internalPortletWindow, request);

-        ActionResponseImpl actionResponse = new ActionResponseImpl(

-        		this, internalPortletWindow, request, response);

-        

-        PortletInvoker invoker = new PortletInvoker(internalPortletWindow);

-        invoker.action(actionRequest, actionResponse);

-        debugWithName("Portlet action processed for: "

-        		+ portletWindow.getPortletName());

-        

-        // After processing action, send a redirect URL for rendering.

-        String location = actionResponse.getRedirectLocation();

-

-        if (location == null) {

-        	

-        	// Create portlet URL provider to encode redirect URL.

-        	debugWithName("No redirect location specified.");

-            PortletURLProvider redirectURL = requiredContainerServices

-            		.getPortalCallbackService()

-            		.getPortletURLProvider(request, internalPortletWindow);

-            

-            // Encode portlet mode if it is changed.

-            if (actionResponse.getChangedPortletMode() != null) {

-                redirectURL.setPortletMode(

-                		actionResponse.getChangedPortletMode());

-            }

-            

-            // Encode window state if it is changed.

-            if (actionResponse.getChangedWindowState() != null) {

-                redirectURL.setWindowState(

-                		actionResponse.getChangedWindowState());

-            }

-            

-            // Encode render parameters retrieved from action response.

-            Map renderParameters = actionResponse.getRenderParameters();

-            redirectURL.clearParameters();

-            redirectURL.setParameters(renderParameters);

-            

-            // Encode redirect URL as a render URL.

-            redirectURL.setAction(false);

-            

-            // Set secure of the redirect URL if necessary.

-            if (actionRequest.isSecure()) {

-                redirectURL.setSecure();

-            }

-            

-            // Encode the redirect URL to a string.

-            location = actionResponse.encodeRedirectURL(redirectURL.toString());

-        }

-

-        // Here we intentionally use the original response

-        // instead of the wrapped internal response.

-        response.sendRedirect(location);

-        debugWithName("Redirect URL sent.");

-    }

-

-    /**

-     * Loads the portlet associated with the specified portlet window.

-     * @param portletWindow  the portlet window.

-     * @param request  the servlet request.

-     * @param response  the servlet response.

-     * @throws PortletException

-     * @throws IOException

-     * @throws PortletContainerException

-     */

-    public void doLoad(PortletWindow portletWindow,

-                       HttpServletRequest request,

-                       HttpServletResponse response)

-    throws PortletException, IOException, PortletContainerException {

-    	

-    	ensureInitialized();

-    	

-        InternalPortletWindow internalPortletWindow =

-        		new PortletWindowImpl(servletContext, portletWindow);

-        debugWithName("Load request received for portlet: "

-        		+ portletWindow.getPortletName());

-        

-        RenderRequestImpl renderRequest = new RenderRequestImpl(

-        		this, internalPortletWindow, request);

-        RenderResponseImpl renderResponse = new RenderResponseImpl(

-        		this, internalPortletWindow, request, response);

-        

-        PortletInvoker invoker = new PortletInvoker(internalPortletWindow);

-        invoker.load(renderRequest, renderResponse);

-        debugWithName("Portlet loaded for: " + portletWindow.getPortletName());

-    }

-

-    public String getName() {

-        return name;

-    }

-

-    public RequiredContainerServices getRequiredContainerServices() {

-        return requiredContainerServices;

-    }

-

-    /**

-     * Retrieve the optional container services used by the container.

-     * If no implementation was provided during construction, the default

-     * instance will be returned.

-     *

-     * @return services used by the container.

-     */

-    public OptionalContainerServices getOptionalContainerServices() {

-        return optionalContainerServices;

-    }

-    

-    public PortletAppDD getPortletApplicationDescriptor(String context) 

-        throws PortletContainerException {

-        

-        // make sure the container has initialized

-        ensureInitialized();

-        

-        // sanity check

-        if (context == null || context.trim().equals("")) {

-            final String msg = "Context was null or the empty string.";

-            errorWithName(msg);

-            throw new PortletContainerException(msg);

-        }

-        

-        // obtain the context of the portlet

-        ServletContext portletCtx = servletContext.getContext(context);

-        if (portletCtx == null) {

-            final String msg = "Unable to obtain the servlet context for " +

-                "portlet context [" + context + "].  Ensure the portlet has " +

-                "been deployed and that cross context support is enabled.";

-            errorWithName(msg);

-            throw new PortletContainerException(msg);

-        }

-        

-        // obtain the portlet application descriptor for the portlet

-        // context.

-        PortletAppDD portletAppDD = PortletDescriptorRegistry

-                                        .getRegistry()

-                                        .getPortletAppDD(portletCtx);

-        

-        // we can't return null

-        if (portletAppDD == null) {

-            final String msg = "Obtained a null portlet application description for " +

-                "portlet context [" + context + "]";

-            errorWithName(msg);

-            throw new PortletContainerException(msg);

-        }

-        

-        return portletAppDD;        

-    }

-    

-    

-    // Private Methods ---------------------------------------------------------

-    

-    /**

-     * Ensures that the portlet container is initialized.

-     * @throws IllegalStateException  if the container is not initialized.

-     */

-    private void ensureInitialized() throws IllegalStateException {

-    	if (!isInitialized()) {

-    		throw new IllegalStateException(

-    				"Portlet container [" + name + "] is not initialized.");

-    	}

-    }

-    

-    /**

-     * Prints a message at DEBUG level with the container name prefix.

-     * @param message  log message.

-     */

-    private void debugWithName(String message) {

-    	if (LOG.isDebugEnabled()) {

-    		LOG.debug("Portlet Container [" + name + "]: " + message);

-    	}

-    }

-    

-    /**

-     * Prints a message at INFO level with the container name prefix.

-     * @param message  log message.

-     */

-    private void infoWithName(String message) {

-    	if (LOG.isInfoEnabled()) {

-    		LOG.info("Portlet Container [" + name + "]: " + message);

-    	}

-    }

-    

-    /**

-     * Prints a message at ERROR level with the container name prefix.

-     * @param message  log message.

-     */

-    private void errorWithName(String message) {

-        if (LOG.isErrorEnabled()) {

-            LOG.info("Portlet Container [" + name + "]: " + message);

-        }

-    }

-    

-}

-

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContextManager.java b/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContextManager.java
deleted file mode 100644
index 1577444..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletContextManager.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.core;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.PortletContainerException;

-import org.apache.pluto.descriptors.portlet.PortletAppDD;

-import org.apache.pluto.internal.InternalPortletContext;

-import org.apache.pluto.internal.PortletDescriptorRegistry;

-import org.apache.pluto.internal.impl.PortletContextImpl;

-import org.apache.pluto.spi.optional.PortletRegistryEvent;

-import org.apache.pluto.spi.optional.PortletRegistryListener;

-import org.apache.pluto.spi.optional.PortletRegistryService;

-

-import javax.servlet.ServletContext;

-import java.lang.reflect.Method;

-import java.net.URL;

-import java.net.MalformedURLException;

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.HashSet;

-import java.util.Iterator;

-import java.util.List;

-import java.util.Map;

-

-/**

- * Manager used to cache the portlet configurations which have

- * been previously parsed.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- * @since Sep 20, 2004

- */

-public class PortletContextManager implements PortletRegistryService {

-

-    /**

-     * Log Instance

-     */

-    private static final Log LOG = LogFactory.getLog(PortletContextManager.class);

-

-    /**

-     * The singleton manager instance.

-     */

-    private static final PortletContextManager MANAGER = new PortletContextManager();

-

-    // Private Member Variables ------------------------------------------------

-

-    /**

-     * The PortletContext cache map: key is servlet context, and value is the

-     * associated portlet context.

-     */

-    private Map portletContexts = new HashMap();

-

-    /**

-     * The registered listeners that should be notified upon

-     * registry events.

-     */

-    private List registryListeners = new ArrayList();

-

-    // Constructor -------------------------------------------------------------

-

-    /**

-     * Private constructor that prevents external instantiation.

-     */

-    private PortletContextManager() {

-        // Do nothing.

-    }

-

-    /**

-     * Returns the singleton manager instance.

-     *

-     * @return the singleton manager instance.

-     */

-    public static PortletContextManager getManager() {

-        return MANAGER;

-    }

-

-    // Public Methods ----------------------------------------------------------

-

-    /**

-     * Retrieves the PortletContext associated with the given ServletContext.

-     * If one does not exist, it is created.

-     *

-     * @param servletContext the servlet context.

-     * @return the InternalPortletContext associated with the ServletContext.

-     * @throws PortletContainerException

-     */

-    public InternalPortletContext register(ServletContext servletContext)

-        throws PortletContainerException {

-        String applicationId = getContextPath(servletContext);

-        if (!portletContexts.containsKey(servletContext)) {

-

-            PortletAppDD portletAppDD = PortletDescriptorRegistry.getRegistry()

-                .getPortletAppDD(servletContext);

-

-            PortletContextImpl portletContext = new PortletContextImpl(

-                applicationId,  servletContext, portletAppDD);

-

-            if (portletContext.getApplicationId() == null) {

-                throw new IllegalStateException("Unable to resolve unique identifier for portletContext.");

-            }

-            portletContexts.put(applicationId, portletContext);

-            fireRegistered(portletContext);

-        }

-        return (InternalPortletContext)portletContexts.get(applicationId);

-    }

-

-    public void remove(InternalPortletContext context) {

-        portletContexts.remove(context);

-        fireRemoved(context);

-    }

-

-

-    public Iterator getRegisteredPortletApplications() throws PortletContainerException {

-        return new HashSet(portletContexts.values()).iterator();

-    }

-

-    public PortletAppDD getPortletApplicationDescriptor(String name) throws PortletContainerException {

-        InternalPortletContext ipc = (InternalPortletContext) portletContexts.get(name);

-        if (ipc != null) {

-            return ipc.getPortletApplicationDefinition();

-        }

-        return null;

-    }

-

-    public void addPortletRegistryListener(PortletRegistryListener listener) {

-        registryListeners.add(listener);

-    }

-

-    public void removePortletRegistryListener(PortletRegistryListener listener) {

-        registryListeners.remove(listener);

-    }

-

-    private void fireRegistered(InternalPortletContext context) {

-        PortletRegistryEvent event = new PortletRegistryEvent();

-        event.setApplicationId(context.getApplicationId());

-        event.setPortletApplicationDescriptor(context.getPortletApplicationDefinition());

-

-        Iterator i = registryListeners.iterator();

-        while (i.hasNext()) {

-            ((PortletRegistryListener) i.next()).portletApplicationRegistered(event);

-        }

-

-        LOG.info("Portlet Context '" + context.getApplicationId() + "' registered.");

-    }

-

-    private void fireRemoved(InternalPortletContext context) {

-        PortletRegistryEvent event = new PortletRegistryEvent();

-        event.setApplicationId(context.getApplicationId());

-        event.setPortletApplicationDescriptor(context.getPortletApplicationDefinition());

-

-        Iterator i = registryListeners.iterator();

-        while (i.hasNext()) {

-            ((PortletRegistryListener) i.next()).portletApplicationRemoved(event);

-        }

-

-        LOG.info("Portlet Context '" + context.getApplicationId() + "' removed.");

-    }

-

-

-//

-// Utility

-

-    /**

-     * Servlet 2.5 ServletContext.getContextPath() method.

-     */

-    private static Method contextPathGetter;

-

-    static {

-        try {

-            contextPathGetter = ServletContext.class.getMethod("getContextPath", new Class[0]);

-        }

-        catch (NoSuchMethodException e) {

-            LOG.warn("Servlet 2.4 or below detected.  Unable to find getContextPath on ServletContext.");

-        }

-    }

-

-    protected String getContextPath(ServletContext context) {

-        String contextPath = null;

-        if (contextPathGetter != null) {

-            try {

-                contextPath = (String) contextPathGetter.invoke(context, new Class[0]);

-            } catch (Exception e) {

-                LOG.warn("Unable to directly retrieve context path from ServletContext. Computing. . . ");

-            }

-        }

-

-        if(contextPath == null) {

-            contextPath = computeContextPath(context);

-        }

-

-        return contextPath;

-    }

-

-    private static final String WEB_XML = "/WEB-INF/web.xml";

-

-    protected String computeContextPath(ServletContext context) {

-        try {

-            URL webXmlUrl = context.getResource(WEB_XML);

-            String path = webXmlUrl.toExternalForm();

-            path = path.substring(0, path.indexOf(WEB_XML));

-            path = path.substring(path.lastIndexOf("/"));

-

-            int id = path.indexOf(".war");

-            if(id > 0) {

-                path = path.substring(0, id);

-            }

-

-            return path;

-        } catch (MalformedURLException e) {

-            LOG.warn("Erorr retrieving web.xml from ServletContext. Unable to derive contextPath.");

-            return null;

-        }

-    }

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletInvoker.java b/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletInvoker.java
deleted file mode 100644
index 6339df6..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletInvoker.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.core;

-

-import java.io.IOException;

-

-import javax.portlet.PortletException;

-import javax.servlet.RequestDispatcher;

-import javax.servlet.ServletContext;

-import javax.servlet.http.HttpServletRequest;

-import javax.servlet.http.HttpServletResponse;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.Constants;

-import org.apache.pluto.internal.InternalPortletWindow;

-import org.apache.pluto.internal.impl.ActionRequestImpl;

-import org.apache.pluto.internal.impl.ActionResponseImpl;

-import org.apache.pluto.internal.impl.PortletRequestImpl;

-import org.apache.pluto.internal.impl.PortletResponseImpl;

-import org.apache.pluto.internal.impl.RenderRequestImpl;

-import org.apache.pluto.internal.impl.RenderResponseImpl;

-import org.apache.pluto.util.StringManager;

-

-/**

- * Used internally to invoke/dispatch requests from the container to

- * the portlet application.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-class PortletInvoker {

-

-    /** Logger.  */

-    private static final Log LOG = LogFactory.getLog(PortletInvoker.class);

-

-    /** Exception Messages. */

-    private static final StringManager EXCEPTIONS = StringManager.getManager(

-    		PortletInvoker.class.getPackage().getName());

-    

-    

-    // Private Member Variables ------------------------------------------------

-    

-    /** Portlet Window for which we are invoking the portlet. */

-    private InternalPortletWindow portletWindow = null;

-    

-    

-    // Constructor -------------------------------------------------------------

-    

-    /**

-     * Default Constructor.  Create a new invoker which

-     * is initialized for the given <code>InternalPortletWindow</code>.

-     *

-     * @param portletWindow  the portlet window.

-     */

-    public PortletInvoker(InternalPortletWindow portletWindow) {

-        this.portletWindow = portletWindow;

-    }

-    

-    

-    // Public Methods ----------------------------------------------------------

-    

-    /**

-     * Invoke the portlet with an action request.

-     *

-     * @param request action request used for the invocation.

-     * @param response action response used for the invocation.

-     * @throws PortletException if a error occurs within the portlet.

-     * @throws IOException if an IO error occurs writing the response.

-     *

-     * @see PortletServlet

-     * @see javax.portlet.Portlet#processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse)

-     */

-    public void action(ActionRequestImpl request, ActionResponseImpl response)

-    throws PortletException, IOException {

-        if (LOG.isDebugEnabled()) {

-            LOG.debug("Performing Action Invocation");

-        }

-        invoke(request, response, Constants.METHOD_ACTION);

-    }

-

-    /**

-     * Invoke the portlet with a render request.

-     *

-     * @param request action request used for the invocation.

-     * @param response action response used for the invocation.

-     * @throws PortletException if a error occurs within the portlet.

-     * @throws IOException if an IO error occurs writing the response.

-     *

-     * @see PortletServlet

-     * @see javax.portlet.Portlet#render(javax.portlet.RenderRequest, javax.portlet.RenderResponse)

-     */

-    public void render(RenderRequestImpl request, RenderResponseImpl response)

-    throws PortletException, IOException {

-        if (LOG.isDebugEnabled()) {

-            LOG.debug("Performing Render Invocation");

-        }

-        invoke(request, response, Constants.METHOD_RENDER);

-    }

-

-    /**

-     * Invoke the portlet with a load request.

-     *

-     * @param request action request used for the invocation.

-     * @param response action response used for the invocation.

-     * @throws PortletException if a error occurs within the portlet.

-     *

-     * @see PortletServlet

-     */

-    public void load(PortletRequestImpl request, PortletResponseImpl response)

-    throws PortletException, IOException {

-        if (LOG.isDebugEnabled()) {

-            LOG.debug("Performing Load Invocation");

-        }

-        invoke(request, response, Constants.METHOD_NOOP);

-    }

-    

-    

-    // Private Invoke Method ---------------------------------------------------

-    

-    /**

-     * Perform the invocation.

-     *

-     * @param request portlet request

-     * @param response portlet response

-     * @param methodID method identifier

-     * @throws PortletException if a portlet exception occurs.

-     * @throws IOException if an error occurs writing to the response.

-     */

-    private void invoke(PortletRequestImpl request,

-                        PortletResponseImpl response,

-                        Integer methodID)

-    throws PortletException, IOException {

-

-        String uri = portletWindow.getPortletEntity().getControllerServletUri();

-        if (LOG.isDebugEnabled()) {

-        	LOG.debug("Dispatching to portlet servlet at: " + uri);

-        }

-        

-        ServletContext servletContext = portletWindow.getServletContext();

-        RequestDispatcher dispatcher = servletContext.getRequestDispatcher(uri);

-

-        if (dispatcher != null) {

-            try {

-                // Tomcat does not like to properly include wrapped requests

-                // and responses. Thus we "unwrap" and then include.

-                HttpServletRequest servletRequest =

-                		request.getHttpServletRequest();

-                HttpServletResponse servletResponse =

-                		response.getHttpServletResponse();

-                

-                servletRequest.setAttribute(Constants.METHOD_ID, methodID);

-                servletRequest.setAttribute(Constants.PORTLET_REQUEST, request);

-                servletRequest.setAttribute(Constants.PORTLET_RESPONSE, response);

-                

-                dispatcher.include(servletRequest, servletResponse);

-

-            } catch (javax.servlet.UnavailableException ex) {

-                int seconds = ex.isPermanent()?-1:ex.getUnavailableSeconds();

-                String message =  EXCEPTIONS.getString(

-                    "error.portlet.invoker.unavailable",

-                    uri, new String[] {String.valueOf(seconds)}

-                );

-                if (LOG.isErrorEnabled()) {

-                    LOG.error(message, ex);

-                }

-                throw new javax.portlet.UnavailableException(

-                        message, seconds);

-                

-            } catch (javax.servlet.ServletException ex) {

-                String message = EXCEPTIONS.getString("error.portlet.invoker");

-                if(LOG.isErrorEnabled()) {

-                    LOG.error(message);

-                }

-

-                if (ex.getRootCause() != null &&

-                    ex.getRootCause() instanceof PortletException) {

-                        throw (PortletException) ex.getRootCause();

-                }

-                else if(ex.getRootCause() != null) {

-                    throw new PortletException(ex.getRootCause());

-                }

-                else {

-                    throw new PortletException(ex);

-                }

-                

-            } finally {

-                request.removeAttribute(Constants.METHOD_ID);

-                request.removeAttribute(Constants.PORTLET_REQUEST);

-                request.removeAttribute(Constants.PORTLET_RESPONSE);

-            }

-        } else {

-            String msg = EXCEPTIONS.getString(

-                "error.portlet.invoker.dispatcher",

-                new String[] {servletContext.getServletContextName(), uri}

-            );

-            if (LOG.isErrorEnabled()) {

-                LOG.error(msg);

-            }

-            throw new PortletException(msg);

-        }

-    }

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletServlet.java b/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletServlet.java
deleted file mode 100644
index 6a5c9ea..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/core/PortletServlet.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.core;

-

-import org.apache.pluto.Constants;

-import org.apache.pluto.PortletContainerException;

-import org.apache.pluto.descriptors.portlet.PortletAppDD;

-import org.apache.pluto.descriptors.portlet.PortletDD;

-import org.apache.pluto.internal.InternalPortletConfig;

-import org.apache.pluto.internal.InternalPortletContext;

-import org.apache.pluto.internal.InternalPortletRequest;

-import org.apache.pluto.internal.InternalPortletResponse;

-import org.apache.pluto.internal.impl.ActionRequestImpl;

-import org.apache.pluto.internal.impl.ActionResponseImpl;

-import org.apache.pluto.internal.impl.PortletConfigImpl;

-import org.apache.pluto.internal.impl.RenderRequestImpl;

-import org.apache.pluto.internal.impl.RenderResponseImpl;

-

-import javax.portlet.Portlet;

-import javax.portlet.PortletException;

-import javax.servlet.ServletContext;

-import javax.servlet.ServletException;

-import javax.servlet.http.HttpServlet;

-import javax.servlet.http.HttpServletRequest;

-import javax.servlet.http.HttpServletResponse;

-import java.io.IOException;

-import java.util.Iterator;

-

-/**

- * Portlet Invocation Servlet. This servlet recieves cross context requests from

- * the the container and services the portlet request for the specified method.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.1

- * @since 09/22/2004

- */

-public class PortletServlet extends HttpServlet {

-

-    // Private Member Variables ------------------------------------------------

-

-    /**

-     * The portlet name as defined in the portlet app descriptor.

-     */

-    private String portletName = null;

-

-    /**

-     * The portlet instance wrapped by this servlet.

-     */

-    private Portlet portlet = null;

-

-    /**

-     * The internal portlet context instance.

-     */

-    private InternalPortletContext portletContext = null;

-

-    /**

-     * The internal portlet config instance.

-     */

-    private InternalPortletConfig portletConfig = null;

-

-    // HttpServlet Impl --------------------------------------------------------

-

-    public String getServletInfo() {

-        return "Pluto PortletServlet [" + portletName + "]";

-    }

-

-    /**

-     * Initialize the portlet invocation servlet.

-     *

-     * @throws ServletException if an error occurs while loading portlet.

-     */

-    public void init() throws ServletException {

-

-        // Call the super initialization method.

-        super.init();

-

-        // Retrieve portlet name as defined as an initialization parameter.

-        portletName = getInitParameter("portlet-name");

-

-        // Retrieve the associated internal portlet context.

-        ServletContext servletContext = getServletContext();

-        try {

-            portletContext = PortletContextManager.getManager()

-                .register(servletContext);

-

-        } catch (PortletContainerException ex) {

-            throw new ServletException(ex);

-        }

-

-        // Retrieve the portletDD and create portlet config.

-        PortletDD portletDD = null;

-        PortletAppDD portletAppDD =

-            portletContext.getPortletApplicationDefinition();

-        for (Iterator it = portletAppDD.getPortlets().iterator();

-             it.hasNext();) {

-            PortletDD currentDD = (PortletDD) it.next();

-            if (currentDD.getPortletName().equals(portletName)) {

-                portletDD = currentDD;

-                break;

-            }

-        }

-        if (portletDD == null) {

-            throw new ServletException("Unable to resolve portlet '"

-                + portletName + "'");

-        }

-        portletConfig = new PortletConfigImpl(getServletConfig(),

-            portletContext,

-            portletDD);

-

-        // Create and initialize the portlet wrapped in the servlet.

-        try {

-            ClassLoader loader = Thread.currentThread().getContextClassLoader();

-            Class clazz = loader.loadClass((portletDD.getPortletClass()));

-            portlet = (Portlet) clazz.newInstance();

-            portlet.init(portletConfig);

-        } catch (ClassNotFoundException ex) {

-            ex.printStackTrace();

-            throw new ServletException(ex);

-        } catch (IllegalAccessException ex) {

-            ex.printStackTrace();

-            throw new ServletException(ex);

-        } catch (InstantiationException ex) {

-            ex.printStackTrace();

-            throw new ServletException(ex);

-        } catch (PortletException ex) {

-            ex.printStackTrace();

-            throw new ServletException(ex);

-        }

-    }

-

-    public void destroy() {

-        PortletContextManager.getManager().remove(portletContext);

-        if (portlet != null) {

-            portlet.destroy();

-        }

-        super.destroy();

-    }

-

-    protected void doGet(HttpServletRequest request,

-                         HttpServletResponse response)

-        throws ServletException, IOException {

-        dispatch(request, response);

-    }

-

-    protected void doPost(HttpServletRequest request,

-                          HttpServletResponse response)

-        throws ServletException, IOException {

-        dispatch(request, response);

-    }

-

-    protected void doPut(HttpServletRequest request,

-                         HttpServletResponse response)

-        throws ServletException, IOException {

-        dispatch(request, response);

-    }

-

-    // Private Methods ---------------------------------------------------------

-

-    /**

-     * Dispatch the request to the appropriate portlet methods. This method

-     * assumes that the following attributes are set in the servlet request

-     * scope:

-     * <ul>

-     * <li>METHOD_ID: indicating which method to dispatch.</li>

-     * <li>PORTLET_REQUEST: the internal portlet request.</li>

-     * <li>PORTLET_RESPONSE: the internal portlet response.</li>

-     * </ul>

-     *

-     * @param request  the servlet request.

-     * @param response the servlet response.

-     * @throws ServletException

-     * @throws IOException

-     */

-    private void dispatch(HttpServletRequest request,

-                          HttpServletResponse response)

-        throws ServletException, IOException {

-        InternalPortletRequest portletRequest = null;

-        InternalPortletResponse portletResponse = null;

-        try {

-

-            // Save portlet config into servlet request.

-            request.setAttribute(Constants.PORTLET_CONFIG, portletConfig);

-

-            // Retrieve attributes from the servlet request.

-            Integer methodId = (Integer) request.getAttribute(

-                Constants.METHOD_ID);

-            portletRequest = (InternalPortletRequest) request.getAttribute(

-                Constants.PORTLET_REQUEST);

-            portletResponse = (InternalPortletResponse) request.getAttribute(

-                Constants.PORTLET_RESPONSE);

-            portletRequest.init(portletContext, request);

-

-            // The requested method is RENDER: call Portlet.render(..)

-            if (methodId == Constants.METHOD_RENDER) {

-                RenderRequestImpl renderRequest =

-                    (RenderRequestImpl) portletRequest;

-                RenderResponseImpl renderResponse =

-                    (RenderResponseImpl) portletResponse;

-                portlet.render(renderRequest, renderResponse);

-

-            }

-

-            // The requested method is ACTION: call Portlet.processAction(..)

-            else if (methodId == Constants.METHOD_ACTION) {

-                ActionRequestImpl actionRequest =

-                    (ActionRequestImpl) portletRequest;

-                ActionResponseImpl actionResponse =

-                    (ActionResponseImpl) portletResponse;

-                portlet.processAction(actionRequest, actionResponse);

-            }

-

-            // The requested method is NOOP: do nothing.

-            else if (methodId == Constants.METHOD_NOOP) {

-                // Do nothing.

-            }

-

-        } catch (javax.portlet.UnavailableException ex) {

-            ex.printStackTrace();

-            /*

-            if (e.isPermanent()) {

-                throw new UnavailableException(e.getMessage());

-            } else {

-                throw new UnavailableException(e.getMessage(), e.getUnavailableSeconds());

-            }*/

-

-            // Portlet.destroy() isn't called by Tomcat, so we have to fix it.

-            try {

-                portlet.destroy();

-            } catch (Throwable th) {

-                // Don't care for Exception

-            }

-

-            // TODO: Handle everything as permanently for now.

-            throw new javax.servlet.UnavailableException(ex.getMessage());

-

-        } catch (PortletException ex) {

-            ex.printStackTrace();

-            throw new ServletException(ex);

-

-        } finally {

-            request.removeAttribute(Constants.PORTLET_CONFIG);

-            if (portletRequest != null) {

-                portletRequest.release();

-            }

-        }

-    }

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/core/UserInfoAttribute.java b/trunk/pluto-container/src/main/java/org/apache/pluto/core/UserInfoAttribute.java
deleted file mode 100644
index e427449..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/core/UserInfoAttribute.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.core;

-

-/**

- * Encapsulates a user information attribute as described in

- * PLT.17 of the JSR-168 specification.

- * 

- * @author <a href="cdoremus@apache.org">Craig Doremus</a>

- */

-public interface UserInfoAttribute {

-

-    String getName();

-

-    String getValue();

-

-    String getAuthUser();

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/Configuration.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/Configuration.java
deleted file mode 100644
index ae2a7fc..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/Configuration.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-

-import java.util.ResourceBundle;

-import java.util.PropertyResourceBundle;

-

-/**

- * Central location for Configuration info.

- *

- * @author ddewolf@apache.org

- * @since Jul 2, 2005

- */

-class Configuration {

-    

-    private static final Log LOG = 

-            LogFactory.getLog(Configuration.class);

-

-    public static final ResourceBundle BUNDLE =

-        PropertyResourceBundle.getBundle("org.apache.pluto.core.pluto-configuration");

-

-    private static final String DESCRIPTOR_SERVICE =

-        "org.apache.pluto.descriptors.services.PortletAppDescriptorService";

-            

-

-    public static String getPortletAppDescriptorServiceImpl() {

-        String impl =  BUNDLE.getString(DESCRIPTOR_SERVICE);

-        if(LOG.isDebugEnabled()) {

-            LOG.debug("Using Descriptor Service Impl: "+impl);

-        }

-        return impl;

-    }

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalActionRequest.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalActionRequest.java
deleted file mode 100644
index 41f4cef..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalActionRequest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal;

-

-/**

- * The internal action request extends the internal portlet request and provides

- * some action-specific methods (currently, no specific methods are declared).

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @since 2006-02-17

- */

-public interface InternalActionRequest extends InternalPortletRequest {

-	

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalActionResponse.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalActionResponse.java
deleted file mode 100644
index bdeaa25..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalActionResponse.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal;

-

-import java.util.Map;

-

-import javax.portlet.PortletMode;

-import javax.portlet.WindowState;

-

-/**

- * The internal action response interface extends the internal portlet response

- * interface and provides some action-specific methods.

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public interface InternalActionResponse extends InternalPortletResponse {

-

-    /**

-     * Retrieves the render parameters associated with this response.

-     * @return map of all render parameters associated with this request.

-     */

-    public Map getRenderParameters();

-

-    /**

-     * Retrieve the portlet mode.

-     * @return the changed portlet mode.

-     */

-    public PortletMode getChangedPortletMode();

-

-    /**

-     * Retrieve the window state.

-     * @return the changed window state.

-     */

-    public WindowState getChangedWindowState();

-

-    /**

-     * Retreive the location for which the action should

-     * be redirected.

-     * @return the redirect location.

-     */

-    public String getRedirectLocation();

-    

-}

-

-

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletConfig.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletConfig.java
deleted file mode 100644
index c837ac7..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletConfig.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal;

-

-import javax.portlet.PortletConfig;

-import javax.servlet.ServletConfig;

-

-import org.apache.pluto.descriptors.portlet.PortletDD;

-

-public interface InternalPortletConfig extends PortletConfig {

-

-    public ServletConfig getServletConfig();

-

-    public PortletDD getPortletDefinition();

-}

-

-

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletContext.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletContext.java
deleted file mode 100644
index 4b1f06c..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletContext.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal;

-

-import javax.portlet.PortletContext;

-import javax.servlet.ServletContext;

-

-import org.apache.pluto.descriptors.portlet.PortletAppDD;

-

-public interface InternalPortletContext extends PortletContext {

-

-    /**

-     * Retrieve the unique identifier for the portlet context.

-     * @return unique identifier.

-     */

-    public String getApplicationId();

-

-    /**

-     *

-     * @return servlet context within which we belong

-     */

-    public ServletContext getServletContext();

-

-    /**

-     *

-     * @return application config

-     */

-    public PortletAppDD getPortletApplicationDefinition();

-}

-

-

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletPreference.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletPreference.java
deleted file mode 100644
index 861421b..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletPreference.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal;

-

-/**

- * This class represents a portlet preference, which is a name-value pair.

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public interface InternalPortletPreference {

-	

-	/**

-	 * Returns the name of this portlet preference.

-	 * @return the name of this portlet preference.

-	 */

-    public String getName();

-    

-    /**

-     * Returns the values of this portlet preference, which is a string array.

-     * @return the values of this portlet preference as a string array.

-     */

-    public String[] getValues();

-    

-    /**

-     * Sets values of this portlet preference.

-     * @param values  values of this portlet preference to set.

-     */

-    public void setValues(String[] values);

-    

-    /**

-     * Returns true if this portlet preference is marked as read-only.

-     * @return true if this portlet preference is marked as read-only.

-     */

-    public boolean isReadOnly();

-    

-    /**

-     * Clone a copy of itself.

-     * @return a copy of itself.

-     */

-    public Object clone();

-    

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletRequest.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletRequest.java
deleted file mode 100644
index e29da08..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletRequest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal;

-

-import org.apache.pluto.PortletContainer;

-

-import javax.portlet.PortletRequest;

-import javax.portlet.PortletContext;

-import javax.servlet.http.HttpServletRequest;

-

-/**

- * The internal portlet request interface extends PortletRequest and adds

- * some methods used by Pluto.

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public interface InternalPortletRequest extends PortletRequest {

-

-    /**

-     * Initializes the portlet request for use within the target context.

-     * This method ensures that the portlet utilizes resources from the

-     * <b>included</b> context, and not those from the intiating (portal)

-     * context.

-     * 

-     * @param context  the target portlet context.

-     * @param request  the servlet request.

-     */

-    public void init(PortletContext context, HttpServletRequest request);

-

-    /**

-     * Recycle the request by rolling the underlying request

-     * back to the originating request.

-     */

-    public void release();

-

-    public InternalPortletWindow getInternalPortletWindow();

-

-    public PortletContainer getPortletContainer();

-

-    public HttpServletRequest getHttpServletRequest();

-    

-}

-

-

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletResponse.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletResponse.java
deleted file mode 100644
index 43ccee9..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletResponse.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal;

-

-import javax.portlet.PortletResponse;

-

-/**

- * The internal portlet response interface extends PortletResponse and adds

- * some methods used by Pluto.

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public interface InternalPortletResponse extends PortletResponse {

-

-    public InternalPortletWindow getInternalPortletWindow();

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletWindow.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletWindow.java
deleted file mode 100644
index e2b7912..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletWindow.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal;

-

-import javax.servlet.ServletContext;

-

-import org.apache.pluto.PortletWindow;

-

-

-/**

- * The internal portlet window represents a single window of a portlet instance

- * as it can be shown only once on a single page. There is a one-to-one relation

- * between portlet windows and portlet entities. Adding the same portlet e.g.

- * twice on a page results in two different windows.

- * 

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public interface InternalPortletWindow extends PortletWindow {

-

-    /**

-     * The Context from which this window can be serviced.

-     * @return the associated servlet context.

-     */

-    public ServletContext getServletContext();

-

-    /**

-     * Returns the portlet entity. The return value cannot be NULL.

-     * @return the portlet entity

-     */

-    public PortletEntity getPortletEntity();

-    

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalRenderRequest.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalRenderRequest.java
deleted file mode 100644
index ee29beb..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalRenderRequest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal;

-

-/**

- * The internal render request interface extends the internal portlet request

- * interface and provides some render-specific methods.

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @since 2006-02-17

- */

-public interface InternalRenderRequest extends InternalPortletRequest {

-	

-    public void setIncluded(boolean included);

-    

-    public boolean isIncluded();

-    

-    public void setIncludedQueryString(String queryString);

-    

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalRenderResponse.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalRenderResponse.java
deleted file mode 100644
index 9be7e9f..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/InternalRenderResponse.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal;

-

-/**

- * The internal render response interface extends the internal portlet response

- * interface and provides some render-specific methods.

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @since 2006-02-17

- */

-public interface InternalRenderResponse extends InternalPortletResponse {

-	

-    public void setIncluded(boolean included);

-

-    public boolean isIncluded();

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/PortletDescriptorRegistry.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/PortletDescriptorRegistry.java
deleted file mode 100644
index e218d64..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/PortletDescriptorRegistry.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal;

-

-import org.apache.pluto.PlutoConfigurationException;

-import org.apache.pluto.PortletContainerException;

-import org.apache.pluto.descriptors.portlet.PortletAppDD;

-import org.apache.pluto.descriptors.services.PortletAppDescriptorService;

-import org.apache.pluto.util.StringManager;

-

-import javax.servlet.ServletContext;

-import java.io.IOException;

-import java.io.InputStream;

-import java.util.Map;

-import java.util.WeakHashMap;

-

-/**

- * Simple caching mechanism used to manage portlet descriptors. This mechanism

- * takes special considerations to make sure that the cache is invalidated for

- * any ServletContext that is destroyed, thus allowing for a the context to be

- * redeployed.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- * @since Nov 3, 2004

- */

-public class PortletDescriptorRegistry {

-	

-    /** Portlet deployment descriptor location. */

-    private static final String PORTLET_XML = "/WEB-INF/portlet.xml";

-

-    /** Exception Messages. */

-    private static final StringManager EXCEPTIONS = StringManager.getManager(

-            PortletDescriptorRegistry.class.getPackage().getName());

-    

-    /** The static singleton registry instance. */

-    private static final PortletDescriptorRegistry REGISTRY =

-    		new PortletDescriptorRegistry();

-    

-    

-    // Private Member Variables ------------------------------------------------

-    

-    /** The portlet application descriptor service. */

-    private PortletAppDescriptorService portletDDService = null;

-    

-    /**

-     * Cache of descriptors.  WeakHashMap is used so that

-     * once the context is destroyed (kinda), the cache is eliminated.

-     * Ideally we'd use a ServletContextListener, but at this

-     * point I'm wondering if we really want to add another

-     * config requirement in the servlet xml? Hmm. . .

-     */

-    private Map cache = new WeakHashMap();

-

-    

-    // Constructor -------------------------------------------------------------

-    

-    /**

-     * Returns the singleton registry instance.

-     * @return the singleton registry instance.

-     */

-    public static PortletDescriptorRegistry getRegistry() {

-        return REGISTRY;

-    }

-

-    /**

-     * Private constructor that prevents external instantiation.

-     * We must modify the context class loader in order for

-     * the Configuration utility to find the properties file.

-     * @throws PlutoConfigurationException  if fail to instantiate portlet

-     *         application descriptor service.

-     */

-    private PortletDescriptorRegistry()

-    throws PlutoConfigurationException {

-        String className = Configuration.getPortletAppDescriptorServiceImpl();

-        try {

-            Class clazz = Class.forName(className);

-            portletDDService = (PortletAppDescriptorService) clazz.newInstance();

-        } catch (ClassNotFoundException ex) {

-            throw new PlutoConfigurationException(

-            		"Unable to find class " + className, ex);

-        } catch (InstantiationException ex) {

-            throw new PlutoConfigurationException(

-            		"Unable to instantiate class " + className, ex);

-        } catch (IllegalAccessException ex) {

-            throw new PlutoConfigurationException(

-            		"Unable to access class " + className, ex);

-        }

-    }

-    

-    

-    // Public Methods ----------------------------------------------------------

-    

-    /**

-     * Retrieve the Portlet Application Deployment Descriptor for the given

-     * servlet context.  Create it if it does not allready exist.

-     *

-     * @param servletContext  the servlet context.

-     * @return The portlet application deployment descriptor.

-     * @throws PortletContainerException

-     */

-    public PortletAppDD getPortletAppDD(ServletContext servletContext)

-    throws PortletContainerException {

-        PortletAppDD portletAppDD = (PortletAppDD) cache.get(servletContext);

-        if (portletAppDD == null) {

-        	portletAppDD = createDefinition(servletContext);

-            cache.put(servletContext, portletAppDD);

-        }

-        return portletAppDD;

-    }

-    

-    

-    // Private Methods ---------------------------------------------------------

-    

-    /**

-     * Creates the portlet.xml deployment descriptor representation.

-     *

-     * @param servletContext  the servlet context for which the DD is requested.

-     * @return the Portlet Application Deployment Descriptor.

-     * @throws PortletContainerException

-     */

-    private PortletAppDD createDefinition(ServletContext servletContext)

-    throws PortletContainerException {

-        PortletAppDD portletAppDD = null;

-        try {

-            InputStream in = servletContext.getResourceAsStream(PORTLET_XML);

-            portletAppDD = portletDDService.read(in);

-        } catch (IOException ex) {

-            throw new PortletContainerException(EXCEPTIONS.getString(

-                    "error.context.descriptor.load",

-                    new String[] { servletContext.getServletContextName() }),

-                    ex);

-        }

-        return portletAppDD;

-    }

-    

-}

-

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/PortletEntity.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/PortletEntity.java
deleted file mode 100644
index fe97c0c..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/PortletEntity.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal;

-

-import org.apache.pluto.internal.InternalPortletPreference;

-import org.apache.pluto.descriptors.portlet.PortletDD;

-import org.apache.pluto.descriptors.servlet.ServletDD;

-

-import javax.portlet.PreferencesValidator;

-import javax.portlet.ValidatorException;

-

-/**

- * The PortletEntity encapsulates all data pertaining to a single portlet

- * instance.  This instance may appear zero or more times per user. The

- * PortletEntity consists of two primary peices of information, the Portlet

- * Definition as defined by the {@link PortletDD} and the Wrapping Servlet

- * information as defined by the{@link ServletDD}

- * 

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- */

-public interface PortletEntity {

-	

-    /**

-     * Returns the URI to the controller servlet that wraps this portlet.

-     * @return the URI to the controller servlet that wraps this portlet.

-     */

-    public String getControllerServletUri();

-    

-    /**

-     * Returns an array of default preferences of this portlet. The default

-     * preferences are retrieved from the portlet application descriptor.

-     * <p>

-     * Data retrieved from <code>portlet.xml</code> are injected into the domain

-     * object <code>PortletPreferenceDD</code>. This method converts the domain

-     * objects into <code>PortletPreference</code> objects.

-     * </p>

-     * <p>

-     * Note that if no value is bound to a given preference key,

-     * <code>PortletPreferenceDD.getValues()</code> will return an empty string

-     * list, but the value array of <code>PortletPreference</code> should be set

-     * to null (instead of an empty array).

-     * </p>

-     * <p>

-     * This method never returns null, but the values held by PortletPreference

-     * may be null.

-     * </p>

-     * @return the preference set

-     * 

-     * @see org.apache.pluto.descriptors.portlet.PortletPreferenceDD

-     */

-    public InternalPortletPreference[] getDefaultPreferences();

-

-    /**

-     * Returns the portlet description. The return value cannot be NULL.

-     * @return the portlet description.

-     */

-    public PortletDD getPortletDefinition();

-    

-    /**

-     * Returns the preferences validator instance for this portlet.

-     * One validator instance is created per portlet definition.

-     * @return the preferences validator instance for this portlet.

-     * @throws ValidatorException  if fail to instantiate the validator.

-     */

-    public PreferencesValidator getPreferencesValidator()

-    throws ValidatorException;

-    

-}

-

-

-

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/PreferencesValidatorRegistry.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/PreferencesValidatorRegistry.java
deleted file mode 100644
index 1eb4b16..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/PreferencesValidatorRegistry.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal;

-

-import java.util.HashMap;

-import java.util.Map;

-

-import javax.portlet.PreferencesValidator;

-import javax.portlet.ValidatorException;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.descriptors.portlet.PortletDD;

-

-/**

- * The portlet preferences validator registry. This class caches the portlet

- * preferences validator instances for portlet definitions, and ensure that

- * only one validator instance is created per portlet definition.

- * 

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @since 2006-02-10

- */

-public class PreferencesValidatorRegistry {

-	

-	/** Logger. */

-	private static final Log LOG = LogFactory.getLog(PreferencesValidatorRegistry.class);

-	

-	/** The static singleton registry instance. */

-	private static final PreferencesValidatorRegistry REGISTRY =

-			new PreferencesValidatorRegistry();

-	

-	

-	// Private Member Variables ------------------------------------------------

-	

-	/**

-	 * The preferences validator cache: key is the portlet definition, value is

-	 * the portlet preferences validator instance.

-	 */

-	private Map cache = new HashMap();

-	

-	

-	// Constructor -------------------------------------------------------------

-	

-	/**

-	 * Private constructor that prevents external instantiation.

-	 */

-	private PreferencesValidatorRegistry() {

-		// Do nothing.

-	}

-	

-	public static PreferencesValidatorRegistry getRegistry() {

-		return REGISTRY;

-	}

-	

-	

-	// Public Methods ----------------------------------------------------------

-	

-	/**

-	 * Returns the preferences validator instance for the given portlet

-	 * definition. If no preferences validator class is defined for the portlet

-	 * definition, null is returned. This method caches the validator instances

-	 * in the cache to ensure that only one validator instance is created per

-	 * portlet definition.

-	 * @param portletDD  the portlet definition.

-	 * @return the preferences validator if defined for the portlet definition.

-	 * @throw ValidatorException  if fail to instantiate validator instance. 

-	 */

-	public PreferencesValidator getPreferencesValidator(PortletDD portletDD)

-	throws ValidatorException {

-		

-		// Try to retrieve the validator from cache.

-		PreferencesValidator validator = (PreferencesValidator)

-				cache.get(portletDD);

-		if (validator != null) {

-			return validator;

-		}

-		

-		// Try to construct the validator instance for the portlet definition.

-		String className = portletDD.getPortletPreferences()

-				.getPreferencesValidator();

-		if (className != null) {

-			if (LOG.isDebugEnabled()) {

-				LOG.debug("Creating preferences validator: " + className);

-			}

-			ClassLoader loader = Thread.currentThread().getContextClassLoader();

-			try {

-				Class clazz = loader.loadClass(className);

-			    validator = (PreferencesValidator) clazz.newInstance();

-			    cache.put(portletDD, validator);

-			} catch (InstantiationException ex) {

-				LOG.error("Error instantiating validator.", ex);

-			    throw new ValidatorException(ex, null);

-			} catch (IllegalAccessException ex) {

-				LOG.error("Error instantiating validator.", ex);

-			    throw new ValidatorException(ex, null);

-			} catch (ClassNotFoundException ex) {

-				LOG.error("Error instantiating validator.", ex);

-			    throw new ValidatorException(ex, null);

-			} catch (ClassCastException ex) {

-				LOG.error("Error casting instance to PreferencesValidator.", ex);

-				throw new ValidatorException(ex, null);

-			}

-		}

-		return validator;

-	}

-	

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionRequestImpl.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionRequestImpl.java
deleted file mode 100644
index c1440ce..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionRequestImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import java.io.IOException;

-import java.io.InputStream;

-

-import javax.portlet.ActionRequest;

-import javax.portlet.PortletPreferences;

-import javax.servlet.http.HttpServletRequest;

-

-import org.apache.pluto.Constants;

-import org.apache.pluto.PortletContainer;

-import org.apache.pluto.internal.InternalActionRequest;

-import org.apache.pluto.internal.InternalPortletWindow;

-import org.apache.commons.logging.LogFactory;

-import org.apache.commons.logging.Log;

-

-/**

- * Implementation of the <code>javax.portlet.ActionRequest</code> interface.

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- */

-public class ActionRequestImpl extends PortletRequestImpl

-implements ActionRequest, InternalActionRequest {

-	

-	/** Logger. */

-    private static final Log LOG = LogFactory.getLog(ActionRequestImpl.class);

-    

-    

-    // Private Member Variables ------------------------------------------------

-    

-    /** FIXME: The portlet preferences. */

-    private PortletPreferences portletPreferences = null;

-    

-    

-    // Constructor -------------------------------------------------------------

-    

-    public ActionRequestImpl(PortletContainer container,

-                             InternalPortletWindow internalPortletWindow,

-                             HttpServletRequest servletRequest) {

-        super(container, internalPortletWindow, servletRequest);

-        if (LOG.isDebugEnabled()) {

-        	LOG.debug("Created action request for: " + internalPortletWindow);

-        }

-    }

-

-    // ActionRequest impl ------------------------------------------------------

-    

-    /* (non-Javadoc)

-     * FIXME: should we set the bodyAccessed flag?

-     * @see org.apache.pluto.core.InternalActionResponse#getPortletInputStream()

-     */

-    public InputStream getPortletInputStream() throws IOException {

-        HttpServletRequest servletRequest = (HttpServletRequest) getRequest();

-        if (servletRequest.getMethod().equals("POST")) {

-            String contentType = servletRequest.getContentType();

-            if (contentType == null ||

-                contentType.equals("application/x-www-form-urlencoded")) {

-                throw new IllegalStateException(

-                		"User request HTTP POST data is of type "

-                		+ "application/x-www-form-urlencoded. "

-                		+ "This data has been already processed "

-                		+ "by the portal/portlet-container and is available "

-                		+ "as request parameters.");

-            }

-        }

-        return servletRequest.getInputStream();

-    }

-

-    // PortletRequestImpl impl -------------------------------------------------

-    

-    /**

-     * FIXME: 

-     */

-    public PortletPreferences getPreferences() {

-        if (portletPreferences == null) {

-            portletPreferences = new PortletPreferencesImpl(

-            		getPortletContainer(),

-            		getInternalPortletWindow(),

-            		this,

-            		Constants.METHOD_ACTION);

-        }

-        return portletPreferences;

-    }

-    

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionResponseImpl.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionResponseImpl.java
deleted file mode 100644
index 965b8dc..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionResponseImpl.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import java.util.Enumeration;

-import java.util.HashMap;

-import java.util.Iterator;

-import java.util.Map;

-

-import javax.portlet.ActionResponse;

-import javax.portlet.PortalContext;

-import javax.portlet.PortletMode;

-import javax.portlet.PortletModeException;

-import javax.portlet.WindowState;

-import javax.portlet.WindowStateException;

-import javax.servlet.http.HttpServletRequest;

-import javax.servlet.http.HttpServletResponse;

-import javax.servlet.http.HttpServletResponseWrapper;

-

-import org.apache.pluto.PortletContainer;

-import org.apache.pluto.descriptors.portlet.PortletDD;

-import org.apache.pluto.descriptors.portlet.SupportsDD;

-import org.apache.pluto.internal.InternalActionResponse;

-import org.apache.pluto.internal.InternalPortletWindow;

-import org.apache.pluto.spi.ResourceURLProvider;

-import org.apache.pluto.spi.PortalCallbackService;

-import org.apache.pluto.util.StringUtils;

-

-public class ActionResponseImpl extends PortletResponseImpl

-implements ActionResponse, InternalActionResponse {

-

-    /**

-     * Is it still allowed to invoke the method sendRedirect() ?

-     */

-    boolean redirectAllowed = true;

-

-    private boolean redirected;

-    private String redirectLocation;

-

-    private Map renderParameters = new HashMap();

-    private WindowState windowState = null;

-    private PortletMode portletMode = null;

-

-    private PortalCallbackService callback;

-    private PortalContext context;

-

-

-    public ActionResponseImpl(PortletContainer container,

-                              InternalPortletWindow internalPortletWindow,

-                              HttpServletRequest servletRequest,

-                              HttpServletResponse servletResponse) {

-        super(container, internalPortletWindow, servletRequest,

-              servletResponse);

-        context = container.getRequiredContainerServices().getPortalContext();

-        callback = container.getRequiredContainerServices().getPortalCallbackService();

-    }

-

-//

-// javax.portlet.ActionResponse

-//

-    public void setWindowState(WindowState windowState)

-        throws WindowStateException {

-        if (redirected) {

-            throw new IllegalStateException(

-                "it is not allowed to invoke setWindowState after sendRedirect has been called");

-        }

-

-        if (isWindowStateAllowed(windowState)) {

-            this.windowState = windowState;

-        } else {

-            throw new WindowStateException("Can't set this WindowState",

-                                           windowState);

-        }

-        redirectAllowed = false;

-    }

-

-    public void setPortletMode(PortletMode portletMode)

-        throws PortletModeException {

-        if (redirected) {

-            throw new IllegalStateException(

-                "it is not allowed to invoke setPortletMode after sendRedirect has been called");

-        }

-

-        // check if portal supports portlet mode

-        boolean supported = isPortletModeAllowed(portletMode);

-

-

-        // if porlet mode is allowed

-        if (supported) {

-            this.portletMode = portletMode;

-        } else {

-            throw new PortletModeException("Can't set this PortletMode",

-                                           portletMode);

-        }

-

-        redirectAllowed = false;

-

-    }

-

-    public void sendRedirect(String location) throws java.io.IOException {

-        if (redirectAllowed) {

-            if (location != null) {

-                HttpServletResponse redirectResponse = getHttpServletResponse();

-                while (redirectResponse instanceof HttpServletResponseWrapper) {

-                    redirectResponse = (HttpServletResponse)

-                        ((HttpServletResponseWrapper)redirectResponse).getResponse();

-                }

-

-                ResourceURLProvider provider = callback.getResourceURLProvider(

-                                getHttpServletRequest(),

-                                getInternalPortletWindow()

-                );

-

-                if (location.indexOf("://") != -1) {

-                    provider.setAbsoluteURL(location);

-                } else {

-                    provider.setFullPath(location);

-                }

-                location =

-                redirectResponse.encodeRedirectURL(provider.toString());

-                //redirectResponse.sendRedirect(location);

-                redirectLocation = location;

-                redirected = true;

-            }

-        } else {

-            throw new java.lang.IllegalStateException(

-                "Can't invoke sendRedirect() after certain methods have been called");

-        }

-

-    }

-

-    public void setRenderParameters(Map parameters) {

-        if (redirected) {

-            throw new IllegalStateException(

-                "Can't invoke setRenderParameters() after sendRedirect() has been called");

-        }

-        if (parameters == null) {

-            throw new IllegalArgumentException(

-                "Render parameters must not be null.");

-        }

-        for (Iterator iter = parameters.entrySet().iterator(); iter.hasNext();) {

-            Map.Entry entry = (Map.Entry) iter.next();

-            if (!(entry.getKey() instanceof String)) {

-                throw new IllegalArgumentException(

-                    "Key must not be null and of type java.lang.String.");

-            }

-            if (!(entry.getValue() instanceof String[])) {

-                throw new IllegalArgumentException(

-                    "Value must not be null and of type java.lang.String[].");

-            }

-        }

-

-        renderParameters = StringUtils.copyParameters(parameters);

-

-        redirectAllowed = false;

-    }

-

-    public void setRenderParameter(String key, String value) {

-        if (redirected) {

-            throw new IllegalStateException(

-                "Can't invoke setRenderParameter() after sendRedirect() has been called");

-        }

-

-        if ((key == null) || (value == null)) {

-            throw new IllegalArgumentException(

-                "Render parameter key or value must not be null.");

-        }

-

-        renderParameters.put(key, new String[]{value});

-

-        redirectAllowed = false;

-    }

-

-    public void setRenderParameter(String key, String[] values) {

-        if (redirected) {

-            throw new IllegalStateException(

-                "Can't invoke setRenderParameter() after sendRedirect() has been called");

-        }

-

-        if (key == null || values == null || values.length == 0) {

-            throw new IllegalArgumentException(

-                "Render parameter key or value must not be null or values be an empty array.");

-        }

-

-        renderParameters.put(key, StringUtils.copy(values));

-

-        redirectAllowed = false;

-    }

-    // --------------------------------------------------------------------------------------------

-    

-    // org.apache.pluto.core.InternalActionResponse implementation --------------------------------

-    public Map getRenderParameters() {

-        return renderParameters;

-    }

-

-    public PortletMode getChangedPortletMode() {

-        return this.portletMode;

-    }

-

-    public WindowState getChangedWindowState() {

-        return this.windowState;

-    }

-

-    public String getRedirectLocation() {

-        return redirectLocation;

-    }

-

-    private boolean isPortletModeAllowed(PortletMode mode) {

-        return isPortletModeAllowedByPortlet(mode)

-               && isPortletModeAllowedByPortal(mode);

-    }

-

-    private boolean isPortletModeAllowedByPortlet(PortletMode mode) {

-        PortletDD dd = getInternalPortletWindow().getPortletEntity()

-            .getPortletDefinition();

-

-        Iterator supports = dd.getSupports().iterator();

-        while(supports.hasNext()) {

-            SupportsDD sup = (SupportsDD)supports.next();

-            Iterator modes = sup.getPortletModes().iterator();

-            while(modes.hasNext()) {

-                if (modes.next().toString().equalsIgnoreCase(mode.toString())) {

-                    return true;

-                }

-            }

-        }

-        return false;

-    }

-

-    private boolean isPortletModeAllowedByPortal(PortletMode mode) {

-        Enumeration supportedModes = context.getSupportedPortletModes();

-        while (supportedModes.hasMoreElements()) {

-            if (supportedModes.nextElement().toString().equalsIgnoreCase(

-                (mode.toString()))) {

-                return true;

-            }

-        }

-        return false;

-    }

-

-    private boolean isWindowStateAllowed(WindowState state) {

-        Enumeration supportedStates = context.getSupportedWindowStates();

-        while (supportedStates.hasMoreElements()) {

-            if (supportedStates.nextElement().toString().equalsIgnoreCase(

-                (state.toString()))) {

-                return true;

-            }

-        }

-        return false;

-    }

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/CombinedPortletResourceBundle.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/CombinedPortletResourceBundle.java
deleted file mode 100644
index 49d3aab..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/CombinedPortletResourceBundle.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import org.apache.pluto.util.StringManager;

-

-import java.util.ResourceBundle;

-import java.util.Enumeration;

-import java.util.HashMap;

-import java.util.Vector;

-

-/**

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:

- * @version 1.0

- * @since Jan 9, 2006

- */

-class CombinedPortletResourceBundle extends ResourceBundle {

-

-    private static final StringManager EXCEPTIONS =

-        StringManager.getManager(CombinedPortletResourceBundle.class.getPackage().getName());

-

-    private HashMap contents = new HashMap();

-

-    public CombinedPortletResourceBundle(InlinePortletResourceBundle inlineBundle, ResourceBundle resourceBundle) {

-       dump(inlineBundle);

-       dump(resourceBundle);

-    }

-

-    protected Object handleGetObject(String key) {

-        if(key == null) {

-            throw new NullPointerException(EXCEPTIONS.getString("error.null"));

-        }

-        return contents.get(key);

-    }

-

-    public Enumeration getKeys() {

-       return new Vector(contents.keySet()).elements();

-    }

-

-    private void dump(ResourceBundle bundle) {

-        Enumeration e = bundle.getKeys();

-        while(e.hasMoreElements()) {

-            String value = e.nextElement().toString();

-            contents.put(value, bundle.getObject(value));

-        }

-    }

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/Environment.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/Environment.java
deleted file mode 100644
index 9e243e0..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/Environment.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import java.util.ResourceBundle;

-

-/**

- * Utility class used to retrieve environment information from the

- * <code>environment.properties</code> file packaged with pluto.

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- */

-final class Environment {

-

-    /**

-     * Properties Resource Bundle containing pluto environment information.

-     */

-    public static final ResourceBundle PROPS;

-

-    static {

-        PROPS = ResourceBundle.getBundle("org.apache.pluto.environment");

-    }

-

-

-    /**

-     * Retrieve the name of the container.

-     * @return the container name.

-     */

-    public static final String getPortletContainerName() {

-        return PROPS.getString("pluto.container.name");

-    }

-

-    /**

-     * Retrieve the major version number.

-     * @return the major version number.

-     */

-    public static final String getPortletContainerMajorVersion() {

-        return PROPS.getString("pluto.container.version.major");

-    }

-

-    /**

-     * Retrieve the minor version number.

-     * @return the minor version number.

-     */

-    public static final String getPortletContainerMinorVersion() {

-        return PROPS.getString("pluto.container.version.minor");

-    }

-

-    /**

-     * Retrieve the major version number of the specification which this version

-     * of pluto supports.

-     * @return te major specification version.

-     */

-    public static final int getMajorSpecificationVersion() {

-        return Integer.parseInt(PROPS.getString("javax.portlet.version.major"));

-    }

-

-    /**

-     * Retrieve the minor version number of the specification which this version

-     * of pluto supports.

-     * @return the minor specification version.

-     */

-    public static final int getMinorSpecificationVersion() {

-        return Integer.parseInt(PROPS.getString("javax.portlet.version.minor"));

-    }

-

-    /**

-     * Retrieve the formatted server info String required to be returned by the

-     * PortletContext.

-     * @return the server info.

-     */

-    public static final String getServerInfo() {

-        StringBuffer sb = new StringBuffer(getPortletContainerName())

-            .append("/")

-            .append(getPortletContainerMajorVersion())

-            .append(".")

-            .append(getPortletContainerMinorVersion());

-        return sb.toString();

-    }

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/InlinePortletResourceBundle.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/InlinePortletResourceBundle.java
deleted file mode 100644
index e0cac43..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/InlinePortletResourceBundle.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*

- * Copyright 2006 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import org.apache.pluto.Constants;

-

-import java.util.ListResourceBundle;

-import java.util.ArrayList;

-

-/**

- * InlinePortletResourceBundle implementation which provides the

- * inline title, short-title, and keywords as properties from the

- * bundle.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:

- * @version 1.0

- * @since Jan 9, 2006

- */

-class InlinePortletResourceBundle extends ListResourceBundle {

-

-    private Object[][] contents;

-

-    public InlinePortletResourceBundle(Object[][] contents) {

-        this.contents = contents;

-    }

-

-    public InlinePortletResourceBundle(String title, String shortTitle, String keywords) {

-        ArrayList temp = new ArrayList();

-        if(title != null)

-            temp.add(new Object[] {Constants.TITLE_KEY, title});

-

-        if(shortTitle != null)

-            temp.add(new Object[] {Constants.SHORT_TITLE_KEY, shortTitle});

-

-        if(keywords != null)

-            temp.add(new Object[] {Constants.KEYWORDS_KEY, keywords});

-

-        contents = (Object[][])temp.toArray(new Object[temp.size()][]);

-    }

-

-    protected Object[][] getContents() {

-        return contents;

-    }

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/InternalImplConverter.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/InternalImplConverter.java
deleted file mode 100644
index eb88101..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/InternalImplConverter.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import org.apache.pluto.internal.InternalPortletRequest;

-import org.apache.pluto.internal.InternalPortletResponse;

-import org.apache.pluto.wrappers.PortletRequestWrapper;

-import org.apache.pluto.wrappers.PortletResponseWrapper;

-

-import javax.portlet.PortletRequest;

-import javax.portlet.PortletResponse;

-

-/**

- * Static class that provides utility methods to convert a generic

- * PortletRequest or PortletResponse object into an Internal respresentation

- * of the same object.

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- */

-class InternalImplConverter {

-	

-	/**

-	 * Private constructor that prevents external instantiation.

-	 */

-	private InternalImplConverter() {

-		// Do nothing.

-	}

-	

-	

-	// Public Static Utility Methods -------------------------------------------

-

-    /**

-     * The scary part about this is that there is not yet a 

-     * PortletRequestWrapper defined by the spec.  Because of this, there's a

-     * chance someone might implement their own wrapper and we won't be able to

-     * get the real internal one!

-     * @param request the portlet request to be converted.

-     * @return the internal request.

-     */

-    public static InternalPortletRequest getInternalRequest(

-    		PortletRequest request) {

-        while (!(request instanceof InternalPortletRequest)) {

-            request = ((PortletRequestWrapper) request).getPortletRequest();

-            if (request == null) {

-                throw new IllegalStateException(

-                		"The internal portlet request cannot be found.");

-            }

-        }

-        return (InternalPortletRequest) request;

-    }

-

-    /**

-     * The scary part about this is that there is not yet a

-     * PortletRequestWrapper defined by the spec.  Because of this, there's a

-     * chance someone might implement their own wrapper and we won't be able to

-     * get the real internal one!

-     * @param response the portlet response to be converted.

-     * @return the internal response.

-     */

-    public static InternalPortletResponse getInternalResponse(

-    		PortletResponse response) {

-        while (!(response instanceof InternalPortletResponse)) {

-            response = ((PortletResponseWrapper) response).getPortletResponse();

-            if (response == null) {

-                throw new IllegalStateException(

-                		"The internal portlet response cannot be found.");

-            }

-        }

-        return (InternalPortletResponse) response;

-    }

-    

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletConfigImpl.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletConfigImpl.java
deleted file mode 100644
index afed1d3..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletConfigImpl.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import org.apache.pluto.internal.InternalPortletConfig;

-import org.apache.pluto.descriptors.common.InitParamDD;

-import org.apache.pluto.descriptors.portlet.PortletDD;

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-

-import javax.portlet.PortletConfig;

-import javax.portlet.PortletContext;

-import javax.servlet.ServletConfig;

-import java.util.*;

-

-public class PortletConfigImpl implements PortletConfig, InternalPortletConfig {

-

-    private static final Log LOG = LogFactory.getLog(PortletConfigImpl.class);

-

-    /**

-     * The servlet config for which we exist.

-     */

-    private ServletConfig servletConfig;

-

-    /**

-     * The Portlet Application Context within which we exist.

-     */

-    private PortletContext portletContext;

-

-    /**

-     * The portlet descriptor.

-     */

-    protected PortletDD portletDD;

-

-    private ResourceBundleFactory bundles;

-

-    public PortletConfigImpl(ServletConfig servletConfig,

-                             PortletContext portletContext,

-                             PortletDD portletDD) {

-        this.servletConfig = servletConfig;

-        this.portletContext = portletContext;

-        this.portletDD = portletDD;

-    }

-

-    public String getPortletName() {

-        return portletDD.getPortletName();

-    }

-

-    public PortletContext getPortletContext() {

-        return portletContext;

-    }

-

-    public ResourceBundle getResourceBundle(Locale locale) {

-        if(LOG.isDebugEnabled()) {

-            LOG.debug("Resource Bundle requested: "+locale);

-        }

-        if (bundles == null) {

-            bundles = new ResourceBundleFactory(portletDD);

-        }

-        return bundles.getResourceBundle(locale);

-    }

-

-    public String getInitParameter(String name) {

-        if (name == null) {

-            throw new IllegalArgumentException("Parameter name == null");

-        }

-

-        Iterator parms = portletDD.getInitParams().iterator();

-        while(parms.hasNext()) {

-            InitParamDD param = (InitParamDD)parms.next();

-            if (param.getParamName().equals(name)) {

-                return param.getParamValue();

-            }

-        }

-        return null;

-    }

-

-    public Enumeration getInitParameterNames() {

-        return new java.util.Enumeration() {

-            private Iterator iterator =

-                new ArrayList(portletDD.getInitParams()).iterator();

-

-            public boolean hasMoreElements() {

-                return iterator.hasNext();

-            }

-

-            public Object nextElement() {

-                if (iterator.hasNext()) {

-                    return ((InitParamDD) iterator.next()).getParamName();

-                } else {

-                    return null;

-                }

-            }

-        };

-    }

-

-

-    public javax.servlet.ServletConfig getServletConfig() {

-        return servletConfig;

-    }

-

-    public PortletDD getPortletDefinition() {

-        return portletDD;

-    }

-    // --------------------------------------------------------------------------------------------

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletContextImpl.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletContextImpl.java
deleted file mode 100644
index e418ad1..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletContextImpl.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.descriptors.portlet.PortletAppDD;

-import org.apache.pluto.internal.InternalPortletContext;

-

-import javax.portlet.PortletContext;

-import javax.portlet.PortletRequestDispatcher;

-import javax.servlet.RequestDispatcher;

-import javax.servlet.ServletContext;

-import java.io.InputStream;

-import java.lang.reflect.Method;

-import java.net.MalformedURLException;

-

-/**

- * Pluto's Portlet Context Implementation. This class implements the

- * <code>InternalPortletContext</code> which provides container specific

- * information needed for processing.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.1

- */

-public class PortletContextImpl

-    implements PortletContext, InternalPortletContext {

-

-    /**

-     * Logger.

-     */

-    private static final Log LOG = LogFactory.getLog(PortletContextImpl.class);

-

-    /**

-     * Attribute key used to bind the servletContext to the application.

-     */

-    private static final String CONTEXT_PATH =

-        "org.apache.pluto.PORTLET_APP_CONTEXT_PATH";

-

-

-

-    // Private Member Variables ------------------------------------------------

-

-    private String applicationId;

-    private String applicationName;

-    private PortletAppDD portletAppDD = null;

-    private ServletContext servletContext = null;

-

-    // Constructor -------------------------------------------------------------

-

-    /**

-     * Constructs an instance.

-     *

-     * @param servletContext the servlet context in which we are contained.

-     * @param portletAppDD   the portlet application descriptor.

-     */

-    public PortletContextImpl(String portletApplicationId,

-                              ServletContext servletContext,

-                              PortletAppDD portletAppDD) {

-        this.servletContext = servletContext;

-        this.portletAppDD = portletAppDD;

-        this.applicationId = portletApplicationId;

-        this.applicationName = servletContext.getServletContextName();

-        if(applicationName == null) {

-            applicationName = applicationId;

-        }

-    }

-

-    public String getApplicationId() {

-        return applicationId;

-    }

-

-    public String getApplicationName() {

-        return applicationName;

-    }

-

-    // PortletContext Impl -----------------------------------------------------

-

-    /**

-     * Retrieve the PortletContainer's server info.

-     *

-     * @return the server info in the form of <i>Server/Version</i>

-     * @see Environment#getServerInfo()

-     */

-    public String getServerInfo() {

-        return Environment.getServerInfo();

-    }

-

-    public PortletRequestDispatcher getRequestDispatcher(String path) {

-

-        if (LOG.isDebugEnabled()) {

-            LOG.debug("PortletRequestDispatcher requested: " + path);

-        }

-

-        // Check if the path name is valid. A valid path name must not be null

-        //   and must start with a slash '/' as defined by the portlet spec.

-        if (path == null || !path.startsWith("/")) {

-            if (LOG.isInfoEnabled()) {

-                LOG.info("Failed to retrieve PortletRequestDispatcher: "

-                    + "path name must begin with a slash '/'.");

-            }

-            return null;

-        }

-

-        // Extract query string which contains appended parameters.

-        String queryString = null;

-        int index = path.indexOf("?");

-        if (index > 0 && index < path.length() - 1) {

-            queryString = path.substring(index + 1);

-        }

-

-        // Construct PortletRequestDispatcher.

-        PortletRequestDispatcher portletRequestDispatcher = null;

-        try {

-            RequestDispatcher servletRequestDispatcher = servletContext

-                .getRequestDispatcher(path);

-            if (servletRequestDispatcher != null) {

-                portletRequestDispatcher = new PortletRequestDispatcherImpl(

-                    servletRequestDispatcher, queryString);

-            } else {

-                if (LOG.isInfoEnabled()) {

-                    LOG.info("No matching request dispatcher found for: " + path);

-                }

-            }

-        } catch (Exception ex) {

-            // We need to catch exception because of a Tomcat 4.x bug.

-            //   Tomcat throws an exception instead of return null if the path

-            //   was not found.

-            if (LOG.isInfoEnabled()) {

-                LOG.info("Failed to retrieve PortletRequestDispatcher: "

-                    + ex.getMessage());

-            }

-            portletRequestDispatcher = null;

-        }

-        return portletRequestDispatcher;

-    }

-

-    public PortletRequestDispatcher getNamedDispatcher(String name) {

-        RequestDispatcher dispatcher = servletContext.getNamedDispatcher(name);

-        if (dispatcher != null) {

-            return new PortletRequestDispatcherImpl(dispatcher);

-        } else {

-            if (LOG.isInfoEnabled()) {

-                LOG.info("No matching request dispatcher found for name: "

-                    + name);

-            }

-        }

-        return null;

-    }

-

-    public InputStream getResourceAsStream(String path) {

-        return servletContext.getResourceAsStream(path);

-    }

-

-    public int getMajorVersion() {

-        return Environment.getMajorSpecificationVersion();

-    }

-

-    public int getMinorVersion() {

-        return Environment.getMinorSpecificationVersion();

-    }

-

-    public String getMimeType(String file) {

-        return servletContext.getMimeType(file);

-    }

-

-    public String getRealPath(String path) {

-        return servletContext.getRealPath(path);

-    }

-

-    public java.util.Set getResourcePaths(String path) {

-        return servletContext.getResourcePaths(path);

-    }

-

-    public java.net.URL getResource(String path)

-        throws java.net.MalformedURLException {

-        if (path == null || !path.startsWith("/")) {

-            throw new MalformedURLException("path must start with a '/'");

-        }

-        return servletContext.getResource(path);

-    }

-

-    public java.lang.Object getAttribute(java.lang.String name) {

-        if (name == null) {

-            throw new IllegalArgumentException("Attribute name == null");

-        }

-

-        return servletContext.getAttribute(name);

-    }

-

-    public java.util.Enumeration getAttributeNames() {

-        return servletContext.getAttributeNames();

-    }

-

-    public java.lang.String getInitParameter(java.lang.String name) {

-        if (name == null) {

-            throw new IllegalArgumentException("Parameter name == null");

-        }

-

-        return servletContext.getInitParameter(name);

-    }

-

-    public java.util.Enumeration getInitParameterNames() {

-        return servletContext.getInitParameterNames();

-    }

-

-    public void log(java.lang.String msg) {

-        servletContext.log(msg);

-    }

-

-    public void log(java.lang.String message, java.lang.Throwable throwable) {

-        servletContext.log(message, throwable);

-    }

-

-    public void removeAttribute(java.lang.String name) {

-        if (name == null) {

-            throw new IllegalArgumentException("Attribute name == null");

-        }

-

-        servletContext.removeAttribute(name);

-    }

-

-    public void setAttribute(java.lang.String name, java.lang.Object object) {

-        if (name == null) {

-            throw new IllegalArgumentException("Attribute name == null");

-        }

-

-        servletContext.setAttribute(name, object);

-    }

-

-    public String getPortletContextName() {

-        return servletContext.getServletContextName();

-    }

-

-    // org.apache.pluto.core.InternalPortletContext Impl -----------------------

-

-    public ServletContext getServletContext() {

-        return servletContext;

-    }

-

-    public PortletAppDD getPortletApplicationDefinition() {

-        return portletAppDD;

-    }

-

-}

-

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletEntityImpl.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletEntityImpl.java
deleted file mode 100644
index 38074fd..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletEntityImpl.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.PortletContainerException;

-import org.apache.pluto.PortletWindow;

-import org.apache.pluto.internal.InternalPortletPreference;

-import org.apache.pluto.internal.PortletDescriptorRegistry;

-import org.apache.pluto.internal.PortletEntity;

-import org.apache.pluto.internal.PreferencesValidatorRegistry;

-import org.apache.pluto.descriptors.portlet.PortletAppDD;

-import org.apache.pluto.descriptors.portlet.PortletDD;

-import org.apache.pluto.descriptors.portlet.PortletPreferenceDD;

-import org.apache.pluto.descriptors.portlet.PortletPreferencesDD;

-import org.apache.pluto.descriptors.servlet.ServletDD;

-

-import javax.portlet.PreferencesValidator;

-import javax.portlet.ValidatorException;

-import javax.servlet.ServletContext;

-

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.List;

-

-/**

- * The PortletEntity encapsulates all data pertaining to a single portlet

- * instance.  This instance may appear zero or more times per user. The

- * PortletEntity consists of two primary peices of information, the Portlet

- * Definition as defined by the {@link PortletDD} and the Wrapping Servlet

- * information as defined by the{@link ServletDD}

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class PortletEntityImpl implements PortletEntity {

-	

-	/** Logger. */

-    private static final Log LOG = LogFactory.getLog(PortletEntityImpl.class);

-    

-    /** URI prefix of the portlet invoker servlet. */

-    private static final String PREFIX = "/PlutoInvoker/";

-    

-    

-    // Private Member Variables ------------------------------------------------

-    

-    /** The servlet context. */

-    private ServletContext servletContext = null;

-    

-    /** The portlet window. */

-    private PortletWindow portletWindow = null;

-

-    /** The cached PortletDD retrieved from the portlet descriptor registry. */

-    private PortletDD portletDefinition = null;

-    

-    /** Default portlet preferences defined for this portlet. */

-    private InternalPortletPreference[] defaultPreferences = null;

-    

-    

-    // Constructor -------------------------------------------------------------

-    

-    PortletEntityImpl(ServletContext servletContext, PortletWindow portletWindow) {

-        this.servletContext = servletContext;

-        this.portletWindow = portletWindow;

-    }

-    

-    

-    // PortletEntity Impl ------------------------------------------------------

-    

-    /**

-     * Returns the URI to the controller servlet that wraps this portlet.

-     * @return the URI to the controller servlet that wraps this portlet.

-     */

-    public String getControllerServletUri() {

-        return PREFIX + portletWindow.getPortletName();

-    }

-    

-    /**

-     * Returns an array of default preferences of this portlet. The default

-     * preferences are retrieved from the portlet application descriptor.

-     * <p>

-     * Data retrieved from <code>portlet.xml</code> are injected into the domain

-     * object <code>PortletPreferenceDD</code>. This method converts the domain

-     * objects into <code>PortletPreference</code> objects.

-     * </p>

-     * <p>

-     * Note that if no value is bound to a given preference key,

-     * <code>PortletPreferenceDD.getValues()</code> will return an empty string

-     * list, but the value array of <code>PortletPreference</code> should be set

-     * to null (instead of an empty array).

-     * </p>

-     * <p>

-     * This method never returns null, but the values held by PortletPreference

-     * may be null.

-     * </p>

-     * @return the preference set

-     * 

-     * @see org.apache.pluto.descriptors.portlet.PortletPreferenceDD

-     */

-    public InternalPortletPreference[] getDefaultPreferences() {

-        if (defaultPreferences == null) {

-            PortletDD portletDD = getPortletDefinition();

-            PortletPreferencesDD prefsDD = portletDD.getPortletPreferences();

-            if (prefsDD != null) {

-            	List prefs = new ArrayList();

-            	for (Iterator it = prefsDD.getPortletPreferences().iterator();

-            			it.hasNext(); ) {

-            		PortletPreferenceDD prefDD = (PortletPreferenceDD) it.next();

-            		String[] values = null;

-            		if (prefDD.getValues().size() > 0) {

-            			values = (String[]) prefDD.getValues().toArray(

-            					new String[prefDD.getValues().size()]);

-            		}

-            		PortletPreferenceImpl pref = new PortletPreferenceImpl(

-            				prefDD.getName(), values, prefDD.isReadOnly());

-            		prefs.add(pref);

-            	}

-            	defaultPreferences = (InternalPortletPreference[])

-            			prefs.toArray(new InternalPortletPreference[prefs.size()]);

-            }

-        }

-        return defaultPreferences;

-    }

-

-    /**

-     * Returns the portlet description. The return value cannot be NULL.

-     * @return the portlet description.

-     */

-    public PortletDD getPortletDefinition() {

-        if (portletDefinition == null) {

-            load();

-        }

-        return portletDefinition;

-    }

-    

-    /**

-     * Returns the preferences validator instance for this portlet.

-     * One validator instance is created per portlet definition.

-     * @return the preferences validator instance for this portlet.

-     * @throws ValidatorException  if fail to instantiate the validator.

-     */

-    public PreferencesValidator getPreferencesValidator()

-    throws ValidatorException {

-    	PreferencesValidator validator = PreferencesValidatorRegistry

-    			.getRegistry()

-    			.getPreferencesValidator(getPortletDefinition());

-    	return validator;

-    }

-    

-    

-    // Private Methods ---------------------------------------------------------

-    

-    /**

-     * Loads the portlet definition.

-     */

-    private void load() {

-    	

-    	// Retrieve the cross servlet context for the portlet.

-        String contextPath = portletWindow.getContextPath();

-        if (LOG.isDebugEnabled()) {

-            LOG.debug("Loading portlet definition for context: " + contextPath);

-        }

-        ServletContext crossContext = servletContext.getContext(contextPath);

-        if (LOG.isDebugEnabled()) {

-            LOG.debug("Retrieved cross context: " + crossContext);

-        }

-        

-        // Load PortletAppDD and find out the portlet definition.

-        try {

-            PortletAppDD appDD = PortletDescriptorRegistry.getRegistry()

-            		.getPortletAppDD(crossContext);

-            for (Iterator it = appDD.getPortlets().iterator(); it.hasNext(); ) {

-                PortletDD portletDD = (PortletDD) it.next();

-                if (portletDD.getPortletName().equals(

-                		portletWindow.getPortletName())) {

-                	portletDefinition = portletDD;

-                	break;

-                }

-            }

-        } catch (PortletContainerException ex) {

-        	String message = "Unable to load Portlet App Deployment Descriptor:"

-        			+ ex.getMessage();

-        	LOG.error(message, ex);

-        	// FIXME: should this be a NullPointerException?

-            throw new NullPointerException(message);

-        }

-    }

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletPreferenceImpl.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletPreferenceImpl.java
deleted file mode 100644
index fb87d51..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletPreferenceImpl.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import org.apache.pluto.internal.InternalPortletPreference;

-

-/**

- * TODO: javadoc

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- * @since Sep 20, 2004

- */

-public class PortletPreferenceImpl implements InternalPortletPreference {

-	

-	// Private Member Variables ------------------------------------------------

-	

-	/** The preference name. */

-    private String name = null;

-    

-    /** The preference values. */

-    private String[] values = null;

-    

-    /** Flag indicating if this preference is read-only. */

-    private boolean readOnly = false;

-    

-    

-    // Constructors ------------------------------------------------------------

-    

-    public PortletPreferenceImpl(String name, String[] values) {

-        this.name = name;

-        this.values = values;

-        this.readOnly = false;

-    }

-    

-    public PortletPreferenceImpl(String name,

-                                 String[] values,

-                                 boolean readOnly) {

-        this.name = name;

-        this.values = values;

-        this.readOnly = readOnly;

-    }

-    

-    /**

-     * Private constructor that is used only within the <code>clone()</code>

-     * method.

-     * @see #clone()

-     */

-    private PortletPreferenceImpl() {

-    	// Do nothing.

-    }

-    

-    

-    // PortletPreference Impl --------------------------------------------------

-    

-    public String getName() {

-        return name;

-    }

-

-    public void setName(String name) {

-        this.name = name;

-    }

-

-    public String[] getValues() {

-        return values;

-    }

-

-    public void setValues(String[] values) {

-        this.values = values;

-    }

-

-    public boolean isReadOnly() {

-        return readOnly;

-    }

-

-    public void setReadOnly(boolean readOnly) {

-        this.readOnly = readOnly;

-    }

-    

-    public Object clone() {

-    	PortletPreferenceImpl copy = new PortletPreferenceImpl();

-    	copy.name = this.name;

-    	if (this.values != null) {

-    		copy.values = (String[]) this.values.clone();

-    	}

-    	copy.readOnly = this.readOnly;

-    	return copy;

-    }

-    

-    

-    // Object Methods ----------------------------------------------------------

-    

-    /**

-     * Override of toString() that prints out name and values of fields.

-     * @see java.lang.Object#toString()

-     */

-    public String toString(){

-    	StringBuffer buffer = new StringBuffer();

-    	buffer.append(getClass().getName());

-    	buffer.append("[name=").append(name).append(";");

-    	if (values != null) {

-    		for (int i = 0; i < values.length; i++) {

-    			buffer.append("value[").append(i).append("]=")

-    					.append(values[i]).append(";");

-    		}

-    	} else {

-    		buffer.append("values=NULL;");

-    	}

-    	buffer.append("readOnly=").append(readOnly).append("]");

-    	return buffer.toString();

-    }

-    

-}

-

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletPreferencesImpl.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletPreferencesImpl.java
deleted file mode 100644
index 11f4009..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletPreferencesImpl.java
+++ /dev/null
@@ -1,361 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import java.io.IOException;

-import java.util.ArrayList;

-import java.util.Collections;

-import java.util.Enumeration;

-import java.util.HashMap;

-import java.util.Iterator;

-import java.util.Map;

-import java.util.Vector;

-

-import javax.portlet.PortletPreferences;

-import javax.portlet.PreferencesValidator;

-import javax.portlet.ReadOnlyException;

-import javax.portlet.ValidatorException;

-

-import org.apache.pluto.Constants;

-import org.apache.pluto.PortletContainer;

-import org.apache.pluto.PortletContainerException;

-import org.apache.pluto.util.StringManager;

-import org.apache.pluto.internal.InternalPortletPreference;

-import org.apache.pluto.internal.InternalPortletRequest;

-import org.apache.pluto.internal.InternalPortletWindow;

-import org.apache.pluto.internal.PortletEntity;

-import org.apache.pluto.spi.optional.PortletPreferencesService;

-import org.apache.commons.logging.LogFactory;

-import org.apache.commons.logging.Log;

-

-/**

- * Implementation of the <code>javax.portlet.PortletPreferences</code>

- * interface.

- * 

- * @see org.apache.pluto.core.PortletPreference

- * @see org.apache.pluto.core.impl.PortletPreferenceImpl

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class PortletPreferencesImpl implements PortletPreferences {

-	

-	/** Logger. */

-    private static final Log LOG = LogFactory.getLog(PortletPreferencesImpl.class);

-    

-    private static final StringManager EXCEPTIONS = StringManager.getManager(

-    		PortletPreferencesImpl.class.getPackage().getName());

-    

-    

-    // Private Member Variables ------------------------------------------------

-    

-    /** The portlet preferences service provided by the portal. */

-    private PortletPreferencesService preferencesService = null;

-

-    private InternalPortletWindow window = null;

-

-    private InternalPortletRequest request = null;

-    

-    /**

-     * Default portlet preferences retrieved from portlet.xml, and used for

-     * resetting portlet preferences.

-     */

-    private InternalPortletPreference[] defaultPreferences = null;

-    

-    /**

-     * Current portlet preferences: key is the preference name as a string,

-     * value is the PortletPreference instance.

-     */

-    private Map preferences = new HashMap();

-

-    /** Current method used for managing these preferences. */

-    private Integer methodId = null;

-    

-    

-    // Constructor -------------------------------------------------------------

-    

-    /**

-     * Constructs an instance.

-     * @param container  the portlet container.

-     * @param portletWindow  the internal portlet window.

-     * @param request  the internal portlet request.

-     * @param methodId  the request method ID: render request or action request.

-     */

-    public PortletPreferencesImpl(PortletContainer container,

-                                  InternalPortletWindow window,

-                                  InternalPortletRequest request,

-                                  Integer methodId) {

-        this.window = window;

-        this.request = request;

-        this.methodId = methodId;

-        

-        // Get the portlet preferences service from container.

-        preferencesService = container.getOptionalContainerServices()

-        		.getPortletPreferencesService();

-        if (LOG.isDebugEnabled()) {

-            LOG.debug("Using PortletPreferencesService: "

-            		+ preferencesService.getClass().getName());

-        }

-        

-        // Put default portlet preferences into preferences map.

-        PortletEntity entity = window.getPortletEntity();

-        defaultPreferences = entity.getDefaultPreferences();

-        for (int i = 0; i < defaultPreferences.length; i++) {

-            preferences.put(defaultPreferences[i].getName(),

-                            (InternalPortletPreference) defaultPreferences[i].clone());

-        }

-        if (LOG.isDebugEnabled()) {

-        	LOG.debug("Loaded default preferences: " + toString());

-        }

-        

-        // Merge stored portlet preferences into preferences map.

-        try {

-        	InternalPortletPreference[] storedPreferences = preferencesService

-            		.getStoredPreferences(window, request);

-            for (int i = 0; i < storedPreferences.length; i++) {

-            	if (LOG.isDebugEnabled()) {

-            		LOG.debug("Merging stored preference: "

-            				+ storedPreferences[i].getName());

-            	}

-                preferences.put(storedPreferences[i].getName(),

-                                storedPreferences[i]);

-            }

-        	// Store the preferences retrieved from portlet.xml.

-            //   Portlet preferences are stored everytime when a

-            //   PortletPreferencesImpl instance is created.

-            //   So here we do not check the portlet request method ID.

-        	internalStore();

-        	

-        } catch (PortletContainerException ex) {

-            LOG.error("Error retrieving preferences.", ex);

-            //TODO: Rethrow up the stack????

-        } catch (IOException ex) {

-            LOG.error("Error retrieving preferences.", ex);        	

-            //TODO: Rethrow up the stack????

-        } catch (ValidatorException ex) {

-            LOG.warn("ValidatorException initializing portlet preferences. "

-            		+ "This is not illegal at this point "

-            		+ "since we are just retreiving from portlet.xml.", ex);    	

-        }

-        if (LOG.isDebugEnabled()) {

-        	LOG.debug("Merged stored preferences: " + toString());

-        }

-    }

-    

-    

-    // PortletPreferences Impl -------------------------------------------------

-    

-    public boolean isReadOnly(String key) {

-        if (key == null) {

-            throw new IllegalArgumentException(

-            		EXCEPTIONS.getString("error.null", "Preference key "));

-        }

-        InternalPortletPreference pref = (InternalPortletPreference)

-        		preferences.get(key);

-        return (pref != null && pref.isReadOnly());

-    }

-

-    public String getValue(String key, String defaultValue) {

-        String[] values = getValues(key, new String[] { defaultValue });

-        String value = null;

-        if (values != null && values.length > 0) {

-        	value = values[0];

-        }

-        if (value == null) {

-        	value = defaultValue;

-        }

-        return value;

-    }

-

-    public String[] getValues(String key, String[] defaultValues) {

-        if (key == null) {

-            throw new IllegalArgumentException(

-            		EXCEPTIONS.getString("error.null", "Preference key "));

-        }

-        String[] values = null;

-        InternalPortletPreference pref = (InternalPortletPreference)

-        		preferences.get(key);

-        if (pref != null) {

-            values = pref.getValues();

-        }

-        if (values == null) {

-            values = defaultValues;

-        }

-        return values;

-    }

-

-    public void setValue(String key, String value) throws ReadOnlyException {

-        if (isReadOnly(key)) {

-            throw new ReadOnlyException(EXCEPTIONS.getString(

-            		"error.preference.readonly", key));

-        }

-        InternalPortletPreference pref = (InternalPortletPreference)

-        		preferences.get(key);

-        if (pref != null) {

-            pref.setValues(new String[] { value });

-        } else {

-            pref = new PortletPreferenceImpl(key, new String[] { value });

-            preferences.put(key, pref);

-        }

-    }

-

-    public void setValues(String key, String[] values) throws ReadOnlyException {

-        if (isReadOnly(key)) {

-            throw new ReadOnlyException(EXCEPTIONS.getString(

-            		"error.preference.readonly"));

-        }

-        InternalPortletPreference pref = (InternalPortletPreference)

-        		preferences.get(key);

-        if (pref != null) {

-            pref.setValues(values);

-        } else {

-            pref = new PortletPreferenceImpl(key, values);

-            preferences.put(key, pref);

-        }

-    }

-

-    public Enumeration getNames() {

-        return new Vector(preferences.keySet()).elements();

-    }

-

-    public Map getMap() {

-        Map map = new HashMap();

-        Iterator it = preferences.keySet().iterator();

-        while (it.hasNext()) {

-        	InternalPortletPreference pref = (InternalPortletPreference)

-        			preferences.get(it.next());

-            map.put(pref.getName(),

-                    pref.getValues() != null ? pref.getValues().clone() : null);

-        }

-        return Collections.unmodifiableMap(map);

-    }

-    

-    public void reset(String key) throws ReadOnlyException {

-    	// Read-only preferences cannot be reset.

-        if (isReadOnly(key)) {

-            throw new ReadOnlyException(EXCEPTIONS.getString(

-            		"error.preference.readonly", "Preference key "));

-        }

-        // Try to reset preference to the default values.

-        boolean resetDone = false;

-        for (int i = 0; !resetDone && i < defaultPreferences.length; i++) {

-        	if (key.equals(defaultPreferences[i].getName())) {

-        		if (LOG.isDebugEnabled()) {

-        			LOG.debug("Resetting preference for key: " + key);

-        		}

-        		preferences.put(key,

-        				(InternalPortletPreference) defaultPreferences[i].clone());

-        		resetDone = true;

-        	}

-        }

-        // Remove preference if default values are not defined (PLT.14.1).

-        if (!resetDone) {

-        	if (LOG.isDebugEnabled()) {

-        		LOG.debug("Resetting preference to null for key: " + key);

-        	}

-        	preferences.remove(key);

-        }

-    }

-    

-    /**

-     * Stores the portlet preferences to a persistent storage. This method

-     * should only be invoked within <code>processAction()</code> method.

-     * 

-     * @see #internalStore()

-     * 

-     * @throws IllegalStateException  if this method is not invoked within

-     *         <code>processAction()</code> method.

-     * @throws ValidatorException  if the portlet preferences are not valid.

-     * @throws IOException  if an error occurs with the persistence mechanism.

-     */

-    public void store() throws IOException, ValidatorException {

-        if (!Constants.METHOD_ACTION.equals(methodId)) {

-            throw new IllegalStateException(

-                	"store is only allowed inside a processAction call.");

-        }

-        internalStore();

-    }

-    

-    

-    // Private Methods ---------------------------------------------------------

-    

-    /**

-     * Stores the portlet preferences to a persistent storage. If a preferences

-     * validator is defined for this portlet, this method firstly validates the

-     * portlet preferences.

-     * <p>

-     * This method is invoked internally, thus it does not check the portlet

-     * request method ID (METHOD_RENDER or METHOD_ACTION).

-     * </p>

-     * @throws ValidatorException  if the portlet preferences are not valid.

-     * @throws IOException  if an error occurs with the persistence mechanism.

-     */

-    private void internalStore() throws IOException, ValidatorException {

-        // Validate the preferences before storing, if a validator is defined.

-        //   If the preferences cannot pass the validation,

-        //   an ValidatorException will be thrown out.

-        PreferencesValidator validator = window.getPortletEntity()

-        		.getPreferencesValidator();

-        if (validator != null) {

-        	validator.validate(this);

-        }

-        // Store the portlet preferences.

-        InternalPortletPreference[] prefs = (InternalPortletPreference[]) 

-        		(new ArrayList(preferences.values())).toArray(

-        				new InternalPortletPreference[preferences.size()]);

-        try {

-        	preferencesService.store(window, request, prefs);

-        } catch (PortletContainerException ex) {

-            LOG.error("Error storing preferences.", ex);

-            throw new IOException("Error storing perferences: " + ex.getMessage());

-        }

-    }

-    

-    

-    // Object Methods ----------------------------------------------------------

-    

-    /**

-     * Returns the string representation of this object. Preferences are

-     * separated by ';' character, while values in one preference are separated

-     * by ',' character.

-     * @return the string representation of this object.

-     * @see java.lang.Object#toString()

-     */

-    public String toString() {

-    	StringBuffer buffer = new StringBuffer();

-    	buffer.append(getClass().getName()).append("[");

-    	for (Enumeration en = getNames(); en.hasMoreElements(); ) {

-    		String name = (String) en.nextElement();

-    		buffer.append(name);

-    		buffer.append("(readOnly:").append(isReadOnly(name)).append(")=");

-    		String[] values = getValues(name, null);

-    		if (values != null) {

-	    		for (int i = 0; i < values.length; i++) {

-	    			buffer.append(values[i]);

-	    			if (i < values.length - 1) {

-	    				buffer.append(",");

-	    			}

-				}

-    		} else {

-    			buffer.append("NULL");

-    		}

-    		buffer.append(";");

-    	}

-    	buffer.append("]");

-    	return buffer.toString();

-    }

-    

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestDispatcherImpl.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestDispatcherImpl.java
deleted file mode 100644
index 77629d9..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestDispatcherImpl.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import org.apache.pluto.internal.InternalRenderRequest;

-import org.apache.pluto.internal.InternalRenderResponse;

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-

-import javax.portlet.PortletException;

-import javax.portlet.PortletRequestDispatcher;

-import javax.portlet.RenderRequest;

-import javax.portlet.RenderResponse;

-import javax.servlet.RequestDispatcher;

-import javax.servlet.ServletException;

-import javax.servlet.http.HttpServletRequest;

-import javax.servlet.http.HttpServletResponse;

-

-import java.io.IOException;

-

-/**

- * Implementation of the <code>PortletRequestDispatcher</code> interface.

- * The portlet request dispatcher is used to dispatch <b>RenderRequest</b> and

- * <b>RenderResponse</b> to a URI. Note that ActionRequest and ActionResponse

- * can never be dispatched.

- * 

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class PortletRequestDispatcherImpl implements PortletRequestDispatcher {

-	

-	/** Logger. */

-    private static final Log LOG = LogFactory.getLog(PortletRequestDispatcherImpl.class);

-    

-    

-    // Private Member Variables ------------------------------------------------

-    

-    /** The nested servlet request dispatcher instance. */

-    private RequestDispatcher requestDispatcher = null;

-    

-    /** The included query string. */

-    private String queryString = null;

-    

-    

-    // Constructors ------------------------------------------------------------

-    

-    /**

-     * Creates an instance. This constructor should be called to construct a

-     * named dispatcher.

-     * @param requestDispatcher  the servlet request dispatcher.

-     * @see javax.portlet.PortletContext#getNamedDispatcher(String)

-     */

-    public PortletRequestDispatcherImpl(RequestDispatcher requestDispatcher) {

-        this.requestDispatcher = requestDispatcher;

-        if (LOG.isDebugEnabled()) {

-        	LOG.debug("Named dispatcher created.");

-        }

-    }

-    

-    /**

-     * Creates an instance. This constructor should be called to construct a

-     * portlet request dispatcher.

-     * @param requestDispatcher  the servlet request dispatcher.

-     * @param queryString  the included query string.

-     * @see javax.portlet.PortletContext#getRequestDispatcher(String)

-     */

-    public PortletRequestDispatcherImpl(RequestDispatcher requestDispatcher,

-                                        String queryString) {

-        this(requestDispatcher);

-        this.queryString = queryString;

-        if (LOG.isDebugEnabled()) {

-        	LOG.debug("Request dispatcher created.");

-        }

-    }

-    

-    

-    // PortletRequestDispatcher Impl -------------------------------------------

-    

-    public void include(RenderRequest request, RenderResponse response)

-    throws PortletException, IOException {

-

-        InternalRenderRequest internalRequest = (InternalRenderRequest)

-                InternalImplConverter.getInternalRequest(request);

-        InternalRenderResponse internalResponse = (InternalRenderResponse)

-                InternalImplConverter.getInternalResponse(response);

-        

-        boolean isIncluded = (internalRequest.isIncluded()

-        		|| internalResponse.isIncluded());

-        try {

-        	internalRequest.setIncluded(true);

-        	internalRequest.setIncludedQueryString(queryString);

-        	internalResponse.setIncluded(true);

-

-            requestDispatcher.include(

-            		(HttpServletRequest) internalRequest,

-            		(HttpServletResponse) internalResponse);

-        } catch (IOException ex) {

-            throw ex;

-        } catch (ServletException ex) {

-            if (ex.getRootCause() != null) {

-                throw new PortletException(ex.getRootCause());

-            } else {

-                throw new PortletException(ex);

-            }

-        } finally {

-        	internalRequest.setIncluded(isIncluded);

-        	internalResponse.setIncluded(isIncluded);

-        }

-    }

-    

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java
deleted file mode 100644
index d6bf7ad..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java
+++ /dev/null
@@ -1,648 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.PortletContainer;

-import org.apache.pluto.descriptors.common.SecurityRoleRefDD;

-import org.apache.pluto.descriptors.portlet.PortletDD;

-import org.apache.pluto.descriptors.portlet.SupportsDD;

-import org.apache.pluto.internal.InternalPortletRequest;

-import org.apache.pluto.internal.InternalPortletWindow;

-import org.apache.pluto.internal.PortletEntity;

-import org.apache.pluto.util.ArgumentUtility;

-import org.apache.pluto.util.Enumerator;

-import org.apache.pluto.util.NamespaceMapper;

-import org.apache.pluto.util.StringManager;

-import org.apache.pluto.util.StringUtils;

-import org.apache.pluto.util.impl.NamespaceMapperImpl;

-

-import javax.portlet.PortalContext;

-import javax.portlet.PortletContext;

-import javax.portlet.PortletMode;

-import javax.portlet.PortletRequest;

-import javax.portlet.PortletSession;

-import javax.portlet.WindowState;

-import javax.servlet.RequestDispatcher;

-import javax.servlet.ServletInputStream;

-import javax.servlet.http.HttpServletRequest;

-import javax.servlet.http.HttpServletRequestWrapper;

-import javax.servlet.http.HttpSession;

-import java.io.BufferedReader;

-import java.io.UnsupportedEncodingException;

-import java.io.IOException;

-import java.util.Collections;

-import java.util.Enumeration;

-import java.util.HashSet;

-import java.util.Iterator;

-import java.util.Map;

-import java.util.Set;

-import java.util.Vector;

-import java.util.Locale;

-import java.security.Principal;

-

-/**

- * Abstract <code>javax.portlet.PortletRequest</code> implementation.

- * This class also implements InternalPortletRequest.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public abstract class PortletRequestImpl extends HttpServletRequestWrapper

-implements PortletRequest, InternalPortletRequest {

-	

-	/** Logger. */

-    private static final Log LOG = LogFactory.getLog(PortletRequestImpl.class);

-    

-    private static final StringManager EXCEPTIONS =

-            StringManager.getManager(PortletRequestImpl.class.getPackage().getName());

-    

-    

-    // Private Member Variables ------------------------------------------------

-    

-    /** The parent container within which this request was created. */

-    private PortletContainer container = null;

-    

-    /** The portlet window which is the target of this portlet request. */

-    private InternalPortletWindow internalPortletWindow = null;

-

-    /**

-     * The PortletContext associated with this Request. This PortletContext must

-     * be initialized from within the <code>PortletServlet</code>.

-     */

-    private PortletContext portletContext = null;

-

-    /** The PortalContext within which this request is occuring. */

-    private PortalContext portalContext = null;

-

-    /** The portlet session. */

-    private PortletSession portletSession = null;

-

-    /** Response content types. */

-    private Vector contentTypes = null;

-    

-    /** TODO: javadoc */

-    private NamespaceMapper mapper = new NamespaceMapperImpl();

-

-    /** FIXME: do we really need this?

-     * Flag indicating if the HTTP-Body has been accessed. */

-    private boolean bodyAccessed = false;

-

-

-    // Constructors ------------------------------------------------------------

-

-    public PortletRequestImpl(InternalPortletRequest internalPortletRequest) {

-        this(internalPortletRequest.getPortletContainer(),

-             internalPortletRequest.getInternalPortletWindow(),

-             internalPortletRequest.getHttpServletRequest());

-    }

-

-    /**

-     * Creates a PortletRequestImpl instance.

-     * @param container  the portlet container.

-     * @param internalPortletWindow  the internal portlet window.

-     * @param servletRequest  the underlying servlet request.

-     */

-    public PortletRequestImpl(PortletContainer container,

-                              InternalPortletWindow internalPortletWindow,

-                              HttpServletRequest servletRequest) {

-        super(servletRequest);

-        this.container = container;

-        this.internalPortletWindow = internalPortletWindow;

-        this.portalContext = container.getRequiredContainerServices().getPortalContext();

-    }

-    

-    

-    // PortletRequest Impl -----------------------------------------------------

-

-    /**

-     * Determine whether or not the specified WindowState is allowed for this

-     * portlet.

-     *

-     * @param state the state in question

-     * @return true if the state is allowed.

-     */

-    public boolean isWindowStateAllowed(WindowState state) {

-    	for (Enumeration en = portalContext.getSupportedWindowStates();

-    			en.hasMoreElements(); ) {

-            if (en.nextElement().toString().equals(state.toString())) {

-                return true;

-            }

-        }

-        return false;

-    }

-    

-    public boolean isPortletModeAllowed(PortletMode mode) {

-        return (isPortletModeAllowedByPortlet(mode)

-                && isPortletModeAllowedByPortal(mode));

-    }

-    

-    public PortletMode getPortletMode() {

-        return internalPortletWindow.getPortletMode();

-    }

-    

-    public WindowState getWindowState() {

-        return internalPortletWindow.getWindowState();

-    }

-    

-    public PortletSession getPortletSession() {

-        return getPortletSession(true);

-    }

-    

-    /**

-     * Returns the portlet session.

-     * <p>

-     * Note that since portlet request instance is created everytime the portlet

-     * container receives an incoming request, the portlet session instance held

-     * by the request instance is also re-created for each incoming request.

-     * </p>

-     */

-    public PortletSession getPortletSession(boolean create) {

-        if (LOG.isDebugEnabled()) {

-            LOG.debug("Retreiving portlet session (create=" + create + ")");

-        }

-        //

-        // It is critical that we don't retrieve the portlet session until the

-        //   cross context dispatch has been completed.  If we do then we risk

-        //   having a cached version which is invalid for the context within

-        //   which it exists.

-        //

-        if (portletContext == null) {

-            throw new IllegalStateException(

-                    EXCEPTIONS.getString("error.session.illegalState"));

-        }

-        //

-        // We must make sure that if the session has been invalidated (perhaps

-        //   through setMaxIntervalTimeout()) and the underlying request

-        //   returns null that we no longer use the cached version.

-        // We have to check (ourselves) if the session has exceeded its max

-        //   inactive interval. If so, we should invalidate the underlying

-        //   HttpSession and recreate a new one (if the create flag is set to

-        //   true) -- We just cannot depend on the implementation of

-        //   javax.servlet.http.HttpSession!

-        //

-        HttpSession httpSession = getHttpServletRequest().getSession(create);

-        if (httpSession != null) {

-        	// HttpSession is not null does NOT mean that it is valid.

-//START PATCH - Jira Issue PLUTO-242 contriuted by David Garcia

-//            long maxInactiveTime = httpSession.getMaxInactiveInterval() * 1000L;

-//            long currentInactiveTime = System.currentTimeMillis()

-//            		- httpSession.getLastAccessedTime();

-//            if (currentInactiveTime > maxInactiveTime) {

-//            	if (LOG.isDebugEnabled()) {

-//            		LOG.debug("The underlying HttpSession is expired and "

-//            				+ "should be invalidated.");

-            int maxInactiveInterval = httpSession.getMaxInactiveInterval();

-            if (maxInactiveInterval >= 0) {    // < 0 => Never expires.

-            	long maxInactiveTime = httpSession.getMaxInactiveInterval() * 1000L;

-            	long currentInactiveTime = System.currentTimeMillis()

-            			- httpSession.getLastAccessedTime();

-            	if (currentInactiveTime > maxInactiveTime) {

-            		if (LOG.isDebugEnabled()) {

-            			LOG.debug("The underlying HttpSession is expired and "

-            					+ "should be invalidated.");

-            		}

-            		httpSession.invalidate();

-            		httpSession = getHttpServletRequest().getSession(create);

-            	}

-//            	httpSession.invalidate();

-//            	httpSession = getHttpServletRequest().getSession(create);

-//END PATCH 

-            }

-        }

-        if (httpSession == null) {

-            if (LOG.isDebugEnabled()) {

-                LOG.debug("The underlying HttpSession is not available: "

-                		+ "no session will be returned.");

-            }

-            return null;

-        }

-        //

-        // If we reach here, we are sure that the underlying HttpSession is

-        //   available. If we haven't created and cached a portlet session

-        //   instance, we will create and cache one now.

-        //

-        if (portletSession == null) {

-        	if (LOG.isDebugEnabled()) {

-        		LOG.debug("Creating new portlet session...");

-        	}

-            portletSession = new PortletSessionImpl(

-                    portletContext,

-                    internalPortletWindow,

-                    httpSession);

-        }

-        return portletSession;

-    }

-    

-    public String getProperty(String name) throws IllegalArgumentException {

-    	ArgumentUtility.validateNotNull("propertyName", name);

-        String property = this.getHttpServletRequest().getHeader(name);

-        if (property == null) {

-            Map propertyMap = container.getRequiredContainerServices()

-                    .getPortalCallbackService()

-                    .getRequestProperties(

-                    		getHttpServletRequest(),

-                    		internalPortletWindow);

-

-            if (propertyMap != null) {

-                String[] properties = (String[]) propertyMap.get(name);

-                if (properties != null && properties.length > 0) {

-                	property = properties[0];

-                }

-            }

-        }

-        return property;

-    }

-

-    public Enumeration getProperties(String name) {

-    	ArgumentUtility.validateNotNull("propertyName", name);

-        Set v = new HashSet();

-        Enumeration props = this.getHttpServletRequest().getHeaders(name);

-        if (props != null) {

-            while (props.hasMoreElements()) {

-                v.add(props.nextElement());

-            }

-        }

-

-        // get properties from PropertyManager

-        Map map = container.getRequiredContainerServices()

-                .getPortalCallbackService()

-                .getRequestProperties(

-                		getHttpServletRequest(),

-                		internalPortletWindow);

-

-        if (map != null) {

-            String[] properties = (String[]) map.get(name);

-

-            if (properties != null) {

-                // add properties to vector

-                for (int i = 0; i < properties.length; i++) {

-                    v.add(properties[i]);

-                }

-            }

-        }

-

-        return new Enumerator(v.iterator());

-    }

-

-    public Enumeration getPropertyNames() {

-        Set v = new HashSet();

-

-        // get properties from PropertyManager

-        Map map = container.getRequiredContainerServices()

-                .getPortalCallbackService()

-                .getRequestProperties(getHttpServletRequest(), internalPortletWindow);

-

-        if (map != null) {

-            v.addAll(map.keySet());

-        }

-

-        // get properties from request header

-        Enumeration props = this.getHttpServletRequest().getHeaderNames();

-        if (props != null) {

-            while (props.hasMoreElements()) {

-                v.add(props.nextElement());

-            }

-        }

-

-        return new Enumerator(v.iterator());

-    }

-

-    public PortalContext getPortalContext() {

-        return container.getRequiredContainerServices().getPortalContext();

-    }

-

-    public String getAuthType() {

-        return this.getHttpServletRequest().getAuthType();

-    }

-

-    public String getContextPath() {

-        return this.internalPortletWindow.getContextPath();

-        //return ((HttpServletRequest)getRequest()).getContextPath();

-    }

-

-    public String getRemoteUser() {

-        return this.getHttpServletRequest().getRemoteUser();

-    }

-

-    public Principal getUserPrincipal() {

-        return this.getHttpServletRequest().getUserPrincipal();

-    }

-

-    /**

-     * Determines whether a user is mapped to the specified role.  As specified

-     * in PLT-20-3, we must reference the &lt;security-role-ref&gt; mappings

-     * within the deployment descriptor. If no mapping is available, then, and

-     * only then, do we check use the actual role name specified against the web

-     * application deployment descriptor.

-     *

-     * @param roleName the name of the role

-     * @return true if it is determined the user has the given role.

-     */

-    public boolean isUserInRole(String roleName) {

-        PortletEntity entity = internalPortletWindow.getPortletEntity();

-        PortletDD def = entity.getPortletDefinition();

-

-        SecurityRoleRefDD ref = null;

-        Iterator refs = def.getSecurityRoleRefs().iterator();

-        while (refs.hasNext()) {

-            SecurityRoleRefDD r = (SecurityRoleRefDD) refs.next();

-            if (r.getRoleName().equals(roleName)) {

-                ref = r;

-                break;

-            }

-        }

-

-        String link;

-        if (ref != null && ref.getRoleLink() != null) {

-            link = ref.getRoleLink();

-        } else {

-            link = roleName;

-        }

-

-        return this.getHttpServletRequest().isUserInRole(link);

-    }

-

-    public Object getAttribute(String name) {

-    	ArgumentUtility.validateNotNull("attributeName", name);

-    	

-        String encodedName = isNameReserved(name) ?

-                name :

-                mapper.encode(internalPortletWindow.getId(), name);

-

-        Object attribute = getHttpServletRequest()

-                .getAttribute(encodedName);

-

-        if (attribute == null) {

-            attribute = getHttpServletRequest().getAttribute(name);

-        }

-        return attribute;

-    }

-

-    public Enumeration getAttributeNames() {

-        Enumeration attributes = this.getHttpServletRequest()

-                .getAttributeNames();

-

-        Vector portletAttributes = new Vector();

-

-        while (attributes.hasMoreElements()) {

-            String attribute = (String) attributes.nextElement();

-

-            String portletAttribute = mapper.decode(

-                    internalPortletWindow.getId(), attribute);

-

-            if (portletAttribute != null) { // it is in the portlet's namespace

-                portletAttributes.add(portletAttribute);

-            }

-        }

-

-        return portletAttributes.elements();

-    }

-

-    public String getParameter(String name) {

-    	ArgumentUtility.validateNotNull("parameterName", name);

-        String[] values = (String[]) baseGetParameterMap().get(name);

-        if (values != null && values.length > 0) {

-            return values[0];

-        } else {

-        	return null;

-        }

-    }

-

-    public Enumeration getParameterNames() {

-        return Collections.enumeration(baseGetParameterMap().keySet());

-    }

-

-    public String[] getParameterValues(String name) {

-    	ArgumentUtility.validateNotNull("parameterName", name);

-    	String[] values = (String[]) baseGetParameterMap().get(name);

-        if (values != null) {

-            values = StringUtils.copy(values);

-        }

-        return values;

-    }

-    

-    public Map getParameterMap() {

-    	return StringUtils.copyParameters(baseGetParameterMap());

-    }

-

-    public boolean isSecure() {

-        return this.getHttpServletRequest().isSecure();

-    }

-

-    public void setAttribute(String name, Object value) {

-    	ArgumentUtility.validateNotNull("attributeName", name);

-        String encodedName = isNameReserved(name) ?

-                name : mapper.encode(internalPortletWindow.getId(), name);

-        if (value == null) {

-            removeAttribute(name);

-        } else {

-            getHttpServletRequest().setAttribute(encodedName, value);

-        }

-    }

-

-    public void removeAttribute(String name) {

-    	ArgumentUtility.validateNotNull("attributeName", name);

-        String encodedName = isNameReserved(name) ?

-                name : mapper.encode(internalPortletWindow.getId(), name);

-        getHttpServletRequest().removeAttribute(encodedName);

-    }

-

-    public String getRequestedSessionId() {

-        return this.getHttpServletRequest().getRequestedSessionId();

-    }

-

-    public boolean isRequestedSessionIdValid() {

-        if (LOG.isDebugEnabled()) {

-            LOG.debug(" ***** IsRequestedSessionIdValid? "+getHttpServletRequest().isRequestedSessionIdValid());

-        }

-        return getHttpServletRequest().isRequestedSessionIdValid();

-    }

-

-    public String getResponseContentType() {

-        Enumeration enumeration = getResponseContentTypes();

-        while (enumeration.hasMoreElements()) {

-            return (String) enumeration.nextElement();

-        }

-        return "text/html";

-    }

-

-    public Enumeration getResponseContentTypes() {

-        if (contentTypes == null) {

-            contentTypes = new Vector();

-            PortletDD dd = internalPortletWindow.getPortletEntity().getPortletDefinition();

-            Iterator supports = dd.getSupports().iterator();

-            while (supports.hasNext()) {

-                SupportsDD sup = (SupportsDD) supports.next();

-                contentTypes.add(sup.getMimeType());

-            }

-            if (contentTypes.size() < 1) {

-                contentTypes.add("text/html");

-            }

-        }

-        return contentTypes.elements();

-    }

-

-    public Locale getLocale() {

-        return this.getHttpServletRequest().getLocale();

-    }

-

-    public Enumeration getLocales() {

-        return this.getHttpServletRequest().getLocales();

-    }

-

-    public String getScheme() {

-        return this.getHttpServletRequest().getScheme();

-    }

-

-    public String getServerName() {

-        return this.getHttpServletRequest().getServerName();

-    }

-

-    public int getServerPort() {

-        return this.getHttpServletRequest().getServerPort();

-    }

-    

-    

-    // Protected Methods -------------------------------------------------------

-    

-    /**

-     * The base method that returns the parameter map in this portlet request.

-     * All parameter-related methods call this base method. Subclasses may just

-     * overwrite this protected method to change behavior of all parameter-

-     * related methods.

-     * @return the base parameter map from which parameters are retrieved.

-     */

-    protected Map baseGetParameterMap() {

-        bodyAccessed = true;

-        return this.getHttpServletRequest().getParameterMap();

-    }

-

-    protected void setBodyAccessed() {

-    	bodyAccessed = true;

-    }

-    

-    

-    // InternalPortletRequest Impl ---------------------------------------------

-

-    public InternalPortletWindow getInternalPortletWindow() {

-        return internalPortletWindow;

-    }

-

-    public PortletContainer getPortletContainer() {

-        return container;

-    }

-

-    public HttpServletRequest getHttpServletRequest() {

-        return (HttpServletRequest) super.getRequest();

-    }

-    

-    public void init(PortletContext portletContext, HttpServletRequest req) {

-        this.portletContext = portletContext;

-        setRequest(req);

-    }

-

-    /**

-     * TODO: Implement this properly.  Not required now

-     */

-    public void release() {

-    	// TODO:

-    }

-    

-    

-    // TODO: Additional Methods of HttpServletRequestWrapper -------------------

-    

-    public BufferedReader getReader()

-    throws UnsupportedEncodingException, IOException {

-    	// the super class will ensure that a IllegalStateException is thrown

-    	//   if getInputStream() was called earlier

-    	BufferedReader reader = getHttpServletRequest().getReader();

-    	bodyAccessed = true;

-    	return reader;

-    }

-    

-    public ServletInputStream getInputStream() throws IOException {

-    	ServletInputStream stream = getHttpServletRequest().getInputStream();

-    	bodyAccessed = true;

-    	return stream;

-    }

-

-    public RequestDispatcher getRequestDispatcher(String path) {

-        return getHttpServletRequest().getRequestDispatcher(path);

-    }

-    

-    /**

-     * TODO: why check bodyAccessed?

-     */

-    public void setCharacterEncoding(String encoding)

-    throws UnsupportedEncodingException {

-        if (bodyAccessed) {

-        	throw new IllegalStateException("Cannot set character encoding "

-        			+ "after HTTP body is accessed.");

-        }

-        super.setCharacterEncoding(encoding);

-    }

-    

-    

-    // Private Methods ---------------------------------------------------------

-    

-    /**

-     * Is this attribute name a reserved name (by the J2EE spec)?. Reserved

-     * names begin with "java." or "javax.".

-     */

-    private boolean isNameReserved(String name) {

-        return name.startsWith("java.") || name.startsWith("javax.");

-    }

-    

-    private boolean isPortletModeAllowedByPortlet(PortletMode mode) {

-        if (isPortletModeMandatory(mode)) {

-            return true;

-        }

-

-        PortletDD dd = internalPortletWindow.getPortletEntity()

-                .getPortletDefinition();

-

-        Iterator mimes = dd.getSupports().iterator();

-        while (mimes.hasNext()) {

-            Iterator modes = ((SupportsDD) mimes.next()).getPortletModes().iterator();

-            while (modes.hasNext()) {

-                String m = (String) modes.next();

-                if (m.equals(mode.toString())) {

-                    return true;

-                }

-            }

-        }

-        return false;

-    }

-

-    private boolean isPortletModeAllowedByPortal(PortletMode mode) {

-        Enumeration supportedModes = portalContext.getSupportedPortletModes();

-        while (supportedModes.hasMoreElements()) {

-            if (supportedModes.nextElement().toString().equals(

-                    (mode.toString()))) {

-                return true;

-            }

-        }

-        return false;

-    }

-

-    private boolean isPortletModeMandatory(PortletMode mode) {

-        return PortletMode.VIEW.equals(mode) || PortletMode.EDIT.equals(mode) || PortletMode.HELP.equals(mode);

-    }

-

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletResponseImpl.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletResponseImpl.java
deleted file mode 100644
index 44a4d8e..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletResponseImpl.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import java.io.IOException;

-import java.io.PrintWriter;

-

-import javax.portlet.PortletResponse;

-import javax.servlet.ServletOutputStream;

-import javax.servlet.http.HttpServletRequest;

-import javax.servlet.http.HttpServletResponse;

-import javax.servlet.http.HttpServletResponseWrapper;

-

-import org.apache.pluto.PortletContainer;

-import org.apache.pluto.internal.InternalPortletResponse;

-import org.apache.pluto.internal.InternalPortletWindow;

-import org.apache.pluto.spi.ResourceURLProvider;

-import org.apache.pluto.util.ArgumentUtility;

-import org.apache.pluto.util.PrintWriterServletOutputStream;

-

-/**

- * Abstract <code>javax.portlet.PortletResponse</code> implementation.

- * This class also implements InternalPortletResponse.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public abstract class PortletResponseImpl extends HttpServletResponseWrapper

-implements PortletResponse, InternalPortletResponse {

-	

-	// Private Member Variables ------------------------------------------------

-	

-	/** The portlet container. */

-    private PortletContainer container = null;

-    

-    /** The internal portlet window. */

-    private InternalPortletWindow internalPortletWindow = null;

-

-    /** The servlet request of the target/portlet's web module. */

-    private HttpServletRequest httpServletRequest = null;

-    

-    private boolean usingWriter;

-    private boolean usingStream;

-

-    private ServletOutputStream wrappedWriter;

-    

-    

-    // Constructor -------------------------------------------------------------

-    

-    public PortletResponseImpl(PortletContainer container,

-                               InternalPortletWindow internalPortletWindow,

-                               HttpServletRequest servletRequest,

-                               HttpServletResponse servletResponse) {

-        super(servletResponse);

-        this.container = container;

-        this.httpServletRequest = servletRequest;

-        this.internalPortletWindow = internalPortletWindow;

-    }

-    

-    

-    // PortletResponse Impl ----------------------------------------------------

-    

-    public void addProperty(String name, String value) {

-    	ArgumentUtility.validateNotNull("propertyName", name);

-        container.getRequiredContainerServices()

-        		.getPortalCallbackService()

-        		.addResponseProperty(

-        				getHttpServletRequest(),

-        				internalPortletWindow,

-        				name, value);

-    }

-

-    public void setProperty(String name, String value) {

-    	ArgumentUtility.validateNotNull("propertyName", name);

-        container.getRequiredContainerServices()

-                .getPortalCallbackService()

-                .setResponseProperty(

-                        getHttpServletRequest(),

-                        internalPortletWindow,

-                        name, value);

-    }

-

-    public String encodeURL(String path) {

-        if (path.indexOf("://") == -1 && !path.startsWith("/")) {

-            throw new IllegalArgumentException(

-                "only absolute URLs or full path URIs are allowed");

-        }

-        

-        ResourceURLProvider provider = getContainer()

-        		.getRequiredContainerServices()

-        		.getPortalCallbackService()

-        		.getResourceURLProvider(

-        				httpServletRequest,

-        				internalPortletWindow);

-        if (path.indexOf("://") != -1) {

-            provider.setAbsoluteURL(path);

-        } else {

-            provider.setFullPath(path);

-        }

-        return getHttpServletResponse().encodeURL(provider.toString());

-    }

-    

-    

-    // InternalPortletResponse impl --------------------------------------------

-    

-    public InternalPortletWindow getInternalPortletWindow() {

-        return internalPortletWindow;

-    }

-    

-    

-    // Internal Methods --------------------------------------------------------

-    

-    /**

-     * Returns the portlet container.

-     * @return the portlet container.

-     */

-    protected PortletContainer getContainer() {

-        return container;

-    }

-    

-    /**

-     * Returns the nested HttpServletRequest instance.

-     * @return the nested HttpServletRequest instance.

-     */

-    protected HttpServletRequest getHttpServletRequest() {

-        return httpServletRequest;

-    }

-    

-    /**

-     * Returns the nested HttpServletResponse instance.

-     * @return the nested HttpServletResponse instance.

-     */

-    public HttpServletResponse getHttpServletResponse() {

-        return (HttpServletResponse) super.getResponse();

-    }

-    

-    

-    // HttpServletResponse Methods ---------------------------------------------

-    

-    public String encodeUrl(String url) {

-        return this.encodeURL(url);

-    }

-    

-    /**

-     * TODO: javadoc about why we are using a wrapped writer here.

-     * @see org.apache.pluto.util.PrintWriterServletOutputStream

-     */

-    public ServletOutputStream getOutputStream()

-    throws IllegalStateException, IOException {

-        if (usingWriter) {

-            throw new IllegalStateException(

-            		"getPortletOutputStream can't be used "

-            		+ "after getWriter was invoked.");

-        }

-        if (wrappedWriter == null) {

-            wrappedWriter = new PrintWriterServletOutputStream(

-            		getHttpServletResponse().getWriter());

-        }

-        usingStream = true;

-        return wrappedWriter;

-    }

-    

-    public PrintWriter getWriter()

-    throws IllegalStateException, IOException {

-        if (usingStream) {

-            throw new IllegalStateException(

-            		"getWriter can't be used "

-            		+ "after getOutputStream was invoked.");

-        }

-        usingWriter = true;

-        return getHttpServletResponse().getWriter();

-    }

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletSessionImpl.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletSessionImpl.java
deleted file mode 100644
index 65f8c63..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletSessionImpl.java
+++ /dev/null
@@ -1,281 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import java.util.Enumeration;

-import java.util.Vector;

-

-import javax.portlet.PortletContext;

-import javax.portlet.PortletSession;

-import javax.portlet.PortletSessionUtil;

-import javax.servlet.http.HttpSessionContext;

-import javax.servlet.http.HttpSession;

-import javax.servlet.ServletContext;

-

-import org.apache.pluto.internal.InternalPortletWindow;

-import org.apache.pluto.util.ArgumentUtility;

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-

-/**

- * Implementation of the <code>javax.portlet.PortletSession</code> interface.

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class PortletSessionImpl implements PortletSession, HttpSession {

-	

-	/** Logger. */

-    private static final Log LOG = LogFactory.getLog(PortletSessionImpl.class);

-    

-    /** The default scope (<code>PORTLET_SCOPE</code>) for storing objects. */

-    private static final int DEFAULT_SCOPE = PortletSession.PORTLET_SCOPE;

-    

-    /** The portlet scope namespace as defined in PLT. 15.3. */

-    private static final String PORTLET_SCOPE_NAMESPACE = "javax.portlet.p.";

-    

-    /** The portlet window ID / attribute name separator as defined in PLT. 15.3. */

-    private static final char ID_NAME_SEPARATOR = '?';

-

-    

-    // Private Member Variables ------------------------------------------------

-    

-    /** The wrapped HttpSession object. */

-    private HttpSession httpSession = null;

-    

-    /** The portlet context. */

-    private PortletContext portletContext = null;

-    

-    /** The internal portlet window. */

-    private InternalPortletWindow internalPortletWindow = null;

-    

-    

-    // Constructor -------------------------------------------------------------

-    

-    /**

-     * Constructs an instance.

-     */

-    public PortletSessionImpl(PortletContext portletContext,

-                              InternalPortletWindow internalPortletWindow,

-                              HttpSession httpSession) {

-        this.portletContext = portletContext;

-        this.internalPortletWindow = internalPortletWindow;

-        this.httpSession = httpSession;

-    }

-    

-    

-    // PortletSession Impl: Attributes -----------------------------------------

-    

-    public Object getAttribute(String name) {

-        return getAttribute(name, DEFAULT_SCOPE);

-    }

-    

-    /**

-     * Returns the attribute of the specified name under the given scope.

-     * 

-     * @param name  the attribute name.

-     * @param scope  the scope under which the attribute object is stored.

-     * @return the attribute object.

-     */

-    public Object getAttribute(String name, int scope) {

-    	ArgumentUtility.validateNotNull("attributeName", name);

-    	String key = (scope == PortletSession.APPLICATION_SCOPE)

-    			? name : createPortletScopedId(name);

-    	return httpSession.getAttribute(key);

-    }

-    

-    public Enumeration getAttributeNames() {

-        return getAttributeNames(DEFAULT_SCOPE);

-    }

-    

-    public Enumeration getAttributeNames(int scope) {

-    	// Return all attribute names in the nested HttpSession object.

-        if (scope == PortletSession.APPLICATION_SCOPE) {

-            return httpSession.getAttributeNames();

-        }

-        // Return attribute names with the portlet-scoped prefix.

-        else {

-            Vector portletScopedNames = new Vector();

-            for (Enumeration en = httpSession.getAttributeNames();

-            		en.hasMoreElements(); ) {

-            	String name = (String) en.nextElement();

-                if (isInCurrentPortletScope(name)) {

-                	portletScopedNames.add(

-                			PortletSessionUtil.decodeAttributeName(name));

-                }

-           }

-            return portletScopedNames.elements();

-        }

-    }

-    

-    public void removeAttribute(String name) {

-        removeAttribute(name, DEFAULT_SCOPE);

-    }

-

-    public void removeAttribute(String name, int scope) {

-    	ArgumentUtility.validateNotNull("attributeName", name);

-    	if (scope == PortletSession.APPLICATION_SCOPE) {

-    		httpSession.removeAttribute(name);

-    	} else {

-    		httpSession.removeAttribute(createPortletScopedId(name));

-    	}

-    }

-    

-    public void setAttribute(String name, Object value) {

-        setAttribute(name, value, DEFAULT_SCOPE);

-    }

-

-    public void setAttribute(String name, Object value, int scope) {

-    	ArgumentUtility.validateNotNull("attributeName", name);

-    	if (scope == PortletSession.APPLICATION_SCOPE) {

-    		httpSession.setAttribute(name, value);

-    	} else {

-    		httpSession.setAttribute(createPortletScopedId(name),  value);

-    	}

-    }

-

-    

-    // PortletSession Impl: Other Methods --------------------------------------

-    

-    public PortletContext getPortletContext() {

-        return portletContext;

-    }

-

-    public long getCreationTime() {

-        return httpSession.getCreationTime();

-    }

-

-    public String getId() {

-        return httpSession.getId();

-    }

-

-    public long getLastAccessedTime() {

-        return httpSession.getLastAccessedTime();

-    }

-

-    public int getMaxInactiveInterval() {

-        return httpSession.getMaxInactiveInterval();

-    }

-

-    public void invalidate() throws IllegalStateException {

-        httpSession.invalidate();

-    }

-

-    public boolean isNew() throws IllegalStateException {

-        return httpSession.isNew();

-    }

-    

-    /**

-     * Specifies the time, in seconds, between client requests, before the

-     * portlet container invalidates this session. A negative time indicates

-     * the session should never timeout.

-     * <p>

-     * [Portlet Spec. PLT. 15.4.] If the PortletSession object is invalidated

-     * by a portlet, the portlet container must invalidate the associated

-     * HttpSession object.

-     * </p>

-     * @param interval  an integer specifying the number of seconds.

-     */ 

-    public void setMaxInactiveInterval(int interval) {

-        httpSession.setMaxInactiveInterval(interval);

-        if (LOG.isDebugEnabled()) {

-            LOG.debug("Session timeout set to: " + interval);

-        }

-    }

-    

-    

-    // Private Methods ---------------------------------------------------------

-    

-    /**

-     * Creates portlet-scoped ID for the specified attribute name.

-     * Portlet-scoped ID for a given attribute name has the following form:

-     * <code>javax.portlet.p.&lt;ID&gt;?&lt;name&gt;</code>

-     * where <code>ID</code> is a unique identification for the portlet window

-     * (assigned by the portal/portlet-container) that must not contain a '?'

-     * character. <code>name</code> is the attribute name.

-     * <p>

-     * Refer to Portlet Specification PLT. 15.3 for more details.

-     * </p>

-     * @param name  the attribute name.

-     * @return portlet-scoped ID for the attribute name.

-     */

-    private String createPortletScopedId(String name) {

-    	StringBuffer buffer = new StringBuffer();

-    	buffer.append(PORTLET_SCOPE_NAMESPACE);

-    	buffer.append(internalPortletWindow.getId().getStringId());

-    	buffer.append(ID_NAME_SEPARATOR);

-    	buffer.append(name);

-    	return buffer.toString();

-    }

-    

-    /**

-     * Checks if the attribute name in APPLICATION_SCOPE is in the current

-     * portlet scope. 

-     * @param name  the attribute name to check.

-     * @return true if the attribute name is in the current portlet scope.

-     * @see #createPortletScopedId(String)

-     */

-    private boolean isInCurrentPortletScope(String name) {

-    	// Portlet-scoped attribute names MUST start with "javax.portlet.p.",

-    	//   and contain the ID-name separator '?'.

-    	if (name.startsWith(PORTLET_SCOPE_NAMESPACE)

-    			&& name.indexOf(ID_NAME_SEPARATOR) > -1) {

-        	String id = name.substring(PORTLET_SCOPE_NAMESPACE.length(),

-        	                           name.indexOf(ID_NAME_SEPARATOR));

-        	return (id.equals(internalPortletWindow.getId().getStringId()));

-        }

-    	// Application-scoped attribute names are not in portlet scope.

-    	else {

-        	return false;

-        }

-    }

-    

-    

-    // HttpSession Impl --------------------------------------------------------

-    

-    public ServletContext getServletContext() {

-        return httpSession.getServletContext();

-    }

-

-    /**

-     * DEPRECATED: implemented for backwards compatability with HttpSession.

-     * @deprecated

-     */

-    public HttpSessionContext getSessionContext() {

-        return httpSession.getSessionContext();

-    }

-

-    public Object getValue(String name) {

-        return this.getAttribute(name, DEFAULT_SCOPE);

-    }

-

-    /**

-     * DEPRECATED: Implemented for backwards compatibility with HttpSession.

-     * @deprecated

-     */

-    public String[] getValueNames() {

-        return httpSession.getValueNames();

-    }

-

-    public void putValue(String name, Object value) {

-        this.setAttribute(name, value, DEFAULT_SCOPE);

-    }

-

-    public void removeValue(String name) {

-        this.removeAttribute(name, DEFAULT_SCOPE);

-    }

-    

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletURLImpl.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletURLImpl.java
deleted file mode 100644
index 56ad017..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletURLImpl.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import java.util.Enumeration;

-import java.util.HashMap;

-import java.util.Iterator;

-import java.util.Map;

-

-import javax.portlet.PortalContext;

-import javax.portlet.PortletMode;

-import javax.portlet.PortletModeException;

-import javax.portlet.PortletSecurityException;

-import javax.portlet.PortletURL;

-import javax.portlet.WindowState;

-import javax.portlet.WindowStateException;

-

-import org.apache.pluto.PortletContainer;

-import org.apache.pluto.descriptors.portlet.PortletDD;

-import org.apache.pluto.descriptors.portlet.SupportsDD;

-import org.apache.pluto.internal.InternalPortletWindow;

-import org.apache.pluto.spi.PortletURLProvider;

-import org.apache.pluto.util.StringManager;

-import org.apache.pluto.util.StringUtils;

-

-public class PortletURLImpl implements PortletURL {

-

-    private static final StringManager EXCEPTIONS =

-        StringManager.getManager(PortletURLImpl.class.getPackage().getName());

-

-

-    private PortletContainer container;

-    protected PortletMode mode = null;

-

-    protected Map parameters = new HashMap();

-

-    protected InternalPortletWindow internalPortletWindow;

-

-    protected boolean secure;

-    protected javax.servlet.http.HttpServletRequest servletRequest;

-    protected javax.servlet.http.HttpServletResponse servletResponse;

-    protected WindowState state;

-    protected boolean isAction;

-

-    private PortalContext context;

-

-    public PortletURLImpl(PortletContainer container,

-                          InternalPortletWindow internalPortletWindow,

-                          javax.servlet.http.HttpServletRequest servletRequest,

-                          javax.servlet.http.HttpServletResponse servletResponse,

-                          boolean isAction) {

-        this.container = container;

-        this.internalPortletWindow = internalPortletWindow;

-        this.servletRequest = servletRequest;

-        this.servletResponse = servletResponse;

-        secure = servletRequest.isSecure();

-        this.isAction = isAction;

-        this.context = container.getRequiredContainerServices().getPortalContext();

-    }

-

-    // javax.portlet.PortletURL -------------------------------------------------------------------

-    public void setWindowState(WindowState windowState)

-        throws WindowStateException {

-        if (windowState != null && isWindowStateAllowed(windowState)) {

-            state = windowState;

-            return;

-        }

-

-        throw new WindowStateException(

-            "unsupported Window State used: " + windowState, windowState);

-    }

-

-    public void setPortletMode(PortletMode portletMode)

-        throws PortletModeException {

-        // Test and throw exception if not allowed.

-        isPortletModeAllowed(portletMode);

-        mode = portletMode;

-    }

-

-    public void setParameter(String name, String value) {

-        if (name == null || value == null) {

-            throw new IllegalArgumentException(

-                "name and value must not be null");

-        }

-

-        parameters.put(name, new String[]{value});

-    }

-

-    public void setParameter(String name, String[] values) {

-        if (name == null || values == null || values.length == 0) {

-            throw new IllegalArgumentException(

-                "name and values must not be null or values be an empty array");

-        }

-

-        parameters.put(name, StringUtils.copy(values));

-    }

-

-    /* (non-Javadoc)

-     * @see javax.portlet.PortletURL#setParameters(Map)

-     */

-    public void setParameters(Map parameters) {

-        if (parameters == null) {

-            throw new IllegalArgumentException("Parameters must not be null.");

-        }

-        for (Iterator it = parameters.entrySet().iterator(); it.hasNext();) {

-            Map.Entry entry = (Map.Entry) it.next();

-            if (!(entry.getKey() instanceof String)) {

-                throw new IllegalArgumentException(

-                    "Key must not be null and of type java.lang.String.");

-            }

-            if (!(entry.getValue() instanceof String[])) {

-                throw new IllegalArgumentException(

-                    "Value must not be null and of type java.lang.String[].");

-            }

-        }

-

-        this.parameters = StringUtils.copyParameters(parameters);

-    }

-

-    public void setSecure(boolean secure) throws PortletSecurityException {

-        this.secure = secure;

-    }

-

-    public String toString() {

-        StringBuffer url = new StringBuffer(200);

-

-        PortletURLProvider urlProvider = container

-        		.getRequiredContainerServices()

-        		.getPortalCallbackService()

-        		.getPortletURLProvider(servletRequest, internalPortletWindow);

-

-        if (mode != null) {

-            urlProvider.setPortletMode(mode);

-        }

-        if (state != null) {

-            urlProvider.setWindowState(state);

-        }

-        if (isAction) {

-            urlProvider.setAction(true);

-        }

-        if (secure) {

-            urlProvider.setSecure();

-        }

-        urlProvider.clearParameters();

-        urlProvider.setParameters(parameters);

-

-        url.append(urlProvider.toString());

-

-        return url.toString();

-    }

-    // --------------------------------------------------------------------------------------------

-

-

-    // additional methods -------------------------------------------------------------------------

-    public String getParameter(String name) {

-        return (String) parameters.get(name);

-    }

-

-    public String[] getParameters(String name) {

-        return (String[]) parameters.get(name);

-    }

-

-    public PortletMode getPortletMode() {

-        return mode;

-    }

-

-    public WindowState getWindowState() {

-        return state;

-    }

-    // --------------------------------------------------------------------------------------------

-

-

-    private boolean isPortletModeAllowed(PortletMode mode)

-        throws PortletModeException {

-        if (mode == null) {

-            throw new PortletModeException(

-                EXCEPTIONS.getString("javax.portlet.PortletModeException.null"),

-                null);

-        }

-

-        return isPortletModeAllowedByPortlet(mode)

-               && isPortletModeAllowedByPortal(mode);

-    }

-

-    private boolean isPortletModeAllowedByPortlet(PortletMode mode)

-        throws PortletModeException {

-        // PLT 8.1: View Portlet Mode should always be

-        // supported by a portlet, even if not defined in the descriptor

-        if (mode.equals(PortletMode.VIEW)) {

-            return true;

-        }

-

-        PortletDD dd = internalPortletWindow.getPortletEntity()

-            .getPortletDefinition();

-        Iterator supports = dd.getSupports().iterator();

-        while(supports.hasNext()) {

-            SupportsDD support = (SupportsDD)supports.next();

-            Iterator modes = support.getPortletModes().iterator();

-            while(modes.hasNext()) {

-                String md = (String)modes.next();

-                if (md.toUpperCase().equals(

-                    mode.toString().toUpperCase())) {

-                    return true;

-                }

-            }

-        }

-        String message = EXCEPTIONS.getString(

-            "javax.portlet.PortletModeException.portlet", mode.toString());

-

-        throw new PortletModeException(message, mode);

-    }

-

-    private boolean isPortletModeAllowedByPortal(PortletMode mode)

-        throws PortletModeException {

-        Enumeration supportedModes = context.getSupportedPortletModes();

-        while (supportedModes.hasMoreElements()) {

-            if (supportedModes.nextElement().toString().toUpperCase().equals(

-                (mode.toString().toUpperCase()))) {

-                return true;

-            }

-        }

-        String message = EXCEPTIONS.getString(

-            "javax.portlet.PortletModeException.portal", mode.toString());

-

-        throw new PortletModeException(message, mode);

-    }

-

-    private boolean isWindowStateAllowed(WindowState state) {

-        Enumeration supportedStates = context.getSupportedWindowStates();

-        while (supportedStates.hasMoreElements()) {

-            if (supportedStates.nextElement().toString().toUpperCase().equals(

-                (state.toString().toUpperCase()))) {

-                return true;

-            }

-        }

-        return false;

-    }

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletWindowImpl.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletWindowImpl.java
deleted file mode 100644
index d3a7066..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletWindowImpl.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import javax.portlet.PortletMode;

-import javax.portlet.WindowState;

-import javax.servlet.ServletContext;

-

-import org.apache.pluto.PortletWindow;

-import org.apache.pluto.PortletContainerRuntimeException;

-import org.apache.pluto.PortletWindowID;

-import org.apache.pluto.util.StringManager;

-import org.apache.pluto.internal.InternalPortletWindow;

-import org.apache.pluto.internal.PortletEntity;

-

-/**

- * Implementation of <code>InternalPortletWindow</code> interface.

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class PortletWindowImpl implements InternalPortletWindow {

-

-    private static final StringManager EXCEPTIONS = StringManager.getManager(

-    		PortletWindowImpl.class.getPackage().getName());

-    

-    

-    // Private Member Variables ------------------------------------------------

-    

-    /** The underlying portlet window instance. */

-    private PortletWindow portletWindow = null;

-    

-    /** The servlet context of the portlet. */

-    private ServletContext servletContext = null;

-    

-    /** The portlet entity associated with the portlet window. */

-    private PortletEntity entity = null;

-    

-    

-    // Constructor -------------------------------------------------------------

-    

-    /**

-     * Constructs an internal portlet window that wraps a portlet window.

-     * An internal portlet window instance is created everytime when the portlet

-     * container's <code>doRender()</code> or <code>doAction()</code> method is

-     * invoked.

-     * 

-     * @param context  the servlet context from which this window is

-     *        being invoked.

-     * @param portletWindow  the underlying portlet window instance.

-     */

-    public PortletWindowImpl(ServletContext context,

-                                 PortletWindow portletWindow) {

-        this.servletContext = context.getContext(

-        		portletWindow.getContextPath());

-        if (servletContext == null) {

-            throw new PortletContainerRuntimeException(EXCEPTIONS.getString(

-            		"error.config.context.null",

-                    portletWindow.getPortletName(),

-                    portletWindow.getContextPath()));

-        }

-        this.portletWindow = portletWindow;

-    }

-    

-    

-    // PortletWindow Impl ------------------------------------------------------

-    

-    public String getContextPath() {

-        return portletWindow.getContextPath();

-    }

-

-    public String getPortletName() {

-        return portletWindow.getPortletName();

-    }

-

-    public WindowState getWindowState() {

-        return portletWindow.getWindowState();

-    }

-

-    public PortletMode getPortletMode() {

-        return portletWindow.getPortletMode();

-    }

-    

-    public PortletWindowID getId() {

-        return portletWindow.getId();

-    }

-    

-    

-    // InternalPortletWindow Impl ----------------------------------------------

-    

-    public ServletContext getServletContext() {

-        return servletContext;

-    }

-

-    public PortletEntity getPortletEntity() {

-        if (entity == null) {

-            entity = new PortletEntityImpl(servletContext, this);

-        }

-        return entity;

-    }

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/RandomStringUtils.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/RandomStringUtils.java
deleted file mode 100644
index 71d4c97..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/RandomStringUtils.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * Copyright 2002-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.internal.impl;
-
-import java.util.Random;
-/**
- * <strong>Copied from commons-lang. No need for dependency.</strong>
- * 
- * <p>Operations for random <code>String</code>s.</p>
- *
- * @author GenerationJava Core library
- * @author <a href="mailto:bayard@generationjava.com">Henri Yandell</a>
- * @author <a href="mailto:steven@caswell.name">Steven Caswell</a>
- * @author Stephen Colebourne
- * @author Gary Gregory
- * @author Phil Steitz
- * @since 1.0
- * @version $Id$
- */
-public class RandomStringUtils {
-
-    /**
-     * <p>Random object used by random method. This has to be not local
-     * to the random method so as to not return the same value in the
-     * same millisecond.</p>
-     */
-    private static final Random RANDOM = new Random();
-
-    /**
-     * <p><code>RandomStringUtils</code> instances should NOT be constructed in
-     * standard programming. Instead, the class should be used as
-     * <code>RandomStringUtils.random(5);</code>.</p>
-     *
-     * <p>This constructor is public to permit tools that require a JavaBean instance
-     * to operate.</p>
-     */
-    public RandomStringUtils() {
-    }
-
-    // Random
-    //-----------------------------------------------------------------------
-    /**
-     * <p>Creates a random string whose length is the number of characters
-     * specified.</p>
-     *
-     * <p>Characters will be chosen from the set of all characters.</p>
-     *
-     * @param count  the length of random string to create
-     * @return the random string
-     */
-    public static String random(int count) {
-        return random(count, false, false);
-    }
-
-    /**
-     * <p>Creates a random string whose length is the number of characters
-     * specified.</p>
-     *
-     * <p>Characters will be chosen from the set of characters whose
-     * ASCII value is between <code>32</code> and <code>126</code> (inclusive).</p>
-     *
-     * @param count  the length of random string to create
-     * @return the random string
-     */
-    public static String randomAscii(int count) {
-        return random(count, 32, 127, false, false);
-    }
-
-    /**
-     * <p>Creates a random string whose length is the number of characters
-     * specified.</p>
-     *
-     * <p>Characters will be chosen from the set of alphabetic
-     * characters.</p>
-     *
-     * @param count  the length of random string to create
-     * @return the random string
-     */
-    public static String randomAlphabetic(int count) {
-        return random(count, true, false);
-    }
-
-    /**
-     * <p>Creates a random string whose length is the number of characters
-     * specified.</p>
-     *
-     * <p>Characters will be chosen from the set of alpha-numeric
-     * characters.</p>
-     *
-     * @param count  the length of random string to create
-     * @return the random string
-     */
-    public static String randomAlphanumeric(int count) {
-        return random(count, true, true);
-    }
-
-    /**
-     * <p>Creates a random string whose length is the number of characters
-     * specified.</p>
-     *
-     * <p>Characters will be chosen from the set of numeric
-     * characters.</p>
-     *
-     * @param count  the length of random string to create
-     * @return the random string
-     */
-    public static String randomNumeric(int count) {
-        return random(count, false, true);
-    }
-
-    /**
-     * <p>Creates a random string whose length is the number of characters
-     * specified.</p>
-     *
-     * <p>Characters will be chosen from the set of alpha-numeric
-     * characters as indicated by the arguments.</p>
-     *
-     * @param count  the length of random string to create
-     * @param letters  if <code>true</code>, generated string will include
-     *  alphabetic characters
-     * @param numbers  if <code>true</code>, generated string will include
-     *  numeric characters
-     * @return the random string
-     */
-    public static String random(int count, boolean letters, boolean numbers) {
-        return random(count, 0, 0, letters, numbers);
-    }
-
-    /**
-     * <p>Creates a random string whose length is the number of characters
-     * specified.</p>
-     *
-     * <p>Characters will be chosen from the set of alpha-numeric
-     * characters as indicated by the arguments.</p>
-     *
-     * @param count  the length of random string to create
-     * @param start  the position in set of chars to start at
-     * @param end  the position in set of chars to end before
-     * @param letters  if <code>true</code>, generated string will include
-     *  alphabetic characters
-     * @param numbers  if <code>true</code>, generated string will include
-     *  numeric characters
-     * @return the random string
-     */
-    public static String random(int count, int start, int end, boolean letters, boolean numbers) {
-        return random(count, start, end, letters, numbers, null, RANDOM);
-    }
-
-    /**
-     * <p>Creates a random string based on a variety of options, using
-     * default source of randomness.</p>
-     *
-     * <p>This method has exactly the same semantics as
-     * {@link #random(int,int,int,boolean,boolean,char[],Random)}, but
-     * instead of using an externally supplied source of randomness, it uses
-     * the internal static {@link Random} instance.</p>
-     *
-     * @param count  the length of random string to create
-     * @param start  the position in set of chars to start at
-     * @param end  the position in set of chars to end before
-     * @param letters  only allow letters?
-     * @param numbers  only allow numbers?
-     * @param chars  the set of chars to choose randoms from.
-     *  If <code>null</code>, then it will use the set of all chars.
-     * @return the random string
-     * @throws ArrayIndexOutOfBoundsException if there are not
-     *  <code>(end - start) + 1</code> characters in the set array.
-     */
-    public static String random(int count, int start, int end, boolean letters, boolean numbers, char[] chars) {
-        return random(count, start, end, letters, numbers, chars, RANDOM);
-    }
-
-    /**
-     * <p>Creates a random string based on a variety of options, using
-     * supplied source of randomness.</p>
-     *
-     * <p>If start and end are both <code>0</code>, start and end are set
-     * to <code>' '</code> and <code>'z'</code>, the ASCII printable
-     * characters, will be used, unless letters and numbers are both
-     * <code>false</code>, in which case, start and end are set to
-     * <code>0</code> and <code>Integer.MAX_VALUE</code>.
-     *
-     * <p>If set is not <code>null</code>, characters between start and
-     * end are chosen.</p>
-     *
-     * <p>This method accepts a user-supplied {@link Random}
-     * instance to use as a source of randomness. By seeding a single
-     * {@link Random} instance with a fixed seed and using it for each call,
-     * the same random sequence of strings can be generated repeatedly
-     * and predictably.</p>
-     *
-     * @param count  the length of random string to create
-     * @param start  the position in set of chars to start at
-     * @param end  the position in set of chars to end before
-     * @param letters  only allow letters?
-     * @param numbers  only allow numbers?
-     * @param chars  the set of chars to choose randoms from.
-     *  If <code>null</code>, then it will use the set of all chars.
-     * @param random  a source of randomness.
-     * @return the random string
-     * @throws ArrayIndexOutOfBoundsException if there are not
-     *  <code>(end - start) + 1</code> characters in the set array.
-     * @throws IllegalArgumentException if <code>count</code> &lt; 0.
-     * @since 2.0
-     */
-    public static String random(int count, int start, int end, boolean letters, boolean numbers,
-                                char[] chars, Random random) {
-        if (count == 0) {
-            return "";
-        } else if (count < 0) {
-            throw new IllegalArgumentException("Requested random string length " + count + " is less than 0.");
-        }
-        if ((start == 0) && (end == 0)) {
-            end = 'z' + 1;
-            start = ' ';
-            if (!letters && !numbers) {
-                start = 0;
-                end = Integer.MAX_VALUE;
-            }
-        }
-
-        StringBuffer buffer = new StringBuffer();
-        int gap = end - start;
-
-        while (count-- != 0) {
-            char ch;
-            if (chars == null) {
-                ch = (char) (random.nextInt(gap) + start);
-            } else {
-                ch = chars[random.nextInt(gap) + start];
-            }
-            if ((letters && numbers && Character.isLetterOrDigit(ch))
-                || (letters && Character.isLetter(ch))
-                || (numbers && Character.isDigit(ch))
-                || (!letters && !numbers)) {
-                buffer.append(ch);
-            } else {
-                count++;
-            }
-        }
-        return buffer.toString();
-    }
-
-    /**
-     * <p>Creates a random string whose length is the number of characters
-     * specified.</p>
-     *
-     * <p>Characters will be chosen from the set of characters
-     * specified.</p>
-     *
-     * @param count  the length of random string to create
-     * @param chars  the String containing the set of characters to use,
-     *  may be null
-     * @return the random string
-     * @throws IllegalArgumentException if <code>count</code> &lt; 0.
-     */
-    public static String random(int count, String chars) {
-        if (chars == null) {
-            return random(count, 0, 0, false, false, null, RANDOM);
-        }
-        return random(count, chars.toCharArray());
-    }
-
-    /**
-     * <p>Creates a random string whose length is the number of characters
-     * specified.</p>
-     *
-     * <p>Characters will be chosen from the set of characters specified.</p>
-     *
-     * @param count  the length of random string to create
-     * @param chars  the character array containing the set of characters to use,
-     *  may be null
-     * @return the random string
-     * @throws IllegalArgumentException if <code>count</code> &lt; 0.
-     */
-    public static String random(int count, char[] chars) {
-        if (chars == null) {
-            return random(count, 0, 0, false, false, null, RANDOM);
-        }
-        return random(count, 0, chars.length, false, false, chars, RANDOM);
-    }
-
-}
\ No newline at end of file
diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/RenderRequestImpl.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/RenderRequestImpl.java
deleted file mode 100644
index 2d5966c..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/RenderRequestImpl.java
+++ /dev/null
@@ -1,367 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.Constants;

-import org.apache.pluto.PortletContainer;

-import org.apache.pluto.internal.InternalPortletWindow;

-import org.apache.pluto.internal.InternalPortletRequest;

-import org.apache.pluto.internal.InternalRenderRequest;

-

-import javax.portlet.PortletPreferences;

-import javax.portlet.RenderRequest;

-import javax.servlet.ServletInputStream;

-import javax.servlet.http.HttpServletRequest;

-

-import java.io.BufferedReader;

-import java.io.IOException;

-import java.io.UnsupportedEncodingException;

-import java.util.ArrayList;

-import java.util.HashMap;

-import java.util.Iterator;

-import java.util.List;

-import java.util.Map;

-import java.util.StringTokenizer;

-

-/**

- * Implementation of the <code>javax.portlet.RenderRequest</code> interface.

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class RenderRequestImpl extends PortletRequestImpl

-implements RenderRequest, InternalRenderRequest {

-	

-	/** Logger. */

-    private static final Log LOG = LogFactory.getLog(RenderRequestImpl.class);

-    

-    

-    // Private Member Variables ------------------------------------------------

-    

-    /** True if we are in an include call. */

-    private boolean included = false;

-    

-    /** The parameters including parameters appended to the dispatching URI. */

-    private Map parameters = null;

-    

-    /** The portlet preferences. */

-    private PortletPreferences portletPreferences = null;

-    

-    

-    // Constructors ------------------------------------------------------------

-    

-    public RenderRequestImpl(InternalPortletRequest request) {

-        super(request);    

-    }

-

-    public RenderRequestImpl(PortletContainer container,

-                             InternalPortletWindow internalPortletWindow,

-                             HttpServletRequest servletRequest) {

-        super(container, internalPortletWindow, servletRequest);

-        if (LOG.isDebugEnabled()) {

-        	LOG.debug("Created render request for: " + internalPortletWindow);

-        }

-    }

-    

-    

-    // RenderRequest Impl ------------------------------------------------------

-    

-    public PortletPreferences getPreferences() {

-        if (portletPreferences == null) {

-            portletPreferences = new PortletPreferencesImpl(

-            		getPortletContainer(),

-            		getInternalPortletWindow(),

-            		this,

-            		Constants.METHOD_RENDER);

-        }

-        return portletPreferences;

-    }

-    

-    

-    /**

-     * Checks the included flag and returns the content type. If the included

-     * flag is set to true, this method returns null.

-     */

-    public String getContentType() {

-        return included ? null : super.getContentType();

-    }

-    

-    /**

-     * Checks the included flag and returns the content length. If the included

-     * flag is set to true, this method returns 0.

-     */

-    public int getContentLength() {

-        return included ? 0 : super.getContentLength();

-    }

-    

-    /**

-     * Checks the included flag and returns the reader to this rende response.

-     * If the included flag is set to true, this method returns null.

-     */

-    public BufferedReader getReader()

-    throws UnsupportedEncodingException, IOException {

-        return included ? null : super.getReader();

-    }

-    

-    /**

-     * Checks the included flag and returns the input stream to this render

-     * response. If the included flag is set to true, this method returns null.

-     */

-    public ServletInputStream getInputStream() throws IOException {

-        return included ? null : super.getInputStream();

-    }

-    

-    

-    // PortletRequestImpl Overwriting ------------------------------------------

-    

-    protected Map baseGetParameterMap() {

-    	if (included && parameters != null) {

-    		super.setBodyAccessed();

-    		return parameters;

-    	} else {

-    		return super.baseGetParameterMap();

-    	}

-    }

-    

-    

-    // InternalRenderRequest Impl ----------------------------------------------

-    

-    public void setIncluded(boolean included) {

-    	this.included = included;

-        if (!included) {

-        	this.parameters = null;

-        }

-        if (LOG.isDebugEnabled()) {

-        	LOG.debug("Render request's included mode: " + included);

-        }

-    }

-

-    public boolean isIncluded() {

-        return included;

-    }

-    

-    public void setIncludedQueryString(String queryString)

-    throws IllegalStateException {

-    	if (!included) {

-    		throw new IllegalStateException("Parameters cannot be appended to "

-    				+ "render request which is not included in a dispatch.");

-    	}

-    	if (queryString != null && queryString.trim().length() > 0) {

-    		// Copy all the original render parameters.

-    		parameters = new HashMap(super.getParameterMap());

-    		// Merge the appended parameters to the render parameter map.

-    		// The original render parameters should not be overwritten.

-    		mergeQueryString(parameters, queryString);

-    		// Log the new render parameter map.

-    		if (LOG.isDebugEnabled()) {

-    			LOG.debug("Merged parameters: " + parameters.toString());

-    		}

-    	} else {

-    		if (LOG.isDebugEnabled()) {

-    			LOG.debug("No query string appended to the included request.");

-    		}

-    	}

-    }

-    

-    

-    // Included HttpServletRequest (Limited) Impl ------------------------------

-    

-    /*

-     * -------------------------------------------------------------------------

-     * (non-javadoc)

-     * Portlet Spec. PLT. 16.3.3.

-     * The following methods of the HttpServletRequest must return the path and

-     * query string information used to obtain the PortletRequestDispatcher

-     * object:

-     *   getPathInfo

-     *   getPathTranslated

-     *   getQueryString

-     *   getRequestURI

-     *   getServletPath

-     * -------------------------------------------------------------------------

-     */

-    

-    public String getPathInfo() {

-    	String attr = (String) super.getAttribute(

-    			"javax.servlet.include.path_info");

-    	return (included && attr != null) ? attr : super.getPathInfo();

-    }

-

-    public String getQueryString() {

-    	String attr = (String) super.getAttribute(

-    			"javax.servlet.include.query_string");

-    	return (included && attr != null) ? attr : super.getQueryString();

-    }

-    

-    /**

-     * TODO: check PLT.16.3.3. page 67, line 10.

-     */

-    public String getPathTranslated() {

-    	// TODO:

-        return null;

-    }

-    

-    public String getRequestURI() {

-    	String attr = (String) super.getAttribute(

-    			"javax.servlet.include.request_uri");

-        return (included && attr != null) ? attr : super.getRequestURI();

-    }

-    

-    public String getServletPath() {

-        String attr = (String) super.getAttribute(

-                "javax.servlet.include.servlet_path");

-        return (included && attr != null) ? attr : super.getServletPath();

-    }

-    

-    /*

-     * -------------------------------------------------------------------------

-     * (non-Javadoc)

-     * Portlet Spec. PLT. 16.3.3.

-     * The following methods of the HttpServletRequest must return null:

-     *   getProtocol

-     *   getRemoteAddr

-     *   getRemoteHost

-     *   getRealPath

-     *   getRequestURL

-     * -------------------------------------------------------------------------

-     */

-    

-    public String getProtocol() {

-        return included ? null : super.getProtocol();

-    }

-

-    public String getRemoteAddr() {

-        return included ? null : super.getRemoteAddr();

-    }

-

-    public String getRemoteHost() {

-        return included ? null : super.getRemoteHost();

-    }

-

-    public String getRealPath(String path) {

-        return included ? null : super.getRealPath(path);

-    }

-

-    public StringBuffer getRequestURL() {

-        return included ? null : super.getRequestURL();

-    }

-    

-    /*

-     * -------------------------------------------------------------------------

-     * (non-Javadoc)

-     * Portlet Spec. PLT. 16.3.3.

-     * The following methods of the HttpServletRequest must do no operations

-     * and return null:

-     *   getCharacterEncoding

-     *   setCharacterEncoding

-     *   getContentType

-     *   getInputStream

-     *   getReader

-     * The getContentLength method of the HttpServletRequest must return 0.

-     * -------------------------------------------------------------------------

-     */

-    

-    public String getCharacterEncoding() {

-        return included ? null : super.getCharacterEncoding();

-    }

-    

-    public void setCharacterEncoding(String encoding)

-    throws UnsupportedEncodingException {

-        if (!included) {

-        	super.setCharacterEncoding(encoding);

-        }

-    }

-    

-    /*

-     * -------------------------------------------------------------------------

-     * (non-javadoc)

-     * Portlet Spec. PLT. 16.3.3.

-     * The getMethod method of the HttpServletRequest must always return 'GET'.

-     * -------------------------------------------------------------------------

-     */

-    

-    public String getMethod() {

-    	return "GET";

-    }

-    

-    

-    // Private Methods ---------------------------------------------------------

-    

-    /**

-     * Parses the appended query string and merges the appended parameters to

-     * the original parameters. Query parameters are name-value pairs separated

-     * by the '<code>&amp;</code>' character.

-     * @param parameters  the original parameters map.

-     * @param queryString  the appended query string.

-     */

-    private void mergeQueryString(Map parameters, String queryString) {

-    	

-    	// Create the appended parameters map:

-    	//   key is the parameter name as a string,

-    	//   value is a List of parameter values (List of String).

-        Map appendedParameters = new HashMap();

-        

-        // Parse the appended query string.

-    	if (LOG.isDebugEnabled()) {

-    		LOG.debug("Parsing appended query string: " + queryString);

-    	}

-        StringTokenizer st = new StringTokenizer(queryString, "&", false);

-        while (st.hasMoreTokens()) {

-            String token = st.nextToken();

-            int equalIndex = token.indexOf("=");

-            if (equalIndex > 0) {

-                String key = token.substring(0, equalIndex);

-                String value = null;

-                if (equalIndex < token.length() - 1) {

-                	value = token.substring(equalIndex + 1);

-                } else {                	value = "";

-                }

-                List values = (List) appendedParameters.get(key);

-                if (values == null) {

-                	values = new ArrayList();

-                }

-                values.add(value);

-                appendedParameters.put(key, values);

-            }

-        }

-        if (LOG.isDebugEnabled()) {

-            LOG.debug(appendedParameters.size() + " parameters appended.");

-        }

-        

-        // Merge the appended parameters and the original parameters.

-        if (LOG.isDebugEnabled()) {

-        	LOG.debug("Merging appended parameters and original parameters...");

-        }

-    	for (Iterator it = appendedParameters.keySet().iterator();

-    			it.hasNext(); ) {

-    		String key = (String) it.next();

-    		List values = (List) appendedParameters.get(key);

-    		// If the parameter name (key) exists, merge parameter values.

-    		if (parameters.containsKey(key)) {

-    			String[] originalValues = (String[]) parameters.get(key);

-    			if (originalValues != null) {

-    				for (int i = 0; i < originalValues.length; i++) {

-    					values.add(originalValues[i]);

-    				}

-    			}

-    		}

-    		parameters.put(key, (String[]) values.toArray(new String[values.size()]));

-    	}

-    }

-    

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/RenderResponseImpl.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/RenderResponseImpl.java
deleted file mode 100644
index 983c2b7..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/RenderResponseImpl.java
+++ /dev/null
@@ -1,295 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.PortletContainer;

-import org.apache.pluto.internal.InternalPortletWindow;

-import org.apache.pluto.internal.InternalRenderResponse;

-import org.apache.pluto.descriptors.portlet.PortletDD;

-import org.apache.pluto.descriptors.portlet.SupportsDD;

-import org.apache.pluto.spi.PortalCallbackService;

-import org.apache.pluto.util.ArgumentUtility;

-import org.apache.pluto.util.NamespaceMapper;

-import org.apache.pluto.util.StringManager;

-import org.apache.pluto.util.StringUtils;

-import org.apache.pluto.util.impl.NamespaceMapperImpl;

-

-import javax.portlet.PortletURL;

-import javax.portlet.RenderResponse;

-import javax.servlet.http.HttpServletRequest;

-import javax.servlet.http.HttpServletResponse;

-

-import java.io.IOException;

-import java.io.OutputStream;

-import java.io.PrintWriter;

-import java.util.Iterator;

-import java.util.Locale;

-

-/**

- * Implementation of the <code>javax.portlet.RenderResponse</code> interface.

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class RenderResponseImpl extends PortletResponseImpl

-implements RenderResponse, InternalRenderResponse {

-    

-	/** Logger. */

-	private static final Log LOG = LogFactory.getLog(RenderResponseImpl.class);

-	

-    private static final StringManager EXCEPTIONS = StringManager.getManager(

-    		RenderResponseImpl.class.getPackage().getName());

-    

-    

-    // Private Member Variables ------------------------------------------------

-    

-    /** True if we are in an include call. */

-    private boolean included = false;

-    

-    /** The current content type. */

-    private String currentContentType = null;

-    

-    private NamespaceMapper mapper = new NamespaceMapperImpl();

-    

-    

-    // Constructor -------------------------------------------------------------

-    

-    public RenderResponseImpl(PortletContainer container,

-                              InternalPortletWindow internalPortletWindow,

-                              HttpServletRequest servletRequest,

-                              HttpServletResponse servletResponse) {

-        super(container, internalPortletWindow, servletRequest, servletResponse);

-    }

-    

-    

-    // RenderResponse Impl -----------------------------------------------------

-    

-    public String getContentType() {

-        // NOTE: in servlet 2.4 we could simply use this:

-        //   return super.getHttpServletResponse().getContentType();

-        return currentContentType;

-    }

-

-    public PortletURL createRenderURL() {

-        return createURL(false);

-    }

-

-    public PortletURL createActionURL() {

-        return createURL(true);

-    }

-

-    public String getNamespace() {

-         String namespace = mapper.encode(getInternalPortletWindow().getId(), "");

-         StringBuffer validNamespace = new StringBuffer();

-         for (int i = 0; i < namespace.length(); i++) {

-         	char ch = namespace.charAt(i);

-         	if (Character.isJavaIdentifierPart(ch)) {

-         		validNamespace.append(ch);

-         	} else {

-         		validNamespace.append('_');

-         	}

-         }

-         return validNamespace.toString();

-    }

-

-    public void setTitle(String title) {

-        PortalCallbackService callback = getContainer()

-        		.getRequiredContainerServices()

-        		.getPortalCallbackService();

-        callback.setTitle(this.getHttpServletRequest(),

-                          getInternalPortletWindow(),

-                          title);

-    }

-

-    public void setContentType(String contentType)

-    throws IllegalArgumentException {

-    	ArgumentUtility.validateNotNull("contentType", contentType);

-        String mimeType = StringUtils.getMimeTypeWithoutEncoding(contentType);

-        if (!isValidContentType(mimeType)) {

-            throw new IllegalArgumentException("Specified content type '"

-            		+ mimeType + "' is not supported.");

-        }

-        getHttpServletResponse().setContentType(mimeType);

-        this.currentContentType = mimeType;

-    }

-

-    public String getCharacterEncoding() {

-        return getHttpServletResponse().getCharacterEncoding();

-    }

-    

-    /**

-     * @see PortletResponseImpl#getOutputStream()

-     * @see #getWriter()

-     */

-    public OutputStream getPortletOutputStream()

-    throws IOException, IllegalStateException {

-        if (currentContentType == null) {

-            String message = EXCEPTIONS.getString("error.contenttype.null");

-            if (LOG.isWarnEnabled()) {

-            	LOG.warn("Current content type is not set.");

-            }

-            throw new IllegalStateException(message);

-        }

-        return super.getOutputStream();

-    }

-    

-    /**

-     * @see PortletResponseImpl#getWriter()

-     * @see #getPortletOutputStream()

-     */

-    public PrintWriter getWriter() throws IOException, IllegalStateException {

-        if (currentContentType == null) {

-            String message = EXCEPTIONS.getString("error.contenttype.null");

-            if (LOG.isWarnEnabled()) {

-            	LOG.warn("Current content type is not set.");

-            }

-            throw new IllegalStateException(message);

-        }

-        return super.getWriter();

-    }

-

-    public Locale getLocale() {

-        return getHttpServletRequest().getLocale();

-    }

-

-    // TODO: port 1.0.1 setBufferSize fix to 1.1

-    public void setBufferSize(int size) {

-        throw new IllegalStateException(

-            "portlet container does not support buffering");

-    }

-

-    public int getBufferSize() {

-        // TODO: return this.getHttpServletResponse().getBufferSize();

-        return 0;

-    }

-

-    public void flushBuffer() throws IOException {

-        getHttpServletResponse().flushBuffer();

-    }

-

-    public void resetBuffer() {

-        getHttpServletResponse().resetBuffer();

-    }

-

-    public boolean isCommitted() {

-        return getHttpServletResponse().isCommitted();

-    }

-

-    public void reset() {

-        getHttpServletResponse().reset();

-    }

-

-    

-    // InternalRenderResponse Impl ---------------------------------------------

-    

-    public void setIncluded(boolean included) {

-        this.included = included;

-    }

-

-    public boolean isIncluded() {

-        return included;

-    }

-    

-    

-    // Included HttpServletResponse (Limited) Impl -----------------------------

-    

-    /**

-     * TODO

-     */

-    public String encodeRedirectUrl(String url) {

-    	if (included) {

-    		return null;

-    	} else {

-    		return super.encodeRedirectUrl(url);

-    	}

-    }

-    

-    /**

-     * TODO

-     */

-    public String encodeRedirectURL(String url) {

-    	if (included) {

-    		return null;

-    	} else {

-    		return super.encodeRedirectURL(url);

-    	}

-    }

-    

-    

-    // Private Methods ---------------------------------------------------------

-    

-    /**

-     * Creates a portlet URL.

-     * TODO: make dynamic? as service?

-     * @param isAction  true for an action URL, false for a render URL.

-     * @return the created portlet (action/render) URL.

-     */

-    private PortletURL createURL(boolean isAction) {

-        return new PortletURLImpl(getContainer(),

-                                  getInternalPortletWindow(),

-                                  getHttpServletRequest(),

-                                  getHttpServletResponse(),

-                                  isAction);

-    }

-    

-    /**

-     * Checks if the specified content type is valid (supported by the portlet).

-     * The specified content type should be a tripped mime type without any

-     * character encoding suffix.

-     * @param contentType  the content type to check.

-     * @return true if the content type is valid, false otherwise.

-     */

-    private boolean isValidContentType(String contentType) {

-    	boolean valid = false;

-    	

-        PortletDD portletDD = getInternalPortletWindow().getPortletEntity()

-        		.getPortletDefinition();

-        for (Iterator it = portletDD.getSupports().iterator();

-        		!valid && it.hasNext(); ) {

-            

-        	SupportsDD supportsDD = (SupportsDD) it.next();

-            String supportedType = supportsDD.getMimeType();

-            

-            // Content type is supported by an exact match.

-            if (supportedType.equals(contentType)) {

-            	valid = true;

-            }

-            // The supported type contains a wildcard.

-            else if (supportedType.indexOf("*") >= 0) {

-            	

-                int index = supportedType.indexOf("/");

-                String supportedPrefix = supportedType.substring(0, index);

-                String supportedSuffix = supportedType.substring(index + 1);

-                

-                index = contentType.indexOf("/");

-                String typePrefix = contentType.substring(0, index);

-                String typeSuffix = contentType.substring(index + 1);

-                

-                // Check if the prefixes match AND the suffixes match.

-                if (supportedPrefix.equals("*") || supportedPrefix.equals(typePrefix)) {

-                    if (supportedSuffix.equals("*") || supportedSuffix.equals(typeSuffix)) {

-                        valid = true;

-                    }

-                }

-            }

-        }

-        // Return the check result.

-        return valid;

-    }

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/ResourceBundleFactory.java b/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/ResourceBundleFactory.java
deleted file mode 100644
index 5973575..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/ResourceBundleFactory.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import org.apache.pluto.descriptors.portlet.PortletDD;

-import org.apache.pluto.descriptors.portlet.PortletInfoDD;

-import org.apache.pluto.util.StringManager;

-import org.apache.commons.logging.LogFactory;

-import org.apache.commons.logging.Log;

-

-import java.util.*;

-

-/**

- * Factory object used to create Portlet Resource Bundles.

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- *

- */

-class ResourceBundleFactory {

-    

-    private static final Log LOG = 

-        LogFactory.getLog(ResourceBundleFactory.class);

-    

-    private static final StringManager EXCEPTIONS =

-        StringManager.getManager(ResourceBundleFactory.class.getPackage().getName());

-

-    /**

-     * The default (no local) resources bundle for

-     * this bundle.

-     */

-    private InlinePortletResourceBundle defaultBundle;

-

-    /**

-     * All of the previously loaded bundles.

-     */

-    private Map bundles = new HashMap();

-

-    /**

-     * The name of the bundle.

-     */

-    private String bundleName;

-

-    public ResourceBundleFactory(PortletDD dd) {

-        bundleName = dd.getResourceBundle();

-        if(LOG.isDebugEnabled()) {

-            LOG.debug("Resource Bundle Created: "+bundleName);

-        }

-

-        PortletInfoDD info = dd.getPortletInfo();

-        if(info != null) {

-            defaultBundle = new InlinePortletResourceBundle(

-                info.getTitle(), info.getShortTitle(), info.getKeywords()

-            );

-        }

-        else {

-            defaultBundle = new InlinePortletResourceBundle(new Object[][] { {"a", "b"} });

-        }

-   }

-

-    public ResourceBundle getResourceBundle(Locale locale) {

-        if(LOG.isDebugEnabled()) {

-            LOG.debug("Resource Bundle: "+bundleName+" : "+locale+" requested. ");

-        }

-

-        // If allready loaded for this local, return immediately!

-        if (bundles.containsKey(locale)) {

-            return (ResourceBundle) bundles.get(locale);

-        }

-

-        try {

-            ResourceBundle bundle = null;

-            if(bundleName != null) {

-                ClassLoader loader =

-                        Thread.currentThread().getContextClassLoader();

-                bundle = ResourceBundle.getBundle(bundleName, locale, loader);

-                bundles.put(locale, new CombinedPortletResourceBundle(defaultBundle, bundle));

-            }

-            else {

-                bundles.put(locale, defaultBundle);

-            }

-       } catch (MissingResourceException mre) {

-            if(bundleName != null && LOG.isWarnEnabled()) {

-                LOG.info(EXCEPTIONS.getString("warning.resourcebundle.notfound",bundleName, mre.getMessage()));

-            }

-            if(LOG.isDebugEnabled()) {

-                LOG.debug("Using default bundle for locale ("+locale+").");

-            }

-            bundles.put(locale, defaultBundle);

-        }

-       return (ResourceBundle)bundles.get(locale);

-    }

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/package.html b/trunk/pluto-container/src/main/java/org/apache/pluto/package.html
deleted file mode 100644
index b536bc6..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/package.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<HTML>

-<HEAD><TITLE>Apache Pluto</TITLE></HEAD>

-<BODY>

-<P>The root package of the Pluto Portlet Container.</P>

-

-<P>Portals embedding Pluto must implement the 

-   {@link org.apache.pluto.services.PortletContainerServices}

-   interfac and then retrieve an instance of the container from

-   the {@link org.apache.pluto.PortletContainerFactory}.</P>

-<H3>Initialization of the container</H3>   

-<P>

-<xmp>

-PortletContainerServices services = // your implementation!

-PortletContainer container =

-   PortletContainerFactory.createContainer("MyContainer", services);

-

-ServletContext context = // the servlet context within which the portal is executing

-container.init(servletContext);

-</xmp>

-</P>

-

-<H3>Processing of Requests</H3>   

-<P>

-<xmp>

-if(isActionRequest) {

-    container.doAction(request, response);

-}

-else if(isRenderRequest) {

-    container.doRender(request, response);

-}

-</xmp>

-</P>

-

-<H3>Shutting Down the Container</H3>

-<P>

-<xmp>

-container.destroy();

-</xmp>

-</P>

-

-</BODY>

-</HTML>
\ No newline at end of file
diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/ContainerService.java b/trunk/pluto-container/src/main/java/org/apache/pluto/spi/ContainerService.java
deleted file mode 100644
index 2af7249..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/ContainerService.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.spi;

-

-/**

- * Defines a service and needs to be implemented by all PortletContainerServices.

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public interface ContainerService {

-

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/PortalCallbackService.java b/trunk/pluto-container/src/main/java/org/apache/pluto/spi/PortalCallbackService.java
deleted file mode 100644
index 75ecdce..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/PortalCallbackService.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.spi;

-

-import javax.servlet.http.HttpServletRequest;

-

-import org.apache.pluto.PortletWindow;

-

-import java.util.Map;

-

-/**

- * The callback service interface defining callback methods that will be invoked

- * by the portlet container when necessary.

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- * @since Sep 21, 2004

- */

-public interface PortalCallbackService extends ContainerService {

-

-    /**

-     * Set the title to be used for this portlet.

-     * @param request  the servlet request.

-     * @param portletWindow  the portlet window.

-     * @param title  the title to set.

-     */

-    public void setTitle(HttpServletRequest request,

-                         PortletWindow portletWindow,

-                         String title);

-

-    /**

-     * Returns a URL provider used to constuct a URL to the given portlet.

-     * @param request  the servlet request.

-     * @param portletWindow  the portlet window.

-     * @return the URL provider used to construct a URL to the given portlet.

-     */

-    public PortletURLProvider getPortletURLProvider(HttpServletRequest request,

-                                                    PortletWindow portletWindow);

-

-    /**

-     * Returns a URL provider used to construct a URL to a resource in the web

-     * application.

-     * @param request  the servlet request.

-     * @param portletWindow  the portlet window.

-     * @return the URL provider used to construct a URL to a resource.

-     */

-    public ResourceURLProvider getResourceURLProvider(HttpServletRequest request,

-                                                      PortletWindow portletWindow);

-

-    public Map getRequestProperties(HttpServletRequest request,

-                                    PortletWindow portletWindow);

-

-    public void setResponseProperty(HttpServletRequest request,

-                                    PortletWindow portletWindow,

-                                    String property,

-                                    String value);

-

-    public void addResponseProperty(HttpServletRequest request,

-                                    PortletWindow portletWindow,

-                                    String property,

-                                    String value);

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/PortletURLProvider.java b/trunk/pluto-container/src/main/java/org/apache/pluto/spi/PortletURLProvider.java
deleted file mode 100644
index 2fcf90e..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/PortletURLProvider.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.spi;

-

-import java.util.Map;

-

-import javax.portlet.PortletMode;

-import javax.portlet.WindowState;

-

-/**

- * Defines the interface used by the portlet container to create Portal URLs.

- * This provider must be implemented by the Portal and provided via the

- * container services upon initialization of the container.

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- */

-public interface PortletURLProvider {

-

-

-    /**

-     * Sets the new portlet mode at the URL. If no mode is set at the URL the

-     * currently active mode is used.

-     * @param mode the new portlet mode

-     */

-    public void setPortletMode(PortletMode mode);

-

-    /**

-     * Sets the new window state at the URL. If no state is set at the URL the

-     * currently active state is used.

-     * @param state the new window state

-     */

-    public void setWindowState(WindowState state);

-

-    /**

-     * Specifies whether or not this request should be considered an action

-     * request. If the value specified is false, a render request will be

-     * assumed.

-     */

-    public void setAction(boolean action);

-

-    /**

-     * By calling this method the URL is defined as a secure URL.

-     */

-    public void setSecure();

-

-    /**

-     * Removes all pre-existing parameters in this URL

-     */

-    public void clearParameters();

-

-    /**

-     * Sets the given parameters as parameters into the URL, Removes all

-     * previously set parameters.

-     * @param parameters a map containing the name [java.lang.String] and value

-     *                   [java.lang.String[]] of the parameters.

-     */

-    public void setParameters(Map parameters);

-

-

-    /**

-     * Returns the URL in string format. This method should only be called

-     * once.

-     * @return the URL

-     */

-    public String toString();

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/ResourceURLProvider.java b/trunk/pluto-container/src/main/java/org/apache/pluto/spi/ResourceURLProvider.java
deleted file mode 100644
index 54b66ea..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/ResourceURLProvider.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.spi;

-

-/**

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- */

-public interface ResourceURLProvider {

-	

-    /**

-     * Sets the absolute URL to be returned by the provider. E.g.

-     * http://host/wps/portal/hello.gif

-     * @param path the new absolute url

-     */

-    public void setAbsoluteURL(String path);

-

-    /**

-     * Sets a full path URI including the context root. E.g.

-     * /wps/portal/hello.gif

-     * @param path the new absolute url

-     */

-    public void setFullPath(String path);

-

-    /**

-     * Returns a url to a resource as absolute URL starting with protocol so

-     * that it can be accessed by a browser.

-     * @return the URL as string

-     */

-    public String toString();

-    

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/P3PAttributes.java b/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/P3PAttributes.java
deleted file mode 100644
index aac0de3..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/P3PAttributes.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*

- * Copyright 2003-2006 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.spi.optional;

-

-/**

- * As defined in PLT.D of the JSR-168 specification, this class defines a set of 

- * attribute names for user information and their intended 

- * meaning. To allow portals an automated mapping of commonly used user information 

- * attributes portlet programmers should use these attribute names. These attribute names  

- * are derived from the Platform for Privacy Preferences 1.0 (P3P 1.0) Specification by the 

- * W3C (http://www.w3c.org/TR/P3P).  

- * 

- * @author <a href="cdoremus@apache.org">Craig Doremus</a>

- */

-public interface P3PAttributes {

-

-	/*	NOTE: The user.bdate must consist of a string that represents the time in milliseconds 

-	since January 1, 1970, 00:00:00 GMT. */

-	public static final String USER_BDATE = "user.bdate"; 

-	public static final String USER_GENDER = "user.gender";

-	public static final String USER_EMPLOYER = "user.employer";

-	public static final String USER_DEPARTMENT = "user.department";

-	public static final String USER_JOBTITLE = "user.jobtitle";

-	public static final String USER_NAME_PREFIX = "user.name.prefix";

-	public static final String USER_NAME_GIVEN = "user.name.given";

-	public static final String USER_NAME_FAMILY = "user.name.family";

-	public static final String USER_NAME_MIDDLE = "user.name.middle";

-	public static final String USER_NAME_SUFFIX = "user.name.suffix";

-	public static final String USER_NAME_NICKNAME = "user.name.nickName";

-	public static final String USER_HOME_INFO_POSTAL_NAME = "user.home-info.postal.name";

-	public static final String USER_HOME_INFO_POSTAL_STREET = "user.home-info.postal.street";

-	public static final String USER_HOME_INFO_POSTAL_CITY = "user.home-info.postal.city";

-	public static final String USER_HOME_INFO_POSTAL_STATEPROV = "user.home-info.postal.stateprov";

-	public static final String USER_HOME_INFO_POSTAL_POSTALCODE = "user.home-info.postal.postalcode";

-	public static final String USER_HOME_INFO_POSTAL_COUNTRY = "user.home-info.postal.country";

-	public static final String USER_HOME_INFO_POSTAL_ORGANIZATION= "user.home-info.postal.organization";

-	public static final String USER_HOME_INFO_TELECOM_TELEPHONE_INTCODE = "user.home-info.telecom.telephone.intcode";

-	public static final String USER_HOME_INFO_TELECOM_TELEPHONE_LOCCODE = "user.home-info.telecom.telephone.loccode";

-	public static final String USER_HOME_INFO_TELECOM_TELEPHONE_NUMBER = "user.home-info.telecom.telephone.number";

-	public static final String USER_HOME_INFO_TELECOM_TELEPHONE_EXT = "user.home-info.telecom.telephone.ext";

-	public static final String USER_HOME_INFO_TELECOM_TELEPHONE_COMMENT = "user.home-info.telecom.telephone.comment";

-	public static final String USER_HOME_INFO_TELECOM_FAX_INTCODE = "user.home-info.telecom.fax.intcode";

-	public static final String USER_HOME_INFO_TELECOM_FAX_LOCCODE = "user.home-info.telecom.fax.loccode";

-	public static final String USER_HOME_INFO_TELECOM_FAX_NUMBER = "user.home-info.telecom.fax.number";

-	public static final String USER_HOME_INFO_TELECOM_FAX_EXT = "user.home-info.telecom.fax.ext";

-	public static final String USER_HOME_INFO_TELECOM_FAX_COMMENT = "user.home-info.telecom.fax.comment";

-	public static final String USER_HOME_INFO_TELECOM_MOBILE_INTCODE = "user.home-info.telecom.mobile.intcode";

-	public static final String USER_HOME_INFO_TELECOM_MOBILE_LOCCODE = "user.home-info.telecom.mobile.loccode";

-	public static final String USER_HOME_INFO_TELECOM_MOBILE_NUMBER = "user.home-info.telecom.mobile.number";

-	public static final String USER_HOME_INFO_TELECOM_MOBILE_EXT = "user.home-info.telecom.mobile.ext";

-	public static final String USER_HOME_INFO_TELECOM_MOBILE_COMMENT = "user.home-info.telecom.mobile.comment";

-	public static final String USER_HOME_INFO_TELECOM_PAGER_INTCODE = "user.home-info.telecom.pager.intcode";

-	public static final String USER_HOME_INFO_TELECOM_PAGER_LOCCODE = "user.home-info.telecom.pager.loccode";

-	public static final String USER_HOME_INFO_TELECOM_PAGER_NUMBER = "user.home-info.telecom.pager.number";

-	public static final String USER_HOME_INFO_TELECOM_PAGER_EXT = "user.home-info.telecom.pager.ext";

-	public static final String USER_HOME_INFO_TELECOM_PAGER_COMMENT = "user.home-info.telecom.pager.comment";

-	public static final String USER_HOME_INFO_ONLINE_EMAIL = "user.home-info.online.email";

-	public static final String USER_HOME_INFO_ONLINE_URI = "user.home-info.online.uri";

-	public static final String USER_BUSINESS_INFO_POSTAL_NAME = "user.business-info.postal.name";

-	public static final String USER_BUSINESS_INFO_POSTAL_STREET = "user.business-info.postal.street";

-	public static final String USER_BUSINESS_INFO_POSTAL_CITY = "user.business-info.postal.city";

-	public static final String USER_BUSINESS_INFO_POSTAL_STATEPROV = "user.business-info.postal.stateprov";

-	public static final String USER_BUSINESS_INFO_POSTAL_POSTALCODE = "user.business-info.postal.postalcode";

-	public static final String USER_BUSINESS_INFO_POSTAL_COUNTRY = "user.business-info.postal.country";

-	public static final String USER_BUSINESS_INFO_POSTAL_ORGANIZATION = "user.business-info.postal.organization";

-	public static final String USER_BUSINESS_INFO_TELECOM_TELEPHONE_INTCODE = "user.business-info.telecom.telephone.intcode";

-	public static final String USER_BUSINESS_INFO_TELECOM_TELEPHONE_LOCCODE= "user.business-info.telecom.telephone.loccode";

-	public static final String USER_BUSINESS_INFO_TELECOM_TELEPHONE_NUMBER = "user.business-info.telecom.telephone.number";

-	public static final String USER_BUSINESS_INFO_TELECOM_TELEPHONE_EXT = "user.business-info.telecom.telephone.ext";

-	public static final String USER_BUSINESS_INFO_TELECOM_TELEPHONE_COMMENT = "user.business-info.telecom.telephone.comment";

-	public static final String USER_BUSINESS_INFO_TELECOM_FAX_INTCODE = "user.business-info.telecom.fax.intcode";

-	public static final String USER_BUSINESS_INFO_TELECOM_FAX_LOCCODE = "user.business-info.telecom.fax.loccode";

-	public static final String USER_BUSINESS_INFO_TELECOM_FAX_NUMBER = "user.business-info.telecom.fax.number";

-	public static final String USER_BUSINESS_INFO_TELECOM_FAX_EXT = "user.business-info.telecom.fax.ext";

-	public static final String USER_BUSINESS_INFO_TELECOM_FAX_COMMENT = "user.business-info.telecom.fax.comment";

-	public static final String USER_BUSINESS_INFO_TELECOM_MOBILE_INTCODE = "user.business-info.telecom.mobile.intcode";

-	public static final String USER_BUSINESS_INFO_TELECOM_MOBILE_LOCCODE = "user.business-info.telecom.mobile.loccode";

-	public static final String USER_BUSINESS_INFO_TELECOM_MOBILE_NUMBER = "user.business-info.telecom.mobile.number";

-	public static final String USER_BUSINESS_INFO_TELECOM_MOBILE_EXT = "user.business-info.telecom.mobile.ext";

-	public static final String USER_BUSINESS_INFO_TELECOM_MOBILE_COMMENT = "user.business-info.telecom.mobile.comment";

-	public static final String USER_BUSINESS_INFO_TELECOM_PAGER_INTCODE = "user.business-info.telecom.pager.intcode";

-	public static final String USER_BUSINESS_INFO_TELECOM_PAGER_LOCCODE = "user.business-info.telecom.pager.loccode";

-	public static final String USER_BUSINESS_INFO_TELECOM_PAGER_NUMBER = "user.business-info.telecom.pager.number";

-	public static final String USER_BUSINESS_INFO_TELECOM_PAGER_EXT = "user.business-info.telecom.pager.ext";

-	public static final String USER_BUSINESS_INFO_TELECOM_PAGER_COMMENT = "user.business-info.telecom.pager.comment";

-	public static final String USER_BUSINESS_INFO_ONLINE_EMAIL = "user.business-info.online.email";

-	public static final String USER_BUSINESS_INFO_ONLINE_URI = "user.business-info.online.uri";

-	

-	public static final String[] ATTRIBUTE_ARRAY = {

-		"user.bdate",

-		"user.gender",

-		"user.employer",

-		"user.department",

-		"user.jobtitle",

-		"user.name.prefix",

-		"user.name.given",

-		"user.name.family",

-		"user.name.middle",

-		"user.name.suffix",

-		"user.name.nickName",

-		"user.home-info.postal.name",

-		"user.home-info.postal.street",

-		"user.home-info.postal.city",

-		"user.home-info.postal.stateprov",

-		"user.home-info.postal.postalcode",

-		"user.home-info.postal.country",

-		"user.home-info.postal.organization",

-		"user.home-info.telecom.telephone.intcode",

-		"user.home-info.telecom.telephone.loccode",

-		"user.home-info.telecom.telephone.number",

-		"user.home-info.telecom.telephone.ext",

-		"user.home-info.telecom.telephone.comment",

-		"user.home-info.telecom.fax.intcode",

-		"user.home-info.telecom.fax.loccode",

-		"user.home-info.telecom.fax.number",

-		"user.home-info.telecom.fax.ext",

-		"user.home-info.telecom.fax.comment",

-		"user.home-info.telecom.mobile.intcode",

-		"user.home-info.telecom.mobile.loccode",

-		"user.home-info.telecom.mobile.number",

-		"user.home-info.telecom.mobile.ext",

-		"user.home-info.telecom.mobile.comment",

-		"user.home-info.telecom.pager.intcode",

-		"user.home-info.telecom.pager.loccode",

-		"user.home-info.telecom.pager.number",

-		"user.home-info.telecom.pager.ext",

-		"user.home-info.telecom.pager.comment",

-		"user.home-info.online.email",

-		"user.home-info.online.uri",

-		"user.business-info.postal.name",

-		"user.business-info.postal.street",

-		"user.business-info.postal.city",

-		"user.business-info.postal.stateprov",

-		"user.business-info.postal.postalcode",

-		"user.business-info.postal.country",

-		"user.business-info.postal.organization",

-		"user.business-info.telecom.telephone.intcode",

-		"user.business-info.telecom.telephone.loccode",

-		"user.business-info.telecom.telephone.number",

-		"user.business-info.telecom.telephone.ext",

-		"user.business-info.telecom.telephone.comment",

-		"user.business-info.telecom.fax.intcode",

-		"user.business-info.telecom.fax.loccode",

-		"user.business-info.telecom.fax.number",

-		"user.business-info.telecom.fax.ext",

-		"user.business-info.telecom.fax.comment",

-		"user.business-info.telecom.mobile.intcode",

-		"user.business-info.telecom.mobile.loccode",

-		"user.business-info.telecom.mobile.number",

-		"user.business-info.telecom.mobile.ext",

-		"user.business-info.telecom.mobile.comment",

-		"user.business-info.telecom.pager.intcode",

-		"user.business-info.telecom.pager.loccode",

-		"user.business-info.telecom.pager.number",

-		"user.business-info.telecom.pager.ext",

-		"user.business-info.telecom.pager.comment",

-		"user.business-info.online.email",

-		"user.business-info.online.uri"

-	};

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletEnvironmentService.java b/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletEnvironmentService.java
deleted file mode 100644
index 6183907..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletEnvironmentService.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.spi.optional;

-

-import org.apache.pluto.internal.InternalPortletWindow;

-import org.apache.pluto.internal.InternalPortletRequest;

-import org.apache.pluto.internal.InternalPortletResponse;

-import org.apache.pluto.internal.InternalActionResponse;

-

-import javax.servlet.http.HttpServletRequest;

-import javax.servlet.http.HttpServletResponse;

-

-/**

- * Factory Service for creating Portlet request and responses.

- * <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public interface PortletEnvironmentService {

-	

-	public InternalPortletRequest createActionRequest(

-			HttpServletRequest servletRequest,

-			HttpServletResponse servletResponse,

-			InternalPortletWindow internalPortletWindow);

-	

-	public InternalActionResponse createActionRespose(

-			HttpServletRequest servletRequest,

-			HttpServletResponse servletResponse,

-			InternalPortletWindow internalPortletWindow);

-	

-	public InternalPortletRequest createRenderRequest(

-			HttpServletRequest servletRequest,

-			HttpServletResponse servletResponse,

-			InternalPortletWindow internalPortletWindow);

-	

-	public InternalPortletResponse createRenderRespose(

-			HttpServletRequest servletRequest,

-			HttpServletResponse servletResponse,

-			InternalPortletWindow internalPortletWindow);

-	

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletInvokerService.java b/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletInvokerService.java
deleted file mode 100644
index 8db2dc1..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletInvokerService.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.spi.optional;

-

-import org.apache.pluto.internal.InternalPortletWindow;

-

-import javax.portlet.ActionRequest;

-import javax.portlet.ActionResponse;

-import javax.portlet.RenderRequest;

-import javax.portlet.RenderResponse;

-import javax.portlet.PortletRequest;

-import javax.portlet.PortletResponse;

-

-/**

- * Service used to invoke portlets.

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public interface PortletInvokerService {

-	

-    public void action(ActionRequest req, ActionResponse res, InternalPortletWindow window);

-

-    public void render(RenderRequest req, RenderResponse res, InternalPortletWindow window);

-

-    public void load(PortletRequest req, PortletResponse res, InternalPortletWindow window);

-	

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletPreferencesService.java b/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletPreferencesService.java
deleted file mode 100644
index 7b321cb..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletPreferencesService.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.spi.optional;

-

-import javax.portlet.PortletRequest;

-

-import org.apache.pluto.PortletWindow;

-import org.apache.pluto.PortletContainerException;

-import org.apache.pluto.internal.InternalPortletPreference;

-import org.apache.pluto.spi.ContainerService;

-

-/**

- * Portlet preferences service that should be implemented by the portal.

- * This is an optional container service.

- * 

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public interface PortletPreferencesService extends ContainerService {

-	

-	/**

-	 * Returns the stored portlet preferences.

-	 * @param portletWindow  the portlet window.

-	 * @param request  the portlet request.

-	 * @return the stored portlet preferences.

-	 * @throws PortletContainerException  if fail to get stored preferences.

-	 */

-    public InternalPortletPreference[] getStoredPreferences(

-    		PortletWindow portletWindow,

-    		PortletRequest request)

-    throws PortletContainerException;

-    

-    /**

-     * Stores the portlet references to the persistent storage.

-     * @param portletWindow  the portlet window.

-     * @param request  the portlet request.

-     * @param preferences  the portlet preferences to store.

-     * @throws PortletContainerException  if fail to store preferences.

-     */

-    public void store(PortletWindow portletWindow,

-                      PortletRequest request,

-                      InternalPortletPreference[] preferences)

-    throws PortletContainerException;

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletRegistryEvent.java b/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletRegistryEvent.java
deleted file mode 100644
index 70d1903..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletRegistryEvent.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.spi.optional;
-
-import org.apache.pluto.descriptors.portlet.PortletAppDD;
-
-/**
- * Encapsulation of event information.
- *
- * @since 1.1.0
- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>
- */
-public class PortletRegistryEvent {
-
-    private String applicationId;
-    private PortletAppDD portletApplicationDescriptor;
-
-
-    public String getApplicationId() {
-        return applicationId;
-    }
-
-    public void setApplicationId(String applicationId) {
-        this.applicationId = applicationId;
-    }
-
-    public PortletAppDD getPortletApplicationDescriptor() {
-        return portletApplicationDescriptor;
-    }
-
-    public void setPortletApplicationDescriptor(PortletAppDD portletApplicationDescriptor) {
-        this.portletApplicationDescriptor = portletApplicationDescriptor;
-    }
-}
diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletRegistryListener.java b/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletRegistryListener.java
deleted file mode 100644
index 2b95727..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletRegistryListener.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.spi.optional;
-
-/**
- * Listener interface implemented by observers of
- * the PortletRegistry which intend to be notified
- * of new portlet application registrations.
- *
- * @since 1.1.0
- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>
- */
-public interface PortletRegistryListener {
-
-    /**
-     * Recieve notification of a newly registered application.
-     *
-     * @param event registry event information
-     */
-    void portletApplicationRegistered(PortletRegistryEvent event);
-
-    /**
-     * Recieve notification of an application which is
-     * removed from service.
-     *
-     * @param event registry event information
-     */
-    void portletApplicationRemoved(PortletRegistryEvent event);
-
-}
diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletRegistryService.java b/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletRegistryService.java
deleted file mode 100644
index d9a7048..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletRegistryService.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.spi.optional;
-
-import org.apache.pluto.descriptors.portlet.PortletAppDD;
-import org.apache.pluto.PortletContainerException;
-
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * Interface defining the services used by the container
- * to access portlet application descriptors.  The registry
- * acts as both internally as descriptor cache and publically
- * as a mechanism for notifying the container of new applications.
- *
- * @since 1.1.0
- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>
- * 
- */
-public interface PortletRegistryService {
-
-    /**
-     * Retrieve all registered applications.  This list
-     * will only contain those applications which have
-     * been registered with the container.  Others may
-     * or may not be available within the servers.
-     *
-     * @return iterator of all application descriptors.
-     */
-    Iterator getRegisteredPortletApplications()
-        throws PortletContainerException;
-
-    /**
-     * Retrieve the portlet descriptor for the specified
-     * portlet application. If the name does not match
-     * the name of a contextPath registered with the container
-     * the portlet application name must be checked.
-     *
-     * @param name the name of the portlet application.
-     * @return the named portlet application descriptor.
-     */
-    PortletAppDD getPortletApplicationDescriptor(String name)
-        throws PortletContainerException;
-
-    /**
-     * Add a listener which will recieve notifications of newly
-     * registered applications.
-     *
-     * @param listener the listener to add
-     */
-    void addPortletRegistryListener(PortletRegistryListener listener);
-
-    /**
-     * Remove a previously registered listener.
-     *
-     * @param listener the listener to remove
-     */
-    void removePortletRegistryListener(PortletRegistryListener listener);
-
-    
-}
diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/UserInfoAttributesService.java b/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/UserInfoAttributesService.java
deleted file mode 100644
index 0903a82..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/spi/optional/UserInfoAttributesService.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*

- * Copyright 2003-2006 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.spi.optional;

-

-import java.util.Map;

-

-import javax.portlet.PortletRequest;

-

-import org.apache.pluto.PortletContainerException;

-import org.apache.pluto.spi.ContainerService;

-

-/**

- * Used to access user information attributes as described in

- * PLT.17.2 of the JSR-168 specificiation. Attribute persistence is

- * not covered by the spec so it is not done here.

- * 

- * @author <a href="cdoremus@apache.org">Craig Doremus</a>

- */

-public interface UserInfoAttributesService extends ContainerService  {

-

-	/**

-	 * To access user information attributes as defined in PLT.17

-	 * of JSR-168.

-	 * 

-	 * @param request Used to extract the authenticated user name.

-	 * @return A map of names and values of user information attributes

-	 * for a particular authenticated user.

-	 */

-    Map getAttributes(PortletRequest request) 

-    	throws PortletContainerException ;

-    

-	/**

-	 * Persists user information attributes. 

-	 *  

-	 * @param attributes The attributes to persist.

-    void store(UserInfoAttribute[] attributes)

-    	throws PortletContainerException;

-	 */

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/util/ArgumentUtility.java b/trunk/pluto-container/src/main/java/org/apache/pluto/util/ArgumentUtility.java
deleted file mode 100644
index b1d1953..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/util/ArgumentUtility.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-

-/**

- * Static class that provides utility static methods for argument validation.

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class ArgumentUtility {

-	

-	/** Logger. */

-    public static final Log LOG = LogFactory.getLog(ArgumentUtility.class);

-    

-    

-    // Static Utility Methods --------------------------------------------------

-    

-    /**

-     * Validates that the passed-in argument value is not null.

-     * @param argumentName  the argument name.

-     * @param argument  the argument value.

-     * @throws IllegalArgumentException  if the argument value is null.

-     */

-    public static void validateNotNull(String argumentName, Object argument)

-    throws IllegalArgumentException {

-        if (argument == null) {

-        	if (LOG.isDebugEnabled()) {

-        		LOG.debug("Validation failed for argument: " + argumentName

-        				+ ": argument should not be null.");

-        	}

-        	throw new IllegalArgumentException(

-        			"Illegal Argument: " + argumentName

-        			+ " (argument should not be null)");

-        }

-    }

-    

-    /**

-     * Validates that the passed-in string argument value is not null or empty.

-     * @param argumentName  the argument name.

-     * @param argument  the argument value.

-     * @throws IllegalArgumentException  if the argument value is null or empty.

-     */

-    public static void validateNotEmpty(String argumentName, String argument)

-    throws IllegalArgumentException {

-        if (argument == null || "".equals(argument)) {

-            if (LOG.isDebugEnabled()) {

-                LOG.debug("Validation failed for argument: " + argumentName

-                		+ ": argument should not be null or empty.");

-            }

-            throw new IllegalArgumentException(

-            		"Illegal Argument: " + argumentName

-            		+ " (argument should not be null or empty)");

-        }

-    }

-    

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/util/Enumerator.java b/trunk/pluto-container/src/main/java/org/apache/pluto/util/Enumerator.java
deleted file mode 100644
index 988f245..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/util/Enumerator.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util;

-

-import java.util.Collection;

-import java.util.Enumeration;

-import java.util.Iterator;

-import java.util.Map;

-import java.util.NoSuchElementException;

-

-

-/**

- * Uitlity class to wraps an <code>Enumeration</code> around a Collection, i.e.

- * <code>Iterator</code> classes.

- */

-

-public final class Enumerator implements Enumeration {

-

-

-    // Iterator over which the Enumeration takes place

-    private Iterator iterator = null;

-

-

-    /**

-     * Returns an Enumeration over the specified Collection.

-     * @param collection Collection with values that should be enumerated

-     */

-    public Enumerator(Collection collection) {

-        this(collection.iterator());

-    }

-

-

-    /**

-     * Returns an Enumeration over the values of the specified Iterator.

-     * @param iterator Iterator to be wrapped

-     */

-    public Enumerator(Iterator iterator) {

-        super();

-        this.iterator = iterator;

-    }

-

-

-    /**

-     * Returns an Enumeration over the values of the specified Map.

-     * @param map Map with values that should be enumerated

-     */

-    public Enumerator(Map map) {

-        this(map.values().iterator());

-    }

-

-

-    /**

-     * Tests if this enumeration contains more elements.

-     * @return <code>true</code> if this enumeration contains at least one more

-     *         element to provide, <code>false</code> otherwise.

-     */

-    public boolean hasMoreElements() {

-        return (iterator.hasNext());

-    }

-

-

-    /**

-     * Returns the next element of this enumeration.

-     * @return the next element of this enumeration

-     * @throws NoSuchElementException if no more elements exist

-     */

-    public Object nextElement() throws NoSuchElementException {

-        return (iterator.next());

-    }

-

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/util/NamespaceMapper.java b/trunk/pluto-container/src/main/java/org/apache/pluto/util/NamespaceMapper.java
deleted file mode 100644
index 36475c0..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/util/NamespaceMapper.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util;

-

-import org.apache.pluto.PortletWindowID;

-

-/**

- **/

-public interface NamespaceMapper {

-

-

-    public String encode(PortletWindowID namespace, String name);

-

-    public String encode(PortletWindowID ns1, PortletWindowID ns2, String name);

-

-    public String decode(PortletWindowID ns, String name);

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/util/PrintWriterServletOutputStream.java b/trunk/pluto-container/src/main/java/org/apache/pluto/util/PrintWriterServletOutputStream.java
deleted file mode 100644
index e830891..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/util/PrintWriterServletOutputStream.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util;

-

-import java.io.IOException;

-import java.io.PrintWriter;

-

-import javax.servlet.ServletOutputStream;

-

-/**

- * This is a specialized class implementing a ServletOutputStream that works in

- * conjunction with a PrintWriter to send data to the browser. It is used when a

- * J2EE server throws an IllegalStateException when you call getOutputStream on

- * a response which someone has previously called getWriter on.

- */

-public class PrintWriterServletOutputStream extends ServletOutputStream {

-

-    /**

-     * The PrintWriter that is wrapped on top of the base input stream

-     */

-    PrintWriter mPrintWriter;

-

-    /**

-     * Construct a ServletOutputStream that coordinates output using a base

-     * ServletOutputStream and a PrintWriter that is wrapped on top of that

-     * OutputStream.

-     */

-    public PrintWriterServletOutputStream(PrintWriter pO) {

-        super();

-        mPrintWriter = pO;

-    }

-

-    /**

-     * Writes an array of bytes

-     * @param pBuf the array to be written

-     * @throws IOException if an I/O error occurred

-     */

-    public void write(byte[] pBuf) throws IOException {

-        char[] cbuf = new char[pBuf.length];

-        for (int i = 0; i < cbuf.length; i++) {

-            cbuf[i] = (char) (pBuf[i] & 0xff);

-        }

-        mPrintWriter.write(cbuf, 0, pBuf.length);

-    }

-

-    /**

-     * Writes a single byte to the output stream

-     */

-    public void write(int pVal) throws IOException {

-        mPrintWriter.write(pVal);

-    }

-

-    /**

-     * Writes a subarray of bytes

-     * @param pBuf    the array to be written

-     * @param pOffset the offset into the array

-     * @param pLength the number of bytes to write

-     * @throws IOException if an I/O error occurred

-     */

-    public void write(byte[] pBuf, int pOffset, int pLength)

-        throws IOException {

-        char[] cbuf = new char[pLength];

-        for (int i = 0; i < pLength; i++) {

-            cbuf[i] = (char) (pBuf[i + pOffset] & 0xff);

-        }

-        mPrintWriter.write(cbuf, 0, pLength);

-    }

-

-    /**

-     * Flushes the stream, writing any buffered output bytes

-     * @throws IOException if an I/O error occurred

-     */

-    public void flush() throws IOException {

-        mPrintWriter.flush();

-    }

-

-    /**

-     * Closes the stream

-     * @throws IOException if an I/O error occurred

-     */

-    public void close() throws IOException {

-        mPrintWriter.close();

-    }

-

-    /**

-     * Prints a string.

-     * @param pVal the String to be printed

-     * @throws IOException if an I/O error has occurred

-     */

-    public void print(String pVal) throws IOException {

-        mPrintWriter.print(pVal);

-    }

-

-    /**

-     * Prints an string followed by a CRLF.

-     * @param pVal the String to be printed

-     * @throws IOException if an I/O error has occurred

-     */

-    public void println(String pVal) throws IOException {

-        mPrintWriter.println(pVal);

-    }

-

-    /**

-     * Prints a CRLF

-     * @throws IOException if an I/O error has occurred

-     */

-    public void println() throws IOException {

-        mPrintWriter.println();

-    }

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/util/StringManager.java b/trunk/pluto-container/src/main/java/org/apache/pluto/util/StringManager.java
deleted file mode 100644
index 6e9546c..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/util/StringManager.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*

- * Copyright 1999,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util;

-

-import org.apache.commons.logging.LogFactory;

-import org.apache.commons.logging.Log;

-

-import java.net.URLClassLoader;

-import java.text.MessageFormat;

-import java.util.Hashtable;

-import java.util.Locale;

-import java.util.MissingResourceException;

-import java.util.ResourceBundle;

-

-/**

- * An internationalization / localization helper class which reduces the bother

- * of handling ResourceBundles and takes care of the common cases of message

- * formating which otherwise require the creation of Object arrays and such.

- * <p/>

- * <p>The StringManager operates on a package basis. One StringManager per

- * package can be created and accessed via the getManager method call.

- * <p/>

- * <p>The StringManager will look for a ResourceBundle named by the package name

- * given plus the suffix of "LocalStrings". In practice, this means that the

- * localized information will be contained in a LocalStrings.properties file

- * located in the package directory of the classpath.

- * <p/>

- * <p>Please see the documentation for java.util.ResourceBundle for more

- * information.

- * @author James Duncan Davidson [duncan@eng.sun.com]

- * @author James Todd [gonzo@eng.sun.com]

- */

-

-public class StringManager {

-    private static final Log LOG =  LogFactory.getLog(StringManager.class);

-

-    /**

-     * The ResourceBundle for this StringManager.

-     */

-

-    private ResourceBundle bundle;

-    

-    /** 

-     * The package this StringManager belongs to.

-     */

-    private String packageName = null;

-

-    /**

-     * Creates a new StringManager for a given package. This is a private method

-     * and all access to it is arbitrated by the static getManager method call

-     * so that only one StringManager per package will be created.

-     * @param packageName Name of package to create StringManager for.

-     */

-

-    private StringManager(String packageName) {

-        if(LOG.isDebugEnabled()) {

-            LOG.debug("String Manager Created for package: "+packageName);

-        }

-        this.packageName = packageName;

-        String bundleName = packageName + ".LocalStrings";

-        try {

-            bundle = ResourceBundle.getBundle(bundleName);

-            return;

-        } catch (MissingResourceException ex) {

-            // Try from the current loader ( that's the case for trusted apps )

-            ClassLoader cl = Thread.currentThread().getContextClassLoader();

-            if (cl != null) {

-                try {

-                    bundle =

-                    ResourceBundle.getBundle(bundleName, Locale.getDefault(),

-                                             cl);

-                    return;

-                } catch (MissingResourceException ex2) {

-                }

-            }

-            if (cl == null) {

-                cl = this.getClass().getClassLoader();

-            }

-

-            System.out.println("Can't find resource " + bundleName +

-                               " " + cl);

-            if (cl instanceof URLClassLoader) {

-                System.out.println(((URLClassLoader) cl).getURLs());

-            }

-        }

-    }

-

-    /**

-     * Get a string from the underlying resource bundle.

-     * @param key The resource name

-     */

-    public String getString(String key) {

-        return MessageFormat.format(getStringInternal(key), null);

-    }

-

-

-    protected String getStringInternal(String key) {

-        if (key == null) {

-            String msg = "key is null";

-

-            throw new NullPointerException(msg);

-        }

-

-        String str = null;

-

-        if (bundle == null) {

-            return key;

-        }

-        try {

-            str = bundle.getString(key);

-        } catch (MissingResourceException mre) {

-            String name = null;

-            if (packageName == null) {

-                name = "unknown";

-            } else {

-                name = packageName;

-            }

-            str = "Cannot find message in the ResourceBundle associated with key '" + key + "' " +

-                    "(package " + name + ")";

-            LOG.warn(str, mre);

-        }

-

-        return str;

-    }

-

-    /**

-     * Get a string from the underlying resource bundle and format it with the

-     * given set of arguments.

-     * @param key  The resource name

-     * @param args Formatting directives

-     */

-

-    public String getString(String key, Object[] args) {

-        String iString = null;

-        String value = getStringInternal(key);

-

-        // this check for the runtime exception is some pre 1.1.6

-        // VM's don't do an automatic toString() on the passed in

-        // objects and barf out

-

-        try {

-            // ensure the arguments are not null so pre 1.2 VM's don't barf

-            Object nonNullArgs[] = args;

-            for (int i = 0; i < args.length; i++) {

-                if (args[i] == null) {

-                    if (nonNullArgs == args) {

-                        nonNullArgs =

-                        (Object[]) args.clone();

-                    }

-                    nonNullArgs[i] = "null";

-                }

-            }

-

-            iString = MessageFormat.format(value, nonNullArgs);

-        } catch (IllegalArgumentException iae) {

-            StringBuffer buf = new StringBuffer();

-            buf.append(value);

-            for (int i = 0; i < args.length; i++) {

-                buf.append(" arg[").append(i).append("]=").append(args[i]);

-            }

-            iString = buf.toString();

-        }

-        return iString;

-    }

-

-    /**

-     * Get a string from the underlying resource bundle and format it with the

-     * given object argument. This argument can of course be a String object.

-     * @param key The resource name

-     * @param arg Formatting directive

-     */

-

-    public String getString(String key, Object arg) {

-        Object[] args = new Object[]{arg};

-        return getString(key, args);

-    }

-

-    /**

-     * Get a string from the underlying resource bundle and format it with the

-     * given object arguments. These arguments can of course be String objects.

-     * @param key  The resource name

-     * @param arg1 Formatting directive

-     * @param arg2 Formatting directive

-     */

-

-    public String getString(String key, Object arg1, Object arg2) {

-        Object[] args = new Object[]{arg1, arg2};

-        return getString(key, args);

-    }

-

-    /**

-     * Get a string from the underlying resource bundle and format it with the

-     * given object arguments. These arguments can of course be String objects.

-     * @param key  The resource name

-     * @param arg1 Formatting directive

-     * @param arg2 Formatting directive

-     * @param arg3 Formatting directive

-     */

-

-    public String getString(String key, Object arg1, Object arg2,

-                            Object arg3) {

-        Object[] args = new Object[]{arg1, arg2, arg3};

-        return getString(key, args);

-    }

-

-    /**

-     * Get a string from the underlying resource bundle and format it with the

-     * given object arguments. These arguments can of course be String objects.

-     * @param key  The resource name

-     * @param arg1 Formatting directive

-     * @param arg2 Formatting directive

-     * @param arg3 Formatting directive

-     * @param arg4 Formatting directive

-     */

-

-    public String getString(String key, Object arg1, Object arg2,

-                            Object arg3, Object arg4) {

-        Object[] args = new Object[]{arg1, arg2, arg3, arg4};

-        return getString(key, args);

-    }

-    // --------------------------------------------------------------

-    // STATIC SUPPORT METHODS

-    // --------------------------------------------------------------

-

-    private static Hashtable managers = new Hashtable();

-

-    /**

-     * Get the StringManager for a particular package. If a manager for a

-     * package already exists, it will be reused, else a new StringManager will

-     * be created and returned.

-     * @param packageName The package name

-     */

-

-    public synchronized static StringManager getManager(String packageName) {

-        StringManager mgr = (StringManager) managers.get(packageName);

-

-        if (mgr == null) {

-            mgr = new StringManager(packageName);

-            managers.put(packageName, mgr);

-        }

-        return mgr;

-    }

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/util/StringUtils.java b/trunk/pluto-container/src/main/java/org/apache/pluto/util/StringUtils.java
deleted file mode 100644
index fb9aee8..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/util/StringUtils.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util;

-

-import java.util.HashMap;

-import java.util.Iterator;

-import java.util.Map;

-

-/**

- * Static class hosting a couple of utility methods around strings.

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class StringUtils {

-	

-	// Private Constructor -----------------------------------------------------

-	

-	/**

-	 * Private constructor that prevents external instantiation.

-	 */

-	private StringUtils() {

-		// Do nothing.

-	}

-	

-	

-	// Static Utility Methods --------------------------------------------------

-	

-    /**

-     * Replaces all occurrences of a pattern within a string by a replacement.

-     * @param source  the string that should be searched.

-     * @param pattern  the pattern that should be replaced.

-     * @param replace  the replacement that should be inserted instead of the

-     *        pattern.

-     * @return The updated source string.

-     */

-    public static String replace(String source, String pattern, String replace) {

-        if (source == null || source.length() == 0

-        		|| pattern == null || pattern.length() == 0) {

-            return source;

-        }

-

-        int k = source.indexOf(pattern);

-

-        if (k == -1) {

-            return source;

-        }

-

-        StringBuffer out = new StringBuffer();

-        int i = 0, l = pattern.length();

-

-        while (k != -1) {

-            out.append(source.substring(i, k));

-

-            if (replace != null) {

-                out.append(replace);

-            }

-

-            i = k + l;

-            k = source.indexOf(pattern, i);

-        }

-        out.append(source.substring(i));

-        return out.toString();

-    }

-    

-    /**

-     * TODO: can't we just use String[].clone()?

-     * @param source

-     * @return

-     */

-    public static String[] copy(String[] source) {

-        if (source == null) {

-            return null;

-        }

-        int length = source.length;

-        String[] result = new String[length];

-        System.arraycopy(source, 0, result, 0, length);

-        return result;

-    }

-    

-    /**

-     * Deep-clones a parameter map. The key is the parameter name as a String

-     * instance, while the value is a String array (String[]) instance.

-     * @param parameters  the parameter map to deep-clone.

-     * @return the deep-cloned parameter map.

-     */

-    public static Map copyParameters(Map parameters) {

-        Map result = new HashMap(parameters);

-        for (Iterator it = result.entrySet().iterator(); it.hasNext();) {

-            Map.Entry entry = (Map.Entry) it.next();

-            if (!(entry.getKey() instanceof String)) {

-                throw new IllegalArgumentException("Parameter map keys "

-                		+ "must not be null and of type java.lang.String.");

-            }

-            try {

-                entry.setValue(copy((String[]) entry.getValue()));

-            } catch (ClassCastException ex) {

-                throw new IllegalArgumentException("Parameter map values "

-                		+ "must not be null and of type java.lang.String[].");

-            }

-        }

-        return result;

-    }

-    

-    /**

-     * Strips the specified mime type by removing the character encoding

-     * specified at the end of the mime type (all characters after the ';').

-     * The stripped mime type is trimmed string which contains no white 

-     * spaces at the beginning and the end.

-     * @param mimeType  the mime type to strip.

-     * @return the stripped mime type.

-     */

-    public static String getMimeTypeWithoutEncoding(String mimeType) {

-        int index = mimeType.indexOf(';');

-        String strippedType = null;

-        if (index == -1) {

-            strippedType = mimeType;

-        } else {

-            strippedType = mimeType.substring(0, index);

-        }

-        return strippedType.trim();

-    }

-

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/util/impl/NamespaceMapperImpl.java b/trunk/pluto-container/src/main/java/org/apache/pluto/util/impl/NamespaceMapperImpl.java
deleted file mode 100644
index d96a952..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/util/impl/NamespaceMapperImpl.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.impl;

-

-import org.apache.pluto.PortletWindowID;

-import org.apache.pluto.util.NamespaceMapper;

-

-/**

- * Default implementation of <code>NamespaceMapper</code> interface.

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class NamespaceMapperImpl implements NamespaceMapper {

-	

-    public NamespaceMapperImpl() {

-    	// Do nothing.

-    }

-    

-    

-    // NamespaceMapper Impl ----------------------------------------------------

-    

-    public String encode(PortletWindowID portletWindowId, String name) {

-        StringBuffer buffer = new StringBuffer(50);

-        buffer.append("Pluto_");

-        buffer.append(portletWindowId.getStringId());

-        buffer.append('_');

-        buffer.append(name);

-        return buffer.toString();

-    }

-

-    public String encode(PortletWindowID portletWindowId1,

-                         PortletWindowID portletWindowId2,

-                         String name) {

-        StringBuffer buffer = new StringBuffer(50);

-        buffer.append("Pluto_");

-        buffer.append(portletWindowId1.getStringId());

-        buffer.append('_');

-        buffer.append(portletWindowId2.getStringId());

-        buffer.append('_');

-        buffer.append(name);

-        return buffer.toString();

-    }

-

-    public String decode(PortletWindowID portletWindowId, String name) {

-        if (!name.startsWith("Pluto_")) {

-            return null;

-        }

-        StringBuffer buffer = new StringBuffer(50);

-        buffer.append("Pluto_");

-        buffer.append(portletWindowId.getStringId());

-        buffer.append('_');

-        if (!name.startsWith(buffer.toString())) {

-            return null;

-        }

-        return name.substring(buffer.length());

-    }

-    

-}

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/wrappers/ActionRequestWrapper.java b/trunk/pluto-container/src/main/java/org/apache/pluto/wrappers/ActionRequestWrapper.java
deleted file mode 100644
index fc6c8e5..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/wrappers/ActionRequestWrapper.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.wrappers;

-

-import javax.portlet.ActionRequest;

-

-public class ActionRequestWrapper extends PortletRequestWrapper

-    implements ActionRequest {

-

-    /**

-     * Creates a ServletRequest adaptor wrapping the given request object.

-     * @throws java.lang.IllegalArgumentException

-     *          if the request is null.

-     */

-    public ActionRequestWrapper(ActionRequest actionRequest) {

-        super(actionRequest);

-

-        if (actionRequest == null) {

-            throw new IllegalArgumentException("Request cannot be null");

-        }

-    }

-

-    // javax.portlet.ActionRequest implementation -------------------------------------------------    

-    public java.io.InputStream getPortletInputStream()

-        throws java.io.IOException {

-        return this.getActionRequest().getPortletInputStream();

-    }

-

-    public void setCharacterEncoding(String enc)

-        throws java.io.UnsupportedEncodingException {

-        this.getActionRequest().setCharacterEncoding(enc);

-    }

-

-    public java.io.BufferedReader getReader()

-        throws java.io.UnsupportedEncodingException, java.io.IOException {

-        return this.getActionRequest().getReader();

-    }

-

-    public java.lang.String getCharacterEncoding() {

-        return this.getActionRequest().getCharacterEncoding();

-    }

-

-    public java.lang.String getContentType() {

-        return this.getActionRequest().getContentType();

-    }

-

-    public int getContentLength() {

-        return this.getActionRequest().getContentLength();

-    }

-    

-    // --------------------------------------------------------------------------------------------

-    

-    // additional methods -------------------------------------------------------------------------

-    /**

-     * Return the wrapped ServletRequest object.

-     */

-    public ActionRequest getActionRequest() {

-        return (ActionRequest) getPortletRequest();

-    }

-

-    // --------------------------------------------------------------------------------------------

-}

-

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/wrappers/ActionResponseWrapper.java b/trunk/pluto-container/src/main/java/org/apache/pluto/wrappers/ActionResponseWrapper.java
deleted file mode 100644
index 9c9e9bd..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/wrappers/ActionResponseWrapper.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.wrappers;

-

-import java.util.Map;

-

-import javax.portlet.ActionResponse;

-import javax.portlet.PortletMode;

-import javax.portlet.PortletModeException;

-import javax.portlet.WindowState;

-import javax.portlet.WindowStateException;

-

-public class ActionResponseWrapper extends PortletResponseWrapper

-    implements ActionResponse {

-

-    /**

-     * Creates a ServletResponse adaptor wrapping the given response object.

-     * @throws java.lang.IllegalArgumentException

-     *          if the response is null.

-     */

-    public ActionResponseWrapper(ActionResponse actionResponse) {

-        super(actionResponse);

-

-        if (actionResponse == null) {

-            throw new IllegalArgumentException("Response cannot be null");

-        }

-    }

-

-    // javax.portlet.ActionResponse implementation ------------------------------------------------

-    public void setWindowState(WindowState windowState)

-        throws WindowStateException {

-        this.getActionResponse().setWindowState(windowState);

-    }

-

-    public void setPortletMode(PortletMode portletMode)

-        throws PortletModeException {

-        this.getActionResponse().setPortletMode(portletMode);

-    }

-

-    public void sendRedirect(String location) throws java.io.IOException {

-        this.getActionResponse().sendRedirect(location);

-    }

-

-    public void setRenderParameters(Map parameters) {

-        this.getActionResponse().setRenderParameters(parameters);

-    }

-

-    public void setRenderParameter(String key, String value) {

-        this.getActionResponse().setRenderParameter(key, value);

-    }

-

-    public void setRenderParameter(String key, String[] values) {

-        this.getActionResponse().setRenderParameter(key, values);

-    }

-

-    // --------------------------------------------------------------------------------------------

-

-    // additional methods -------------------------------------------------------------------------

-    /**

-     * Return the wrapped ServletResponse object.

-     */

-    public ActionResponse getActionResponse() {

-        return (ActionResponse) getPortletResponse();

-    }

-

-    // --------------------------------------------------------------------------------------------

-}

-

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/wrappers/PortletRequestWrapper.java b/trunk/pluto-container/src/main/java/org/apache/pluto/wrappers/PortletRequestWrapper.java
deleted file mode 100644
index 6ab11f6..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/wrappers/PortletRequestWrapper.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.wrappers;

-

-import java.util.Enumeration;

-

-import javax.portlet.PortalContext;

-import javax.portlet.PortletMode;

-import javax.portlet.PortletPreferences;

-import javax.portlet.PortletRequest;

-import javax.portlet.PortletSession;

-import javax.portlet.WindowState;

-

-public class PortletRequestWrapper

-    extends javax.servlet.http.HttpServletRequestWrapper

-    implements PortletRequest {

-

-    /**

-     * Creates a ServletRequest adaptor wrapping the given request object.

-     * @throws java.lang.IllegalArgumentException

-     *          if the request is null.

-     */

-    public PortletRequestWrapper(PortletRequest portletRequest) {

-        super((javax.servlet.http.HttpServletRequest) portletRequest);

-

-        if (portletRequest == null) {

-            throw new IllegalArgumentException("Request cannot be null");

-        }

-    }

-

-    // javax.portlet.PortletRequest implementation -------------------------------------------------

-    public boolean isWindowStateAllowed(WindowState state) {

-        return this.getPortletRequest().isWindowStateAllowed(state);

-    }

-

-    public boolean isPortletModeAllowed(PortletMode mode) {

-        return this.getPortletRequest().isPortletModeAllowed(mode);

-    }

-

-    public PortletMode getPortletMode() {

-        return this.getPortletRequest().getPortletMode();

-    }

-

-    public WindowState getWindowState() {

-        return this.getPortletRequest().getWindowState();

-    }

-

-    public PortletPreferences getPreferences() {

-        return this.getPortletRequest().getPreferences();

-    }

-

-    public PortletSession getPortletSession() {

-        return this.getPortletRequest().getPortletSession();

-    }

-

-    public PortletSession getPortletSession(boolean create) {

-        return this.getPortletRequest().getPortletSession(create);

-    }

-

-    public String getProperty(String name) {

-        return this.getPortletRequest().getProperty(name);

-    }

-

-    public Enumeration getProperties(String name) {

-        return this.getPortletRequest().getProperties(name);

-    }

-

-    public Enumeration getPropertyNames() {

-        return this.getPortletRequest().getPropertyNames();

-    }

-

-    public PortalContext getPortalContext() {

-        return this.getPortletRequest().getPortalContext();

-    }

-

-    public java.lang.String getAuthType() {

-        return this.getPortletRequest().getAuthType();

-    }

-

-    public String getContextPath() {

-        return this.getPortletRequest().getContextPath();

-    }

-

-    public java.lang.String getRemoteUser() {

-        return this.getPortletRequest().getRemoteUser();

-    }

-

-    public java.security.Principal getUserPrincipal() {

-        return this.getPortletRequest().getUserPrincipal();

-    }

-

-    public boolean isUserInRole(java.lang.String role) {

-        return this.getPortletRequest().isUserInRole(role);

-    }

-

-    public Object getAttribute(String name) {

-        return this.getPortletRequest().getAttribute(name);

-    }

-

-    public java.util.Enumeration getAttributeNames() {

-        return this.getPortletRequest().getAttributeNames();

-    }

-

-    public String getParameter(String name) {

-        return this.getPortletRequest().getParameter(name);

-    }

-

-    public java.util.Enumeration getParameterNames() {

-        return this.getPortletRequest().getParameterNames();

-    }

-

-    public String[] getParameterValues(String name) {

-        return this.getPortletRequest().getParameterValues(name);

-    }

-

-    public java.util.Map getParameterMap() {

-        return this.getPortletRequest().getParameterMap();

-    }

-

-    public boolean isSecure() {

-        return this.getPortletRequest().isSecure();

-    }

-

-    public void setAttribute(String name, Object o) {

-        this.getPortletRequest().setAttribute(name, o);

-    }

-

-    public void removeAttribute(String name) {

-        this.getPortletRequest().removeAttribute(name);

-    }

-

-    public String getRequestedSessionId() {

-        return this.getPortletRequest().getRequestedSessionId();

-    }

-

-    public boolean isRequestedSessionIdValid() {

-        return this.getPortletRequest().isRequestedSessionIdValid();

-    }

-

-    public String getResponseContentType() {

-        return this.getPortletRequest().getResponseContentType();

-    }

-

-    public java.util.Enumeration getResponseContentTypes() {

-        return this.getPortletRequest().getResponseContentTypes();

-    }

-

-    public java.util.Locale getLocale() {

-        return this.getPortletRequest().getLocale();

-    }

-

-    public java.util.Enumeration getLocales() {

-        return this.getPortletRequest().getLocales();

-    }

-

-    public String getScheme() {

-        return this.getPortletRequest().getScheme();

-    }

-

-    public String getServerName() {

-        return this.getPortletRequest().getServerName();

-    }

-

-    public int getServerPort() {

-        return this.getPortletRequest().getServerPort();

-    }

-

-    // --------------------------------------------------------------------------------------------

-    

-    // additional methods -------------------------------------------------------------------------

-    /**

-     * Return the wrapped ServletRequest object.

-     */

-    public PortletRequest getPortletRequest() {

-        return (PortletRequest) super.getRequest();

-    }

-

-    /**

-     * Sets the request being wrapped.

-     * @throws java.lang.IllegalArgumentException

-     *          if the request is null.

-     */

-    public void setRequest(PortletRequest request) {

-        if (request == null) {

-            throw new IllegalArgumentException("Request cannot be null");

-        }

-        setRequest((javax.servlet.http.HttpServletRequest) request);

-    }

-    // --------------------------------------------------------------------------------------------

-}

-

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/wrappers/PortletResponseWrapper.java b/trunk/pluto-container/src/main/java/org/apache/pluto/wrappers/PortletResponseWrapper.java
deleted file mode 100644
index ffc8bcc..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/wrappers/PortletResponseWrapper.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.wrappers;

-

-import javax.portlet.PortletResponse;

-

-public class PortletResponseWrapper

-    extends javax.servlet.http.HttpServletResponseWrapper

-    implements PortletResponse {

-

-    /**

-     * Creates a ServletResponse adaptor wrapping the given response object.

-     * @throws java.lang.IllegalArgumentException

-     *          if the response is null.

-     */

-    public PortletResponseWrapper(PortletResponse portletResponse) {

-        super((javax.servlet.http.HttpServletResponse) portletResponse);

-

-        if (portletResponse == null) {

-            throw new IllegalArgumentException("Response cannot be null");

-        }

-    }

-

-    // javax.portlet.PortletResponse implementation ------------------------------------------------

-    public void addProperty(String key, String value) {

-        this.getPortletResponse().addProperty(key, value);

-    }

-

-    public void setProperty(String key, String value) {

-        this.getPortletResponse().setProperty(key, value);

-    }

-

-    public String encodeURL(String path) {

-        return this.getPortletResponse().encodeURL(path);

-    }

-    // --------------------------------------------------------------------------------------------

-

-    // additional methods -------------------------------------------------------------------------

-    /**

-     * Return the wrapped ServletResponse object.

-     */

-    public PortletResponse getPortletResponse() {

-        return (PortletResponse) super.getResponse();

-    }

-

-    /**

-     * Sets the response being wrapped.

-     * @throws java.lang.IllegalArgumentException

-     *          if the response is null.

-     */

-    public void setResponse(PortletResponse response) {

-        if (response == null) {

-            throw new IllegalArgumentException("Response cannot be null");

-        }

-        setResponse((javax.servlet.http.HttpServletResponse) response);

-    }

-    // --------------------------------------------------------------------------------------------

-}

-

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/wrappers/RenderRequestWrapper.java b/trunk/pluto-container/src/main/java/org/apache/pluto/wrappers/RenderRequestWrapper.java
deleted file mode 100644
index 488321c..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/wrappers/RenderRequestWrapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.wrappers;

-

-import javax.portlet.RenderRequest;

-

-public class RenderRequestWrapper extends PortletRequestWrapper

-    implements RenderRequest {

-

-    /**

-     * Creates a ServletRequest adaptor wrapping the given request object.

-     * @throws java.lang.IllegalArgumentException

-     *          if the request is null.

-     */

-    public RenderRequestWrapper(RenderRequest renderRequest) {

-        super(renderRequest);

-

-        if (renderRequest == null) {

-            throw new IllegalArgumentException("Request cannot be null");

-        }

-    }

-

-    // javax.portlet.RenderRequest implementation -------------------------------------------------

-

-    // --------------------------------------------------------------------------------------------

-    

-    // additional methods -------------------------------------------------------------------------

-    /**

-     * Return the wrapped ServletRequest object.

-     */

-    public RenderRequest getRenderRequest() {

-        return (RenderRequest) getPortletRequest();

-    }

-

-    // --------------------------------------------------------------------------------------------

-}

-

diff --git a/trunk/pluto-container/src/main/java/org/apache/pluto/wrappers/RenderResponseWrapper.java b/trunk/pluto-container/src/main/java/org/apache/pluto/wrappers/RenderResponseWrapper.java
deleted file mode 100644
index d0a0a6a..0000000
--- a/trunk/pluto-container/src/main/java/org/apache/pluto/wrappers/RenderResponseWrapper.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.wrappers;

-

-import javax.portlet.PortletURL;

-import javax.portlet.RenderResponse;

-import java.io.IOException;

-import java.io.OutputStream;

-

-public class RenderResponseWrapper extends PortletResponseWrapper

-    implements RenderResponse {

-    /**

-     * Creates a ServletResponse adaptor wrapping the given response object.

-     * @throws java.lang.IllegalArgumentException

-     *          if the response is null.

-     */

-    public RenderResponseWrapper(RenderResponse renderResponse) {

-        super(renderResponse);

-

-        if (renderResponse == null) {

-            throw new IllegalArgumentException("Response cannot be null");

-        }

-    }

-

-    // javax.portlet.RenderResponse implementation ------------------------------------------------

-    public String getContentType() {

-        return this.getRenderResponse().getContentType();

-    }

-

-    public PortletURL createRenderURL() {

-        return this.getRenderResponse().createRenderURL();

-    }

-

-    public PortletURL createActionURL() {

-        return this.getRenderResponse().createActionURL();

-    }

-

-    public String getNamespace() {

-        return this.getRenderResponse().getNamespace();

-    }

-

-    public void setTitle(String title) {

-        this.getRenderResponse().setTitle(title);

-    }

-

-    public void setContentType(String type) {

-        this.getRenderResponse().setContentType(type);

-    }

-

-    public String getCharacterEncoding() {

-        return this.getRenderResponse().getCharacterEncoding();

-    }

-

-    public java.io.PrintWriter getWriter() throws java.io.IOException {

-        return this.getRenderResponse().getWriter();

-    }

-

-    public java.util.Locale getLocale() {

-        return this.getRenderResponse().getLocale();

-    }

-

-    public void setBufferSize(int size) {

-        this.getRenderResponse().setBufferSize(size);

-    }

-

-    public int getBufferSize() {

-        return this.getRenderResponse().getBufferSize();

-    }

-

-    public void flushBuffer() throws java.io.IOException {

-        this.getRenderResponse().flushBuffer();

-    }

-

-    public void resetBuffer() {

-        this.getRenderResponse().resetBuffer();

-    }

-

-    public boolean isCommitted() {

-        return this.getRenderResponse().isCommitted();

-    }

-

-    public void reset() {

-        this.getRenderResponse().reset();

-    }

-

-    public OutputStream getPortletOutputStream() throws IOException {

-        return this.getRenderResponse().getPortletOutputStream();

-    }

-    // --------------------------------------------------------------------------------------------

-

-    // additional methods -------------------------------------------------------------------------

-    /**

-     * Return the wrapped ServletResponse object.

-     */

-    public RenderResponse getRenderResponse() {

-        return (RenderResponse) getPortletResponse();

-    }

-    // --------------------------------------------------------------------------------------------

-

-}

-

diff --git a/trunk/pluto-container/src/main/resources/org/apache/pluto/core/LocalStrings.properties b/trunk/pluto-container/src/main/resources/org/apache/pluto/core/LocalStrings.properties
deleted file mode 100644
index cb28d6d..0000000
--- a/trunk/pluto-container/src/main/resources/org/apache/pluto/core/LocalStrings.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#

-# Copyright 2005 The Apache Software Foundation

-# Licensed  under the  Apache License,  Version 2.0  (the "License");

-# you may not use  this file  except in  compliance with the License.

-# You may obtain a copy of the License at

-#

-#   http://www.apache.org/licenses/LICENSE-2.0

-#

-# Unless required by applicable law or agreed to in writing, software

-# distributed  under the  License is distributed on an "AS IS" BASIS,

-# WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-# implied.

-#

-# See the License for the specific language governing permissions and

-# limitations under the License.

-#

-######################################################################

-

-pluto.container.init=Unable to initialize portlet container {0}

-

-error.load.portlet.xml=Unable to load portlet.xml for context {0} {1}

-

-error.context.descriptor.load=An error occured while loading the context descriptor {0}

-

-####################################

-##       Portlet Invocation       ##

-####################################

-

-error.portlet.invoker=Unable to successfully invoke portlet.  Error during processing.

-error.portlet.invoker.dispatcher=Unable to locate request dispatcher for context {0} and portlet {1}.

-error.portlet.invoker.unavailable=Unable to invoke portlet.  Resource {0} unavailable for {1} seconds.

-

-error.config.context.null=Error creating portlet invoker for portlet {0}.  Unable to locate context {1}.  Check your portlet configuration and ensure cross context dispatching is enabled.

-

diff --git a/trunk/pluto-container/src/main/resources/org/apache/pluto/core/impl/LocalStrings.properties b/trunk/pluto-container/src/main/resources/org/apache/pluto/core/impl/LocalStrings.properties
deleted file mode 100644
index 7d8e59b..0000000
--- a/trunk/pluto-container/src/main/resources/org/apache/pluto/core/impl/LocalStrings.properties
+++ /dev/null
@@ -1,50 +0,0 @@
-#

-# Copyright 2005 The Apache Software Foundation

-# Licensed  under the  Apache License,  Version 2.0  (the "License");

-# you may not use  this file  except in  compliance with the License.

-# You may obtain a copy of the License at

-#

-#   http://www.apache.org/licenses/LICENSE-2.0

-#

-# Unless required by applicable law or agreed to in writing, software

-# distributed  under the  License is distributed on an "AS IS" BASIS,

-# WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-# implied.

-#

-# See the License for the specific language governing permissions and

-# limitations under the License.

-#

-######################################################################

-

-## PortletModeException caused by Portal

-javax.portlet.PortletModeException.portlet=Portlet mode '{0}' is not supported by the portal.

-

-## PortletModeException caused by Portlet

-javax.portlet.PortletModeException.portal=Portlet mode '{0}' is not supported by the portlet.

-

-## PortletModeException caused by null mode

-javax.portlet.PortletModeException.null=Portlet mode may not be null.

-

-

-############################################

-# Error Messages:

-#

-############################################

-

-error.null={0} may not be null

-## Replace the following with the above

-error.contenttype.null=Content Type Not Set

-error.attributeName.null=Attribute Name may not be null.

-error.propertyName.null=Property Name may not be null.

-

-error.session.illegalState=Session may not be retrieved before cross context portlet invocation.

-error.preference.readonly=Preference {0} may not be modified.  It is marked as read only.

-

-############################################

-# Warning Messages:

-#

-############################################

-

-warning.resourcebundle.notfound=Unable to locate Resource Bundle {0}: {1}

-

-

diff --git a/trunk/pluto-container/src/main/resources/org/apache/pluto/core/pluto-configuration.properties b/trunk/pluto-container/src/main/resources/org/apache/pluto/core/pluto-configuration.properties
deleted file mode 100644
index f21baeb..0000000
--- a/trunk/pluto-container/src/main/resources/org/apache/pluto/core/pluto-configuration.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-#

-# Copyright 2005 The Apache Software Foundation

-# Licensed  under the  Apache License,  Version 2.0  (the "License");

-# you may not use  this file  except in  compliance with the License.

-# You may obtain a copy of the License at

-#

-#   http://www.apache.org/licenses/LICENSE-2.0

-#

-# Unless required by applicable law or agreed to in writing, software

-# distributed  under the  License is distributed on an "AS IS" BASIS,

-# WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-# implied.

-#

-# See the License for the specific language governing permissions and

-# limitations under the License.

-#

-######################################################################

-org.apache.pluto.descriptors.services.PortletAppDescriptorService=org.apache.pluto.descriptors.services.castor.PortletAppDescriptorServiceImpl
\ No newline at end of file
diff --git a/trunk/pluto-container/src/main/resources/org/apache/pluto/environment.properties b/trunk/pluto-container/src/main/resources/org/apache/pluto/environment.properties
deleted file mode 100644
index 1a129f5..0000000
--- a/trunk/pluto-container/src/main/resources/org/apache/pluto/environment.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-#

-# Copyright 2005 The Apache Software Foundation

-# Licensed  under the  Apache License,  Version 2.0  (the "License");

-# you may not use  this file  except in  compliance with the License.

-# You may obtain a copy of the License at

-#

-#   http://www.apache.org/licenses/LICENSE-2.0

-#

-# Unless required by applicable law or agreed to in writing, software

-# distributed  under the  License is distributed on an "AS IS" BASIS,

-# WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-# implied.

-#

-# See the License for the specific language governing permissions and

-# limitations under the License.

-#

-######################################################################

-

-pluto.container.name=Pluto

-pluto.container.version.major=1

-pluto.container.version.minor=1.0-SNAPSHOT

-

-javax.portlet.version.major=1

-javax.portlet.version.minor=0

-

diff --git a/trunk/pluto-container/src/main/resources/org/apache/pluto/internal/LocalStrings.properties b/trunk/pluto-container/src/main/resources/org/apache/pluto/internal/LocalStrings.properties
deleted file mode 100644
index d523e28..0000000
--- a/trunk/pluto-container/src/main/resources/org/apache/pluto/internal/LocalStrings.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-#

-# Copyright 2006 The Apache Software Foundation

-# Licensed  under the  Apache License,  Version 2.0  (the "License");

-# you may not use  this file  except in  compliance with the License.

-# You may obtain a copy of the License at

-#

-#   http://www.apache.org/licenses/LICENSE-2.0

-#

-# Unless required by applicable law or agreed to in writing, software

-# distributed  under the  License is distributed on an "AS IS" BASIS,

-# WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-# implied.

-#

-# See the License for the specific language governing permissions and

-# limitations under the License.

-#

-######################################################################

-

-error.context.descriptor.load=Error loading context: {0}

-

diff --git a/trunk/pluto-container/src/main/resources/org/apache/pluto/internal/impl/LocalStrings.properties b/trunk/pluto-container/src/main/resources/org/apache/pluto/internal/impl/LocalStrings.properties
deleted file mode 100644
index b6499f0..0000000
--- a/trunk/pluto-container/src/main/resources/org/apache/pluto/internal/impl/LocalStrings.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#

-# Copyright 2006 The Apache Software Foundation

-# Licensed  under the  Apache License,  Version 2.0  (the "License");

-# you may not use  this file  except in  compliance with the License.

-# You may obtain a copy of the License at

-#

-#   http://www.apache.org/licenses/LICENSE-2.0

-#

-# Unless required by applicable law or agreed to in writing, software

-# distributed  under the  License is distributed on an "AS IS" BASIS,

-# WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-# implied.

-#

-# See the License for the specific language governing permissions and

-# limitations under the License.

-#

-######################################################################

-javax.portlet.PortletModeException.null=PortletMode is null

-

-javax.portlet.PortletModeException.portlet=PortletMode is not allowed by portlet: {0}

-

-javax.portlet.PortletModeException.portal=PortletMode not supported by portal: {0}

-

-warning.resourcebundle.notfound=Resource not found: {0}

-

-error.null=Null object: {0} 

-

-error.session.illegalState=Session is in an illegal state

-

-error.config.context.null=Error creating portlet invoker for portlet {0}.  Unable to locate context {1}.  Check your portlet configuration and ensure cross context dispatching is enabled.

-

-error.contenttype.null=Null content-type

-

-error.preference.readonly=Read-only preference: {0}

diff --git a/trunk/pluto-container/src/site/site.xml b/trunk/pluto-container/src/site/site.xml
deleted file mode 100644
index 0885652..0000000
--- a/trunk/pluto-container/src/site/site.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-

-<project name="Pluto Portlet Container">

-  

-  <bannerLeft>

-    <name>Pluto</name>

-    <src>http://portals.apache.org/pluto/images/pluto.png</src>

-    <href>http://portals.apache.org/pluto</href>

-  </bannerLeft>

-  <bannerRight>

-    <src>http://portals.apache.org/pluto/images/banner.png</src>

-  </bannerRight>

-  

-  <body>

-    

-    <links>

-      <item name="Pluto Home" href="http://portals.apache.org/pluto/"/>

-      <item name="JSR 168" href="http://jcp.org/en/jsr/detail?id=168"/>

-      <item name="JSR 286" href="http://jcp.org/en/jsr/detail?id=286"/>

-      <item name="Chinese Translation" href="http://people.apache.org/~zheng/pluto/chinese/"/>

-    </links>

-    

-    <menu name="Portlet Container">

-      <item name="Getting Started" href="/getting-started.html"/>

-      <item name="Embedding Pluto" href="/embed.html"/>

-    </menu>

-    

-    ${reports}

-    

-  </body>

-  

-</project>

-

diff --git a/trunk/pluto-container/src/site/xdoc/embed.xml b/trunk/pluto-container/src/site/xdoc/embed.xml
deleted file mode 100644
index 0df57fd..0000000
--- a/trunk/pluto-container/src/site/xdoc/embed.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-

-<document>

-  

-  <properties>

-    <title>Embedding the Pluto Container</title>

-    <author email="ddewolf@apache.org">David DeWolf</author>

-  </properties>

-  

-  <body>

-    

-    <section name="Embedding the Pluto Container">

-      

-      <p>

-        This document is currently <b>very</b> breif. Please feel free to submit

-        patches.

-      </p>

-      

-      <subsection name="Steps for Embedding Pluto">

-        <p>

-          <b>Step 1:</b> Implement <code>org.apache.pluto.PortletContainerServices</code>

-        </p>

-        <p>

-          <b>Step 2:</b> Manage the Portlet Container Lifecycle:

-          <ul>

-            <li>

-              Create an instance of the container:

-              <source><![CDATA[

-//

-// Step 1) Create and instance of the PortletContainerService

-//

-PortletContainerServices impl = . . .

-

-//

-// Step 2) Request a new container from the container factory

-//

-PortletContainerFactory factory =

-    PortletContainerFactory.getInstance();

-

-PortletContainer container = factory.createContainer(

-    "My Container Name", impl

-);

-

-//

-// Step 3) Initialize the Container with the embedding 

-//         application's ServletContext

-//

-container.init(ctx);

-              ]]></source>

-            </li>

-            <li>Destroy the Container during Shutdown.</li>

-          </ul>

-        </p>

-        <p>

-          <b>Step 3:</b> Invoke the Container as necessary:

-          <source><![CDATA[

-// Load a portlet

-container.doLoad(portletWindow, request, response);

-// Process a Portlet Action

-container.doAction(portletWindow, request, response);

-// Render a portlet

-container.doRender(portletWindow, request, response);

-          ]]></source>

-        </p>

-        

-      </subsection>

-      

-    </section>

-    

-  </body>

-  

-</document>

-

diff --git a/trunk/pluto-container/src/site/xdoc/getting-started.xml b/trunk/pluto-container/src/site/xdoc/getting-started.xml
deleted file mode 100644
index 8a25ce5..0000000
--- a/trunk/pluto-container/src/site/xdoc/getting-started.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-

-<document>

-  

-  <properties>

-    <title>Getting Started</title>

-    <author email="ddewolf@apache.org">David DeWolf</author>

-  </properties>

-  

-  <body>

-    

-    <section name="Getting Started">

-      <p>

-        The Pluto Portlet Container is not designed for use by end users. The

-        container is meant to be embeded within portal and web applications to

-        provide Java Portlet Specification compliance. If you are a user looking

-        to develop, test, or deploy portlets, please see the

-        <a href="../pluto-portal-driver/index.html">Pluto Portal Driver</a>.

-      </p>

-      <p>

-        If you are looking for information on how to embed pluto in your portal

-        or web application, please see the <a href="embed.html">embedding pluto</a>

-        documentation for Pluto 1.1.

-      </p>

-    </section>

-    

-  </body>

-  

-</document>

-

diff --git a/trunk/pluto-container/src/test/java/org/apache/pluto/core/PortletContextManagerTest.java b/trunk/pluto-container/src/test/java/org/apache/pluto/core/PortletContextManagerTest.java
deleted file mode 100644
index a1a1425..0000000
--- a/trunk/pluto-container/src/test/java/org/apache/pluto/core/PortletContextManagerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.apache.pluto.core;
-
-import junit.framework.TestCase;
-
-import javax.servlet.ServletContext;
-
-//import org.easymock.EasyMock;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-
-public class PortletContextManagerTest extends TestCase {
-
-    private PortletContextManager manager;
-    private ServletContext context;
-
-    public void setUp() {
-        /* Java5 Required!
-        context = EasyMock.createMock(ServletContext.class);
-        */
-        manager = PortletContextManager.getManager();
-    }
-
-    public void testComputeContextPath() throws MalformedURLException {
-        /* Java5 Required!
-            URL url = new URL("file://usr/local/apache-tomcat-5.1.19/webapps/my-test-context/WEB-INF/web.xml");
-            EasyMock.expect(context.getResource("/WEB-INF/web.xml")).andReturn(url);
-            EasyMock.replay(context);
-            assertEquals("/my-test-context", manager.computeContextPath(context));
-            EasyMock.verify(context);
-
-
-            EasyMock.reset(context);
-            url = new URL("file://usr/local/apache-tomcat-5.1.19/webapps/my-test-context.war!/WEB-INF/web.xml");
-            EasyMock.expect(context.getResource("/WEB-INF/web.xml")).andReturn(url);
-            EasyMock.replay(context);
-            assertEquals("/my-test-context", manager.computeContextPath(context));
-        */
-        }
-}
diff --git a/trunk/pluto-container/src/test/java/org/apache/pluto/internal/impl/EnvironmentTest.java b/trunk/pluto-container/src/test/java/org/apache/pluto/internal/impl/EnvironmentTest.java
deleted file mode 100644
index 14cea2c..0000000
--- a/trunk/pluto-container/src/test/java/org/apache/pluto/internal/impl/EnvironmentTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import java.util.Properties;

-

-import org.apache.pluto.util.PlutoTestCase;

-

-/**

- * Test Class

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since June 1, 2005

- */

-public class EnvironmentTest extends PlutoTestCase {

-

-    private Properties props;

-

-    public void setUp() throws Exception {

-        props = new Properties();

-        props.load(Environment.class.getResourceAsStream("/org/apache/pluto/environment.properties"));

-    }

-

-    public void testContainerMajorVersion() {

-        assertEquals(props.getProperty("pluto.container.version.major"), Environment.getPortletContainerMajorVersion());

-    }

-

-    public void testContainerMinorVersion() {

-        assertEquals(props.getProperty("pluto.container.version.minor"), Environment.getPortletContainerMinorVersion());

-    }

-

-    public void testContainerName() {

-        assertEquals(props.getProperty("pluto.container.name"), Environment.getPortletContainerName());

-    }

-

-    public void testSpecVersion() {

-        assertEquals(Integer.parseInt(props.getProperty("javax.portlet.version.major")), Environment.getMajorSpecificationVersion());

-    }

-

-    public void testSpecMinorVersion() {

-        assertEquals(Integer.parseInt(props.getProperty("javax.portlet.version.minor")), Environment.getMinorSpecificationVersion());

-    }

-

-    public void testServerInfo() {

-        assertContains("Server Info does not contain container name.", props.getProperty("pluto.container.name"), Environment.getServerInfo());

-        assertContains("Server Info does not contain container name.", props.getProperty("pluto.container.version.major"), Environment.getServerInfo());

-        assertContains("Server Info does not contain container name.", props.getProperty("pluto.container.version.minor"), Environment.getServerInfo());

-    }

-}

diff --git a/trunk/pluto-container/src/test/java/org/apache/pluto/internal/impl/ResourceBundleFactoryTest.java b/trunk/pluto-container/src/test/java/org/apache/pluto/internal/impl/ResourceBundleFactoryTest.java
deleted file mode 100644
index 23bf9eb..0000000
--- a/trunk/pluto-container/src/test/java/org/apache/pluto/internal/impl/ResourceBundleFactoryTest.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.internal.impl;

-

-import org.apache.pluto.util.PlutoTestCase;

-import org.apache.pluto.descriptors.portlet.PortletDD;

-import org.apache.pluto.descriptors.portlet.PortletInfoDD;

-

-import java.util.ListResourceBundle;

-import java.util.Locale;

-import java.util.ResourceBundle;

-

-import junit.framework.Assert;

-

-/**

- * Unit test for the resource bundle factory.

- * @author ddewolf@apache.org

- * @since Jul 30, 2005

- */

-public class ResourceBundleFactoryTest extends PlutoTestCase {

-

-    private PortletDD validDD;

-

-    public void setUp() throws Exception {

-        super.setUp();

-

-        validDD = new PortletDD();

-

-        PortletInfoDD info = new PortletInfoDD();

-        info.setTitle("Info Title");

-        info.setShortTitle("Info Short Title");

-        info.setKeywords("Info Keywords");

-        validDD.setPortletInfo(info);

-        

-        validDD.setResourceBundle(TestResourceBundle.class.getName());

-    }

-

-    public void tearDown() throws Exception {

-        super.setUp();

-        validDD = null;

-    }

-

-    public void testGetBundleAllSpecified() {

-        ResourceBundleFactory factory = new ResourceBundleFactory(validDD);

-        ResourceBundle bundle = factory.getResourceBundle(Locale.getDefault());

-

-        Assert.assertEquals("Bundle Title", bundle.getString("javax.portlet.title"));

-        Assert.assertEquals("Bundle Short Title", bundle.getString("javax.portlet.short-title"));

-        Assert.assertEquals("Bundle Keywords", bundle.getString("javax.portlet.keywords"));

-    }

-

-    public void testGetResourceBundleNoBundle() {

-        validDD.setResourceBundle(null);

-        ResourceBundleFactory factory = new ResourceBundleFactory(validDD);

-        ResourceBundle bundle = factory.getResourceBundle(Locale.getDefault());

-

-        Assert.assertEquals("Info Title", bundle.getString("javax.portlet.title"));

-        Assert.assertEquals("Info Short Title", bundle.getString("javax.portlet.short-title"));

-        Assert.assertEquals("Info Keywords", bundle.getString("javax.portlet.keywords"));

-    }

-

-    public void testGetResourceBundleNoInfo() {

-        validDD.setPortletInfo(null);

-        ResourceBundleFactory factory = new ResourceBundleFactory(validDD);

-        ResourceBundle bundle = factory.getResourceBundle(Locale.getDefault());

-

-        Assert.assertEquals("Bundle Title", bundle.getString("javax.portlet.title"));

-        Assert.assertEquals("Bundle Short Title", bundle.getString("javax.portlet.short-title"));

-        Assert.assertEquals("Bundle Keywords", bundle.getString("javax.portlet.keywords"));

-    }

-

-    public void testGetResourceBundleNoBundleNullValues() {

-        validDD.setResourceBundle(null);

-        validDD.getPortletInfo().setTitle(null);

-        validDD.getPortletInfo().setShortTitle(null);

-        validDD.getPortletInfo().setKeywords(null);

-        ResourceBundleFactory factory = new ResourceBundleFactory(validDD);

-        ResourceBundle bundle = factory.getResourceBundle(Locale.getDefault());

-

-        try {

-            Assert.assertEquals(null, bundle.getString("javax.portlet.title"));

-            fail("Exception should have been thrown.");

-        }

-        catch(Throwable t) {

-

-        }

-

-        try {

-            Assert.assertEquals(null, bundle.getString("javax.portlet.short-title"));

-            fail("Exception should have been throw.");

-        }

-        catch(Throwable t) {

-

-        }

-

-        try {

-            Assert.assertEquals(null, bundle.getString("javax.portlet.keywords"));

-            fail("Exception should have been thrown.");

-        }

-        catch(Throwable t) {

-

-        }

-    }

-

-

-    public static class TestResourceBundle extends ListResourceBundle {

-        

-        private Object[][] contents = {

-            {"javax.portlet.title", "Bundle Title"},

-            {"javax.portlet.short-title", "Bundle Short Title"},

-            {"javax.portlet.keywords", "Bundle Keywords"}

-        };

-

-        protected Object[][] getContents() {

-            return contents;

-        }

-    }

-

-

-

-}

diff --git a/trunk/pluto-container/src/test/java/org/apache/pluto/util/ArgumentUtilityTest.java b/trunk/pluto-container/src/test/java/org/apache/pluto/util/ArgumentUtilityTest.java
deleted file mode 100644
index 42a5ed6..0000000
--- a/trunk/pluto-container/src/test/java/org/apache/pluto/util/ArgumentUtilityTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util;

-

-

-

-/**

- * Test Class

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since June 1, 2005

- */

-public class ArgumentUtilityTest extends PlutoTestCase {

-

-    public void testValidateNotNullWhenNull()

-    throws Exception {

-        Object[] parameters = new Object[] {"arg", null};

-        assertException(new ArgumentUtility(), "validateNotNull",

-                        parameters, IllegalArgumentException.class);

-    }

-

-    public void testValidateNotNullWhenNotNull() {

-        ArgumentUtility.validateNotNull("arg", "notnull");

-    }

-

-    public void testValidateNotNullOrEmptyWhenNull() {

-

-        Object[] parameters = new Object[] {"arg", null};

-        Class[] parameterTypes = new Class[] { String.class, String.class };

-        assertException(new ArgumentUtility(), "validateNotEmpty",

-                        parameterTypes,

-                        parameters, IllegalArgumentException.class);

-    }

-

-    public void testValidateNotNullOrEmptyWhenEmpty() {

-

-        Object[] parameters = new Object[] {"arg", ""};

-        assertException(new ArgumentUtility(), "validateNotEmpty",

-                        parameters, IllegalArgumentException.class);

-    }

-

-    public void testValidateNotNullOrEmptyWhenValid() {

-        ArgumentUtility.validateNotEmpty("arg", "notempty");

-    }

-

-}

diff --git a/trunk/pluto-container/src/test/java/org/apache/pluto/util/PlutoTestCase.java b/trunk/pluto-container/src/test/java/org/apache/pluto/util/PlutoTestCase.java
deleted file mode 100644
index 45e02f3..0000000
--- a/trunk/pluto-container/src/test/java/org/apache/pluto/util/PlutoTestCase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util;

-

-import java.lang.reflect.Method;

-import java.lang.reflect.InvocationTargetException;

-

-import org.jmock.MockObjectTestCase;

-

-/**

- * Test Class

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since June 1, 2005

- */

-public abstract class PlutoTestCase extends MockObjectTestCase {

-

-    public void setUp() throws Exception {

-        System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");

-        System.setProperty("org.apache.commons.logging.simplelog.defaultlog", "ERROR");

-    }

-

-    protected void assertException(Object target, String methodName,

-                                 Object[] parameters, Class exceptionType) {

-            Class[] parameterClasses = new Class[parameters.length];

-            for(int i=0;i<parameters.length;i++) {

-                parameterClasses[i] = parameters[i]==null?Object.class:parameters[i].getClass();

-            }

-        assertException(target, methodName, parameterClasses, parameters, exceptionType);

-    }

-

-    protected void assertException(Object target, String methodName,

-                                 Class[] parameterClasses,

-                                 Object[] parameters, Class exceptionType) {

-        try {

-            Class targetClass = target.getClass();

-            Method method = targetClass.getMethod(methodName, parameterClasses);

-            method.invoke(target, parameters);

-        }

-        catch(InvocationTargetException ite) {

-            Throwable t = ite.getTargetException();

-            if(!t.getClass().equals(exceptionType)) {

-                fail("Incorrect Exception thrown.  Expected: "+exceptionType.getName()+", recieved "+t.getClass().getName());

-            }

-        }

-        catch(Throwable t) {

-            fail("Invalid Test.  Reflection invocation and setup failed.");

-        }

-    }

-

-    protected void assertContains(String message, String expectedSubstring,

-                                  String testString) {

-        if (testString.indexOf(expectedSubstring) < 0) {

-            fail(message);

-        } 

-    }

-}

diff --git a/trunk/pluto-container/src/test/java/org/apache/pluto/util/StringUtilsTest.java b/trunk/pluto-container/src/test/java/org/apache/pluto/util/StringUtilsTest.java
deleted file mode 100644
index be476c7..0000000
--- a/trunk/pluto-container/src/test/java/org/apache/pluto/util/StringUtilsTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util;

-

-import java.util.Map;

-import java.util.Iterator;

-

-/**

- * Test Class

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since June 1, 2005

- */

-public class StringUtilsTest extends PlutoTestCase {

-

-    public void testReplaceAtBegin() {

-        assertEquals("ReplacedValue", StringUtils.replace("___lacedValue", "___", "Rep"));

-    }

-

-    public void testReplaceAtEnd() {

-        assertEquals("ReplacedValue", StringUtils.replace("ReplacedVa***", "***", "lue"));

-    }

-

-    public void testReplaceInMiddle() {

-        assertEquals("ReplacedValue", StringUtils.replace("Rep(###)Value", "(###)", "laced"));

-    }

-

-    public void testReplaceMultiples() {

-        assertEquals("ReplacedValueReplacedValue", StringUtils.replace("Rep(###)ValueRep(###)Value", "(###)", "laced"));

-    }

-

-    public void testCopy() {

-        String[] original  = new String[] {"one", "two", "three", "four", "five"};

-        String[] results = StringUtils.copy(original);

-        for(int i=0;i<original.length;i++) {

-            assertEquals(original[i], results[i]);

-        }

-    }

-

-    public void testCopyMap() {

-        Map original = new java.util.HashMap();

-        original.put("one", new String[] { "two"});

-        original.put("three", new String[] { "four"});

-        original.put("five", new String[] { "six"});

-        original.put("seven", new String[] { String.valueOf(8), String.valueOf(9) } );

-

-        Map results = StringUtils.copyParameters(original);

-        assertEquals("Map sizes are inconsistent", original.size(), results.size());

-        Iterator it = original.keySet().iterator();

-        while(it.hasNext()) {

-            Object key = it.next();

-            String[] originalValue = (String[])original.get(key);

-            String[] newValue = (String[])results.get(key);

-

-            assertNotNull(originalValue);

-            assertNotNull(newValue);

-            assertEquals(originalValue.length, newValue.length);

-            for(int i=0;i<i++;i++) {

-                assertEquals(originalValue[i], newValue[i]);

-            }

-        }

-    }

-}

diff --git a/trunk/pluto-container/src/test/java/org/apache/pluto/util/impl/NamespaceMapperImplTest.java b/trunk/pluto-container/src/test/java/org/apache/pluto/util/impl/NamespaceMapperImplTest.java
deleted file mode 100644
index 5d104fa..0000000
--- a/trunk/pluto-container/src/test/java/org/apache/pluto/util/impl/NamespaceMapperImplTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.impl;

-

-import org.apache.pluto.PortletWindowID;

-import org.apache.pluto.util.PlutoTestCase;

-import org.apache.pluto.util.NamespaceMapper;

-

-/**

- * Test Class

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since June 1, 2005

- */

-public class NamespaceMapperImplTest extends PlutoTestCase {

-

-    private NamespaceMapper mapper = new NamespaceMapperImpl();

-    private PortletWindowID id1;

-    private PortletWindowID id2;

-

-    public void setUp() throws Exception {

-        super.setUp();

-        id1 = new InternalPortletWindowID();

-        id2 = new InternalPortletWindowID();

-    }

-

-    public void testEncodeUniquenessWithSameName() {

-        String mappedA = mapper.encode(id1, "testNumber1");

-        String mappedB = mapper.encode(id2, "testNumber1");

-        assertFalse(mappedA.equals(mappedB));

-    }

-

-    public void testEncodeUniquenessWithSameObjectID() {

-        String mappedA = mapper.encode(id1, "testNumber1");

-        String mappedB = mapper.encode(id1, "testNumber2");

-        assertFalse(mappedA.equals(mappedB));

-    }

-

-    public void testDecode() {

-        String original = "original";

-        String mappedA = mapper.encode(id1, original);

-        assertEquals(original, mapper.decode(id1, mappedA));

-    }

-

-    public void testDecodeInvalidId() {

-        assertNull(mapper.decode(id1, mapper.encode(id2, "test")));

-    }

-

-    private static int objectIDCounter = 1;

-    

-    

-    private class InternalPortletWindowID implements PortletWindowID {

-    	

-        private int id;

-

-        public InternalPortletWindowID() {

-            id = objectIDCounter++;

-        }

-

-        public String getStringId() {

-            return "uniqueId"+id;

-        }

-    }

-}

diff --git a/trunk/pluto-descriptor-api/pom.xml b/trunk/pluto-descriptor-api/pom.xml
deleted file mode 100644
index 228b79e..0000000
--- a/trunk/pluto-descriptor-api/pom.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 2005-2006 The Apache Software Foundation
-
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  
-  <parent>
-    <groupId>org.apache.pluto</groupId>
-    <artifactId>pluto</artifactId>
-    <version>1.1.0-SNAPSHOT</version>
-  </parent>
-  
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>pluto-descriptor-api</artifactId>
-  <packaging>jar</packaging>
-  <name>Pluto Descriptor Service API</name>
-  
-  <dependencies>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>${junit.version}</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-  
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-site-plugin</artifactId>
-        <configuration>
-          <resourcesDirectory>${basedir}/../pluto-site/src/site/resources</resourcesDirectory>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/trunk/pluto-descriptor-api/src/assemble/bin.xml b/trunk/pluto-descriptor-api/src/assemble/bin.xml
deleted file mode 100644
index ae17e12..0000000
--- a/trunk/pluto-descriptor-api/src/assemble/bin.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<assembly>

-  <id>bin</id>

-  <formats>

-    <format>tar.gz</format>

-    <format>tar.bz2</format>

-    <format>zip</format>

-  </formats>

-  <fileSets>

-    <fileSet>

-      <includes>

-        <include>README*</include>

-        <include>LICENSE*</include>

-        <include>NOTICE*</include>

-      </includes>

-    </fileSet>

-    <fileSet>

-      <directory>target</directory>

-      <outputDirectory></outputDirectory>

-      <includes>

-        <include>*.jar</include>

-      </includes>

-    </fileSet>

-  </fileSets>

-  <dependencySets>

-

-  </dependencySets>

-</assembly>

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/common/IconDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/common/IconDD.java
deleted file mode 100644
index d8f2293..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/common/IconDD.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.common;

-

-/**

- * Resource Icon configuration.

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: IconDD.java 157038 2005-03-11 03:44:40Z ddewolf $

- * @since Feb 28, 2005

- */

-public class IconDD{

-

-    /** The large icon uri. */

-    private String largeIcon;

-

-    /** The small icon uri. */

-    private String smallIcon;

-

-    /**

-     * Default Constructor.

-     */

-    public IconDD() {

-

-    }

-

-    /**

-     * Retrieve the large icon uri.

-     * @return the uri to the large icon (relative to the context path).

-     */

-    public String getLargeIcon() {

-        return largeIcon;

-    }

-

-    /**

-     * Set the large icon uri.

-     * @param largeIcon the relative path to the icon resource.

-     */

-    public void setLargeIcon(String largeIcon) {

-        this.largeIcon = largeIcon;

-    }

-

-    /**

-     * Retrieve the small icon uri.

-     * @return the uri to the small icon (relative to the context path).

-     */

-    public String getSmallIcon() {

-        return smallIcon;

-    }

-

-    /**

-     * Set the small Icon uri.

-     * @param smallIcon the relative path to the icon resource.

-     */

-    public void setSmallIcon(String smallIcon) {

-        this.smallIcon = smallIcon;

-    }

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/common/InitParamDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/common/InitParamDD.java
deleted file mode 100644
index 1b3ec7c..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/common/InitParamDD.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.common;

-

-/**

- * Initialization Parameter configuration.

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: InitParamDD.java 157038 2005-03-11 03:44:40Z ddewolf $

- * @since Feb 28, 2005

- */

-public class InitParamDD {

-

-    /** The name of the parameter. */

-    private String paramName;

-

-    /** The value of the parameter. */

-    private String paramValue;

-

-    /** The description of the parameter. */

-    private String description;

-

-    /**

-     * Default Constructor.

-     */

-    public InitParamDD() {

-

-    }

-

-    /**

-     * Retrieve the name of the parameter.

-     * @return

-     */

-    public String getParamName() {

-        return paramName;

-    }

-

-    /**

-     * Set the name of the parameter.

-     * @param paramName

-     */

-    public void setParamName(String paramName) {

-        this.paramName = paramName;

-    }

-

-    /**

-     * Get the name of the parameter.

-     * @return

-     */

-    public String getParamValue() {

-        return paramValue;

-    }

-

-    /**

-     * Set the value of the parameter.

-     * @param paramValue

-     */

-    public void setParamValue(String paramValue) {

-        this.paramValue = paramValue;

-    }

-

-    /**

-     * Retrieve the description.

-     * @return

-     */

-    public String getDescription() {

-        return description;

-    }

-

-    /**

-     * Set the description of the parameter.

-     * @param description

-     */

-    public void setDescription(String description) {

-        this.description = description;

-    }

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/common/SecurityRoleRefDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/common/SecurityRoleRefDD.java
deleted file mode 100644
index 29f2ec3..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/common/SecurityRoleRefDD.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.common;

-

-/**

- * Security Role Reference Configuration.

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: SecurityRoleRefDD.java 157038 2005-03-11 03:44:40Z ddewolf $

- * @since Feb 28, 2005

- */

-public class SecurityRoleRefDD {

-

-    /** The name of the role reference. */

-    private String roleName;

-

-    /** The role to which the reference is linked. */

-    private String roleLink;

-

-    /** The description of what the role is utilized for. */

-    private String description;

-

-    /**

-     * Default Constructor.

-     */

-    public SecurityRoleRefDD() {

-

-    }

-

-    /**

-     * Retrieve the name of the role reference.

-     * @return

-     */

-    public String getRoleName() {

-        return roleName;

-    }

-

-    /**

-     * Set the name of the role reference.

-     * @param roleName

-     */

-    public void setRoleName(String roleName) {

-        this.roleName = roleName;

-    }

-

-    /**

-     * Retrieve then role to which the reference is linked.

-     * @return

-     */

-    public String getRoleLink() {

-        return roleLink;

-    }

-

-    /**

-     * Set the role to which the reference is linked.

-     * @param roleLink

-     */

-    public void setRoleLink(String roleLink) {

-        this.roleLink = roleLink;

-    }

-

-    /**

-     * Retrieve the description of the role reference.

-     * @return

-     */

-    public String getDescription() {

-        return description;

-    }

-

-    /**

-     * Set the description of the role reference.

-     * @param description

-     */

-    public void setDescription(String description) {

-        this.description = description;

-    }

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/common/package.html b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/common/package.html
deleted file mode 100644
index b73328b..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/common/package.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<HTML>

-<BODY>

-Common deployment descriptor elements used in many descriptors.

-</BODY>

-</HTML>
\ No newline at end of file
diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/package.html b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/package.html
deleted file mode 100644
index 1cdc80d..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/package.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<HTML>

-<BODY>

-Object Model and Read/Write Services for deployment descriptors.

-Specifically used to represent web.xml and portlet.xml files.

-</BODY>

-</HTML>
\ No newline at end of file
diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletAppDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletAppDD.java
deleted file mode 100644
index c885ff9..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletAppDD.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.portlet;

-

-import java.util.ArrayList;

-import java.util.List;

-

-/**

- * Portlet Application Configuration.

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: PortletAppDD.java 157475 2005-03-14 22:13:18Z ddewolf $

- * @since Mar 6, 2005

- */

-public class PortletAppDD {

-

-    /** The defined portlets within the system. */

-    private List portlets = new ArrayList();

-

-    /**

-     * Default Constructor.

-     */

-    public PortletAppDD() {

-    }

-

-    /**

-     * Retrieve the portlets which exist within this application.

-     * @return

-     */

-    public List getPortlets() {

-        return portlets;

-    }

-

-    /**

-     * Set the portlets that exist within this application.

-     * @param portlets

-     */

-    public void setPortlets(List portlets) {

-        this.portlets = portlets;

-    }

-

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletDD.java
deleted file mode 100644
index 16a07ef..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletDD.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.portlet;

-

-import java.util.List;

-import java.util.ArrayList;

-

-/**

- * Bare bones implementation of the Portlet descriptor.

- * 

- * FIXME: Hmmm... What do you mean, David?  --ZHENG Zhong

- * 

- * Eventually this should be flushed out :), but for the sake of timing I'll be lazy for now.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * 

- * @since Mar 6, 2005

- */

-public class PortletDD {

-	

-	// Private Member Variables ------------------------------------------------

-	

-    /** The unique name of the portlet. */

-    private String portletName = null;

-

-    /** The class which implements the portlet interface. */

-    private String portletClass = null;

-

-    private String resourceBundle = null;

-

-    private PortletInfoDD portletInfo = null;

-

-    private PortletPreferencesDD portletPreferences = new PortletPreferencesDD();

-

-    private List initParams = new ArrayList();

-

-    private List supports = new ArrayList();

-

-    /** All security role references. */

-    private List securityRoleRefs = new ArrayList();

-    

-    

-    // Constructor -------------------------------------------------------------

-    

-    /**

-     * Default no-arg constructor.

-     */

-    public PortletDD() {

-    	// Do nothing.

-    }

-    

-    

-    // Public Methods ----------------------------------------------------------

-    

-    /**

-     * Retrieve the unique name of the portlet.

-     * @return

-     */

-    public String getPortletName() {

-        return portletName;

-    }

-

-    /**

-     * Set the unique name of the portlet.

-     * @param portletName Value of the portlet-name element for this portlet in portlet.xml.

-     * @throws IllegalArgumentException if the name has a period since it is used

-     * to create the portlet ID in <code>PortletWindowConfig.createPortletId()</code>

-     * using a dot to separate the context path from the portlet name.

-     * @see PortletWindowConfig#createPortletId(String, String)

-     */

-    public void setPortletName(String portletName) {

-    	if (portletName.indexOf('.') != -1) {

-    		throw new IllegalArgumentException("Portlet name must not have a dot(period). Please remove the dot from the value of the portlet-name element ("+ portletName + ") in portlet.xml");

-    	}

-        this.portletName = portletName;

-    }

-

-    /**

-     * Retrieve the name of the portlet class.

-     * @return the fully qualified portlet class name.

-     */

-    public String getPortletClass() {

-        return portletClass;

-    }

-

-    /**

-     * Set the name of the portlet class.

-     * @param portletClass

-     */

-    public void setPortletClass(String portletClass) {

-        this.portletClass = portletClass;

-    }

-

-    public String getResourceBundle() {

-        return resourceBundle;

-    }

-

-    public void setResourceBundle(String resourceBundle) {

-        this.resourceBundle = resourceBundle;

-    }

-

-    public PortletInfoDD getPortletInfo() {

-        return portletInfo;

-    }

-

-    public void setPortletInfo(PortletInfoDD portletInfo) {

-        this.portletInfo = portletInfo;

-    }

-

-    public List getSupports() {

-        return supports;

-    }

-

-    public void setSupports(List supports) {

-        this.supports = supports;

-    }

-

-    public List getInitParams() {

-        return initParams;

-    }

-

-    public void setInitParams(List initParams) {

-        this.initParams = initParams;

-    }

-

-    public PortletPreferencesDD getPortletPreferences() {

-        return portletPreferences;

-    }

-

-    public void setPortletPreferences(PortletPreferencesDD portletPreferences) {

-        this.portletPreferences = portletPreferences;

-    }

-

-    /**

-     * Retrieve the security role references for this portlet.

-     * @return

-     */

-    public List getSecurityRoleRefs() {

-        return securityRoleRefs;

-    }

-

-    /**

-     * Set the security role references for this portlet.

-     * @param securityRoleRefs

-     */

-    public void setSecurityRoleRefs(List securityRoleRefs) {

-        this.securityRoleRefs = securityRoleRefs;

-    }

-    

-    

-    // Object Methods ----------------------------------------------------------

-    

-    /**

-     * Returns a string representation of this instance.

-     * FIXME: more info!

-     * @return a string representation of this instance.

-     */

-    public String toString() {

-    	StringBuffer buffer = new StringBuffer();

-    	buffer.append(getClass().getName());

-    	buffer.append("[portletName=").append(portletName);

-    	buffer.append(",portletClass=").append(portletClass);

-    	// TODO:

-    	return buffer.toString();

-    }

-    

-    /**

-     * Returns the hash code for this instance.

-     * @return the hash code for this instance.

-     */

-    public int hashCode() {

-    	return toString().hashCode();

-    }

-    

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletInfoDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletInfoDD.java
deleted file mode 100644
index 89454d7..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletInfoDD.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.portlet;

-

-/**

- * Implementation of the Portlet Info descriptor element.

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @since 1.1.0-SNAPSHOT

- */

-public class PortletInfoDD {

-    private String title;

-    private String shortTitle;

-    private String keywords;

-

-    public String getTitle() {

-        return title;

-    }

-

-    public void setTitle(String title) {

-        this.title = title;

-    }

-

-    public String getKeywords() {

-        return keywords;

-    }

-

-    public void setKeywords(String keywords) {

-        this.keywords = keywords;

-    }

-

-    public String getShortTitle() {

-        return shortTitle;

-    }

-

-    public void setShortTitle(String shortTitle) {

-        this.shortTitle = shortTitle;

-    }

-

-}

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletPreferenceDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletPreferenceDD.java
deleted file mode 100644
index febbceb..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletPreferenceDD.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.portlet;

-

-import java.util.List;

-import java.util.ArrayList;

-

-/**

- * Portlet preference definition in portlet.xml.

- * 

- * @see PortletPreferencesDD

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @since Jun 29, 2005

- */

-public class PortletPreferenceDD {

-	

-	/** The preference name. */

-    private String name = null;

-    

-    /** The preference values. */

-    private List values = new ArrayList();

-    

-    /** Flag indicating if this preference is marked as read-only. */

-    private boolean readOnly = false;

-    

-    

-    // Public Methods ----------------------------------------------------------

-    

-    public String getName() {

-        return name;

-    }

-

-    public void setName(String name) {

-        this.name = name;

-    }

-

-    public List getValues() {

-        return values;

-    }

-    

-    public void setValues(List values) {

-        this.values = values;

-    }

-    

-    public boolean isReadOnly() {

-    	return readOnly;

-    }

-    

-    public void setReadOnly(boolean readOnly) {

-    	this.readOnly = readOnly;

-    }

-    

-}

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletPreferencesDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletPreferencesDD.java
deleted file mode 100644
index 04b7fcc..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/PortletPreferencesDD.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.portlet;

-

-import java.util.List;

-import java.util.ArrayList;

-

-/**

- * Portlet preferences definition in portlet.xml.

- *

- * @see PortletPreferenceDD

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @since Jun 29, 2005

- */

-public class PortletPreferencesDD {

-	

-	/** List of portlet preferences. */

-    private List portletPreferences = new ArrayList();

-    

-    /** Portlet preferences validator class name. */

-    private String preferencesValidator;

-

-    public List getPortletPreferences() {

-        return portletPreferences;

-    }

-

-    public void setPortletPreferences(List portletPreferences) {

-        this.portletPreferences = portletPreferences;

-    }

-

-    public String getPreferencesValidator() {

-        return preferencesValidator;

-    }

-

-    public void setPreferencesValidator(String preferencesValidator) {

-        this.preferencesValidator = preferencesValidator;

-    }

-}

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/SupportsDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/SupportsDD.java
deleted file mode 100644
index dea7a8b..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/portlet/SupportsDD.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.portlet;

-

-import java.util.List;

-import java.util.ArrayList;

-

-/**

- * Representation of the supports element within the portlet.xml

- * 

- */

-public class SupportsDD {

-

-    private String mimeType;

-    private List portletModes = new ArrayList();

-

-    public String getMimeType() {

-        return mimeType;

-    }

-

-    public void setMimeType(String mimeType) {

-        this.mimeType = mimeType;

-    }

-

-    public List getPortletModes() {

-        return portletModes;

-    }

-

-    public void setPortletModes(List portletModes) {

-        this.portletModes = portletModes;

-    }

-}

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/services/Constants.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/services/Constants.java
deleted file mode 100644
index 5249f80..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/services/Constants.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.services;

-

-/**

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: Constants.java 156636 2005-03-09 12:16:31Z cziegeler $

- * @since Mar 7, 2005

- */

-public class Constants {

-

-    public static final String WEB_XML_PUBLIC_ID = "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN";

-    public static final String WEB_XML_DTD = "http://java.sun.com/dtd/web-app_2_3.dtd";

-

-    public static final String PORLTET_XML_PUBLIC_ID = "-//Sun Microsystems, Inc.//DTD PortletApplication 1.0//EN";

-    public static final String PORTLET_XML_DTD = "http://java.sun.com/dtd/portlet-app_1_0.dtd";

-

-    private Constants() {

-

-    }

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/services/PortletAppDescriptorService.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/services/PortletAppDescriptorService.java
deleted file mode 100644
index dd3c9ef..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/services/PortletAppDescriptorService.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-

-package org.apache.pluto.descriptors.services;

-

-import org.apache.pluto.descriptors.portlet.PortletAppDD;

-

-import java.io.IOException;

-import java.io.InputStream;

-import java.io.OutputStream;

-

-/**

- * Read/Write services for Portlet Application configuration

- * This service reads the portlet.xml and converts it to a

- * standard bean model.

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: PortletAppDescriptorService.java 157038 2005-03-11 03:44:40Z ddewolf $

- * @since Mar 6, 2005

- */

-public interface PortletAppDescriptorService {

-

-    /**

-     * Retrieve the PortletApp deployment descriptor

-     * (portlet.xml).

-     * @return Object representation of the descriptor.

-     * @throws IOException if an IO error occurs.

-     */

-    PortletAppDD read(InputStream in) throws IOException;

-

-    /**

-     * Write the PortletApp deployment descriptor

-     * (portlet.xml).

-     * @param portletDescriptor

-     * @param out

-     * @throws IOException if an IO error occurs.

-     */

-    void write(PortletAppDD portletDescriptor, OutputStream out) throws IOException;

-}

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/services/WebAppDescriptorService.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/services/WebAppDescriptorService.java
deleted file mode 100644
index bc2f769..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/services/WebAppDescriptorService.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.services;

-

-import org.apache.pluto.descriptors.servlet.WebAppDD;

-

-import java.io.IOException;

-import java.io.InputStream;

-import java.io.OutputStream;

-

-/**

- * WebApplication configuration as contained

- * within the web.xml Deployment Descriptor.

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: WebAppDescriptorService.java 157038 2005-03-11 03:44:40Z ddewolf $

- * @since Feb 28, 2005

- */

-public interface WebAppDescriptorService {

-

-    /**

-     * Retrieve the WebApp deployment descriptor

-     * (web.xml).

-     * @return Object representation of the descriptor.

-     * @throws IOException if an IO error occurs.

-     */ 

-    WebAppDD read(InputStream in) throws IOException;

-

-    /**

-     * Write the WebApp deployment descriptor

-     * (web.xml).

-     * @param dd

-     * @param out output stream to which the descriptor should be written

-     * @throws IOException if an IO error occurs.

-     */

-    void write(WebAppDD dd, OutputStream out) throws IOException;

-}

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/AuthConstraintDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/AuthConstraintDD.java
deleted file mode 100644
index db81697..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/AuthConstraintDD.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-/**

- * <B>TODO</B>: Document

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: AuthConstraintDD.java 156636 2005-03-09 12:16:31Z cziegeler $

- * @since Feb 28, 2005

- */

-public class AuthConstraintDD {

-

-    private String description;

-    private String roleName;

-

-    public AuthConstraintDD() {

-

-    }

-

-    public String getDescription() {

-        return description;

-    }

-

-    public void setDescription(String description) {

-        this.description = description;

-    }

-

-    public String getRoleName() {

-        return roleName;

-    }

-

-    public void setRoleName(String roleName) {

-        this.roleName = roleName;

-    }

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/EjbRefDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/EjbRefDD.java
deleted file mode 100644
index b0ce357..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/EjbRefDD.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-/**

- * <B>TODO</B>: Document

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: EjbRefDD.java 156636 2005-03-09 12:16:31Z cziegeler $

- * @since Feb 28, 2005

- */

-public class EjbRefDD {

-

-    private String description;

-    private String ejbRefName;

-    private String ejbRefType;

-    private String home;

-    private String remote;

-    private String ejbLink;

-    private String runAs;

-

-    public EjbRefDD() {

-

-    }

-

-    public String getDescription() {

-        return description;

-    }

-

-    public void setDescription(String description) {

-        this.description = description;

-    }

-

-    public String getEjbRefName() {

-        return ejbRefName;

-    }

-

-    public void setEjbRefName(String ejbRefName) {

-        this.ejbRefName = ejbRefName;

-    }

-

-    public String getEjbRefType() {

-        return ejbRefType;

-    }

-

-    public void setEjbRefType(String ejbRefType) {

-        this.ejbRefType = ejbRefType;

-    }

-

-    public String getHome() {

-        return home;

-    }

-

-    public void setHome(String home) {

-        this.home = home;

-    }

-

-    public String getRemote() {

-        return remote;

-    }

-

-    public void setRemote(String remote) {

-        this.remote = remote;

-    }

-

-    public String getEjbLink() {

-        return ejbLink;

-    }

-

-    public void setEjbLink(String ejbLink) {

-        this.ejbLink = ejbLink;

-    }

-

-    public String getRunAs() {

-        return runAs;

-    }

-

-    public void setRunAs(String runAs) {

-        this.runAs = runAs;

-    }

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/EnvEntryDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/EnvEntryDD.java
deleted file mode 100644
index ae554d7..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/EnvEntryDD.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-/**

- * <B>TODO</B>: Document

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: EnvEntryDD.java 156636 2005-03-09 12:16:31Z cziegeler $

- * @since Feb 28, 2005

- */

-public class EnvEntryDD {

-

-    private String description;

-    private String envEntryName;

-    private String envEntryValue;

-    private String envEntryType;

-

-    public EnvEntryDD() {

-

-    }

-

-    public String getDescription() {

-        return description;

-    }

-

-    public void setDescription(String description) {

-        this.description = description;

-    }

-

-    public String getEnvEntryName() {

-        return envEntryName;

-    }

-

-    public void setEnvEntryName(String envEntryName) {

-        this.envEntryName = envEntryName;

-    }

-

-    public String getEnvEntryValue() {

-        return envEntryValue;

-    }

-

-    public void setEnvEntryValue(String envEntryValue) {

-        this.envEntryValue = envEntryValue;

-    }

-

-    public String getEnvEntryType() {

-        return envEntryType;

-    }

-

-    public void setEnvEntryType(String envEntryType) {

-        this.envEntryType = envEntryType;

-    }

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/ErrorPageDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/ErrorPageDD.java
deleted file mode 100644
index 5528ef5..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/ErrorPageDD.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*

- * Copyright 2005 The Apache Software FoundationType

- *

- * Licensed under the Apache License, VersionType 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissionTypes and

- * limitationTypes under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-/**

- * <B>TODO</B>: Document

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: ErrorPageDD.java 156636 2005-03-09 12:16:31Z cziegeler $

- * @since Mar 4, 2005

- */

-public class ErrorPageDD {

-

-    private String errorCode;

-    private String exceptionType;

-    private String location;

-

-    public ErrorPageDD() {

-

-    }

-

-    public String getErrorCode() {

-        return errorCode;

-    }

-

-    public void setErrorCode(String errorCode) {

-        this.errorCode = errorCode;

-    }

-

-    public String getExceptionType() {

-        return exceptionType;

-    }

-

-    public void setExceptionType(String exceptionType) {

-        this.exceptionType = exceptionType;

-    }

-

-    public String getLocation() {

-        return location;

-    }

-

-    public void setLocation(String location) {

-        this.location = location;

-    }

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/FilterDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/FilterDD.java
deleted file mode 100644
index 59a9cf9..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/FilterDD.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-import org.apache.pluto.descriptors.common.IconDD;

-

-import java.util.List;

-

-/**

- * Filter DD() uration as contained within the

- * web.xml Deployment Descriptor.

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: FilterDD.java 156636 2005-03-09 12:16:31Z cziegeler $

- * @since Feb 28, 2005

- */

-public class FilterDD {

-

-    private String filterName;

-    private String filterClass;

-    private String displayName;

-

-    private String description;

-    private IconDD icon;

-    private List initParams;

-

-    public FilterDD() {

-

-    }

-

-    public String getFilterName() {

-        return filterName;

-    }

-

-    public void setFilterName(String filterName) {

-        this.filterName = filterName;

-    }

-

-    public String getFilterClass() {

-        return filterClass;

-    }

-

-    public void setFilterClass(String filterClass) {

-        this.filterClass = filterClass;

-    }

-

-    public String getDisplayName() {

-        return displayName;

-    }

-

-    public void setDisplayName(String displayName) {

-        this.displayName = displayName;

-    }

-

-    public String getDescription() {

-        return description;

-    }

-

-    public void setDescription(String description) {

-        this.description = description;

-    }

-

-    public IconDD getIcon() {

-        return icon;

-    }

-

-    public void setIcon(IconDD icon) {

-        this.icon = icon;

-    }

-

-    public List getInitParams() {

-        return initParams;

-    }

-

-    public void setInitParams(List initParams) {

-        this.initParams = initParams;

-    }

-

-    public boolean isValid() {

-        return filterName != null && filterClass != null;

-    }

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/FilterMappingDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/FilterMappingDD.java
deleted file mode 100644
index a735134..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/FilterMappingDD.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-import java.util.List;

-

-/**

- * FilterMapping configuration as contained within the

- * web.xml Deployment Descriptor.

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: FilterMappingDD.java 157475 2005-03-14 22:13:18Z ddewolf $

- * @since Feb 28, 2005

- */

-public class FilterMappingDD {

-

-    private String filterName;

-    private String servletName;

-    private List urlPattern;

-    private List dispatchers;

-

-    public FilterMappingDD() {

-

-    }

-

-    public String getFilterName() {

-        return filterName;

-    }

-

-    public void setFilterName(String filterName) {

-        this.filterName = filterName;

-    }

-

-    public List getUrlPatterns() {

-        return urlPattern;

-    }

-

-    public void setUrlPatterns(List urlPattern) {

-        this.urlPattern = urlPattern;

-    }

-

-    public String getServletName() {

-        return servletName;

-    }

-

-    public void setServletName(String servletName) {

-        this.servletName = servletName;

-    }

-

-    public List getDispatchers() {

-        return dispatchers;

-    }

-

-    public void setDispatchers(List dispatchers) {

-        this.dispatchers = dispatchers;

-    }

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/FormLoginConfigDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/FormLoginConfigDD.java
deleted file mode 100644
index f0836a8..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/FormLoginConfigDD.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-/**

- * <B>TODO</B>: Document

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: FormLoginConfigDD.java 156636 2005-03-09 12:16:31Z cziegeler $

- * @since Mar 4, 2005

- */

-public class FormLoginConfigDD {

-

-    private String formLoginPage;

-    private String formErrorPage;

-

-    public FormLoginConfigDD() {

-

-    }

-

-    public String getFormLoginPage() {

-        return formLoginPage;

-    }

-

-    public void setFormLoginPage(String formLoginPage) {

-        this.formLoginPage = formLoginPage;

-    }

-

-    public String getFormErrorPage() {

-        return formErrorPage;

-    }

-

-    public void setFormErrorPage(String formErrorPage) {

-        this.formErrorPage = formErrorPage;

-    }

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/ListenerDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/ListenerDD.java
deleted file mode 100644
index ca901a7..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/ListenerDD.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-/**

- * <B>TODO</B>: Document

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: ListenerDD.java 156636 2005-03-09 12:16:31Z cziegeler $

- * @since Feb 28, 2005

- */

-public class ListenerDD {

-

-    private String listenerClass;

-

-    public ListenerDD() {

-

-    }

-

-    public String getListenerClass() {

-        return listenerClass;

-    }

-

-    public void setListenerClass(String listenerClass) {

-        this.listenerClass = listenerClass;

-    }

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/LoadOnStartupDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/LoadOnStartupDD.java
deleted file mode 100644
index 9b9d9ff..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/LoadOnStartupDD.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-/**

- * <B>TODO</B>: Document

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: LoadOnStartupDD.java 156636 2005-03-09 12:16:31Z cziegeler $

- * @since Mar 8, 2005

- */

-public class LoadOnStartupDD {

-

-    private int priority;

-

-    public LoadOnStartupDD() {

-

-    }

-

-    public int getPriority() {

-        return priority;

-    }

-

-    public void setPriority(int priority) {

-        this.priority = priority;

-    }

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/LoginConfigDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/LoginConfigDD.java
deleted file mode 100644
index 7cd29fd..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/LoginConfigDD.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-/**

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: LoginConfigDD.java 156636 2005-03-09 12:16:31Z cziegeler $

- * @since Feb 28, 2005

- */

-public class LoginConfigDD  {

-

-    private String authMethod;

-    private String realmName;

-    private FormLoginConfigDD formLoginConfig;

-

-    public LoginConfigDD() {

-

-    }

-

-    public String getAuthMethod() {

-        return authMethod;

-    }

-

-    public void setAuthMethod(String authMethod) {

-        this.authMethod = authMethod;

-    }

-

-    public String getRealmName() {

-        return realmName;

-    }

-

-    public void setRealmName(String realmName) {

-        this.realmName = realmName;

-    }

-

-    public FormLoginConfigDD getFormLoginConfig() {

-        return formLoginConfig ;

-    }

-

-    public void setFormLoginConfig(FormLoginConfigDD formLoginConfig) {

-        this.formLoginConfig = formLoginConfig;

-    }

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/MimeMappingDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/MimeMappingDD.java
deleted file mode 100644
index 22cf1cc..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/MimeMappingDD.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-/**

- * <B>TODO</B>: Document

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id:$

- * @since Feb 28, 2005

- */

-public class MimeMappingDD {

-

-    private String extension;

-    private String mimeType;

-

-    public MimeMappingDD() {

-

-    }

-

-    public String getMimeType() {

-        return mimeType;

-    }

-

-    public void setMimeType(String mimeType) {

-        this.mimeType = mimeType;

-    }

-

-    public String getExtension() {

-        return extension;

-    }

-

-    public void setExtension(String extension) {

-        this.extension = extension;

-    }

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/ResourceRefDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/ResourceRefDD.java
deleted file mode 100644
index 633df8d..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/ResourceRefDD.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-/**

- * <B>TODO</B>: Document

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: ResourceRefDD.java 156636 2005-03-09 12:16:31Z cziegeler $

- * @since Feb 28, 2005

- */

-public class ResourceRefDD {

-

-    private String description;

-    private String resRefName;

-    private String resType;

-    private String resAuth;

-    private String resSharingScope;

-

-    public ResourceRefDD() {

-

-    }

-

-    public String getDescription() {

-        return description;

-    }

-

-    public void setDescription(String description) {

-        this.description = description;

-    }

-

-    public String getResRefName() {

-        return resRefName;

-    }

-

-    public void setResRefName(String resRefName) {

-        this.resRefName = resRefName;

-    }

-

-    public String getResType() {

-        return resType;

-    }

-

-    public void setResType(String resType) {

-        this.resType = resType;

-    }

-

-    public String getResAuth() {

-        return resAuth;

-    }

-

-    public void setResAuth(String resAuth) {

-        this.resAuth = resAuth;

-    }

-

-    public String getResSharingScope() {

-        return resSharingScope;

-    }

-

-    public void setResSharingScope(String resSharingScope) {

-        this.resSharingScope = resSharingScope;

-    }

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/SecurityConstraintDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/SecurityConstraintDD.java
deleted file mode 100644
index f88b5b1..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/SecurityConstraintDD.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-import java.util.List;

-

-/**

- * <B>TODO</B>: Document

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: SecurityConstraintDD.java 156636 2005-03-09 12:16:31Z cziegeler $

- * @since Feb 28, 2005

- */

-public class SecurityConstraintDD {

-

-    private String displayName;

-    private List webResourceCollection;

-    private AuthConstraintDD authConstraint;

-    private UserDataConstraintDD userDataConstraint;

-

-    public SecurityConstraintDD() {

-

-    }

-

-    public String getDisplayName() {

-        return displayName;

-    }

-

-    public void setDisplayName(String displayName) {

-        this.displayName = displayName;

-    }

-

-    public List getWebResourceCollections() {

-        return webResourceCollection;

-    }

-

-    public void setWebResourceCollections(List webResourceCollection) {

-        this.webResourceCollection = webResourceCollection;

-    }

-

-    public AuthConstraintDD getAuthConstraint() {

-        return authConstraint;

-    }

-

-    public void setAuthConstraint(AuthConstraintDD authConstraint) {

-        this.authConstraint = authConstraint;

-    }

-

-    public UserDataConstraintDD getUserDataConstraint() {

-        return userDataConstraint;

-    }

-

-    public void setUserDataConstraint(

-        UserDataConstraintDD userDataConstraint) {

-        this.userDataConstraint = userDataConstraint;

-    }

-

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/SecurityRoleDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/SecurityRoleDD.java
deleted file mode 100644
index 6f5ca29..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/SecurityRoleDD.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-/**

- * <B>TODO</B>: Document

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: SecurityRoleDD.java 156636 2005-03-09 12:16:31Z cziegeler $

- * @since Feb 28, 2005

- */

-public class SecurityRoleDD {

-

-    private String description;

-    private String roleName;

-

-    public SecurityRoleDD() {

-

-    }

-

-    public String getDescription() {

-        return description;

-    }

-

-    public void setDescription(String description) {

-        this.description = description;

-    }

-

-    public String getRoleName() {

-        return roleName;

-    }

-

-    public void setRoleName(String roleName) {

-        this.roleName = roleName;

-    }

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/ServletDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/ServletDD.java
deleted file mode 100644
index 580468e..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/ServletDD.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-import org.apache.pluto.descriptors.common.IconDD;

-

-import java.util.ArrayList;

-import java.util.List;

-

-/**

- * Filter DD() uration as contained within the

- * web.xml Deployment Descriptor.

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: ServletDD.java 156743 2005-03-10 05:50:30Z ddewolf $

- * @since Feb 28, 2005

- */

-public class ServletDD {

-

-    private String servletName;

-    private String servletClass;

-    private String displayName;

-    private String description;

-    private String jspFile;

-    private LoadOnStartupDD loadOnStartup;

-    

-    private IconDD icon;

-    private List initParams = new ArrayList();

-    private List securityRoleRefs = new ArrayList();

-

-    public ServletDD() {

-

-    }

-

-    public String getServletName() {

-        return servletName;

-    }

-

-    public void setServletName(String servletName) {

-        this.servletName = servletName;

-    }

-

-    public String getServletClass() {

-        return servletClass;

-    }

-

-    public void setServletClass(String servletClass) {

-        this.servletClass = servletClass;

-    }

-

-    public String getDisplayName() {

-        return displayName;

-    }

-

-    public void setDisplayName(String displayName) {

-        this.displayName = displayName;

-    }

-

-    public String getJspFile() {

-        return jspFile;

-    }

-

-    public void setJspFile(String jspFile) {

-        this.jspFile = jspFile;

-    }

-

-    public LoadOnStartupDD getLoadOnStartup() {

-        return loadOnStartup;

-    }

-

-    public void setLoadOnStartup(LoadOnStartupDD loadOnStartup) {

-        this.loadOnStartup = loadOnStartup;

-    }

-

-    public String getDescription() {

-        return description;

-    }

-

-    public void setDescription(String description) {

-        this.description = description;

-    }

-

-    public IconDD getIcon() {

-        return icon;

-    }

-

-    public void setIcon(IconDD icon) {

-        this.icon = icon;

-    }

-

-    public List getInitParams() {

-        return initParams;

-    }

-

-    public void setInitParams(List initParams) {

-        this.initParams = initParams;

-    }

-

-    public List getSecurityRoleRefs() {

-        return securityRoleRefs;

-    }

-

-    public void setSecurityRoleRefs(List securityRoleRefs) {

-        this.securityRoleRefs = securityRoleRefs;

-    }

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/ServletMappingDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/ServletMappingDD.java
deleted file mode 100644
index 2e7f156..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/ServletMappingDD.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-/**

- * ServletMapping configuration as contained within the

- * web.xml Deployment Descriptor.

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: ServletMappingDD.java 156636 2005-03-09 12:16:31Z cziegeler $

- * @since Feb 28, 2005

- */

-public class ServletMappingDD {

-

-    private String filterName;

-    private String urlPattern;

-

-    public ServletMappingDD() {

-

-    }

-

-    public String getServletName() {

-        return filterName;

-    }

-

-    public void setServletName(String filterName) {

-        this.filterName = filterName;

-    }

-

-    public String getUrlPattern() {

-        return urlPattern;

-    }

-

-    public void setUrlPattern(String urlPattern) {

-        this.urlPattern = urlPattern;

-    }

-

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/SessionConfigDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/SessionConfigDD.java
deleted file mode 100644
index 1e5159b..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/SessionConfigDD.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-/**

- * <B>TODO</B>: Document

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: SessionConfigDD.java 156636 2005-03-09 12:16:31Z cziegeler $

- * @since Feb 28, 2005

- */

-public class SessionConfigDD {

-

-    private int sessionTimeout;

-

-    public SessionConfigDD() {

-

-    }

-

-    public int getSessionTimeout() {

-        return sessionTimeout;

-    }

-

-    public void setSessionTimeout(int sessionTimeout) {

-        this.sessionTimeout = sessionTimeout;

-    }

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/TaglibDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/TaglibDD.java
deleted file mode 100644
index 7ed716c..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/TaglibDD.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-/**

- * <B>TODO</B>: Document

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: TaglibDD.java 156636 2005-03-09 12:16:31Z cziegeler $

- * @since Feb 28, 2005

- */

-public class TaglibDD {

-

-    private String taglibUri;

-    private String taglibLocation;

-

-    public TaglibDD() {

-

-    }

-

-    public String getTaglibUri() {

-        return taglibUri;

-    }

-

-    public void setTaglibUri(String taglibUri) {

-        this.taglibUri = taglibUri;

-    }

-

-    public String getTaglibLocation() {

-        return taglibLocation;

-    }

-

-    public void setTaglibLocation(String taglibLocation) {

-        this.taglibLocation = taglibLocation;

-    }

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/UserDataConstraintDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/UserDataConstraintDD.java
deleted file mode 100644
index e644fdd..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/UserDataConstraintDD.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-/**

- * <B>TODO</B>: Document

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: UserDataConstraintDD.java 156636 2005-03-09 12:16:31Z cziegeler $

- * @since Feb 28, 2005

- */

-public class UserDataConstraintDD {

-

-    public static final String NONE = "NONE";

-    public static final String INTEGRAL = "INTEGRAL";

-    public static final String CONFIDENTIAL = "CONFIDENTIAL";

-

-    private String description;

-    private String transportGuarantee;

-

-    public UserDataConstraintDD() {

-

-    }

-

-    public String getDescription() {

-        return description;

-    }

-

-    public void setDescription(String description) {

-        this.description = description;

-    }

-

-    public String getTransportGuarantee() {

-        return transportGuarantee;

-    }

-

-    public void setTransportGuarantee(String transportGuarantee) {

-        this.transportGuarantee = transportGuarantee;

-    }

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/WebAppDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/WebAppDD.java
deleted file mode 100644
index 564624a..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/WebAppDD.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-import org.apache.pluto.descriptors.common.IconDD;

-

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.List;

-

-/**

- * WebApplication configuration as contained

- * within the web.xml Deployment Descriptor.

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: WebAppDD.java 157475 2005-03-14 22:13:18Z ddewolf $

- * @since Feb 28, 2005

- */

-public class WebAppDD {

-

-    private IconDD icon;

-    private String displayName;

-    private String description;

-    private boolean distributable;

-    private List contextParams = new ArrayList();

-    private List filters = new ArrayList();

-    private List filterMappings = new ArrayList();

-    private List listeners = new ArrayList();

-    private List servlets = new ArrayList();

-    private List servletMappings = new ArrayList();

-    private SessionConfigDD sessionConfig;

-    private List mimeMappings = new ArrayList();

-    private WelcomeFileListDD welcomeFileList;

-    private List errorPages = new ArrayList();

-    private List taglibs = new ArrayList();

-    private List resourceRefs = new ArrayList();

-    private List securityConstraints = new ArrayList();

-    private LoginConfigDD loginConfig;

-    private List securityRoles = new ArrayList();

-    private List envEntrys = new ArrayList();

-    private List ejbRefs = new ArrayList();

-

-    public WebAppDD() {

-

-    }

-

-    public IconDD getIcon() {

-        return icon;

-    }

-

-    public void setIcon(IconDD icon) {

-        this.icon= icon;

-    }

-

-    public String getDisplayName() {

-        return displayName;

-    }

-

-    public void setDisplayName(String displayName) {

-        this.displayName = displayName;

-    }

-

-    public String getDescription() {

-        return description;

-    }

-

-    public void setDescription(String description) {

-        this.description = description;

-    }

-

-    public boolean isDistributable() {

-        return distributable;

-    }

-

-    public void setDistributable() {

-        this.distributable = true;

-    }

-

-    public void setDistributable(boolean distributable) {

-        this.distributable = distributable;

-    }

-

-    /**

-     * Retrieve the context parameters.

-     * @return InitParamDD instances.

-     */

-    public List getContextParams() {

-        return contextParams;

-    }

-

-    public void setContextParams(List contextParams) {

-        this.contextParams = contextParams;

-    }

-

-    public List getFilters() {

-        return filters;

-    }

-

-    public void setFilters(List filters) {

-        this.filters = filters;

-    }

-

-    public List getFilterMappings() {

-        return filterMappings;

-    }

-

-    public void setFilterMappings(List filterMappings) {

-        this.filterMappings = filterMappings;

-    }

-

-    public List getListeners() {

-        return listeners;

-    }

-

-    public void setListeners(List listeners) {

-        this.listeners = listeners;

-    }

-

-    public List getServlets() {

-        return servlets;

-    }

-

-    public void setServlets(List servlets) {

-        this.servlets = servlets;

-    }

-

-    public List getServletMappings() {

-        return servletMappings;

-    }

-

-    public void setServletMappings(List servletMappings) {

-        this.servletMappings = servletMappings;

-    }

-

-    public SessionConfigDD getSessionConfig() {

-        return sessionConfig ;

-    }

-

-    public void setSessionConfig(SessionConfigDD sessionConfig) {

-        this.sessionConfig = sessionConfig;

-    }

-

-    public List getMimeMappings() {

-        return mimeMappings;

-    }

-

-    public void setMimeMappings(List mimeMappings) {

-        this.mimeMappings = mimeMappings;

-    }

-

-    public WelcomeFileListDD getWelcomeFileList() {

-        return welcomeFileList;

-    }

-

-    public void setWelcomeFileList(WelcomeFileListDD welcomeFileList) {

-        this.welcomeFileList = welcomeFileList;

-    }

-

-    public List getErrorPages() {

-        return errorPages;

-    }

-

-    public void setErrorPages(List errorPages) {

-        this.errorPages = errorPages;

-    }

-

-    public List getTaglibs() {

-        return taglibs;

-    }

-

-    public void setTaglibs(List taglibs) {

-        this.taglibs = taglibs;

-    }

-

-    public List getResourceRefs() {

-        return resourceRefs;

-    }

-

-    public void setResourceRefs(List resourceRefs) {

-        this.resourceRefs = resourceRefs;

-    }

-

-    public List getSecurityConstraints() {

-        return securityConstraints;

-    }

-

-    public void setSecurityConstraints(List securityConstraints) {

-        this.securityConstraints = securityConstraints;

-    }

-

-    public LoginConfigDD getLoginConfig() {

-        return loginConfig;

-    }

-

-    public void setLoginConfig(LoginConfigDD loginConfig) {

-        this.loginConfig = loginConfig;

-    }

-

-    public List getSecurityRoles() {

-        return securityRoles;

-    }

-

-    public void setSecurityRoles(List securityRoles) {

-        this.securityRoles = securityRoles;

-    }

-

-    public List getEnvEntrys() {

-        return envEntrys;

-    }

-

-    public void setEnvEntrys(List envEntrys) {

-        this.envEntrys = envEntrys;

-    }

-

-    public List getEjbRefs() {

-        return ejbRefs;

-    }

-

-    public void setEjbRefs(List ejbRefs) {

-        this.ejbRefs = ejbRefs;

-    }

-

-// Helpers

-

-    public ServletDD getServlet(String name) {

-        ArrayList set = new ArrayList(servlets);

-        Iterator it = set.iterator();

-        ServletDD dd;

-        while(name!=null && it.hasNext()) {

-            dd = (ServletDD)it.next();

-            if(name.equals(dd.getServletName())) {

-                return dd;

-            }

-        }

-        return null;

-    }

-

-    public ServletMappingDD getServletMapping(String uri) {

-        ArrayList set = new ArrayList(servletMappings);

-        Iterator it = set.iterator();

-        ServletMappingDD dd;

-        while(uri!=null && it.hasNext()) {

-            dd = (ServletMappingDD)it.next();

-            if(uri.equals(dd.getUrlPattern())) {

-                return dd;

-            }

-        }

-        return null;

-    }

-

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/WebResourceCollectionDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/WebResourceCollectionDD.java
deleted file mode 100644
index 1ebb2e0..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/WebResourceCollectionDD.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-import java.util.List;

-import java.util.ArrayList;

-

-/**

- * Web Resource Collection configuration.

- * 

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: WebResourceCollectionDD.java 157475 2005-03-14 22:13:18Z ddewolf $

- * @since Mar 4, 2005

- */

-public class WebResourceCollectionDD {

-

-    private String webResourceName;

-    private String description;

-    private List httpMethods = new ArrayList();

-    private List urlPatterns = new ArrayList();

-

-    public WebResourceCollectionDD() {

-

-    }

-

-    public String getWebResourceName() {

-        return webResourceName;

-    }

-

-    public void setWebResourceName(String webResourceName) {

-        this.webResourceName = webResourceName;

-    }

-

-    public String getDescription() {

-        return description;

-    }

-

-    public void setDescription(String description) {

-        this.description = description;

-    }

-

-    public List getHttpMethods() {

-        return httpMethods;

-    }

-

-    public void setHttpMethods(List httpMethods) {

-        this.httpMethods = httpMethods;

-    }

-

-    public List getUrlPatterns() {

-        return urlPatterns;

-    }

-

-    public void setUrlPatterns(List urlPatterns) {

-        this.urlPatterns = urlPatterns;

-    }

-

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/WelcomeFileListDD.java b/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/WelcomeFileListDD.java
deleted file mode 100644
index afd1d7d..0000000
--- a/trunk/pluto-descriptor-api/src/main/java/org/apache/pluto/descriptors/servlet/WelcomeFileListDD.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.servlet;

-

-import java.util.List;

-

-/**

- * <B>TODO</B>: Document

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: WelcomeFileListDD.java 156636 2005-03-09 12:16:31Z cziegeler $

- * @since Feb 28, 2005

- */

-public class WelcomeFileListDD {

-

-    private List welcomeFiles;

-

-    public WelcomeFileListDD() {

-

-    }

-

-    public List getWelcomeFiles() {

-        return welcomeFiles;

-    }

-

-    public void setWelcomeFiles(List welcomeFiles) {

-        this.welcomeFiles = welcomeFiles;

-    }

-

-}

-

diff --git a/trunk/pluto-descriptor-api/src/site/site.xml b/trunk/pluto-descriptor-api/src/site/site.xml
deleted file mode 100644
index e7355b4..0000000
--- a/trunk/pluto-descriptor-api/src/site/site.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>

-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<project name="Maven">

-  <bannerLeft>

-    <name>Pluto</name>

-    <src>http://portals.apache.org/pluto/images/pluto11.png</src>

-    <href>http://portals.apache.org/pluto</href>

-  </bannerLeft>

-  <bannerRight>

-    <src>http://portals.apache.org/pluto/images/banner.png</src>

-  </bannerRight>

-  <body>

-    <links>

-      <item name="Pluto Home" href="http://portals.apache.org/pluto"/>

-      <item name="JSR 168" href="http://jcp.org/en/jsr/detail?id=168"/>

-	  <item name="Chinese Translation" href="http://heavyz.sourceforge.net/pluto_zh/pluto-container"/>

-    </links>

-

-	<menu name="Portlet Container">

-      <item name="Getting Started" href="/getting-started.html"/>

-	</menu>

-

-    ${reports}

-  </body>

-</project>

diff --git a/trunk/pluto-descriptor-impl/pom.xml b/trunk/pluto-descriptor-impl/pom.xml
deleted file mode 100644
index f1044df..0000000
--- a/trunk/pluto-descriptor-impl/pom.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 2005-2006 The Apache Software Foundation
-
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  
-  <parent>
-    <groupId>org.apache.pluto</groupId>
-    <artifactId>pluto</artifactId>
-    <version>1.1.0-SNAPSHOT</version>
-  </parent>
-  
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>pluto-descriptor-impl</artifactId>
-  <packaging>jar</packaging>
-  <name>Pluto Descriptor Service Implementation</name>
-  
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-site-plugin</artifactId>
-        <configuration>
-          <resourcesDirectory>${basedir}/../pluto-site/src/site/resources</resourcesDirectory>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-  
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.pluto</groupId>
-      <artifactId>pluto-descriptor-api</artifactId>
-      <version>${pom.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>castor</groupId>
-      <artifactId>castor</artifactId>
-      <version>${castor.version}</version>
-      <scope>compile</scope>
-    </dependency>
-      
-    <dependency>
-      <groupId>xerces</groupId>
-      <artifactId>xercesImpl</artifactId>
-      <version>${xerces.version}</version>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>xerces</groupId>
-      <artifactId>xmlParserAPIs</artifactId>
-      <version>${xerces.version}</version>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging-api</artifactId>
-      <version>${commons-logging.version}</version>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
-      <version>${commons-logging.version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>${junit.version}</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-  
-</project>
-
-
-
diff --git a/trunk/pluto-descriptor-impl/src/assemble/bin.xml b/trunk/pluto-descriptor-impl/src/assemble/bin.xml
deleted file mode 100644
index ae17e12..0000000
--- a/trunk/pluto-descriptor-impl/src/assemble/bin.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<assembly>

-  <id>bin</id>

-  <formats>

-    <format>tar.gz</format>

-    <format>tar.bz2</format>

-    <format>zip</format>

-  </formats>

-  <fileSets>

-    <fileSet>

-      <includes>

-        <include>README*</include>

-        <include>LICENSE*</include>

-        <include>NOTICE*</include>

-      </includes>

-    </fileSet>

-    <fileSet>

-      <directory>target</directory>

-      <outputDirectory></outputDirectory>

-      <includes>

-        <include>*.jar</include>

-      </includes>

-    </fileSet>

-  </fileSets>

-  <dependencySets>

-

-  </dependencySets>

-</assembly>

-

diff --git a/trunk/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/AbstractCastorDescriptorService.java b/trunk/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/AbstractCastorDescriptorService.java
deleted file mode 100644
index 6e1abf1..0000000
--- a/trunk/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/AbstractCastorDescriptorService.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.services.castor;

-

-import org.exolab.castor.mapping.Mapping;

-import org.exolab.castor.mapping.MappingException;

-import org.exolab.castor.xml.Marshaller;

-import org.exolab.castor.xml.Unmarshaller;

-import org.xml.sax.helpers.DefaultHandler;

-

-import java.io.*;

-

-/**

- * Abstract deployment descriptor support class.

- * This Base class provides support for reading

- * and writing deployment descriptors using Castor.

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: AbstractCastorDescriptorService.java 156743 2005-03-10 05:50:30Z ddewolf $

- * @since Mar 5, 2005

- */

-abstract class AbstractCastorDescriptorService {

-

-    /**

-     * Read the and convert the descriptor into it's Object graph.

-     * @return

-     * @throws IOException

-     */

-    protected Object readInternal(InputStream is) throws IOException {

-        Object object = null;

-        try {

-            Mapping mapping = getCastorMapping();

-            Unmarshaller unmarshaller = new Unmarshaller(mapping);

-            unmarshaller.setEntityResolver(new EntityResolverImpl());

-            unmarshaller.setIgnoreExtraElements(getIgnoreExtraElements());

-            if(is!=null) {

-                InputStreamReader in = new InputStreamReader(is);

-                object = unmarshaller.unmarshal(in);

-            }

-        }

-        catch(Exception me) {

-            me.printStackTrace();

-            throw new IOException(me.getMessage());

-        }

-        finally {

-            if(is != null) {

-                is.close();

-            }

-        }

-        return object;

-    }

-

-    /**

-     * Write the object graph to it's descriptor.

-     * @param object

-     * @throws IOException

-     */

-    protected void writeInternal(Object object, OutputStream out) throws IOException {

-

-        OutputStreamWriter writer =

-            new OutputStreamWriter(out);

-

-        try {

-            Marshaller marshaller =

-                new Marshaller(new DefaultHandler()); //serializer.asDocumentHandler());

-            marshaller.setMapping(getCastorMapping());

-            marshaller.marshal(object);

-        } catch(IOException io) {

-            throw io;

-        } catch (Exception e) {

-            throw new IOException(e.getMessage());

-        }

-        finally {

-            writer.flush();

-            writer.close();

-        }

-    }

-

-    protected boolean getIgnoreExtraElements() {

-        return false;

-    }

-

-    protected abstract Mapping getCastorMapping() throws IOException, MappingException;

-    protected abstract String getPublicId();

-    protected abstract String getDTDUri();

-

-

-}

-

diff --git a/trunk/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/EntityResolverImpl.java b/trunk/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/EntityResolverImpl.java
deleted file mode 100644
index 888b00f..0000000
--- a/trunk/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/EntityResolverImpl.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * Copyright 2003-2005 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.services.castor;

-

-import org.xml.sax.EntityResolver;

-import org.xml.sax.InputSource;

-import org.xml.sax.SAXException;

-

-import java.io.IOException;

-import java.io.InputStream;

-

-/**

- * Entity Resolver which first looks for dtd and xls

- * locally in our packaged.

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since 1.1

- */

-public class EntityResolverImpl implements EntityResolver {

-

-    public InputSource resolveEntity(String publicId, String systemId)

-        throws SAXException, IOException {

-        int idx = systemId.lastIndexOf('/');

-        String name = systemId.substring(idx+1);

-        InputStream in = getClass().getResourceAsStream(name);

-        if(in != null) {

-            return new InputSource(in);

-        }

-        return null;

-    }

-}

diff --git a/trunk/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/PortletAppDescriptorServiceImpl.java b/trunk/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/PortletAppDescriptorServiceImpl.java
deleted file mode 100644
index faadc2a..0000000
--- a/trunk/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/PortletAppDescriptorServiceImpl.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.services.castor;

-

-import org.apache.pluto.descriptors.portlet.PortletAppDD;

-import org.apache.pluto.descriptors.services.Constants;

-import org.apache.pluto.descriptors.services.PortletAppDescriptorService;

-import org.exolab.castor.mapping.Mapping;

-import org.exolab.castor.mapping.MappingException;

-

-import java.io.IOException;

-import java.io.InputStream;

-import java.io.OutputStream;

-import java.net.URL;

-

-/**

- * Abstract Implementation of the Web Application Deployment

- * Descriptor service.  Provides default implementation of

- * the service; requiring only that subclasses provide the

- * input streams to/from the actual descriptor.

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: PortletAppDescriptorServiceImpl.java 156743 2005-03-10 05:50:30Z ddewolf $

- * @since Mar 5, 2005

- */

-public class PortletAppDescriptorServiceImpl

-    extends AbstractCastorDescriptorService

-    implements PortletAppDescriptorService {

-

-    public static final String PORTLET_XML_MAPPING =

-        "castor-portlet-xml-mapping.xml";

-

-    /**

-     * Read the Web Application Deployment Descriptor.

-     *

-     * @return WebAppDD instance representing the descriptor.

-     * @throws java.io.IOException

-     */

-    public PortletAppDD read(InputStream in) throws IOException {

-        PortletAppDD portlet =

-            (PortletAppDD) readInternal(in);

-        return portlet;

-    }

-

-    /**

-     * Write the deployment descriptor.

-     * @param portlet

-     * @throws java.io.IOException

-     */

-    public void write(PortletAppDD portlet, OutputStream out) throws IOException {

-        writeInternal(portlet, out);

-    }

-

-    /**

-     * Retrieve the Web Application Deployment

-     * descriptor's public Id.

-     * @return

-     */

-    protected String getPublicId() {

-        return Constants.PORLTET_XML_PUBLIC_ID;

-    }

-

-    /**

-     * Retrieve the Web Application Deployment

-     * descriptor's DTD uri.

-     * @return

-     */

-    protected String getDTDUri() {

-        return Constants.PORTLET_XML_DTD;

-    }

-

-    /**

-     * Read and Retrieve the Web Application's Castor Mapping

-     * resource.

-     *

-     * @return

-     * @throws java.io.IOException

-     * @throws org.exolab.castor.mapping.MappingException

-     */

-    protected Mapping getCastorMapping()

-    throws IOException, MappingException {

-        URL url = getClass().getResource(PORTLET_XML_MAPPING);

-        if(url == null) {

-            throw new NullPointerException(

-                    "Configuration Error.  Resource: "+PORTLET_XML_MAPPING+" not found."

-            );

-        }

-        Mapping mapping = new Mapping();

-        mapping.loadMapping(url);

-        return mapping;

-    }

-

-    protected boolean getIgnoreExtraElements() {

-        return true;

-    }

-}

-

diff --git a/trunk/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/WebAppDescriptorServiceImpl.java b/trunk/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/WebAppDescriptorServiceImpl.java
deleted file mode 100644
index 0e57f2a..0000000
--- a/trunk/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/WebAppDescriptorServiceImpl.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.services.castor;

-

-import org.apache.pluto.descriptors.services.Constants;

-import org.apache.pluto.descriptors.services.WebAppDescriptorService;

-import org.apache.pluto.descriptors.servlet.WebAppDD;

-import org.exolab.castor.mapping.Mapping;

-import org.exolab.castor.mapping.MappingException;

-

-import java.io.IOException;

-import java.io.InputStream;

-import java.io.OutputStream;

-import java.net.URL;

-

-/**

- * Abstract Implementation of the Web Application Deployment

- * Descriptor service.  Provides default implementation of

- * the service; requiring only that subclasses provide the

- * input streams to/from the actual descriptor.

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version $Id: WebAppDescriptorServiceImpl.java 156743 2005-03-10 05:50:30Z ddewolf $

- * @since Mar 5, 2005

- */

-public class WebAppDescriptorServiceImpl

-    extends AbstractCastorDescriptorService

-    implements WebAppDescriptorService {

-

-    public static final String WEB_XML_MAPPING = "castor-web-xml-mapping.xml";

-

-    /**

-     * Read the Web Application Deployment Descriptor.

-     *

-     * @return WebAppDD instance representing the descriptor.

-     * @throws IOException

-     */

-    public WebAppDD read(InputStream in) throws IOException {

-        WebAppDD webApp = (WebAppDD) readInternal(in);

-       return webApp;

-    }

-

-    /**

-     * Write the deployment descriptor.

-     * @param webApp

-     * @throws IOException

-     */

-    public void write(WebAppDD webApp, OutputStream out) throws IOException {

-        writeInternal(webApp, out);

-    }

-

-    /**

-     * Retrieve the Web Application Deployment

-     * descriptor's public Id.

-     * @return

-     */

-    protected String getPublicId() {

-        return Constants.WEB_XML_PUBLIC_ID;

-    }

-

-    /**

-     * Retrieve the Web Application Deployment

-     * descriptor's DTD uri.

-     * @return

-     */

-    protected String getDTDUri() {

-        return Constants.WEB_XML_DTD;

-    }

-

-    /**

-     * Read and Retrieve the Web Application's Castor Mapping

-     * resource.

-     *

-     * @return

-     * @throws IOException

-     * @throws MappingException

-     */

-    protected Mapping getCastorMapping()

-    throws IOException, MappingException {

-        URL url = getClass().getResource(WEB_XML_MAPPING);

-        if(url == null)

-            throw new NullPointerException(

-                    "Configuration Error.  Resource: "+WEB_XML_MAPPING+" not found."

-            );

-        Mapping mapping = new Mapping();

-        mapping.loadMapping(url);

-        return mapping;

-    }

-

-}

-

diff --git a/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/XMLSchema.dtd b/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/XMLSchema.dtd
deleted file mode 100644
index 4ae65ae..0000000
--- a/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/XMLSchema.dtd
+++ /dev/null
@@ -1,418 +0,0 @@
-<!-- 

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<!-- DTD for XML Schemas: Part 1: Structures

-     Public Identifier: "-//W3C//DTD XMLSCHEMA 200102//EN"

-     Official Location: http://www.w3.org/2001/XMLSchema.dtd -->

-<!-- $Id: XMLSchema.dtd,v 1.1.1.1 2003/09/30 14:03:01 rubys Exp $ -->

-<!-- Note this DTD is NOT normative, or even definitive. -->           <!--d-->

-<!-- prose copy in the structures REC is the definitive version -->    <!--d-->

-<!-- (which shouldn't differ from this one except for this -->         <!--d-->

-<!-- comment and entity expansions, but just in case) -->              <!--d-->

-<!-- With the exception of cases with multiple namespace

-     prefixes for the XML Schema namespace, any XML document which is

-     not valid per this DTD given redefinitions in its internal subset of the

-     'p' and 's' parameter entities below appropriate to its namespace

-     declaration of the XML Schema namespace is almost certainly not

-     a valid schema. -->

-

-<!-- The simpleType element and its constituent parts

-     are defined in XML Schema: Part 2: Datatypes -->

-<!ENTITY % xs-datatypes PUBLIC 'datatypes' 'datatypes.dtd' >

-

-<!ENTITY % p 'xs:'> <!-- can be overriden in the internal subset of a

-                         schema document to establish a different

-                         namespace prefix -->

-<!ENTITY % s ':xs'> <!-- if %p is defined (e.g. as foo:) then you must

-                         also define %s as the suffix for the appropriate

-                         namespace declaration (e.g. :foo) -->

-<!ENTITY % nds 'xmlns%s;'>

-

-<!-- Define all the element names, with optional prefix -->

-<!ENTITY % schema "%p;schema">

-<!ENTITY % complexType "%p;complexType">

-<!ENTITY % complexContent "%p;complexContent">

-<!ENTITY % simpleContent "%p;simpleContent">

-<!ENTITY % extension "%p;extension">

-<!ENTITY % element "%p;element">

-<!ENTITY % unique "%p;unique">

-<!ENTITY % key "%p;key">

-<!ENTITY % keyref "%p;keyref">

-<!ENTITY % selector "%p;selector">

-<!ENTITY % field "%p;field">

-<!ENTITY % group "%p;group">

-<!ENTITY % all "%p;all">

-<!ENTITY % choice "%p;choice">

-<!ENTITY % sequence "%p;sequence">

-<!ENTITY % any "%p;any">

-<!ENTITY % anyAttribute "%p;anyAttribute">

-<!ENTITY % attribute "%p;attribute">

-<!ENTITY % attributeGroup "%p;attributeGroup">

-<!ENTITY % include "%p;include">

-<!ENTITY % import "%p;import">

-<!ENTITY % redefine "%p;redefine">

-<!ENTITY % notation "%p;notation">

-

-<!-- annotation elements -->

-<!ENTITY % annotation "%p;annotation">

-<!ENTITY % appinfo "%p;appinfo">

-<!ENTITY % documentation "%p;documentation">

-

-<!-- Customisation entities for the ATTLIST of each element type.

-     Define one of these if your schema takes advantage of the

-     anyAttribute='##other' in the schema for schemas -->

-

-<!ENTITY % schemaAttrs ''>

-<!ENTITY % complexTypeAttrs ''>

-<!ENTITY % complexContentAttrs ''>

-<!ENTITY % simpleContentAttrs ''>

-<!ENTITY % extensionAttrs ''>

-<!ENTITY % elementAttrs ''>

-<!ENTITY % groupAttrs ''>

-<!ENTITY % allAttrs ''>

-<!ENTITY % choiceAttrs ''>

-<!ENTITY % sequenceAttrs ''>

-<!ENTITY % anyAttrs ''>

-<!ENTITY % anyAttributeAttrs ''>

-<!ENTITY % attributeAttrs ''>

-<!ENTITY % attributeGroupAttrs ''>

-<!ENTITY % uniqueAttrs ''>

-<!ENTITY % keyAttrs ''>

-<!ENTITY % keyrefAttrs ''>

-<!ENTITY % selectorAttrs ''>

-<!ENTITY % fieldAttrs ''>

-<!ENTITY % includeAttrs ''>

-<!ENTITY % importAttrs ''>

-<!ENTITY % redefineAttrs ''>

-<!ENTITY % notationAttrs ''>

-<!ENTITY % annotationAttrs ''>

-<!ENTITY % appinfoAttrs ''>

-<!ENTITY % documentationAttrs ''>

-

-<!ENTITY % complexDerivationSet "CDATA">

-      <!-- #all or space-separated list drawn from derivationChoice -->

-<!ENTITY % blockSet "CDATA">

-      <!-- #all or space-separated list drawn from

-                      derivationChoice + 'substitution' -->

-

-<!ENTITY % mgs '%all; | %choice; | %sequence;'>

-<!ENTITY % cs '%choice; | %sequence;'>

-<!ENTITY % formValues '(qualified|unqualified)'>

-

-

-<!ENTITY % attrDecls    '((%attribute;| %attributeGroup;)*,(%anyAttribute;)?)'>

-

-<!ENTITY % particleAndAttrs '((%mgs; | %group;)?, %attrDecls;)'>

-

-<!-- This is used in part2 -->

-<!ENTITY % restriction1 '((%mgs; | %group;)?)'>

-

-%xs-datatypes;

-

-<!-- the duplication below is to produce an unambiguous content model

-     which allows annotation everywhere -->

-<!ELEMENT %schema; ((%include; | %import; | %redefine; | %annotation;)*,

-                    ((%simpleType; | %complexType;

-                      | %element; | %attribute;

-                      | %attributeGroup; | %group;

-                      | %notation; ),

-                     (%annotation;)*)* )>

-<!ATTLIST %schema;

-   targetNamespace      %URIref;               #IMPLIED

-   version              CDATA                  #IMPLIED

-   %nds;                %URIref;               #FIXED 'http://www.w3.org/2001/XMLSchema'

-   xmlns                CDATA                  #IMPLIED

-   finalDefault         %complexDerivationSet; ''

-   blockDefault         %blockSet;             ''

-   id                   ID                     #IMPLIED

-   elementFormDefault   %formValues;           'unqualified'

-   attributeFormDefault %formValues;           'unqualified'

-   xml:lang             CDATA                  #IMPLIED

-   %schemaAttrs;>

-<!-- Note the xmlns declaration is NOT in the Schema for Schemas,

-     because at the Infoset level where schemas operate,

-     xmlns(:prefix) is NOT an attribute! -->

-<!-- The declaration of xmlns is a convenience for schema authors -->

- 

-<!-- The id attribute here and below is for use in external references

-     from non-schemas using simple fragment identifiers.

-     It is NOT used for schema-to-schema reference, internal or

-     external. -->

-

-<!-- a type is a named content type specification which allows attribute

-     declarations-->

-<!-- -->

-

-<!ELEMENT %complexType; ((%annotation;)?,

-                         (%simpleContent;|%complexContent;|

-                          %particleAndAttrs;))>

-

-<!ATTLIST %complexType;

-          name      %NCName;                        #IMPLIED

-          id        ID                              #IMPLIED

-          abstract  %boolean;                       #IMPLIED

-          final     %complexDerivationSet;          #IMPLIED

-          block     %complexDerivationSet;          #IMPLIED

-          mixed (true|false) 'false'

-          %complexTypeAttrs;>

-

-<!-- particleAndAttrs is shorthand for a root type -->

-<!-- mixed is disallowed if simpleContent, overriden if complexContent

-     has one too. -->

-

-<!-- If anyAttribute appears in one or more referenced attributeGroups

-     and/or explicitly, the intersection of the permissions is used -->

-

-<!ELEMENT %complexContent; ((%annotation;)?, (%restriction;|%extension;))>

-<!ATTLIST %complexContent;

-          mixed (true|false) #IMPLIED

-          id    ID           #IMPLIED

-          %complexContentAttrs;>

-

-<!-- restriction should use the branch defined above, not the simple

-     one from part2; extension should use the full model  -->

-

-<!ELEMENT %simpleContent; ((%annotation;)?, (%restriction;|%extension;))>

-<!ATTLIST %simpleContent;

-          id    ID           #IMPLIED

-          %simpleContentAttrs;>

-

-<!-- restriction should use the simple branch from part2, not the 

-     one defined above; extension should have no particle  -->

-

-<!ELEMENT %extension; ((%annotation;)?, (%particleAndAttrs;))>

-<!ATTLIST %extension;

-          base  %QName;      #REQUIRED

-          id    ID           #IMPLIED

-          %extensionAttrs;>

-

-<!-- an element is declared by either:

- a name and a type (either nested or referenced via the type attribute)

- or a ref to an existing element declaration -->

-

-<!ELEMENT %element; ((%annotation;)?, (%complexType;| %simpleType;)?,

-                     (%unique; | %key; | %keyref;)*)>

-<!-- simpleType or complexType only if no type|ref attribute -->

-<!-- ref not allowed at top level -->

-<!ATTLIST %element;

-            name               %NCName;               #IMPLIED

-            id                 ID                     #IMPLIED

-            ref                %QName;                #IMPLIED

-            type               %QName;                #IMPLIED

-            minOccurs          %nonNegativeInteger;   #IMPLIED

-            maxOccurs          CDATA                  #IMPLIED

-            nillable           %boolean;              #IMPLIED

-            substitutionGroup  %QName;                #IMPLIED

-            abstract           %boolean;              #IMPLIED

-            final              %complexDerivationSet; #IMPLIED

-            block              %blockSet;             #IMPLIED

-            default            CDATA                  #IMPLIED

-            fixed              CDATA                  #IMPLIED

-            form               %formValues;           #IMPLIED

-            %elementAttrs;>

-<!-- type and ref are mutually exclusive.

-     name and ref are mutually exclusive, one is required -->

-<!-- In the absence of type AND ref, type defaults to type of

-     substitutionGroup, if any, else the ur-type, i.e. unconstrained -->

-<!-- default and fixed are mutually exclusive -->

-

-<!ELEMENT %group; ((%annotation;)?,(%mgs;)?)>

-<!ATTLIST %group; 

-          name        %NCName;               #IMPLIED

-          ref         %QName;                #IMPLIED

-          minOccurs   %nonNegativeInteger;   #IMPLIED

-          maxOccurs   CDATA                  #IMPLIED

-          id          ID                     #IMPLIED

-          %groupAttrs;>

-

-<!ELEMENT %all; ((%annotation;)?, (%element;)*)>

-<!ATTLIST %all;

-          minOccurs   (1)                    #IMPLIED

-          maxOccurs   (1)                    #IMPLIED

-          id          ID                     #IMPLIED

-          %allAttrs;>

-

-<!ELEMENT %choice; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>

-<!ATTLIST %choice;

-          minOccurs   %nonNegativeInteger;   #IMPLIED

-          maxOccurs   CDATA                  #IMPLIED

-          id          ID                     #IMPLIED

-          %choiceAttrs;>

-

-<!ELEMENT %sequence; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>

-<!ATTLIST %sequence;

-          minOccurs   %nonNegativeInteger;   #IMPLIED

-          maxOccurs   CDATA                  #IMPLIED

-          id          ID                     #IMPLIED

-          %sequenceAttrs;>

-

-<!-- an anonymous grouping in a model, or

-     a top-level named group definition, or a reference to same -->

-

-<!-- Note that if order is 'all', group is not allowed inside.

-     If order is 'all' THIS group must be alone (or referenced alone) at

-     the top level of a content model -->

-<!-- If order is 'all', minOccurs==maxOccurs==1 on element/any inside -->

-<!-- Should allow minOccurs=0 inside order='all' . . . -->

-

-<!ELEMENT %any; (%annotation;)?>

-<!ATTLIST %any;

-            namespace       CDATA                  '##any'

-            processContents (skip|lax|strict)      'strict'

-            minOccurs       %nonNegativeInteger;   '1'

-            maxOccurs       CDATA                  '1'

-            id              ID                     #IMPLIED

-            %anyAttrs;>

-

-<!-- namespace is interpreted as follows:

-                  ##any      - - any non-conflicting WFXML at all

-

-                  ##other    - - any non-conflicting WFXML from namespace other

-                                  than targetNamespace

-

-                  ##local    - - any unqualified non-conflicting WFXML/attribute

-                  one or     - - any non-conflicting WFXML from

-                  more URI        the listed namespaces

-                  references

-

-                  ##targetNamespace ##local may appear in the above list,

-                    with the obvious meaning -->

-

-<!ELEMENT %anyAttribute; (%annotation;)?>

-<!ATTLIST %anyAttribute;

-            namespace       CDATA              '##any'

-            processContents (skip|lax|strict)  'strict'

-            id              ID                 #IMPLIED

-            %anyAttributeAttrs;>

-<!-- namespace is interpreted as for 'any' above -->

-

-<!-- simpleType only if no type|ref attribute -->

-<!-- ref not allowed at top level, name iff at top level -->

-<!ELEMENT %attribute; ((%annotation;)?, (%simpleType;)?)>

-<!ATTLIST %attribute;

-          name      %NCName;      #IMPLIED

-          id        ID            #IMPLIED

-          ref       %QName;       #IMPLIED

-          type      %QName;       #IMPLIED

-          use       (prohibited|optional|required) #IMPLIED

-          default   CDATA         #IMPLIED

-          fixed     CDATA         #IMPLIED

-          form      %formValues;  #IMPLIED

-          %attributeAttrs;>

-<!-- type and ref are mutually exclusive.

-     name and ref are mutually exclusive, one is required -->

-<!-- default for use is optional when nested, none otherwise -->

-<!-- default and fixed are mutually exclusive -->

-<!-- type attr and simpleType content are mutually exclusive -->

-

-<!-- an attributeGroup is a named collection of attribute decls, or a

-     reference thereto -->

-<!ELEMENT %attributeGroup; ((%annotation;)?,

-                       (%attribute; | %attributeGroup;)*,

-                       (%anyAttribute;)?) >

-<!ATTLIST %attributeGroup;

-                 name       %NCName;       #IMPLIED

-                 id         ID             #IMPLIED

-                 ref        %QName;        #IMPLIED

-                 %attributeGroupAttrs;>

-

-<!-- ref iff no content, no name.  ref iff not top level -->

-

-<!-- better reference mechanisms -->

-<!ELEMENT %unique; ((%annotation;)?, %selector;, (%field;)+)>

-<!ATTLIST %unique;

-          name     %NCName;       #REQUIRED

-	  id       ID             #IMPLIED

-	  %uniqueAttrs;>

-

-<!ELEMENT %key;    ((%annotation;)?, %selector;, (%field;)+)>

-<!ATTLIST %key;

-          name     %NCName;       #REQUIRED

-	  id       ID             #IMPLIED

-	  %keyAttrs;>

-

-<!ELEMENT %keyref; ((%annotation;)?, %selector;, (%field;)+)>

-<!ATTLIST %keyref;

-          name     %NCName;       #REQUIRED

-	  refer    %QName;        #REQUIRED

-	  id       ID             #IMPLIED

-	  %keyrefAttrs;>

-

-<!ELEMENT %selector; ((%annotation;)?)>

-<!ATTLIST %selector;

-          xpath %XPathExpr; #REQUIRED

-          id    ID          #IMPLIED

-          %selectorAttrs;>

-<!ELEMENT %field; ((%annotation;)?)>

-<!ATTLIST %field;

-          xpath %XPathExpr; #REQUIRED

-          id    ID          #IMPLIED

-          %fieldAttrs;>

-

-<!-- Schema combination mechanisms -->

-<!ELEMENT %include; (%annotation;)?>

-<!ATTLIST %include;

-          schemaLocation %URIref; #REQUIRED

-          id             ID       #IMPLIED

-          %includeAttrs;>

-

-<!ELEMENT %import; (%annotation;)?>

-<!ATTLIST %import;

-          namespace      %URIref; #IMPLIED

-          schemaLocation %URIref; #IMPLIED

-          id             ID       #IMPLIED

-          %importAttrs;>

-

-<!ELEMENT %redefine; (%annotation; | %simpleType; | %complexType; |

-                      %attributeGroup; | %group;)*>

-<!ATTLIST %redefine;

-          schemaLocation %URIref; #REQUIRED

-          id             ID       #IMPLIED

-          %redefineAttrs;>

-

-<!ELEMENT %notation; (%annotation;)?>

-<!ATTLIST %notation;

-	  name        %NCName;    #REQUIRED

-	  id          ID          #IMPLIED

-	  public      CDATA       #REQUIRED

-	  system      %URIref;    #IMPLIED

-	  %notationAttrs;>

-

-<!-- Annotation is either application information or documentation -->

-<!-- By having these here they are available for datatypes as well

-     as all the structures elements -->

-

-<!ELEMENT %annotation; (%appinfo; | %documentation;)*>

-<!ATTLIST %annotation; %annotationAttrs;>

-

-<!-- User must define annotation elements in internal subset for this

-     to work -->

-<!ELEMENT %appinfo; ANY>   <!-- too restrictive -->

-<!ATTLIST %appinfo;

-          source     %URIref;      #IMPLIED

-          id         ID         #IMPLIED

-          %appinfoAttrs;>

-<!ELEMENT %documentation; ANY>   <!-- too restrictive -->

-<!ATTLIST %documentation;

-          source     %URIref;   #IMPLIED

-          id         ID         #IMPLIED

-          xml:lang   CDATA      #IMPLIED

-          %documentationAttrs;>

-

-<!NOTATION XMLSchemaStructures PUBLIC

-           'structures' 'http://www.w3.org/2001/XMLSchema.xsd' >

-<!NOTATION XML PUBLIC

-           'REC-xml-1998-0210' 'http://www.w3.org/TR/1998/REC-xml-19980210' >

diff --git a/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/castor-portlet-xml-mapping.xml b/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/castor-portlet-xml-mapping.xml
deleted file mode 100644
index 84734d1..0000000
--- a/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/castor-portlet-xml-mapping.xml
+++ /dev/null
@@ -1,133 +0,0 @@
-<?xml version="1.0"?>

-<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Object Mapping DTD Version 1.0//EN"

-                         "http://castor.exolab.org/mapping.dtd">

-<!-- 

-  Copyright 2004 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<mapping>

-  <description>Portlet Deployment Descriptor Mapping</description>

-

-  <!--

-   Bare Bones for now!

-   -->

-

-  <class name="org.apache.pluto.descriptors.portlet.PortletAppDD">

-    <map-to xml="portlet-app"/>

-    <field name="Portlets"

-           type="org.apache.pluto.descriptors.portlet.PortletDD"

-           collection="arraylist">

-      <bind-xml name="portlet" node="element"/>

-    </field>

-  </class>

-

-  <class name="org.apache.pluto.descriptors.portlet.PortletDD">

-    <field name="PortletName">

-      <bind-xml name="portlet-name" node="element"/>

-    </field>

-

-    <field name="PortletClass">

-      <bind-xml name="portlet-class" node="element"/>

-    </field>

-

-    <field name="PortletInfo" type="org.apache.pluto.descriptors.portlet.PortletInfoDD">

-      <bind-xml name="portlet-info" node="element"/>

-    </field>

-

-    <field name="InitParams" type="org.apache.pluto.descriptors.common.InitParamDD" collection="arraylist">

-      <bind-xml name="init-param" node="element" />

-    </field>

-      

-    <field name="ResourceBundle">

-      <bind-xml name="resource-bundle" node="element"/>

-    </field>

-

-    <field name="SecurityRoleRefs"

-           type="org.apache.pluto.descriptors.common.SecurityRoleRefDD"

-           collection="arraylist">

-      <bind-xml name="security-role-ref" node="element"/>

-    </field>

-

-    <field name="Supports" type="org.apache.pluto.descriptors.portlet.SupportsDD"

-           collection="arraylist">

-      <bind-xml name="supports" node="element"/>

-    </field>

-

-    <field name="PortletPreferences" type="org.apache.pluto.descriptors.portlet.PortletPreferencesDD">

-      <bind-xml name="portlet-preferences" node="element" />

-    </field>

-  </class>

-

-  <class name="org.apache.pluto.descriptors.portlet.PortletInfoDD">

-    <map-to xml="portlet-info"/>

-    <field name="Title">

-      <bind-xml name="title" node="element"/>

-    </field>

-    <field name="Keywords">

-      <bind-xml name="keywords" node="element"/>

-    </field>

-    <field name="ShortTitle">

-      <bind-xml name="short-title" node="element"/>

-    </field>

-  </class>

-    

-  <class name="org.apache.pluto.descriptors.portlet.SupportsDD">

-    <map-to xml="supports"/>

-

-    <field name="MimeType">

-      <bind-xml name="mime-type" node="element"/>

-    </field>

-

-    <field name="PortletModes" type="java.lang.String"

-           collection="arraylist">

-      <bind-xml name="portlet-mode" node="element"/>

-    </field>

-  </class>

-

-  <class name="org.apache.pluto.descriptors.common.InitParamDD">

-    <field name="ParamName">

-      <bind-xml name="name" node="element"/>

-    </field>

-    <field name="ParamValue">

-      <bind-xml name="value" node="element"/>

-    </field>

-  </class>

-

-  <class name="org.apache.pluto.descriptors.portlet.PortletPreferencesDD">

-    <map-to xml="portlet-preferences" />

-

-    <field name="PortletPreferences" type="org.apache.pluto.descriptors.portlet.PortletPreferenceDD"

-          collection="arraylist">

-      <bind-xml name="preference" node="element"/>

-    </field>

-

-    <field name="PreferencesValidator">

-      <bind-xml name="preferences-validator" node="element" />

-    </field>

-  </class>

-

-  <class name="org.apache.pluto.descriptors.portlet.PortletPreferenceDD">

-    <field name="Name">

-      <bind-xml name="name" node="element"/>

-    </field>

-    <field name="Values" type="java.lang.String" collection="arraylist">

-      <bind-xml name="value" node="element"/>

-    </field>

-    <field name="ReadOnly" type="boolean">

-      <bind-xml name="read-only" node="element"/>

-    </field>

-  </class>

-

-</mapping>

-

diff --git a/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/castor-web-xml-mapping.xml b/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/castor-web-xml-mapping.xml
deleted file mode 100644
index 42b2401..0000000
--- a/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/castor-web-xml-mapping.xml
+++ /dev/null
@@ -1,323 +0,0 @@
-<?xml version="1.0"?>

-<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Object Mapping DTD Version 1.0//EN"

-                         "http://castor.exolab.org/mapping.dtd">

-<!-- 

-  Copyright 2004 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<mapping>

-  <description>Servlet Deployment Descriptor Mapping</description>

-

-  <!--

-    The Root WebApplication Element

-    This element should map each and every one of the possible 2.4

-    elments in order.

-      + icon,

-      + display-name

-      + description

-      + distributable

-      + context-param

-      + filter

-      + filter-mapping

-      + listener

-      + servlet

-      + servlet-mapping

-      + session-config

-      + mime-mapping

-      + welcome-file-list?,

-      + error-page

-      + taglib

-      + resource-env-ref

-      + resource-ref

-      + security-constraint

-      + login-config

-      + security-role

-      + env-entry

-      + ejb-ref

-      + ejb-local-ref

-    -->

-  <class name="org.apache.pluto.descriptors.servlet.WebAppDD">

-    <map-to xml="web-app"/>

-      

-    <field name="Icon"

-           type="org.apache.pluto.descriptors.common.IconDD"/>

-

-    <field name="DisplayName">

-      <bind-xml name="display-name" node="element"/>

-    </field>

-

-    <field name="Description">

-      <bind-xml name="description" node="element"/>

-    </field>

-

-    <field name="Distributable" get-method="isDistributable">

-      <bind-xml name="distributable" node="element"/>

-    </field>

-

-    <field name="ContextParams"

-           type="org.apache.pluto.descriptors.common.InitParamDD"

-           collection="arraylist">

-      <bind-xml name="context-param" node="element"/>

-    </field>

-

-    <field name="Filters"

-           type="org.apache.pluto.descriptors.servlet.FilterDD"

-           collection="arraylist">

-      <bind-xml name="filter" node="element"/>

-    </field>

-

-    <field name="Listeners"

-        type="org.apache.pluto.descriptors.servlet.ListenerDD"

-        collection="arraylist">

-        <bind-xml name="listener" node="element"/>

-    </field>

-

-    <field name="Servlets"

-           type="org.apache.pluto.descriptors.servlet.ServletDD"

-           collection="arraylist">

-      <bind-xml name="servlet" node="element"/>

-    </field>

-

-    <field name="FilterMappings"

-           type="org.apache.pluto.descriptors.servlet.FilterMappingDD"

-           collection="arraylist">

-      <bind-xml name="filter-mapping" node="element"/>

-    </field>

-

-    <field name="ServletMappings"

-        type="org.apache.pluto.descriptors.servlet.ServletMappingDD"

-        collection="arraylist">

-        <bind-xml name="servlet-mapping" node="element"/>

-    </field>

-

-    <field name="SessionConfig"

-           type="org.apache.pluto.descriptors.servlet.SessionConfigDD">

-      <bind-xml name="session-config" node="element"/>

-    </field>

-

-    <field name="MimeMappings"

-           type="org.apache.pluto.descriptors.servlet.MimeMappingDD"

-           collection="arraylist">

-      <bind-xml name="mime-mapping" node="element"/>

-    </field>

-

-    <field name="WelcomeFileList"

-           type="org.apache.pluto.descriptors.servlet.WelcomeFileListDD">

-       <bind-xml name="welcome-file-list" node="element"/>

-    </field>

-

-    <field name="ErrorPages"

-           type="org.apache.pluto.descriptors.servlet.ErrorPageDD"

-           collection="arraylist">

-        <bind-xml name="error-page" node="element"/>

-    </field>

-

-    <field name="Taglibs"

-           type="org.apache.pluto.descriptors.servlet.TaglibDD"

-           collection="arraylist">

-      <bind-xml name="taglib" node="element"/>

-    </field>

-

-    <field name="ResourceRefs"

-           type="org.apache.pluto.descriptors.servlet.ResourceRefDD"

-           collection="arraylist">

-      <bind-xml name="resource-ref" node="element"/>

-    </field>

-

-    <field name="SecurityConstraints"

-           type="org.apache.pluto.descriptors.servlet.SecurityConstraintDD"

-           collection="arraylist">

-      <bind-xml name="security-constraint" node="element"/>

-    </field>

-

-    <field name="LoginConfig"

-           type="org.apache.pluto.descriptors.servlet.LoginConfigDD">

-        <bind-xml name="login-config" node="element"/>

-    </field>

-

-    <field name="SecurityRoles"

-           type="org.apache.pluto.descriptors.servlet.SecurityRoleDD"

-           collection="arraylist">

-        <bind-xml name="security-role" node="element"/>

-    </field>

-

-    <field name="envEntrys"

-           type="org.apache.pluto.descriptors.servlet.EnvEntryDD"

-           collection="arraylist">

-      <bind-xml name="env-entry" node="element"/>    

-    </field>

-      

-    <field name="ejbRefs"

-           type="org.apache.pluto.descriptors.servlet.EjbRefDD"

-           collection="arraylist">

-      <bind-xml name="ejb-ref" node="element"/>

-    </field>

-  </class>

-

-  <!--

-    Filter DDuration

-     + filter

-     + filter-mapping

-    -->

-  <class name="org.apache.pluto.descriptors.servlet.FilterDD">

-      <field name="Icon" type="org.apache.pluto.descriptors.common.IconDD"/>

-

-      <field name="FilterName">

-          <bind-xml name="filter-name" node="element"/>

-      </field>

-

-      <field name="DisplayName">

-          <bind-xml name="display-name" node="element"/>

-      </field>

-

-      <field name="Description">

-          <bind-xml name="description" node="element"/>

-      </field>

-

-      <field name="FilterClass">

-          <bind-xml name="filter-class" node="element"/>

-      </field>

-

-      <field name="InitParams"

-          type="org.apache.pluto.descriptors.common.InitParamDD"

-          collection="arraylist">

-          <bind-xml name="init-param"/>

-      </field>

-  </class>

-  <class name="org.apache.pluto.descriptors.servlet.FilterMappingDD">

-

-    <field name="FilterName">

-        <bind-xml name="filter-name" node="element"/>

-    </field>

-

-    <field name="ServletName">

-        <bind-xml name="servlet-name" node="element"/>

-    </field>

-

-    <field name="UrlPatterns" type="java.lang.String"

-           collection="arraylist">

-        <bind-xml name="url-pattern" node="element"/>

-    </field>

-    <field name="Dispatchers" type="java.lang.String"

-           collection="arraylist">

-        <bind-xml name="dispatcher" node="element"/>

-    </field>

-  </class>

-

-

-    <!--

-      Servlet DDuration

-      -->

-

-    <class name="org.apache.pluto.descriptors.servlet.ServletDD">

-      <field name="Icon" type="org.apache.pluto.descriptors.common.IconDD"/>

-

-      <field name="ServletName">

-          <bind-xml name="servlet-name" node="element"/>

-      </field>

-

-      <field name="DisplayName">

-          <bind-xml name="display-name" node="element"/>

-      </field>

-

-      <field name="Description">

-          <bind-xml name="description" node="element"/>

-      </field>

-

-      <field name="ServletClass">

-          <bind-xml name="servlet-class" node="element"/>

-      </field>

-

-      <field name="JspFile">

-          <bind-xml name="jsp-file" node="element"/>

-      </field>

-

-      <field name="InitParams"

-             type="org.apache.pluto.descriptors.common.InitParamDD"

-             collection="arraylist">

-          <bind-xml name="init-param"/>

-      </field>

-

-      <field name="LoadOnStartup"

-             type="org.apache.pluto.descriptors.servlet.LoadOnStartupDD">

-          <bind-xml name="load-on-startup" node="element"/>

-      </field>

-

-      <field name="SecurityRoleRefs"

-             type="org.apache.pluto.descriptors.common.SecurityRoleRefDD"

-             collection="arraylist">

-        <bind-xml name="security-role-ref" node="element"/>

-      </field>

-    </class>

-

-    <class name="org.apache.pluto.descriptors.servlet.SessionConfigDD">

-      <field name="SessionTimeout" type="int">

-        <bind-xml name="session-timeout" node="element"/>

-      </field>

-    </class>

-

-    <class name="org.apache.pluto.descriptors.servlet.WelcomeFileListDD">

-      <field name="WelcomeFiles"

-          type="java.lang.String"

-          collection="arraylist">

-          <bind-xml name="welcome-file" node="element"/>

-      </field>

-    </class>

-

-    <!--

-      Security Constraint

-      + SecurityConstraint

-      + WebResourceCollection

-      -->

-    <class name="org.apache.pluto.descriptors.servlet.SecurityConstraintDD">

-        <field name="DisplayName" type="java.lang.String"/>

-        <field name="WebResourceCollections"

-               type="org.apache.pluto.descriptors.servlet.WebResourceCollectionDD"

-               collection="arraylist">

-          <bind-xml name="web-resource-collection" node="element"/>

-        </field>

-        <field name="AuthConstraint"

-               type="org.apache.pluto.descriptors.servlet.AuthConstraintDD"/>

-        <field name="UserDataConstraint"

-               type="org.apache.pluto.descriptors.servlet.UserDataConstraintDD"/>

-    </class>

-    <class name="org.apache.pluto.descriptors.servlet.WebResourceCollectionDD">

-        <field name="description" type="java.lang.String"/>

-        <field name="webResourceName" type="java.lang.String"/>

-        <field name="httpMethods" type="java.lang.String" collection="arraylist">

-          <bind-xml name="http-method" node="element"/>

-        </field>

-        <field name="urlPatterns" type="java.lang.String" collection="arraylist">

-            <bind-xml name="url-pattern" node="element"/>

-        </field>

-    </class>

-

-    <class name="org.apache.pluto.descriptors.servlet.LoginConfigDD">

-        <field name="AuthMethod" type="java.lang.String"/>

-        <field name="FormLoginConfig"

-               type="org.apache.pluto.descriptors.servlet.FormLoginConfigDD">

-          <bind-xml name="form-login-config" node="element"/>

-        </field>

-        <field name="RealmName" type="java.lang.String"/>

-    </class>

-

-    <class name="org.apache.pluto.descriptors.servlet.LoadOnStartupDD">

-        <field name="Priority" type="int">

-            <bind-xml name="load-on-startup" node="text"/>

-        </field>

-    </class>

-

-

-</mapping>

-

diff --git a/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/datatypes.dtd b/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/datatypes.dtd
deleted file mode 100644
index 7e2650d..0000000
--- a/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/datatypes.dtd
+++ /dev/null
@@ -1,219 +0,0 @@
-<!-- 

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<!--

-        DTD for XML Schemas: Part 2: Datatypes

-        $Id: datatypes.dtd,v 1.1.1.1 2003/09/30 14:03:00 rubys Exp $

-        Note this DTD is NOT normative, or even definitive. - - the

-        prose copy in the datatypes REC is the definitive version

-        (which shouldn't differ from this one except for this comment

-        and entity expansions, but just in case)

-  -->

-

-<!--

-        This DTD cannot be used on its own, it is intended

-        only for incorporation in XMLSchema.dtd, q.v.

-  -->

-

-<!-- Define all the element names, with optional prefix -->

-<!ENTITY % simpleType "%p;simpleType">

-<!ENTITY % restriction "%p;restriction">

-<!ENTITY % list "%p;list">

-<!ENTITY % union "%p;union">

-<!ENTITY % maxExclusive "%p;maxExclusive">

-<!ENTITY % minExclusive "%p;minExclusive">

-<!ENTITY % maxInclusive "%p;maxInclusive">

-<!ENTITY % minInclusive "%p;minInclusive">

-<!ENTITY % totalDigits "%p;totalDigits">

-<!ENTITY % fractionDigits "%p;fractionDigits">

-<!ENTITY % length "%p;length">

-<!ENTITY % minLength "%p;minLength">

-<!ENTITY % maxLength "%p;maxLength">

-<!ENTITY % enumeration "%p;enumeration">

-<!ENTITY % whiteSpace "%p;whiteSpace">

-<!ENTITY % pattern "%p;pattern">

-

-<!--

-        Customisation entities for the ATTLIST of each element

-        type. Define one of these if your schema takes advantage

-        of the anyAttribute='##other' in the schema for schemas

-  -->

-

-<!ENTITY % simpleTypeAttrs "">

-<!ENTITY % restrictionAttrs "">

-<!ENTITY % listAttrs "">

-<!ENTITY % unionAttrs "">

-<!ENTITY % maxExclusiveAttrs "">

-<!ENTITY % minExclusiveAttrs "">

-<!ENTITY % maxInclusiveAttrs "">

-<!ENTITY % minInclusiveAttrs "">

-<!ENTITY % totalDigitsAttrs "">

-<!ENTITY % fractionDigitsAttrs "">

-<!ENTITY % lengthAttrs "">

-<!ENTITY % minLengthAttrs "">

-<!ENTITY % maxLengthAttrs "">

-<!ENTITY % enumerationAttrs "">

-<!ENTITY % whiteSpaceAttrs "">

-<!ENTITY % patternAttrs "">

-

-<!-- Define some entities for informative use as attribute

-        types -->

-<!ENTITY % URIref "CDATA">

-<!ENTITY % XPathExpr "CDATA">

-<!ENTITY % QName "NMTOKEN">

-<!ENTITY % QNames "NMTOKENS">

-<!ENTITY % NCName "NMTOKEN">

-<!ENTITY % nonNegativeInteger "NMTOKEN">

-<!ENTITY % boolean "(true|false)">

-<!ENTITY % simpleDerivationSet "CDATA">

-<!--

-        #all or space-separated list drawn from derivationChoice

-  -->

-

-<!--

-        Note that the use of 'facet' below is less restrictive

-        than is really intended:  There should in fact be no

-        more than one of each of minInclusive, minExclusive,

-        maxInclusive, maxExclusive, totalDigits, fractionDigits,

-        length, maxLength, minLength within datatype,

-        and the min- and max- variants of Inclusive and Exclusive

-        are mutually exclusive. On the other hand,  pattern and

-        enumeration may repeat.

-  -->

-<!ENTITY % minBound "(%minInclusive; | %minExclusive;)">

-<!ENTITY % maxBound "(%maxInclusive; | %maxExclusive;)">

-<!ENTITY % bounds "%minBound; | %maxBound;">

-<!ENTITY % numeric "%totalDigits; | %fractionDigits;">

-<!ENTITY % ordered "%bounds; | %numeric;">

-<!ENTITY % unordered

-   "%pattern; | %enumeration; | %whiteSpace; | %length; |

-   %maxLength; | %minLength;">

-<!ENTITY % facet "%ordered; | %unordered;">

-<!ENTITY % facetAttr 

-        "value CDATA #REQUIRED

-        id ID #IMPLIED">

-<!ENTITY % fixedAttr "fixed %boolean; #IMPLIED">

-<!ENTITY % facetModel "(%annotation;)?">

-<!ELEMENT %simpleType;

-        ((%annotation;)?, (%restriction; | %list; | %union;))>

-<!ATTLIST %simpleType;

-    name      %NCName; #IMPLIED

-    final     %simpleDerivationSet; #IMPLIED

-    id        ID       #IMPLIED

-    %simpleTypeAttrs;>

-<!-- name is required at top level -->

-<!ELEMENT %restriction; ((%annotation;)?,

-                         (%restriction1; |

-                          ((%simpleType;)?,(%facet;)*)),

-                         (%attrDecls;))>

-<!ATTLIST %restriction;

-    base      %QName;                  #IMPLIED

-    id        ID       #IMPLIED

-    %restrictionAttrs;>

-<!--

-        base and simpleType child are mutually exclusive,

-        one is required.

-

-        restriction is shared between simpleType and

-        simpleContent and complexContent (in XMLSchema.xsd).

-        restriction1 is for the latter cases, when this

-        is restricting a complex type, as is attrDecls.

-  -->

-<!ELEMENT %list; ((%annotation;)?,(%simpleType;)?)>

-<!ATTLIST %list;

-    itemType      %QName;             #IMPLIED

-    id        ID       #IMPLIED

-    %listAttrs;>

-<!--

-        itemType and simpleType child are mutually exclusive,

-        one is required

-  -->

-<!ELEMENT %union; ((%annotation;)?,(%simpleType;)*)>

-<!ATTLIST %union;

-    id            ID       #IMPLIED

-    memberTypes   %QNames;            #IMPLIED

-    %unionAttrs;>

-<!--

-        At least one item in memberTypes or one simpleType

-        child is required

-  -->

-

-<!ELEMENT %maxExclusive; %facetModel;>

-<!ATTLIST %maxExclusive;

-        %facetAttr;

-        %fixedAttr;

-        %maxExclusiveAttrs;>

-<!ELEMENT %minExclusive; %facetModel;>

-<!ATTLIST %minExclusive;

-        %facetAttr;

-        %fixedAttr;

-        %minExclusiveAttrs;>

-

-<!ELEMENT %maxInclusive; %facetModel;>

-<!ATTLIST %maxInclusive;

-        %facetAttr;

-        %fixedAttr;

-        %maxInclusiveAttrs;>

-<!ELEMENT %minInclusive; %facetModel;>

-<!ATTLIST %minInclusive;

-        %facetAttr;

-        %fixedAttr;

-        %minInclusiveAttrs;>

-

-<!ELEMENT %totalDigits; %facetModel;>

-<!ATTLIST %totalDigits;

-        %facetAttr;

-        %fixedAttr;

-        %totalDigitsAttrs;>

-<!ELEMENT %fractionDigits; %facetModel;>

-<!ATTLIST %fractionDigits;

-        %facetAttr;

-        %fixedAttr;

-        %fractionDigitsAttrs;>

-

-<!ELEMENT %length; %facetModel;>

-<!ATTLIST %length;

-        %facetAttr;

-        %fixedAttr;

-        %lengthAttrs;>

-<!ELEMENT %minLength; %facetModel;>

-<!ATTLIST %minLength;

-        %facetAttr;

-        %fixedAttr;

-        %minLengthAttrs;>

-<!ELEMENT %maxLength; %facetModel;>

-<!ATTLIST %maxLength;

-        %facetAttr;

-        %fixedAttr;

-        %maxLengthAttrs;>

-

-<!-- This one can be repeated -->

-<!ELEMENT %enumeration; %facetModel;>

-<!ATTLIST %enumeration;

-        %facetAttr;

-        %enumerationAttrs;>

-

-<!ELEMENT %whiteSpace; %facetModel;>

-<!ATTLIST %whiteSpace;

-        %facetAttr;

-        %fixedAttr;

-        %whiteSpaceAttrs;>

-

-<!-- This one can be repeated -->

-<!ELEMENT %pattern; %facetModel;>

-<!ATTLIST %pattern;

-        %facetAttr;

-        %patternAttrs;>

diff --git a/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/portlet-app_1_0.xsd b/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/portlet-app_1_0.xsd
deleted file mode 100644
index 58a8259..0000000
--- a/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/portlet-app_1_0.xsd
+++ /dev/null
@@ -1,648 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!-- 

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<schema targetNamespace="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:portlet="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0" xml:lang="en">

-	<annotation>

-		<documentation>

-		This is the XML Schema for the Portlet 1.0 deployment descriptor.

-		</documentation>

-	</annotation>

-	<annotation>

-		<documentation>

-		The following conventions apply to all J2EE

-		deployment descriptor elements unless indicated otherwise.

-		- In elements that specify a pathname to a file within the

-		  same JAR file, relative filenames (i.e., those not

-		  starting with "/") are considered relative to the root of

-		  the JAR file's namespace.  Absolute filenames (i.e., those

-		  starting with "/") also specify names in the root of the

-		  JAR file's namespace.  In general, relative names are

-		  preferred.  The exception is .war files where absolute

-		  names are preferred for consistency with the Servlet API.

-		</documentation>

-	</annotation>

-	<!-- *********************************************************** -->

-	<import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>

-	<element name="portlet-app" type="portlet:portlet-appType">

-		<annotation>

-			<documentation>

-			The portlet-app element is the root of the deployment descriptor

-			for a portlet application. This element has a required attribute version

-			to specify to which version of the schema the deployment descriptor

-			conforms.

-			</documentation>

-		</annotation>

-		<unique name="portlet-name-uniqueness">

-			<annotation>

-				<documentation>

-				The portlet element contains the name of a portlet.

-				This name must be unique within the portlet application.

-				 </documentation>

-			</annotation>

-			<selector xpath="portlet:portlet"/>

-			<field xpath="portlet:portlet-name"/>

-		</unique>

-		<unique name="custom-portlet-mode-uniqueness">

-			<annotation>

-				<documentation>

-				The custom-portlet-mode element contains the portlet-mode.

-				This portlet mode must be unique within the portlet application.

-				</documentation>

-			</annotation>

-			<selector xpath="portlet:custom-portlet-mode"/>

-			<field xpath="portlet:portlet-mode"/>

-		</unique>

-		<unique name="custom-window-state-uniqueness">

-			<annotation>

-				<documentation>

-				The custom-window-state element contains the window-state.

-				This window state must be unique within the portlet application.

-				</documentation>

-			</annotation>

-			<selector xpath="portlet:custom-window-state"/>

-			<field xpath="portlet:window-state"/>

-		</unique>

-		<unique name="user-attribute-name-uniqueness">

-			<annotation>

-				<documentation>

-				The user-attribute element contains the name the attribute.

-				This name must be unique within the portlet application.

-				</documentation>

-			</annotation>

-			<selector xpath="portlet:user-attribute"/>

-			<field xpath="portlet:name"/>

-		</unique>

-	</element>

-	<complexType name="portlet-appType">

-		<sequence>

-			<element name="portlet" type="portlet:portletType" minOccurs="0" maxOccurs="unbounded">

-				<unique name="init-param-name-uniqueness">

-					<annotation>

-						<documentation>

-						The init-param element contains the name the attribute.

-						This name must be unique within the portlet.

-						</documentation>

-					</annotation>

-					<selector xpath="portlet:init-param"/>

-					<field xpath="portlet:name"/>

-				</unique>

-				<unique name="supports-mime-type-uniqueness">

-					<annotation>

-						<documentation>

-						The supports element contains the supported mime-type.

-						This mime type must be unique within the portlet.

-						</documentation>

-					</annotation>

-					<selector xpath="portlet:supports"/>

-					<field xpath="mime-type"/>

-				</unique>

-				<unique name="preference-name-uniqueness">

-					<annotation>

-						<documentation>

-						The preference element contains the name the preference.

-						This name must be unique within the portlet.

-						</documentation>

-					</annotation>

-					<selector xpath="portlet:portlet-preferences/portlet:preference"/>

-					<field xpath="portlet:name"/>

-				</unique>

-				<unique name="security-role-ref-name-uniqueness">

-					<annotation>

-						<documentation>

-						The security-role-ref element contains the role-name.

-						This role name must be unique within the portlet.

-						</documentation>

-					</annotation>

-					<selector xpath="portlet:security-role-ref"/>

-					<field xpath="portlet:role-name"/>

-				</unique>

-			</element>

-			<element name="custom-portlet-mode" type="portlet:custom-portlet-modeType" minOccurs="0" maxOccurs="unbounded"/>

-			<element name="custom-window-state" type="portlet:custom-window-stateType" minOccurs="0" maxOccurs="unbounded"/>

-			<element name="user-attribute" type="portlet:user-attributeType" minOccurs="0" maxOccurs="unbounded"/>

-			<element name="security-constraint" type="portlet:security-constraintType" minOccurs="0" maxOccurs="unbounded"/>

-		</sequence>

-		<attribute name="version" type="string" use="required"/>

-		<attribute name="id" type="string" use="optional"/>

-	</complexType>

-	<complexType name="custom-portlet-modeType">

-		<annotation>

-			<documentation>

-			A custom portlet mode that one or more portlets in 

-			this portlet application supports.

-			Used in: portlet-app

-			</documentation>

-		</annotation>

-		<sequence>

-			<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>

-			<element name="portlet-mode" type="portlet:portlet-modeType"/>

-		</sequence>

-		<attribute name="id" type="string" use="optional"/>

-	</complexType>

-	<complexType name="custom-window-stateType">

-		<annotation>

-			<documentation>

-			A custom window state that one or more portlets in this 

-			portlet application supports.

-			Used in: portlet-app

-			</documentation>

-		</annotation>

-		<sequence>

-			<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>

-			<element name="window-state" type="portlet:window-stateType"/>

-		</sequence>

-		<attribute name="id" type="string" use="optional"/>

-	</complexType>

-	<complexType name="expiration-cacheType">

-		<annotation>

-			<documentation>

-			Expriation-cache defines expiration-based caching for this

-			portlet. The parameter indicates

-			the time in seconds after which the portlet output expires. 

-			-1 indicates that the output never expires.

-			Used in: portlet

-			</documentation>

-		</annotation>

-		<simpleContent>

-			<extension base="int"/>

-		</simpleContent>

-	</complexType>

-	<complexType name="init-paramType">

-		<annotation>

-			<documentation>

-			The init-param element contains a name/value pair as an 

-			initialization param of the portlet

-			Used in:portlet

-			</documentation>

-		</annotation>

-		<sequence>

-			<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>

-			<element name="name" type="portlet:nameType"/>

-			<element name="value" type="portlet:valueType"/>

-		</sequence>

-		<attribute name="id" type="string" use="optional"/>

-	</complexType>

-	<complexType name="keywordsType">

-		<annotation>

-			<documentation>

-			Locale specific keywords associated with this portlet.

-			The kewords are separated by commas.

-			Used in: portlet-info

-			</documentation>

-		</annotation>

-		<simpleContent>

-			<extension base="string"/>

-		</simpleContent>

-	</complexType>

-	<complexType name="mime-typeType">

-		<annotation>

-			<documentation>

-			MIME type name, e.g. "text/html".

-			The MIME type may also contain the wildcard

-			character '*', like "text/*" or "*/*".

-			Used in: supports

-			</documentation>

-		</annotation>

-		<simpleContent>

-			<extension base="string"/>

-		</simpleContent>

-	</complexType>

-	<complexType name="nameType">

-		<annotation>

-			<documentation>

-			The name element contains the name of a parameter. 

-			Used in: init-param, ...

-			</documentation>

-		</annotation>

-		<simpleContent>

-			<extension base="string"/>

-		</simpleContent>

-	</complexType>

-	<complexType name="portletType">

-		<annotation>

-			<documentation>

-			The portlet element contains the declarative data of a portlet. 

-			Used in: portlet-app

-			</documentation>

-		</annotation>

-		<sequence>

-			<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>

-			<element name="portlet-name" type="portlet:portlet-nameType"/>

-			<element name="display-name" type="portlet:display-nameType" minOccurs="0" maxOccurs="unbounded"/>

-			<element name="portlet-class" type="portlet:portlet-classType"/>

-			<element name="init-param" type="portlet:init-paramType" minOccurs="0" maxOccurs="unbounded"/>

-			<element name="expiration-cache" type="portlet:expiration-cacheType" minOccurs="0"/>

-			<element name="supports" type="portlet:supportsType" maxOccurs="unbounded"/>

-			<element name="supported-locale" type="portlet:supported-localeType" minOccurs="0" maxOccurs="unbounded"/>

-			<choice>

-				<sequence>

-					<element name="resource-bundle" type="portlet:resource-bundleType"/>

-					<element name="portlet-info" type="portlet:portlet-infoType" minOccurs="0"/>

-   			  	</sequence>

-   				<element name="portlet-info" type="portlet:portlet-infoType"/>

-			</choice>

-			<element name="portlet-preferences" type="portlet:portlet-preferencesType" minOccurs="0"/>

-			<element name="security-role-ref" type="portlet:security-role-refType" minOccurs="0" maxOccurs="unbounded"/>

-		</sequence>

-		<attribute name="id" type="string" use="optional"/>

-	</complexType>

-	<simpleType name="portlet-classType">

-		<annotation>

-			<documentation>

-			 The portlet-class element contains the fully

-			 qualified class name of the portlet.

-			Used in: portlet

-			</documentation>

-		</annotation>

-		<restriction base="portlet:fully-qualified-classType"/>

-	</simpleType>

-	<complexType name="portlet-collectionType">

-		<annotation>

-			<documentation>

-			The portlet-collectionType is used to identify a subset

-			of portlets within a portlet application to which a 

-			security constraint applies.

-			Used in: security-constraint

-			</documentation>

-		</annotation>

-		<sequence>

-			<element name="portlet-name" type="portlet:portlet-nameType" maxOccurs="unbounded"/>

-		</sequence>

-	</complexType>

-	<complexType name="portlet-infoType">

-		<sequence>

-			<element name="title" type="portlet:titleType"/>

-			<element name="short-title" type="portlet:short-titleType" minOccurs="0"/>

-			<element name="keywords" type="portlet:keywordsType" minOccurs="0"/>

-		</sequence>

-		<attribute name="id" type="string" use="optional"/>

-	</complexType>

-	<complexType name="portlet-modeType">

-		<annotation>

-			<documentation>

-			Portlet modes. The specification pre-defines the following values 

-			as valid portlet mode constants: 

-			"edit", "help", "view".

-			Portlet mode names are not case sensitive.

-			Used in: custom-portlet-mode, supports

-			</documentation>

-		</annotation>

-		<simpleContent>

-			<extension base="string"/>

-		</simpleContent>

-	</complexType>

-	<complexType name="portlet-nameType">

-		<annotation>

-			<documentation>

-			The portlet-name element contains the canonical name of the 

-			portlet. Each portlet name is unique within the portlet 

-			application.

-			Used in: portlet, portlet-mapping

-			</documentation>

-		</annotation>

-		<simpleContent>

-			<extension base="string"/>

-		</simpleContent>

-	</complexType>

-	<complexType name="portlet-preferencesType">

-		<annotation>

-			<documentation>

-			Portlet persistent preference store.

-			Used in: portlet

-			</documentation>

-		</annotation>

-		<sequence>

-			<element name="preference" type="portlet:preferenceType" minOccurs="0" maxOccurs="unbounded"/>

-			<element name="preferences-validator" type="portlet:preferences-validatorType" minOccurs="0"/>

-		</sequence>

-		<attribute name="id" type="string" use="optional"/>

-	</complexType>

-	<complexType name="preferenceType">

-		<annotation>

-			<documentation>

-			Persistent preference values that may be used for customization 

-			and personalization by the portlet.

-			Used in: portlet-preferences

-			</documentation>

-		</annotation>

-		<sequence>

-			<element name="name" type="portlet:nameType"/>

-			<element name="value" type="portlet:valueType" minOccurs="0" maxOccurs="unbounded"/>

-			<element name="read-only" type="portlet:read-onlyType" minOccurs="0"/>

-		</sequence>

-		<attribute name="id" type="string" use="optional"/>

-	</complexType>

-	<simpleType name="preferences-validatorType">

-		<annotation>

-			<documentation>

-			The class specified under preferences-validator implements

-			the PreferencesValidator interface to validate the 

-			preferences settings.

-			Used in: portlet-preferences

-			</documentation>

-		</annotation>

-		<restriction base="portlet:fully-qualified-classType"/>

-	</simpleType>

-	<simpleType name="read-onlyType">

-		<annotation>

-			<documentation>

-			read-only indicates that a setting cannot

-			be changed in any of the standard portlet modes 

-			("view","edit" or "help").

-			Per default all preferences are modifiable.

-			Valid values are: 

-			- true for read-only

-			- false for modifiable

-			Used in: preferences

-			</documentation>

-		</annotation>

-		<restriction base="portlet:string">

-			<enumeration value="true"/>

-			<enumeration value="false"/>

-		</restriction>

-	</simpleType>

-	<complexType name="resource-bundleType">

-		<annotation>

-			<documentation>

-			Filename of the resource bundle containing the language specific 

-			portlet informations in different languages.

-			Used in: portlet-info

-			</documentation>

-		</annotation>

-		<simpleContent>

-			<extension base="string"/>

-		</simpleContent>

-	</complexType>

-	<complexType name="role-linkType">

-		<annotation>

-			<documentation>

-			The role-link element is a reference to a defined security role. 

-			The role-link element must contain the name of one of the 

-			security roles defined in the security-role elements.

-			Used in: security-role-ref

-			</documentation>

-		</annotation>

-		<simpleContent>

-			<extension base="string"/>

-		</simpleContent>

-	</complexType>

-	<complexType name="security-constraintType">

-		<annotation>

-			<documentation>

-			The security-constraintType is used to associate

-			intended security constraints with one or more portlets.

-			Used in: portlet-app

-			</documentation>

-		</annotation>

-		<sequence>

-			<element name="display-name" type="portlet:display-nameType" minOccurs="0" maxOccurs="unbounded"/>

-			<element name="portlet-collection" type="portlet:portlet-collectionType"/>

-			<element name="user-data-constraint" type="portlet:user-data-constraintType"/>

-		</sequence>

-		<attribute name="id" type="string" use="optional"/>

-	</complexType>

-	<complexType name="security-role-refType">

-		<annotation>

-			<documentation>

-			The security-role-ref element contains the declaration of a 

-			security role reference in the code of the web application. The 

-			declaration consists of an optional description, the security 

-			role name used in the code, and an optional link to a security 

-			role. If the security role is not specified, the Deployer must 

-			choose an appropriate security role.

-			The value of the role name element must be the String used 

-			as the parameter to the 

-			EJBContext.isCallerInRole(String roleName) method

-			or the HttpServletRequest.isUserInRole(String role) method.

-			Used in: portlet

-			</documentation>

-		</annotation>

-		<sequence>

-			<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>

-			<element name="role-name" type="portlet:role-nameType"/>

-			<element name="role-link" type="portlet:role-linkType" minOccurs="0"/>

-		</sequence>

-		<attribute name="id" type="string" use="optional"/>

-	</complexType>

-	<complexType name="short-titleType">

-		<annotation>

-			<documentation>

-			Locale specific short version of the static title.

-			Used in: portlet-info

-			</documentation>

-		</annotation>

-		<simpleContent>

-			<extension base="string"/>

-		</simpleContent>

-	</complexType>

-	<complexType name="supportsType">

-		<annotation>

-			<documentation>

-			Supports indicates the portlet modes a 

-			portlet supports for a specific content type. All portlets must 

-			support the view mode. 

-			Used in: portlet

-			</documentation>

-		</annotation>

-		<sequence>

-			<element name="mime-type" type="portlet:mime-typeType"/>

-			<element name="portlet-mode" type="portlet:portlet-modeType" minOccurs="0" maxOccurs="unbounded"/>

-		</sequence>

-		<attribute name="id" type="string" use="optional"/>

-	</complexType>

-	<complexType name="supported-localeType">

-		<annotation>

-			<documentation>

-			Indicated the locales the portlet supports.

-			Used in: portlet

-			</documentation>

-		</annotation>

-		<simpleContent>

-			<extension base="string"/>

-		</simpleContent>

-	</complexType>

-	<complexType name="titleType">

-		<annotation>

-			<documentation>

-			Locale specific static title for this portlet.

-			Used in: portlet-info

-			</documentation>

-		</annotation>

-		<simpleContent>

-			<extension base="string"/>

-		</simpleContent>

-	</complexType>

-	<simpleType name="transport-guaranteeType">

-		<annotation>

-			<documentation>

-			The transport-guaranteeType specifies that 

-			the communication between client and portlet should 

-			be NONE, INTEGRAL, or CONFIDENTIAL. 

-			NONE means that the portlet does not

-			require any transport guarantees. A value of 

-			INTEGRAL means that the portlet requires that the 

-			data sent between the client and portlet be sent in 

-			such a way that it can't be changed in transit. 

-			CONFIDENTIAL means that the portlet requires 

-			that the data be transmitted in a fashion that

-			prevents other entities from observing the contents 

-			of the transmission. 

-			In most cases, the presence of the INTEGRAL or

-			CONFIDENTIAL flag will indicate that the use 

-			of SSL is required.

- 			Used in: user-data-constraint

-			</documentation>

-		</annotation>

-		<restriction base="portlet:string">

-			<enumeration value="NONE"/>

-			<enumeration value="INTEGRAL"/>

-			<enumeration value="CONFIDENTIAL"/>

-		</restriction>

-	</simpleType>

-	<complexType name="user-attributeType">

-		<annotation>

-			<documentation>

-			User attribute defines a user specific attribute that the

-			portlet application needs. The portlet within this application 

-			can access this attribute via the request parameter USER_INFO

-			map.

-			Used in: portlet-app

-			</documentation>

-		</annotation>

-		<sequence>

-			<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>

-			<element name="name" type="portlet:nameType"/>

-		</sequence>

-		<attribute name="id" type="string" use="optional"/>

-	</complexType>

-	<complexType name="user-data-constraintType">

-		<annotation>

-			<documentation>

-			The user-data-constraintType is used to indicate how

-			data communicated between the client and portlet should be

-			protected.

-			Used in: security-constraint

-			</documentation>

-		</annotation>

-		<sequence>

-			<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>

-			<element name="transport-guarantee" type="portlet:transport-guaranteeType"/>

-		</sequence>

-		<attribute name="id" type="string" use="optional"/>

-	</complexType>

-	<complexType name="valueType">

-		<annotation>

-			<documentation>

-			The value element contains the value of a parameter.

-			Used in: init-param

-			</documentation>

-		</annotation>

-		<simpleContent>

-			<extension base="string"/>

-		</simpleContent>

-	</complexType>

-	<complexType name="window-stateType">

-		<annotation>

-			<documentation>

-			Portlet window state. Window state names are not case sensitive.

-			Used in: custom-window-state

-			</documentation>

-		</annotation>

-		<simpleContent>

-			<extension base="string"/>

-		</simpleContent>

-	</complexType>

-	<!--- everything below is copied from j2ee_1_4.xsd -->

-	<complexType name="descriptionType">

-		<annotation>

-			<documentation>

-			The description element is used to provide text describing the 

-			parent element. The description element should include any 

-			information that the portlet application war file producer wants

-			to provide to the consumer of the portlet application war file 

-			(i.e., to the Deployer). Typically, the tools used by the 

-			portlet application war file consumer will display the 

-			description when processing the parent element that contains the 

-			description. It has an optional attribute xml:lang to indicate 

-			which language is used in the description according to 

-			RFC 1766 (http://www.ietf.org/rfc/rfc1766.txt). The default

-			value of this attribute is English(“en”).

-			Used in: init-param, portlet, portlet-app, security-role

-			</documentation>

-		</annotation>

-		<simpleContent>

-			<extension base="string">

-				<attribute ref="xml:lang"/>

-			</extension>

-		</simpleContent>

-	</complexType>

-	<complexType name="display-nameType">

-		<annotation>

-			<documentation>

-			The display-name type contains a short name that is intended

-			to be displayed by tools. It is used by display-name

-			elements.  The display name need not be unique.

-			Example:

-				...

-  			<display-name xml:lang="en">Employee Self Service</display-name>

-

-			It has an optional attribute xml:lang to indicate 

-			which language is used in the description according to 

-			RFC 1766 (http://www.ietf.org/rfc/rfc1766.txt). The default

-			value of this attribute is English(“en”).

-			</documentation>

-		</annotation>

-		<simpleContent>

-			<extension base="portlet:string">

-				<attribute ref="xml:lang"/>

-			</extension>

-		</simpleContent>

-	</complexType>

-	<simpleType name="fully-qualified-classType">

-		<annotation>

-			<documentation>

-			The elements that use this type designate the name of a

-			Java class or interface.

-			</documentation>

-		</annotation>

-		<restriction base="portlet:string"/>

-	</simpleType>

-	<simpleType name="role-nameType">

-		<annotation>

-			<documentation>

-			The role-nameType designates the name of a security role.

-

-			The name must conform to the lexical rules for an NMTOKEN.

-			</documentation>

-		</annotation>

-		<restriction base="NMTOKEN"/>

-	</simpleType>

-	<simpleType name="string">

-		<annotation>

-			<documentation>

-			This is a special string datatype that is defined by J2EE 

-			as a base type for defining collapsed strings. When 

-			schemas require trailing/leading space elimination as 

-			well as collapsing the existing whitespace, this base 

-			type may be used.

-			</documentation>

-		</annotation>

-		<restriction base="string">

-			<whiteSpace value="collapse"/>

-		</restriction>

-	</simpleType>

-</schema>

diff --git a/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/web-app_2_3.dtd b/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/web-app_2_3.dtd
deleted file mode 100644
index b733607..0000000
--- a/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/web-app_2_3.dtd
+++ /dev/null
@@ -1,1063 +0,0 @@
-<!--

-Copyright (c) 2000 Sun Microsystems, Inc.,

-901 San Antonio Road,

-Palo Alto, California 94303, U.S.A.

-All rights reserved.

-

-Sun Microsystems, Inc. has intellectual property rights relating to

-technology embodied in the product that is described in this document.

-In particular, and without limitation, these intellectual property

-rights may include one or more of the U.S. patents listed at

-http://www.sun.com/patents and one or more additional patents or

-pending patent applications in the U.S. and in other countries.

-

-This document and the product to which it pertains are distributed

-under licenses restricting their use, copying, distribution, and

-decompilation.  This document may be reproduced and distributed but may

-not be changed without prior written authorization of Sun and its

-licensors, if any.

-

-Third-party software, including font technology, is copyrighted and

-licensed from Sun suppliers.

-

-Sun,  Sun Microsystems,  the Sun logo,  Java,  JavaServer Pages,  Java

-Naming and Directory Interface,  JDBC,  JDK,  JavaMail and  and

-Enterprise JavaBeans are trademarks or registered trademarks of Sun

-Microsystems, Inc. in the U.S. and other countries.

-

-Federal Acquisitions: Commercial Software - Government Users Subject to

-Standard License Terms and Conditions.

-

-DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED

-CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED

-WARRANTY OF MERCHANTABILITY, FITNESS FOR FOR A PARTICULAR PURPOSE OR

-NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH

-DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.

-

-

-_________________________________________________________________________

-

-Copyright (c) 2000 Sun Microsystems, Inc.,

-901 San Antonio Road,

-Palo Alto, California 94303, E'tats-Unis.

-Tous droits re'serve's.

-

-Sun Microsystems, Inc. a les droits de proprie'te' intellectuels

-relatants a` la technologie incorpore'e dans le produit qui est de'crit

-dans ce document. En particulier, et sans la limitation, ces droits de

-proprie'te' intellectuels peuvent inclure un ou plus des brevets

-ame'ricains e'nume're's a` http://www.sun.com/patents et un ou les

-brevets plus supple'mentaires ou les applications de brevet en attente

-dans les E'tats-Unis et dans les autres pays.

-

-Ce produit ou document est prote'ge' par un copyright et distribue'

-avec des licences qui en restreignent l'utilisation, la copie, la

-distribution, et la de'compilation.  Ce documention associe n peut

-e^tre reproduite et distribuer, par quelque moyen que ce soit, sans

-l'autorisation pre'alable et e'crite de Sun et de ses bailleurs de

-licence, le cas e'che'ant.

-

-Le logiciel de'tenu par des tiers, et qui comprend la technologie

-relative aux polices de caracte`res, est prote'ge' par un copyright et

-licencie' par des fournisseurs de Sun.

-

-Sun,  Sun Microsystems,  le logo Sun,  Java,  JavaServer Pages,  Java

-Naming and Directory Interface,  JDBC,  JDK,  JavaMail et  and

-Enterprise JavaBeans sont des marques de fabrique ou des marques

-de'pose'es de Sun Microsystems, Inc. aux E'tats-Unis et dans d'autres

-pays.

-

-LA DOCUMENTATION EST FOURNIE "EN L'E'TAT" ET TOUTES AUTRES CONDITIONS,

-DECLARATIONS ET GARANTIES EXPRESSES OU TACITES SONT FORMELLEMENT

-EXCLUES, DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS

-NOTAMMENT TOUTE GARANTIE IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A

-L'APTITUDE A UNE UTILISATION PARTICULIERE OU A L'ABSENCE DE

-CONTREFAC,ON.

--->

-

-<!--

-This is the XML DTD for the Servlet 2.3 deployment descriptor.

-All Servlet 2.3 deployment descriptors must include a DOCTYPE

-of the following form:

-

-  <!DOCTYPE web-app PUBLIC

-	"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

-	"http://java.sun.com/dtd/web-app_2_3.dtd">

-

--->

-

-<!--

-The following conventions apply to all J2EE deployment descriptor

-elements unless indicated otherwise.

-

-- In elements that contain PCDATA, leading and trailing whitespace

-  in the data may be ignored.

-

-- In elements whose value is an "enumerated type", the value is

-  case sensitive.

-

-- In elements that specify a pathname to a file within the same

-  JAR file, relative filenames (i.e., those not starting with "/")

-  are considered relative to the root of the JAR file's namespace.

-  Absolute filenames (i.e., those starting with "/") also specify

-  names in the root of the JAR file's namespace.  In general, relative

-  names are preferred.  The exception is .war files where absolute

-  names are preferred for consistency with the servlet API.

--->

-

-

-<!--

-The web-app element is the root of the deployment descriptor for

-a web application.

--->

-<!ELEMENT web-app (icon?, display-name?, description?, distributable?,

-context-param*, filter*, filter-mapping*, listener*, servlet*,

-servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?,

-error-page*, taglib*, resource-env-ref*, resource-ref*, security-constraint*,

-login-config?, security-role*, env-entry*, ejb-ref*,  ejb-local-ref*)>

-

-<!--

-The auth-constraint element indicates the user roles that should

-be permitted access to this resource collection. The role-name

-used here must either correspond to the role-name of one of the

-security-role elements defined for this web application, or be

-the specially reserved role-name "*" that is a compact syntax for

-indicating all roles in the web application. If both "*" and

-rolenames appear, the container interprets this as all roles.

-If no roles are defined, no user is allowed access to the portion of

-the web application described by the containing security-constraint.

-The container matches role names case sensitively when determining

-access.

-

-

-Used in: security-constraint

--->

-<!ELEMENT auth-constraint (description?, role-name*)>

-

-<!--

-The auth-method element is used to configure the authentication

-mechanism for the web application. As a prerequisite to gaining access to any web resources which are protected by an authorization

-constraint, a user must have authenticated using the configured

-mechanism. Legal values for this element are "BASIC", "DIGEST",

-"FORM", or "CLIENT-CERT".

-

-Used in: login-config

--->

-<!ELEMENT auth-method (#PCDATA)>

-

-<!--

-The context-param element contains the declaration of a web

-application's servlet context initialization parameters.

-

-Used in: web-app

--->

-<!ELEMENT context-param (param-name, param-value, description?)>

-

-<!--

-The description element is used to provide text describing the parent

-element.  The description element should include any information that

-the web application war file producer wants to provide to the consumer of

-the web application war file (i.e., to the Deployer). Typically, the tools

-used by the web application war file consumer will display the description

-when processing the parent element that contains the description.

-

-Used in: auth-constraint, context-param, ejb-local-ref, ejb-ref,

-env-entry, filter, init-param, resource-env-ref, resource-ref, run-as,

-security-role, security-role-ref, servlet, user-data-constraint,

-web-app, web-resource-collection

--->

-<!ELEMENT description (#PCDATA)>

-

-<!--

-The display-name element contains a short name that is intended to be

-displayed by tools.  The display name need not be unique.

-

-Used in: filter, security-constraint, servlet, web-app

-

-Example:

-

-<display-name>Employee Self Service</display-name>

--->

-<!ELEMENT display-name (#PCDATA)>

-

-<!--

-The distributable element, by its presence in a web application

-deployment descriptor, indicates that this web application is

-programmed appropriately to be deployed into a distributed servlet

-container

-

-Used in: web-app

--->

-<!ELEMENT distributable EMPTY>

-

-<!--

-The ejb-link element is used in the ejb-ref or ejb-local-ref

-elements to specify that an EJB reference is linked to an

-enterprise bean.

-

-The name in the ejb-link element is composed of a

-path name specifying the ejb-jar containing the referenced enterprise

-bean with the ejb-name of the target bean appended and separated from

-the path name by "#".  The path name is relative to the war file

-containing the web application that is referencing the enterprise bean.

-This allows multiple enterprise beans with the same ejb-name to be

-uniquely identified.

-

-Used in: ejb-local-ref, ejb-ref

-

-Examples:

-

-	<ejb-link>EmployeeRecord</ejb-link>

-

-	<ejb-link>../products/product.jar#ProductEJB</ejb-link>

-

--->

-<!ELEMENT ejb-link (#PCDATA)>

-

-<!--

-The ejb-local-ref element is used for the declaration of a reference to

-an enterprise bean's local home. The declaration consists of:

-

-	- an optional description

-	- the EJB reference name used in the code of the web application

-	  that's referencing the enterprise bean

-	- the expected type of the referenced enterprise bean

-	- the expected local home and local interfaces of the referenced

-	  enterprise bean

-	- optional ejb-link information, used to specify the referenced

-	  enterprise bean

-

-Used in: web-app

--->

-<!ELEMENT ejb-local-ref (description?, ejb-ref-name, ejb-ref-type,

-		local-home, local, ejb-link?)>

-

-<!--

-The ejb-ref element is used for the declaration of a reference to

-an enterprise bean's home. The declaration consists of:

-

-	- an optional description

-	- the EJB reference name used in the code of

-	  the web application that's referencing the enterprise bean

-	- the expected type of the referenced enterprise bean

-	- the expected home and remote interfaces of the referenced

-	  enterprise bean

-	- optional ejb-link information, used to specify the referenced

-	  enterprise bean

-

-Used in: web-app

--->

-<!ELEMENT ejb-ref (description?, ejb-ref-name, ejb-ref-type,

-		home, remote, ejb-link?)>

-

-<!--

-The ejb-ref-name element contains the name of an EJB reference. The

-EJB reference is an entry in the web application's environment and is

-relative to the java:comp/env context.  The name must be unique

-within the web application.

-

-It is recommended that name is prefixed with "ejb/".

-

-Used in: ejb-local-ref, ejb-ref

-

-Example:

-

-<ejb-ref-name>ejb/Payroll</ejb-ref-name>

--->

-<!ELEMENT ejb-ref-name (#PCDATA)>

-

-<!--

-The ejb-ref-type element contains the expected type of the

-referenced enterprise bean.

-

-The ejb-ref-type element must be one of the following:

-

-	<ejb-ref-type>Entity</ejb-ref-type>

-	<ejb-ref-type>Session</ejb-ref-type>

-

-Used in: ejb-local-ref, ejb-ref

--->

-<!ELEMENT ejb-ref-type (#PCDATA)>

-

-<!--

-The env-entry element contains the declaration of a web application's

-environment entry. The declaration consists of an optional

-description, the name of the environment entry, and an optional

-value.  If a value is not specified, one must be supplied

-during deployment.

--->

-<!ELEMENT env-entry (description?, env-entry-name, env-entry-value?,

-env-entry-type)>

-

-<!--

-The env-entry-name element contains the name of a web applications's

-environment entry.  The name is a JNDI name relative to the

-java:comp/env context.  The name must be unique within a web application.

-

-Example:

-

-<env-entry-name>minAmount</env-entry-name>

-

-Used in: env-entry

--->

-<!ELEMENT env-entry-name (#PCDATA)>

-

-<!--

-The env-entry-type element contains the fully-qualified Java type of

-the environment entry value that is expected by the web application's

-code.

-

-The following are the legal values of env-entry-type:

-

-	java.lang.Boolean

-	java.lang.Byte

-	java.lang.Character

-	java.lang.String

-	java.lang.Short

-	java.lang.Integer

-	java.lang.Long

-	java.lang.Float

-	java.lang.Double

-

-Used in: env-entry

--->

-<!ELEMENT env-entry-type (#PCDATA)>

-

-<!--

-The env-entry-value element contains the value of a web application's

-environment entry. The value must be a String that is valid for the

-constructor of the specified type that takes a single String

-parameter, or for java.lang.Character, a single character.

-

-Example:

-

-<env-entry-value>100.00</env-entry-value>

-

-Used in: env-entry

--->

-<!ELEMENT env-entry-value (#PCDATA)>

-

-<!--

-The error-code contains an HTTP error code, ex: 404

-

-Used in: error-page

--->

-<!ELEMENT error-code (#PCDATA)>

-

-<!--

-The error-page element contains a mapping between an error code

-or exception type to the path of a resource in the web application

-

-Used in: web-app

--->

-<!ELEMENT error-page ((error-code | exception-type), location)>

-

-<!--

-The exception type contains a fully qualified class name of a

-Java exception type.

-

-Used in: error-page

--->

-<!ELEMENT exception-type (#PCDATA)>

-

-<!--

-The extension element contains a string describing an

-extension. example: "txt"

-

-Used in: mime-mapping

--->

-<!ELEMENT extension (#PCDATA)>

-

-<!--

-Declares a filter in the web application. The filter is mapped to

-either a servlet or a URL pattern in the filter-mapping element, using

-the filter-name value to reference. Filters can access the

-initialization parameters declared in the deployment descriptor at

-runtime via the FilterConfig interface.

-

-Used in: web-app

--->

-<!ELEMENT filter (icon?, filter-name, display-name?, description?,

-filter-class, init-param*)>

-

-<!--

-The fully qualified classname of the filter.

-

-Used in: filter

--->

-<!ELEMENT filter-class (#PCDATA)>

-

-<!--

-Declaration of the filter mappings in this web application. The

-container uses the filter-mapping declarations to decide which filters

-to apply to a request, and in what order. The container matches the

-request URI to a Servlet in the normal way. To determine which filters

-to apply it matches filter-mapping declarations either on servlet-name,

-or on url-pattern for each filter-mapping element, depending on which

-style is used. The order in which filters are invoked is the order in

-which filter-mapping declarations that match a request URI for a

-servlet appear in the list of filter-mapping elements.The filter-name

-value must be the value of the <filter-name> sub-elements of one of the

-<filter> declarations in the deployment descriptor.

-

-Used in: web-app

--->

-<!ELEMENT filter-mapping (filter-name, (url-pattern | servlet-name))>

-

-<!--

-The logical name of the filter. This name is used to map the filter.

-Each filter name is unique within the web application.

-

-Used in: filter, filter-mapping

--->

-<!ELEMENT filter-name (#PCDATA)>

-

-<!--

-The form-error-page element defines the location in the web app

-where the error page that is displayed when login is not successful

-can be found. The path begins with a leading / and is interpreted

-relative to the root of the WAR.

-

-Used in: form-login-config

--->

-<!ELEMENT form-error-page (#PCDATA)>

-

-<!--

-The form-login-config element specifies the login and error pages

-that should be used in form based login. If form based authentication

-is not used, these elements are ignored.

-

-Used in: login-config

--->

-<!ELEMENT form-login-config (form-login-page, form-error-page)>

-

-<!--

-The form-login-page element defines the location in the web app

-where the page that can be used for login can be found. The path

-begins with a leading / and is interpreted relative to the root of the WAR.

-

-Used in: form-login-config

--->

-<!ELEMENT form-login-page (#PCDATA)>

-

-<!--

-The home element contains the fully-qualified name of the enterprise

-bean's home interface.

-

-Used in: ejb-ref

-

-Example:

-

-<home>com.aardvark.payroll.PayrollHome</home>

--->

-<!ELEMENT home (#PCDATA)>

-

-<!--

-The http-method contains an HTTP method (GET | POST |...).

-

-Used in: web-resource-collection

--->

-<!ELEMENT http-method (#PCDATA)>

-

-<!--

-The icon element contains small-icon and large-icon elements that

-specify the file names for small and a large GIF or JPEG icon images

-used to represent the parent element in a GUI tool.

-

-Used in: filter, servlet, web-app

--->

-<!ELEMENT icon (small-icon?, large-icon?)>

-

-<!--

-The init-param element contains a name/value pair as an

-initialization param of the servlet

-

-Used in: filter, servlet

--->

-<!ELEMENT init-param (param-name, param-value, description?)>

-

-<!--

-The jsp-file element contains the full path to a JSP file within

-the web application beginning with a `/'.

-

-Used in: servlet

--->

-<!ELEMENT jsp-file (#PCDATA)>

-

-<!--

-The large-icon element contains the name of a file

-containing a large (32 x 32) icon image. The file

-name is a relative path within the web application's

-war file.

-

-The image may be either in the JPEG or GIF format.

-The icon can be used by tools.

-

-Used in: icon

-

-Example:

-

-<large-icon>employee-service-icon32x32.jpg</large-icon>

--->

-<!ELEMENT large-icon (#PCDATA)>

-

-<!--

-The listener element indicates the deployment properties for a web

-application listener bean.

-

-Used in: web-app

--->

-<!ELEMENT listener (listener-class)>

-

-<!--

-The listener-class element declares a class in the application must be

-registered as a web application listener bean. The value is the fully qualified classname of the listener class.

-

-

-Used in: listener

--->

-<!ELEMENT listener-class (#PCDATA)>

-

-<!--

-The load-on-startup element indicates that this servlet should be

-loaded (instantiated and have its init() called) on the startup

-of the web application. The optional contents of

-these element must be an integer indicating the order in which

-the servlet should be loaded. If the value is a negative integer,

-or the element is not present, the container is free to load the

-servlet whenever it chooses. If the value is a positive integer

-or 0, the container must load and initialize the servlet as the

-application is deployed. The container must guarantee that

-servlets marked with lower integers are loaded before servlets

-marked with higher integers. The container may choose the order

-of loading of servlets with the same load-on-start-up value.

-

-Used in: servlet

--->

-<!ELEMENT load-on-startup (#PCDATA)>

-

-<!--

-

-The local element contains the fully-qualified name of the

-enterprise bean's local interface.

-

-Used in: ejb-local-ref

-

--->

-<!ELEMENT local (#PCDATA)>

-

-<!--

-

-The local-home element contains the fully-qualified name of the

-enterprise bean's local home interface.

-

-Used in: ejb-local-ref

--->

-<!ELEMENT local-home (#PCDATA)>

-

-<!--

-The location element contains the location of the resource in the web

-application relative to the root of the web application. The value of

-the location must have a leading `/'.

-

-Used in: error-page

--->

-<!ELEMENT location (#PCDATA)>

-

-<!--

-The login-config element is used to configure the authentication

-method that should be used, the realm name that should be used for

-this application, and the attributes that are needed by the form login

-mechanism.

-

-Used in: web-app

--->

-<!ELEMENT login-config (auth-method?, realm-name?, form-login-config?)>

-

-<!--

-The mime-mapping element defines a mapping between an extension

-and a mime type.

-

-Used in: web-app

--->

-<!ELEMENT mime-mapping (extension, mime-type)>

-

-<!--

-The mime-type element contains a defined mime type. example:

-"text/plain"

-

-Used in: mime-mapping

--->

-<!ELEMENT mime-type (#PCDATA)>

-

-<!--

-The param-name element contains the name of a parameter. Each parameter

-name must be unique in the web application.

-

-

-Used in: context-param, init-param

--->

-<!ELEMENT param-name (#PCDATA)>

-

-<!--

-The param-value element contains the value of a parameter.

-

-Used in: context-param, init-param

--->

-<!ELEMENT param-value (#PCDATA)>

-

-<!--

-The realm name element specifies the realm name to use in HTTP

-Basic authorization.

-

-Used in: login-config

--->

-<!ELEMENT realm-name (#PCDATA)>

-

-<!--

-The remote element contains the fully-qualified name of the enterprise

-bean's remote interface.

-

-Used in: ejb-ref

-

-Example:

-

-<remote>com.wombat.empl.EmployeeService</remote>

--->

-<!ELEMENT remote (#PCDATA)>

-

-<!--

-The res-auth element specifies whether the web application code signs

-on programmatically to the resource manager, or whether the Container

-will sign on to the resource manager on behalf of the web application. In the

-latter case, the Container uses information that is supplied by the

-Deployer.

-

-The value of this element must be one of the two following:

-

-	<res-auth>Application</res-auth>

-	<res-auth>Container</res-auth>

-

-Used in: resource-ref

--->

-<!ELEMENT res-auth (#PCDATA)>

-

-<!--

-The res-ref-name element specifies the name of a resource manager

-connection factory reference.  The name is a JNDI name relative to the

-java:comp/env context.  The name must be unique within a web application.

-

-Used in: resource-ref

--->

-<!ELEMENT res-ref-name (#PCDATA)>

-

-<!--

-The res-sharing-scope element specifies whether connections obtained

-through the given resource manager connection factory reference can be

-shared. The value of this element, if specified, must be one of the

-two following:

-

-	<res-sharing-scope>Shareable</res-sharing-scope>

-	<res-sharing-scope>Unshareable</res-sharing-scope>

-

-The default value is Shareable.

-

-Used in: resource-ref

--->

-<!ELEMENT res-sharing-scope (#PCDATA)>

-

-<!--

-The res-type element specifies the type of the data source. The type

-is specified by the fully qualified Java language class or interface

-expected to be implemented by the data source.

-

-Used in: resource-ref

--->

-<!ELEMENT res-type (#PCDATA)>

-

-<!--

-The resource-env-ref element contains a declaration of a web application's

-reference to an administered object associated with a resource

-in the web application's environment.  It consists of an optional

-description, the resource environment reference name, and an

-indication of the resource environment reference type expected by

-the web application code.

-

-Used in: web-app

-

-Example:

-

-<resource-env-ref>

-    <resource-env-ref-name>jms/StockQueue</resource-env-ref-name>

-    <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>

-</resource-env-ref>

--->

-<!ELEMENT resource-env-ref (description?, resource-env-ref-name,

-		resource-env-ref-type)>

-

-<!--

-The resource-env-ref-name element specifies the name of a resource

-environment reference; its value is the environment entry name used in

-the web application code.  The name is a JNDI name relative to the

-java:comp/env context and must be unique within a web application.

-

-Used in: resource-env-ref

--->

-<!ELEMENT resource-env-ref-name (#PCDATA)>

-

-<!--

-The resource-env-ref-type element specifies the type of a resource

-environment reference.  It is the fully qualified name of a Java

-language class or interface.

-

-Used in: resource-env-ref

--->

-<!ELEMENT resource-env-ref-type (#PCDATA)>

-

-<!--

-The resource-ref element contains a declaration of a web application's

-reference to an external resource. It consists of an optional

-description, the resource manager connection factory reference name,

-the indication of the resource manager connection factory type

-expected by the web application code, the type of authentication

-(Application or Container), and an optional specification of the

-shareability of connections obtained from the resource (Shareable or

-Unshareable).

-

-Used in: web-app

-

-Example:

-

-    <resource-ref>

-	<res-ref-name>jdbc/EmployeeAppDB</res-ref-name>

-	<res-type>javax.sql.DataSource</res-type>

-	<res-auth>Container</res-auth>

-	<res-sharing-scope>Shareable</res-sharing-scope>

-    </resource-ref>

--->

-<!ELEMENT resource-ref (description?, res-ref-name, res-type, res-auth,

-		res-sharing-scope?)>

-

-<!--

-The role-link element is a reference to a defined security role. The

-role-link element must contain the name of one of the security roles

-defined in the security-role elements.

-

-Used in: security-role-ref

--->

-<!ELEMENT role-link (#PCDATA)>

-

-<!--

-The role-name element contains the name of a security role.

-

-The name must conform to the lexical rules for an NMTOKEN.

-

-Used in: auth-constraint, run-as, security-role, security-role-ref

--->

-<!ELEMENT role-name (#PCDATA)>

-

-<!--

-The run-as element specifies the run-as identity to be used for the

-execution of the web application. It contains an optional description, and

-the name of a security role.

-

-Used in: servlet

--->

-<!ELEMENT run-as (description?, role-name)>

-

-<!--

-The security-constraint element is used to associate security

-constraints with one or more web resource collections

-

-Used in: web-app

--->

-<!ELEMENT security-constraint (display-name?, web-resource-collection+,

-auth-constraint?, user-data-constraint?)>

-

-<!--

-The security-role element contains the definition of a security

-role. The definition consists of an optional description of the

-security role, and the security role name.

-

-Used in: web-app

-

-Example:

-

-    <security-role>

-	<description>

-	    This role includes all employees who are authorized

-	    to access the employee service application.

-	</description>

-	<role-name>employee</role-name>

-    </security-role>

--->

-<!ELEMENT security-role (description?, role-name)>

-

-<!--

-The security-role-ref element contains the declaration of a security

-role reference in the web application's code. The declaration consists

-of an optional description, the security role name used in the code,

-and an optional link to a security role. If the security role is not

-specified, the Deployer must choose an appropriate security role.

-

-The value of the role-name element must be the String used as the

-parameter to the EJBContext.isCallerInRole(String roleName) method

-or the HttpServletRequest.isUserInRole(String role) method.

-

-Used in: servlet

-

--->

-<!ELEMENT security-role-ref (description?, role-name, role-link?)>

-

-<!--

-The servlet element contains the declarative data of a

-servlet. If a jsp-file is specified and the load-on-startup element is

-present, then the JSP should be precompiled and loaded.

-

-Used in: web-app

--->

-<!ELEMENT servlet (icon?, servlet-name, display-name?, description?,

-(servlet-class|jsp-file), init-param*, load-on-startup?, run-as?, security-role-ref*)>

-

-<!--

-The servlet-class element contains the fully qualified class name

-of the servlet.

-

-Used in: servlet

--->

-<!ELEMENT servlet-class (#PCDATA)>

-

-<!--

-The servlet-mapping element defines a mapping between a servlet

-and a url pattern

-

-Used in: web-app

--->

-<!ELEMENT servlet-mapping (servlet-name, url-pattern)>

-

-<!--

-The servlet-name element contains the canonical name of the

-servlet. Each servlet name is unique within the web application.

-

-Used in: filter-mapping, servlet, servlet-mapping

--->

-<!ELEMENT servlet-name (#PCDATA)>

-

-<!--

-The session-config element defines the session parameters for

-this web application.

-

-Used in: web-app

--->

-<!ELEMENT session-config (session-timeout?)>

-

-<!--

-The session-timeout element defines the default session timeout

-interval for all sessions created in this web application. The

-specified timeout must be expressed in a whole number of minutes.

-If the timeout is 0 or less, the container ensures the default

-behaviour of sessions is never to time out.

-

-Used in: session-config

--->

-<!ELEMENT session-timeout (#PCDATA)>

-

-<!--

-The small-icon element contains the name of a file

-containing a small (16 x 16) icon image. The file

-name is a relative path within the web application's

-war file.

-

-The image may be either in the JPEG or GIF format.

-The icon can be used by tools.

-

-Used in: icon

-

-Example:

-

-<small-icon>employee-service-icon16x16.jpg</small-icon>

--->

-<!ELEMENT small-icon (#PCDATA)>

-

-<!--

-The taglib element is used to describe a JSP tag library.

-

-Used in: web-app

--->

-<!ELEMENT taglib (taglib-uri, taglib-location)>

-

-<!--

-the taglib-location element contains the location (as a resource

-relative to the root of the web application) where to find the Tag

-Libary Description file for the tag library.

-

-Used in: taglib

--->

-<!ELEMENT taglib-location (#PCDATA)>

-

-<!--

-The taglib-uri element describes a URI, relative to the location

-of the web.xml document, identifying a Tag Library used in the Web

-Application.

-

-Used in: taglib

--->

-<!ELEMENT taglib-uri (#PCDATA)>

-

-<!--

-The transport-guarantee element specifies that the communication

-between client and server should be NONE, INTEGRAL, or

-CONFIDENTIAL. NONE means that the application does not require any

-transport guarantees. A value of INTEGRAL means that the application

-requires that the data sent between the client and server be sent in

-such a way that it can't be changed in transit. CONFIDENTIAL means

-that the application requires that the data be transmitted in a

-fashion that prevents other entities from observing the contents of

-the transmission. In most cases, the presence of the INTEGRAL or

-CONFIDENTIAL flag will indicate that the use of SSL is required.

-

-Used in: user-data-constraint

--->

-<!ELEMENT transport-guarantee (#PCDATA)>

-

-<!--

-The url-pattern element contains the url pattern of the mapping. Must

-follow the rules specified in Section 11.2 of the Servlet API

-Specification.

-

-Used in: filter-mapping, servlet-mapping, web-resource-collection

--->

-<!ELEMENT url-pattern (#PCDATA)>

-

-<!--

-The user-data-constraint element is used to indicate how data

-communicated between the client and container should be protected.

-

-Used in: security-constraint

--->

-<!ELEMENT user-data-constraint (description?, transport-guarantee)>

-

-<!--

-The web-resource-collection element is used to identify a subset

-of the resources and HTTP methods on those resources within a web

-application to which a security constraint applies. If no HTTP methods

-are specified, then the security constraint applies to all HTTP

-methods.

-

-Used in: security-constraint

--->

-<!ELEMENT web-resource-collection (web-resource-name, description?,

-url-pattern*, http-method*)>

-

-<!--

-The web-resource-name contains the name of this web resource

-collection.

-

-Used in: web-resource-collection

--->

-<!ELEMENT web-resource-name (#PCDATA)>

-

-<!--

-The welcome-file element contains file name to use as a default

-welcome file, such as index.html

-

-Used in: welcome-file-list

--->

-<!ELEMENT welcome-file (#PCDATA)>

-

-<!--

-The welcome-file-list contains an ordered list of welcome files

-elements.

-

-Used in: web-app

--->

-<!ELEMENT welcome-file-list (welcome-file+)>

-

-<!--

-The ID mechanism is to allow tools that produce additional deployment

-information (i.e., information beyond the standard deployment

-descriptor information) to store the non-standard information in a

-separate file, and easily refer from these tool-specific files to the

-information in the standard deployment descriptor.

-

-Tools are not allowed to add the non-standard information into the

-standard deployment descriptor.

--->

-

-<!ATTLIST auth-constraint id ID #IMPLIED>

-<!ATTLIST auth-method id ID #IMPLIED>

-<!ATTLIST context-param id ID #IMPLIED>

-<!ATTLIST description id ID #IMPLIED>

-<!ATTLIST display-name id ID #IMPLIED>

-<!ATTLIST distributable id ID #IMPLIED>

-<!ATTLIST ejb-link id ID #IMPLIED>

-<!ATTLIST ejb-local-ref id ID #IMPLIED>

-<!ATTLIST ejb-ref id ID #IMPLIED>

-<!ATTLIST ejb-ref-name id ID #IMPLIED>

-<!ATTLIST ejb-ref-type id ID #IMPLIED>

-<!ATTLIST env-entry id ID #IMPLIED>

-<!ATTLIST env-entry-name id ID #IMPLIED>

-<!ATTLIST env-entry-type id ID #IMPLIED>

-<!ATTLIST env-entry-value id ID #IMPLIED>

-<!ATTLIST error-code id ID #IMPLIED>

-<!ATTLIST error-page id ID #IMPLIED>

-<!ATTLIST exception-type id ID #IMPLIED>

-<!ATTLIST extension id ID #IMPLIED>

-<!ATTLIST filter id ID #IMPLIED>

-<!ATTLIST filter-class id ID #IMPLIED>

-<!ATTLIST filter-mapping id ID #IMPLIED>

-<!ATTLIST filter-name id ID #IMPLIED>

-<!ATTLIST form-error-page id ID #IMPLIED>

-<!ATTLIST form-login-config id ID #IMPLIED>

-<!ATTLIST form-login-page id ID #IMPLIED>

-<!ATTLIST home id ID #IMPLIED>

-<!ATTLIST http-method id ID #IMPLIED>

-<!ATTLIST icon id ID #IMPLIED>

-<!ATTLIST init-param id ID #IMPLIED>

-<!ATTLIST jsp-file id ID #IMPLIED>

-<!ATTLIST large-icon id ID #IMPLIED>

-<!ATTLIST listener id ID #IMPLIED>

-<!ATTLIST listener-class id ID #IMPLIED>

-<!ATTLIST load-on-startup id ID #IMPLIED>

-<!ATTLIST local id ID #IMPLIED>

-<!ATTLIST local-home id ID #IMPLIED>

-<!ATTLIST location id ID #IMPLIED>

-<!ATTLIST login-config id ID #IMPLIED>

-<!ATTLIST mime-mapping id ID #IMPLIED>

-<!ATTLIST mime-type id ID #IMPLIED>

-<!ATTLIST param-name id ID #IMPLIED>

-<!ATTLIST param-value id ID #IMPLIED>

-<!ATTLIST realm-name id ID #IMPLIED>

-<!ATTLIST remote id ID #IMPLIED>

-<!ATTLIST res-auth id ID #IMPLIED>

-<!ATTLIST res-ref-name id ID #IMPLIED>

-<!ATTLIST res-sharing-scope id ID #IMPLIED>

-<!ATTLIST res-type id ID #IMPLIED>

-<!ATTLIST resource-env-ref id ID #IMPLIED>

-<!ATTLIST resource-env-ref-name id ID #IMPLIED>

-<!ATTLIST resource-env-ref-type id ID #IMPLIED>

-<!ATTLIST resource-ref id ID #IMPLIED>

-<!ATTLIST role-link id ID #IMPLIED>

-<!ATTLIST role-name id ID #IMPLIED>

-<!ATTLIST run-as id ID #IMPLIED>

-<!ATTLIST security-constraint id ID #IMPLIED>

-<!ATTLIST security-role id ID #IMPLIED>

-<!ATTLIST security-role-ref id ID #IMPLIED>

-<!ATTLIST servlet id ID #IMPLIED>

-<!ATTLIST servlet-class id ID #IMPLIED>

-<!ATTLIST servlet-mapping id ID #IMPLIED>

-<!ATTLIST servlet-name id ID #IMPLIED>

-<!ATTLIST session-config id ID #IMPLIED>

-<!ATTLIST session-timeout id ID #IMPLIED>

-<!ATTLIST small-icon id ID #IMPLIED>

-<!ATTLIST taglib id ID #IMPLIED>

-<!ATTLIST taglib-location id ID #IMPLIED>

-<!ATTLIST taglib-uri id ID #IMPLIED>

-<!ATTLIST transport-guarantee id ID #IMPLIED>

-<!ATTLIST url-pattern id ID #IMPLIED>

-<!ATTLIST user-data-constraint id ID #IMPLIED>

-<!ATTLIST web-app id ID #IMPLIED>

-<!ATTLIST web-resource-collection id ID #IMPLIED>

-<!ATTLIST web-resource-name id ID #IMPLIED>

-<!ATTLIST welcome-file id ID #IMPLIED>

-<!ATTLIST welcome-file-list id ID #IMPLIED>

diff --git a/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/xml.xsd b/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/xml.xsd
deleted file mode 100644
index 21adcb2..0000000
--- a/trunk/pluto-descriptor-impl/src/main/resources/org/apache/pluto/descriptors/services/castor/xml.xsd
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version='1.0'?>

-<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" >

-<!-- 

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">

-

- <xs:annotation>

-  <xs:documentation>

-   See http://www.w3.org/XML/1998/namespace.html and

-   http://www.w3.org/TR/REC-xml for information about this namespace.

-  </xs:documentation>

- </xs:annotation>

-

- <xs:annotation>

-  <xs:documentation>This schema defines attributes and an attribute group

-        suitable for use by

-        schemas wishing to allow xml:base, xml:lang or xml:space attributes

-        on elements they define.

-

-        To enable this, such a schema must import this schema

-        for the XML namespace, e.g. as follows:

-        &lt;schema . . .>

-         . . .

-         &lt;import namespace="http://www.w3.org/XML/1998/namespace"

-                    schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>

-

-        Subsequently, qualified reference to any of the attributes

-        or the group defined below will have the desired effect, e.g.

-

-        &lt;type . . .>

-         . . .

-         &lt;attributeGroup ref="xml:specialAttrs"/>

- 

-         will define a type which will schema-validate an instance

-         element with any of those attributes</xs:documentation>

- </xs:annotation>

-

- <xs:annotation>

-  <xs:documentation>In keeping with the XML Schema WG's standard versioning

-   policy, this schema document will persist at

-   http://www.w3.org/2001/03/xml.xsd.

-   At the date of issue it can also be found at

-   http://www.w3.org/2001/xml.xsd.

-   The schema document at that URI may however change in the future,

-   in order to remain compatible with the latest version of XML Schema

-   itself.  In other words, if the XML Schema namespace changes, the version

-   of this document at

-   http://www.w3.org/2001/xml.xsd will change

-   accordingly; the version at

-   http://www.w3.org/2001/03/xml.xsd will not change.

-  </xs:documentation>

- </xs:annotation>

-

- <xs:attribute name="lang" type="xs:language">

-  <xs:annotation>

-   <xs:documentation>In due course, we should install the relevant ISO 2- and 3-letter

-         codes as the enumerated possible values . . .</xs:documentation>

-  </xs:annotation>

- </xs:attribute>

-

- <xs:attribute name="space" default="preserve">

-  <xs:simpleType>

-   <xs:restriction base="xs:NCName">

-    <xs:enumeration value="default"/>

-    <xs:enumeration value="preserve"/>

-   </xs:restriction>

-  </xs:simpleType>

- </xs:attribute>

-

- <xs:attribute name="base" type="xs:anyURI">

-  <xs:annotation>

-   <xs:documentation>See http://www.w3.org/TR/xmlbase/ for

-                     information about this attribute.</xs:documentation>

-  </xs:annotation>

- </xs:attribute>

-

- <xs:attributeGroup name="specialAttrs">

-  <xs:attribute ref="xml:base"/>

-  <xs:attribute ref="xml:lang"/>

-  <xs:attribute ref="xml:space"/>

- </xs:attributeGroup>

-

-</xs:schema>

diff --git a/trunk/pluto-descriptor-impl/src/test/java/org/apache/pluto/descriptors/services/castor/WebAppDescriptorServiceImplTest.java b/trunk/pluto-descriptor-impl/src/test/java/org/apache/pluto/descriptors/services/castor/WebAppDescriptorServiceImplTest.java
deleted file mode 100644
index b64809d..0000000
--- a/trunk/pluto-descriptor-impl/src/test/java/org/apache/pluto/descriptors/services/castor/WebAppDescriptorServiceImplTest.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/*

- * Copyright 2005 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.descriptors.services.castor;

-

-import junit.framework.TestCase;

-import junit.framework.Assert;

-

-import java.io.ByteArrayInputStream;

-import java.io.InputStream;

-import java.io.IOException;

-

-import org.apache.pluto.descriptors.servlet.WebAppDD;

-

-/**

- *

- */

-public class WebAppDescriptorServiceImplTest extends TestCase {

-

-    private StringBuffer xmlBegin = new StringBuffer();

-    private StringBuffer xmlEnd = new StringBuffer();

-

-    private StringBuffer icon = new StringBuffer();

-    private StringBuffer misc = new StringBuffer();

-    private StringBuffer ctxParams = new StringBuffer();

-    private StringBuffer sessionConfig = new StringBuffer();

-    private StringBuffer filters = new StringBuffer();

-    private StringBuffer listeners = new StringBuffer();

-    private StringBuffer servlets = new StringBuffer();

-    private StringBuffer filterMappings = new StringBuffer();

-    private StringBuffer servletMappings = new StringBuffer();

-    private StringBuffer mimeMappings = new StringBuffer();

-    private StringBuffer welcomeFiles = new StringBuffer();

-    private StringBuffer errorPage = new StringBuffer();

-    private StringBuffer taglib = new StringBuffer();

-    private StringBuffer resourceRef = new StringBuffer();

-    private StringBuffer securityConstraint = new StringBuffer();

-    private StringBuffer loginConfig = new StringBuffer();

-    private StringBuffer securityRole = new StringBuffer();

-    private StringBuffer envEntry = new StringBuffer();

-    private StringBuffer ejbRef = new StringBuffer();

-

-    WebAppDescriptorServiceImpl impl = new WebAppDescriptorServiceImpl();

-

-    public void setUp() {

-        xmlBegin.append("" +

-                "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" +

-                "<web-app xmlns=\"http://java.sun.com/xml/ns/j2ee\"\n" +

-                "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +

-                "    xsi:schemaLocation=\"http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd\"\n" +

-                "    version=\"2.4\">\n" );

-        icon.append("" +

-                "  <icon>\n" +

-                "      <large-icon>/icon/large.gif</large-icon>\n" +

-                "      <small-icon>/icon/small.gif</small-icon>\n" +

-                "  </icon>\n" );

-        misc.append(""+

-                "  <display-name>Test Web XML</display-name>\n" +

-                "  <description>This is a test web.xml file.</description>\n" +

-                "  <distributable/>\n" );

-        ctxParams.append(""+

-                "  <context-param>\n" +

-                "      <description>Test Parameter 1</description>\n" +

-                "      <param-name>TestParam1</param-name>\n" +

-                "      <param-value>TestParam1Value</param-value>\n" +

-                "  </context-param>\n" +

-                "  <context-param>\n" +

-                "      <description>Test Parameter 2</description>\n" +

-                "      <param-name>TestParam2</param-name>\n" +

-                "      <param-value>TestParam2Value</param-value>\n" +

-                "  </context-param>\n" );

-        filters.append(""+

-                "  <filter>\n" +

-                "      <icon>\n" +

-                "          <large-icon>/icon/large.gif</large-icon>\n" +

-                "          <small-icon>/icon/small.gif</small-icon>\n" +

-                "      </icon>\n" +

-                "      <description>Test Description</description>\n" +

-                "      <display-name>TestName</display-name>\n" +

-                "      <filter-class>org.apache.pluto.test.TestMe</filter-class>\n" +

-                "      <filter-name>test</filter-name>\n" +

-                "      <init-param>\n" +

-                "          <param-name>Test</param-name>\n" +

-                "          <param-value>true</param-value>\n" +

-                "      </init-param>\n" +

-                "      <init-param>\n" +

-                "          <param-name>Test2</param-name>\n" +

-                "          <param-value>true</param-value>\n" +

-                "      </init-param>\n" +

-                "  </filter>\n" );

-        listeners.append("" +

-                "  <listener>\n" +

-                "      <listener-class>org.apache.pluto.test.TestListener</listener-class>\n" +

-                "  </listener>\n" +

-                "  <listener>\n" +

-                "      <listener-class>org.apache.pluto.test.AnotherListener</listener-class>\n" +

-                "  </listener>\n" );

-        servlets.append(""+

-                "  <servlet>\n" +

-                "      <servlet-name>default</servlet-name>\n" +

-                "      <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>\n" +

-                "      <init-param>\n" +

-                "          <param-name>debug</param-name>\n" +

-                "          <param-value>0</param-value>\n" +

-                "      </init-param>\n" +

-                "      <init-param>\n" +

-                "          <param-name>listings</param-name>\n" +

-                "          <param-value>true</param-value>\n" +

-                "      </init-param>\n" +

-                "      <load-on-startup>1</load-on-startup>\n" +

-                "  </servlet>\n" +

-                "  <servlet>\n" +

-                "      <servlet-name>jsp</servlet-name>\n" +

-                "      <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>\n" +

-                "      <init-param>\n" +

-                "          <param-name>fork</param-name>\n" +

-                "          <param-value>false</param-value>\n" +

-                "      </init-param>\n" +

-                "      <init-param>\n" +

-                "          <param-name>xpoweredBy</param-name>\n" +

-                "          <param-value>false</param-value>\n" +

-                "      </init-param>\n" +

-                "      <load-on-startup>3</load-on-startup>\n" +

-                "      <security-role-ref>\n" +

-                "        <role-name>plutoTestRole</role-name>\n" +

-                "        <role-link>tomcat</role-link>\n" +

-                "      </security-role-ref>\n" +

-                "  </servlet>\n" );

-        filterMappings.append(""+

-                "  <filter-mapping>\n" +

-                "      <filter-name>test</filter-name>\n" +

-                "      <url-pattern>/test/*</url-pattern>\n" +

-                "      <url-pattern>/some/*</url-pattern>\n" +

-                "      <dispatcher>INCLUDE</dispatcher>\n" +

-                "      <dispatcher>FORWARD</dispatcher>\n" +

-                "  </filter-mapping>\n" +

-                "  <filter-mapping>\n" +

-                "    <filter-name>test</filter-name>\n" +

-                "    <servlet-name>jsp</servlet-name>\n" +

-                "    <dispatcher>INCLUDE</dispatcher>\n" +

-                "  </filter-mapping>\n" );

-        servletMappings.append(""+

-                "    <servlet-mapping>\n" +

-                "        <servlet-name>default</servlet-name>\n" +

-                "        <url-pattern>/</url-pattern>\n" +

-                "    </servlet-mapping>\n" +

-                "    <servlet-mapping>\n" +

-                "        <servlet-name>jsp</servlet-name>\n" +

-                "        <url-pattern>*.jsp</url-pattern>\n" +

-                "    </servlet-mapping>\n" +

-                "    <servlet-mapping>\n" +

-                "        <servlet-name>jsp</servlet-name>\n" +

-                "        <url-pattern>*.jspx</url-pattern>\n" +

-                "    </servlet-mapping>\n" );

-        sessionConfig.append(""+

-                "    <session-config>\n" +

-                "        <session-timeout>30</session-timeout>\n" +

-                "    </session-config>\n" );

-        mimeMappings.append("" +

-                "    <mime-mapping>\n" +

-                "        <extension>abs</extension>\n" +

-                "        <mime-type>audio/x-mpeg</mime-type>\n" +

-                "    </mime-mapping>\n" +

-                "    <mime-mapping>\n" +

-                "        <extension>ai</extension>\n" +

-                "        <mime-type>application/postscript</mime-type>\n" +

-                "    </mime-mapping>\n" );

-        welcomeFiles.append(""+

-                "    <welcome-file-list>\n" +

-                "        <welcome-file>index.html</welcome-file>\n" +

-                "        <welcome-file>index.htm</welcome-file>\n" +

-                "        <welcome-file>index.jsp</welcome-file>\n" +

-                "    </welcome-file-list>\n" );

-        this.errorPage.append(""+

-                "    <error-page>\n" +

-                "        <error-code>400</error-code>\n" +

-                "        <location>/400.html</location>\n" +

-                "    </error-page>\n" +

-                "    <error-page>\n" +

-                "        <exception-type>java.io.IOException</exception-type>\n" +

-                "        <location>/error/io.html</location>\n" +

-                "    </error-page>\n" );

-        this.taglib.append(""+

-                "    <taglib>\n" +

-                "        <taglib-location>/WEB-INF/test.tld</taglib-location>\n" +

-                "        <taglib-uri>test</taglib-uri>\n" +

-                "    </taglib>\n" );

-        this.resourceRef.append(""+

-                "    <resource-ref>\n" +

-                "        <description>Test Resource</description>\n" +

-                "        <res-auth>CONTIANER</res-auth>\n" +

-                "        <res-ref-name>RefName</res-ref-name>\n" +

-                "        <res-sharing-scope>Scope</res-sharing-scope>\n" +

-                "        <res-type>java.lang.String</res-type>\n" +

-                "    </resource-ref>\n" +

-                "    <resource-ref>\n" +

-                "        <description>Test Resource</description>\n" +

-                "        <res-auth>CONTIANER</res-auth>\n" +

-                "        <res-ref-name>RefName2</res-ref-name>\n" +

-                "        <res-sharing-scope>Scope</res-sharing-scope>\n" +

-                "        <res-type>java.lang.String</res-type>\n" +

-                "    </resource-ref>\n" );

-        this.securityConstraint.append(""+

-                "    <security-constraint>\n" +

-                "        <auth-constraint>\n" +

-                "            <description>Test Role</description>\n" +

-                "            <role-name>TestRole</role-name>\n" +

-                "        </auth-constraint>\n" +

-                "        <display-name>Test Constraint</display-name>\n" +

-                "        <user-data-constraint>\n" +

-                "            <description>CONFIDENTIAL</description>\n" +

-                "            <transport-guarantee>CONFIDENTIAL</transport-guarantee>\n" +

-                "        </user-data-constraint>\n" +

-                "        <web-resource-collection>\n" +

-                "            <description>TestCollection</description>\n" +

-                "            <http-method>GET</http-method>\n" +

-                "            <http-method>POST</http-method>\n" +

-                "            <url-pattern>/test/*</url-pattern>\n" +

-                "            <url-pattern>/secure/*</url-pattern>\n" +

-                "            <web-resource-name>secured</web-resource-name>\n" +

-                "        </web-resource-collection>\n" +

-                "    </security-constraint>\n" );

-        this.loginConfig.append(""+

-                "    <login-config>\n" +

-                "        <auth-method>FORM</auth-method>\n" +

-                "        <form-login-config>\n" +

-                "            <form-login-page>/login.jsp</form-login-page>\n" +

-                "            <form-error-page>/login.jsp?error=true</form-error-page>\n" +

-                "        </form-login-config>\n" +

-                "        <realm-name>BASIC</realm-name>\n" +

-                "    </login-config>\n" );

-         this.securityRole.append(""+

-                "    <security-role>\n" +

-                "        <description>A Test Role</description>\n" +

-                "        <role-name>TestRole</role-name>\n" +

-                "    </security-role>\n" +

-                "    <security-role>\n" +

-                "        <description>Another Role</description>\n" +

-                "        <role-name>AnotherRole</role-name>\n" +

-                "    </security-role>\n" );

-        this.envEntry.append(""+

-                "    <env-entry>\n" +

-                "        <description>Test Environment Entry</description>\n" +

-                "        <env-entry-name>Test</env-entry-name>\n" +

-                "        <env-entry-type>java.lang.String</env-entry-type>\n" +

-                "        <env-entry-value>TestValue</env-entry-value>\n" +

-                "    </env-entry>\n" +

-                "    <env-entry>\n" +

-                "        <description>Another Environment Entry</description>\n" +

-                "        <env-entry-name>Another</env-entry-name>\n" +

-                "        <env-entry-type>java.lang.String</env-entry-type>\n" +

-                "        <env-entry-value>AnotherValue</env-entry-value>\n" +

-                "    </env-entry>\n" );

-        this.ejbRef.append(""+

-                "    <ejb-ref>\n" +

-                "        <description>Test EJB</description>\n" +

-                "        <ejb-link>test</ejb-link>\n" +

-                "        <home>testHomeInterface</home>\n" +

-                "        <remote>testRemoteInterface</remote>\n" +

-                "        <ejb-ref-name>test</ejb-ref-name>\n" +

-                "        <ejb-ref-type>org.apache.pluto.test.ejb.TestEJB</ejb-ref-type>\n" +

-                "    </ejb-ref>\n" );

-        this.xmlEnd.append("</web-app>");

-

-    }

-

-    public void tearDown() {

-

-    }

-

-

-    public void testReadFullDescriptor()

-    throws IOException {

-        StringBuffer xml = new StringBuffer()

-        .append(xmlBegin).append(icon).append(misc)

-        .append(ctxParams).append(sessionConfig).append(filters)

-        .append(listeners).append(servlets).append(filterMappings)

-        .append(servletMappings).append(mimeMappings).append(welcomeFiles)

-        .append(errorPage).append(taglib).append(resourceRef)

-        .append(securityConstraint).append(loginConfig)

-        .append(securityRole).append(envEntry).append(ejbRef)

-        .append(xmlEnd);

-

-        InputStream in = new ByteArrayInputStream(xml.toString().getBytes());

-

-        WebAppDD dd = impl.read(in);

-

-        Assert.assertEquals("DisplayName not as expected", "Test Web XML", dd.getDisplayName());

-        Assert.assertEquals("Description does not match", "This is a test web.xml file.", dd.getDescription());

-        //Assert.assertTrue("Distributable not set", dd.isDistributable());

-

-        assertEquals("Context Parameters not as expected", 2, dd.getContextParams().size());

-        assertEquals("Filters not as expected", 1, dd.getFilters().size());

-        assertEquals("Filter Mappings not as expected", 2, dd.getFilterMappings().size());

-        assertEquals("Listeners not as expected", 2, dd.getListeners().size());

-        assertEquals("Servlets not as expected", 2, dd.getServlets().size());

-        assertEquals("Servlet Mappings not as expected.", 3, dd.getServletMappings().size());

-    }

-

-    public void testReadNullDescriptor() throws IOException {

-        Assert.assertNull("Null descriptor did not return null", impl.read(null));

-    }

-

-    public void testReadPartialDescriptor() {

-

-    }

-

-    public void testReadOutOfOrderDescriptor() {

-

-    }

-

-}

diff --git a/trunk/pluto-portal-driver-impl/pluto-portal-driver-impl.iml b/trunk/pluto-portal-driver-impl/pluto-portal-driver-impl.iml
deleted file mode 100644
index c07e80f..0000000
--- a/trunk/pluto-portal-driver-impl/pluto-portal-driver-impl.iml
+++ /dev/null
@@ -1,229 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module version="4" relativePaths="false" type="JAVA_MODULE">
-  <component name="ModuleRootManager" />
-  <component name="NewModuleRootManager" inherit-compiler-output="false">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <exclude-output />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="pluto-descriptor-api" />
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/taglibs/standard/1.0.4/standard-1.0.4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module" module-name="pluto-container" />
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/javax/servlet/jstl/1.1.2/jstl-1.1.2.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module" module-name="pluto-portal-driver" />
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/commons-collections/commons-collections/3.1/commons-collections-3.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/xalan/xalan/2.6.0/xalan-2.6.0.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/xerces/xmlParserAPIs/2.6.2/xmlParserAPIs-2.6.2.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/commons-beanutils/commons-beanutils/1.6/commons-beanutils-1.6.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/javax/portlet/portlet-api/1.0/portlet-api-1.0.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/commons-digester/commons-digester/1.7/commons-digester-1.7.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module" module-name="pluto-descriptor-impl" />
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/oro/oro/2.0.8/oro-2.0.8.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/org/springframework/spring-aop/2.0-m2/spring-aop-2.0-m2.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/org/springframework/spring-web/2.0-m2/spring-web-2.0-m2.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/org/springframework/spring-core/2.0-m2/spring-core-2.0-m2.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/org/springframework/spring-context/2.0-m2/spring-context-2.0-m2.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/org/springframework/spring-beans/2.0-m2/spring-beans-2.0-m2.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/castor/castor/1.0/castor-1.0.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/junit/junit/4.0/junit-4.0.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar:///Users/ddewolf/.m2/repository/org/easymock/easymock/2.2/easymock-2.2.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntryProperties />
-  </component>
-</module>
-
diff --git a/trunk/pluto-portal-driver-impl/pom.xml b/trunk/pluto-portal-driver-impl/pom.xml
deleted file mode 100644
index 3a1c47c..0000000
--- a/trunk/pluto-portal-driver-impl/pom.xml
+++ /dev/null
@@ -1,145 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 2005-2006 The Apache Software Foundation
-
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-    <parent>
-        <groupId>org.apache.pluto</groupId>
-        <artifactId>pluto</artifactId>
-        <version>1.1.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>pluto-portal-driver-impl</artifactId>
-    <packaging>jar</packaging>
-    <name>Pluto Portal Driver Implementation Classes</name>
-
-    <dependencies>
-
-        <dependency>
-            <groupId>org.apache.pluto</groupId>
-            <artifactId>pluto-container</artifactId>
-            <version>${pom.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.pluto</groupId>
-            <artifactId>pluto-portal-driver</artifactId>
-            <version>${pom.version}</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging-api</artifactId>
-            <version>${commons-logging.version}</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>${commons-logging.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>commons-digester</groupId>
-            <artifactId>commons-digester</artifactId>
-            <version>${commons-digester.version}</version>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>${junit.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>javax.portlet</groupId>
-            <artifactId>portlet-api</artifactId>
-            <version>${portlet-api.version}</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>servlet-api</artifactId>
-            <version>${servlet-api.version}</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>jstl</artifactId>
-            <version>${jstl.version}</version>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>taglibs</groupId>
-            <artifactId>standard</artifactId>
-            <version>${taglibs.standard.version}</version>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-core</artifactId>
-            <version>${springframework.version}</version>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-beans</artifactId>
-            <version>${springframework.version}</version>
-            <scope>compile</scope>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-web</artifactId>
-            <version>${springframework.version}</version>
-            <scope>compile</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <descriptor>src/assemble/bin.xml</descriptor>
-                    <finalName>pluto-portal-${pom.version}</finalName>
-                </configuration>
-            </plugin>
-            <plugin>
-                <artifactId>maven-site-plugin</artifactId>
-                <configuration>
-                    <resourcesDirectory>${basedir}/../pluto-site/src/site/resources</resourcesDirectory>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
-
-
-
diff --git a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/AdminConfigurationImpl.java b/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/AdminConfigurationImpl.java
deleted file mode 100644
index 4edefca..0000000
--- a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/AdminConfigurationImpl.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.config.impl;

-

-import org.apache.pluto.driver.services.portal.admin.DeployWarAdminService;

-import org.apache.pluto.driver.services.portal.admin.ReassembleWarAdminService;

-import org.apache.pluto.driver.services.portal.admin.RenderConfigAdminService;

-import org.apache.pluto.driver.services.portal.admin.PortletRegistryAdminService;

-import org.apache.pluto.driver.services.portal.admin.WarUploadAdminService;

-import org.apache.pluto.driver.config.AdminConfiguration;

-

-import javax.servlet.ServletContext;

-

-/**

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:

- * @version 1.0

- * @since Nov 30, 2005

- */

-public class AdminConfigurationImpl implements AdminConfiguration {

-

-    private PortletRegistryAdminService portletRegistryAdminService;

-    private RenderConfigAdminService renderConfigAdminService;

-    private WarUploadAdminService warUploadAdminService;

-    private ReassembleWarAdminService reassembleWarAdminService;

-    private DeployWarAdminService deployWarAdminService;

-    

-    public void init(ServletContext context) {

-        

-    }

-

-    public void destroy() {

-

-    }

-

-    public PortletRegistryAdminService getPortletRegistryAdminService() {

-        return portletRegistryAdminService;

-    }

-

-    public void setPortletRegistryAdminService(PortletRegistryAdminService portletRegistryAdminService) {

-        this.portletRegistryAdminService = portletRegistryAdminService;

-    }

-

-    public RenderConfigAdminService getRenderConfigAdminService() {

-        return renderConfigAdminService;

-    }

-

-    public void setRenderConfigAdminService(RenderConfigAdminService renderConfigAdminService) {

-        this.renderConfigAdminService = renderConfigAdminService;

-    }

-

-	public DeployWarAdminService getDeployWarAdminService() {

-		return deployWarAdminService;

-	}

-

-	public ReassembleWarAdminService getReassembleWarAdminService() {

-		return reassembleWarAdminService;

-	}

-

-	public WarUploadAdminService getWarUploadAdminService() {

-		return warUploadAdminService;

-	}

-

-	public void setDeployWarAdminService(DeployWarAdminService deployWarAdminService) {

-		this.deployWarAdminService = deployWarAdminService;

-	}

-

-	public void setReassembleWarAdminService(

-			ReassembleWarAdminService reassembleWarAdminService) {

-		this.reassembleWarAdminService = reassembleWarAdminService;

-	}

-

-	public void setWarUploadAdminService(WarUploadAdminService warUploadAdminService) {

-		this.warUploadAdminService = warUploadAdminService;

-	}

-

-

-}

diff --git a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/DriverConfigurationImpl.java b/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/DriverConfigurationImpl.java
deleted file mode 100644
index 39fb023..0000000
--- a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/DriverConfigurationImpl.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.config.impl;

-

-import java.util.Collection;

-

-import javax.servlet.ServletContext;

-

-import org.apache.pluto.driver.config.DriverConfiguration;

-import org.apache.pluto.driver.services.portal.PageConfig;

-import org.apache.pluto.driver.services.portal.PortletApplicationConfig;

-import org.apache.pluto.driver.services.portal.PortletRegistryService;

-import org.apache.pluto.driver.services.portal.PortletWindowConfig;

-import org.apache.pluto.driver.services.portal.PropertyConfigService;

-import org.apache.pluto.driver.services.portal.RenderConfigService;

-import org.apache.pluto.driver.services.portal.SupportedModesService;

-import org.apache.pluto.driver.url.PortalURLParser;

-import org.apache.pluto.spi.PortalCallbackService;

-import org.apache.pluto.spi.optional.PortletPreferencesService;

-

-/**

- * Encapsulation of the Pluto Driver ResourceConfig.

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since Sep 23, 2004

- */

-public class DriverConfigurationImpl

-    implements DriverConfiguration {

-

-    private PortalURLParser portalUrlParser;

-    private PropertyConfigService propertyService;

-    private PortletRegistryService registryService;

-    private RenderConfigService renderService;

-    private SupportedModesService supportedModesService;

-

-    // Container Services

-    private PortalCallbackService portalCallbackService;

-    private PortletPreferencesService portletPreferencesService;

-

-    public DriverConfigurationImpl(PortalURLParser portalUrlParser,

-                                   PropertyConfigService propertyService,

-                                   PortletRegistryService registryService,

-                                   RenderConfigService renderService,

-                                   PortalCallbackService portalCallback,

-                                   SupportedModesService supportedModesService) {

-        this.portalUrlParser = portalUrlParser;

-        this.propertyService = propertyService;

-        this.registryService = registryService;

-        this.renderService = renderService;

-        this.portalCallbackService = portalCallback;

-        this.supportedModesService = supportedModesService;

-    }

-

-    /**

-     * Standard Getter.

-     * @return the name of the portal.

-     */

-    public String getPortalName() {

-        return propertyService.getPortalName();

-    }

-

-    /**

-     * Standard Getter.

-     * @return the portal version.

-     */

-    public String getPortalVersion() {

-        return propertyService.getPortalVersion();

-    }

-

-    /**

-     * Standard Getter.

-     * @return the name of the container.

-     */

-    public String getContainerName() {

-        return propertyService.getContainerName();

-    }

-

-    /**

-     * Standard Getter.

-     * @return the names of the supported portlet modes.

-     */

-    public Collection getSupportedPortletModes() {

-        return propertyService.getSupportedPortletModes();

-    }

-

-    /**

-     * Standard Getter.

-     * @return the names of the supported window states.

-     */

-    public Collection getSupportedWindowStates() {

-        return propertyService.getSupportedWindowStates();

-    }

-

-    /**

-     * Standard Getter.

-     * @return the configuration data of all configured portlet applications.

-     */

-    public Collection getPortletApplications() {

-        return registryService.getPortletApplications();

-    }

-

-   /**

-     * Retrieve the portlet application with the given id.

-     * @param id the id of the portlet application.

-     * @return the portlet application configuration data.

-     */

-    public PortletApplicationConfig getPortletApp(String id) {

-        return registryService.getPortletApplication(id);

-    }

-

-    /**

-     * Retrieve the window configuration associated with the given id.

-     * @param id the id of the portlet window.

-     * @return the portlet window configuration data.

-     */

-    public PortletWindowConfig getPortletWindowConfig(String id) {

-        return registryService.getPortlet(id);

-    }

-

-    /**

-     * Standard Getter.

-     * @return the render configuration.

-     */

-    public Collection getPages() {

-        return renderService.getPages();

-    }

-

-    public PageConfig getPageConfig(String pageId) {

-        return renderService.getPage(pageId);

-    }

-    

-    public boolean isPortletModeSupportedByPortal(String mode) {

-        return supportedModesService.isPortletModeSupportedByPortal(mode);

-    }

-    

-    public boolean isPortletModeSupportedByPortlet(String portletId, String mode) {

-        return supportedModesService.isPortletModeSupportedByPortlet(portletId, mode);

-    }

-    

-    public boolean isPortletModeSupported(String portletId, String mode) {

-        return supportedModesService.isPortletModeSupported(portletId, mode);

-    }

-

-    public void init(ServletContext context) {

-        this.propertyService.init(context);

-        this.registryService.init(context);

-        this.renderService.init(context);

-    }

-

-    public void destroy() {

-        if(propertyService != null)

-            propertyService.destroy();

-

-        if(registryService != null)

-            registryService.destroy();

-

-        if(renderService != null)

-            renderService.destroy();

-    }

-

-//

-// Portal Driver Services

-//

-

-    public PortalURLParser getPortalUrlParser() {

-        return portalUrlParser;

-    }

-

-    public void setPortalUrlParser(PortalURLParser portalUrlParser) {

-        this.portalUrlParser = portalUrlParser;

-    }       

-

-//

-// Container Services

-//

-    public PortalCallbackService getPortalCallbackService() {

-        return portalCallbackService;

-    }

-

-    public void setPortalCallbackService(PortalCallbackService portalCallbackService) {

-        this.portalCallbackService = portalCallbackService;

-    }

-

-    public PortletPreferencesService getPortletPreferencesService() {

-        return portletPreferencesService;

-    }

-

-    public void setPortletPreferencesService(PortletPreferencesService portletPreferencesService) {

-        this.portletPreferencesService = portletPreferencesService;

-    }

-}

-

diff --git a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java b/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java
deleted file mode 100644
index 7f7619b..0000000
--- a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ContainerServicesImpl.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.container;

-

-import org.apache.pluto.OptionalContainerServices;

-import org.apache.pluto.RequiredContainerServices;

-import org.apache.pluto.internal.InternalPortletWindow;

-import org.apache.pluto.driver.config.DriverConfiguration;

-import org.apache.pluto.spi.PortalCallbackService;

-import org.apache.pluto.spi.optional.PortletPreferencesService;

-import org.apache.pluto.spi.optional.PortletEnvironmentService;

-import org.apache.pluto.spi.optional.PortletInvokerService;

-import org.apache.pluto.spi.optional.PortletRegistryService;

-

-import javax.portlet.PortalContext;

-

-/**

- * The Portal Driver's <code>PortletContainerServices</code> implementation. The

- * <code>PortletContainerServices</code> interface is the main integration point

- * between the pluto container and the surrounding portal.

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since Sep 21, 2004

- */

-public class ContainerServicesImpl

-implements RequiredContainerServices, OptionalContainerServices {

-

-

-    private PortalContextImpl context;

-    private DriverConfiguration driverConfig;

-

-

-    /**

-     * Default Constructor.

-     */

-    public ContainerServicesImpl(PortalContextImpl context,

-                                 DriverConfiguration driverConfig) {

-        this.context = context;

-        this.driverConfig = driverConfig;

-    }

-

-    /**

-     * Standard Getter.

-     * @return the portal context for the portal which we service.

-     */

-    public PortalContext getPortalContext() {

-        return context;

-    }

-

-    /**

-     * The PortletPreferencesService provides access to the portal's

-     * PortletPreference persistence mechanism.

-     * @return a PortletPreferencesService instance.

-     */

-    public PortletPreferencesService getPortletPreferencesService() {

-        return driverConfig.getPortletPreferencesService();

-    }

-

-    /**

-     * The PortalCallbackService allows the container to communicate

-     * actions back to the portal.

-     * @return a PortalCallbackService implementation.

-     */

-    public PortalCallbackService getPortalCallbackService() {

-        return driverConfig.getPortalCallbackService();

-    }

-

-

-    /**

-     * Returns null to use pluto's default 

-     * @return

-     */

-    public PortletRegistryService getPortletRegistryService() {

-        return null;

-    }

-

-    public PortletEnvironmentService getPortletEnvironmentService() {

-        return null;

-    }

-

-    public PortletInvokerService getPortletInvokerService(InternalPortletWindow window) {

-        return null;

-    }

-}

-

diff --git a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalCallbackServiceImpl.java b/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalCallbackServiceImpl.java
deleted file mode 100644
index 4f4662d..0000000
--- a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalCallbackServiceImpl.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.container;

-

-import javax.servlet.http.HttpServletRequest;

-

-import org.apache.pluto.PortletWindow;

-import org.apache.pluto.driver.AttributeKeys;

-import org.apache.pluto.driver.services.container.ResourceURLProviderImpl;

-import org.apache.pluto.spi.PortalCallbackService;

-import org.apache.pluto.spi.PortletURLProvider;

-import org.apache.pluto.spi.ResourceURLProvider;

-

-import java.util.Map;

-import java.util.Collections;

-

-/**

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- * @since Sep 22, 2004

- */

-public class PortalCallbackServiceImpl implements PortalCallbackService {

-

-	// Constructor -------------------------------------------------------------

-	

-	/**

-	 * Default no-arg constructor.

-	 */

-    public PortalCallbackServiceImpl() {

-    	// Do nothing.

-    }

-    

-    

-    // PortalCallbackService Impl ----------------------------------------------

-    

-    /**

-     * Method invoked by the container when the portlet sets its title. This

-     * method binds the dynamic portlet title to the servlet request for later

-     * use.

-     */

-    public void setTitle(HttpServletRequest request,

-                         PortletWindow portletWindow,

-                         String title) {

-        request.setAttribute(AttributeKeys.PORTLET_TITLE, title);

-    }

-

-    public PortletURLProvider getPortletURLProvider(

-    		HttpServletRequest request,

-    		PortletWindow portletWindow) {

-        return new PortletURLProviderImpl(request, portletWindow);

-    }

-

-    public ResourceURLProvider getResourceURLProvider(

-    		HttpServletRequest request,

-    		PortletWindow portletWindow) {

-        return new ResourceURLProviderImpl(request, portletWindow);

-    }

-

-    public Map getRequestProperties(HttpServletRequest request,

-                                    PortletWindow portletWindow) {

-    	// TODO: currently this method returns an empty map.

-        return Collections.EMPTY_MAP;

-    }

-

-    public void setResponseProperty(HttpServletRequest request,

-                                    PortletWindow portletWindow,

-                                    String property,

-                                    String value) {

-    	// TODO: currently this method does nothing.

-    }

-

-    public void addResponseProperty(HttpServletRequest request,

-                                    PortletWindow portletWindow,

-                                    String property,

-                                    String value) {

-    	// TODO: currently this method does nothing.

-    }

-}

-

diff --git a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalContextImpl.java b/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalContextImpl.java
deleted file mode 100644
index b758087..0000000
--- a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortalContextImpl.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.container;

-

-import java.util.Enumeration;

-import java.util.HashMap;

-import java.util.Vector;

-

-import javax.portlet.PortalContext;

-import javax.portlet.PortletMode;

-import javax.portlet.WindowState;

-

-import org.apache.pluto.driver.config.DriverConfiguration;

-

-/**

- * <code>PortalContext</code> implementation for the Pluto Portal Driver.

- */

-public class PortalContextImpl implements PortalContext {

-

-    /**

-     * The <code>DriverConfigurationImpl</code> from which this

-     * <code>PortalContext</code> recieves it's configuration information.

-     */

-    private DriverConfiguration config;

-

-    /**

-     * Portal information.

-     */

-    private String info = null;

-

-    /**

-     * Portal Properties

-     */

-    private HashMap properties = new HashMap();

-

-    /**

-     * Supported PortletModes.

-     */

-    private Vector portletModes;

-

-    /**

-     * Supported WindowStates.

-     */

-    private Vector windowStates;

-

-

-    /**

-     * Default Constructor.

-     * @param config

-     */

-    public PortalContextImpl(DriverConfiguration config) {

-        this.config = config;

-        reset();

-    }

-

-    /**

-     * Get a dynamic portal property.

-     * @param name

-     * @return the property value associated with the given key.

-     * @throws IllegalArgumentException if the specified name is null.

-     */

-    public String getProperty(String name) {

-        if (name == null) {

-            throw new IllegalArgumentException("Property name == null");

-        }

-

-        return (String) properties.get(name);

-    }

-

-

-    /**

-     * Get an enumeration containing all names of the portal properties.

-     * @return an enumeration of all keys to which properties are bound.

-     */

-    public Enumeration getPropertyNames() {

-        Vector names = new Vector(properties.keySet());

-        return names.elements();

-    }

-

-

-    /**

-     * Get an enumeration of all <code>PortletMode</code>s supported by this

-     * portal.

-     * @return enumeration of all supported portlet modes.

-     */

-    public Enumeration getSupportedPortletModes() {

-        if (portletModes == null) {

-            portletModes = new Vector();

-            Enumeration enumeration = new Vector(config.getSupportedPortletModes()).elements();

-            while (enumeration.hasMoreElements()) {

-                portletModes.add(

-                    new PortletMode(enumeration.nextElement().toString()));

-            }

-        }

-        return portletModes.elements();

-    }

-

-    /**

-     * Get an enumeration of all <code>WindowState</code>s supported by this

-     * portal.

-     * @return an enumeration of all supported window states.

-     */

-    public Enumeration getSupportedWindowStates() {

-        if (windowStates == null) {

-            windowStates = new Vector();

-            Enumeration enumeration = new Vector(config.getSupportedWindowStates()).elements();

-            while (enumeration.hasMoreElements()) {

-                windowStates.add(

-                    new WindowState(enumeration.nextElement().toString()));

-            }

-        }

-        return windowStates.elements();

-    }

-

-    /**

-     * Get the portal info for this portal.

-     * @return the portal information for this context.

-     */

-    public String getPortalInfo() {

-        if(info == null) {

-            info = config.getPortalName() + "/" + config.getPortalVersion();

-        }

-        return info;

-    }

-

-

-    // additional methods.

-    // methods used container internally to set

-

-    public void setProperty(String name, String value) {

-        if (name == null) {

-            throw new IllegalArgumentException("Property name == null");

-        }

-

-        properties.put(name, value);

-    }

-

-

-    /**

-     * reset all values to default portlet modes and window states; delete all

-     * properties and set the given portlet information as portlet info string.

-     */

-    public void reset() {

-        info = null;

-        properties.clear();

-    }

-

-    public DriverConfiguration getDriverConfiguration() {

-        return config;

-    }

-

-}

diff --git a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java b/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java
deleted file mode 100644
index 6ad510e..0000000
--- a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.container;

-

-import java.util.Iterator;

-import java.util.Map;

-

-import javax.portlet.PortletMode;

-import javax.portlet.WindowState;

-import javax.servlet.http.HttpServletRequest;

-

-import org.apache.pluto.PortletWindow;

-import org.apache.pluto.driver.url.PortalURLParameter;

-import org.apache.pluto.driver.url.PortalURL;

-import org.apache.pluto.driver.core.PortalRequestContext;

-import org.apache.pluto.spi.PortletURLProvider;

-

-/**

- * 

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- */

-public class PortletURLProviderImpl implements PortletURLProvider {

-

-    private PortalURL url;

-    private String window;

-

-    public PortletURLProviderImpl(HttpServletRequest request,

-                                  PortletWindow internalPortletWindow) {

-        PortalRequestContext ctx = (PortalRequestContext)

-            request.getAttribute(PortalRequestContext.REQUEST_KEY);

-        url = ctx.createPortalURL();

-

-        this.window = internalPortletWindow.getId().getStringId();

-    }

-

-    public void setPortletMode(PortletMode mode) {

-        url.setPortletMode(window, mode);

-    }

-

-    public void setWindowState(WindowState state) {

-        url.setWindowState(window, state);

-    }

-

-    public void setAction(boolean action) {

-        if (action) {

-            url.setActionWindow(window);

-        } else {

-            url.setActionWindow(null);

-        }

-    }

-

-    public void setSecure() {

-        //url.setSecure(true);

-    }

-

-    public void clearParameters() {

-        url.clearParameters(window);

-    }

-

-    public void setParameters(Map parameters) {

-        Iterator it = parameters.entrySet().iterator();

-        while (it.hasNext()) {

-            Map.Entry entry = (Map.Entry) it.next();

-            PortalURLParameter param = new PortalURLParameter(

-            		window,

-            		(String) entry.getKey(),

-            		(String[]) entry.getValue());

-            url.addParameter(param);

-        }

-    }

-

-    public String toString() {

-        return url.toString();

-    }

-

-}

diff --git a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ResourceURLProviderImpl.java b/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ResourceURLProviderImpl.java
deleted file mode 100644
index b8cc106..0000000
--- a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ResourceURLProviderImpl.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.container;

-

-import java.net.MalformedURLException;

-import java.net.URL;

-

-import javax.servlet.http.HttpServletRequest;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.PortletWindow;

-import org.apache.pluto.driver.core.PortalRequestContext;

-import org.apache.pluto.spi.ResourceURLProvider;

-

-public class ResourceURLProviderImpl implements ResourceURLProvider {

-

-    private static final Log LOG =

-        LogFactory.getLog(ResourceURLProviderImpl.class);

-

-    private String stringUrl = "";

-    private String base = "";

-

-    public ResourceURLProviderImpl(HttpServletRequest req,

-                                   PortletWindow internalPortletWindow) {

-        PortalRequestContext ctx = (PortalRequestContext)

-            req.getAttribute(PortalRequestContext.REQUEST_KEY);

-

-        this.base = ctx.createPortalURL().getServerURI();

-        if (LOG.isDebugEnabled()) {

-            LOG.debug("Resource URL Created with base: " + base);

-        }

-    }

-

-    public void setAbsoluteURL(String path) {

-        stringUrl = path;

-    }

-

-    public void setFullPath(String path) {

-        stringUrl = base + path;

-    }

-

-    public String toString() {

-        URL url = null;

-

-        if (!"".equals(stringUrl)) {

-            try {

-                url = new URL(stringUrl);

-            } catch (MalformedURLException e) {

-                throw new java.lang.IllegalArgumentException(

-                    "A malformed URL has occured");

-            }

-        }

-

-        return ((url == null) ? "" : url.toString());

-

-    }

-}

diff --git a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/UserInfoAttributesServiceImpl.java b/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/UserInfoAttributesServiceImpl.java
deleted file mode 100644
index 4de7708..0000000
--- a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/UserInfoAttributesServiceImpl.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*

- * Copyright 2003-2006 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.impl;

-

-import java.io.IOException;

-import java.io.InputStream;

-import java.util.HashMap;

-import java.util.Map;

-import java.util.Properties;

-

-import javax.portlet.PortletRequest;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.PortletContainerException;

-import org.apache.pluto.spi.optional.UserInfoAttributesService;

-import org.apache.pluto.spi.optional.P3PAttributes;

-

-/**

- * TODO: Add a cache keyed by logged-in username.

- * FIXME: Only include attributes that are defined in portlet.xml

- * 

- * This is a default implementation of that gets user information attributes

- * from a properties file where the user information attribute name (as defined

- * in PLT.D of the JSR-168 spec) is prefixed by the user name (e.g. craig.user.name.given=Craig). 

- * 

- * @author <a href="cdoremus@apache.org">Craig Doremus</a>

- */

-public class UserInfoAttributesServiceImpl implements UserInfoAttributesService {

-

-	private static UserInfoAttributesServiceImpl instance = new UserInfoAttributesServiceImpl();

-	

-	private static final String USER_INFO_ATTR_FILE = "/user-info-attributes.properties";

-	/** Logger. */

-	private static final Log LOG = LogFactory.getLog(

-			UserInfoAttributesServiceImpl.class);

-	private static Properties props = new Properties();

-	private static Map cache = new HashMap();

-	

-	private UserInfoAttributesServiceImpl(){

-		

-	}

-	

-	public static UserInfoAttributesServiceImpl getInstance() throws IOException {

-		loadProperties();

-		return instance;

-	}

-

-	public static UserInfoAttributesServiceImpl getInstance(Properties inprops) throws IOException {

-		props = inprops;

-		return instance;

-	}

-

-	/**

-	 * Implementation of PLT.17.2 used to access user information attributes.

-	 * 

-	 * @see UserInfoAttributesService#getAttributes(javax.portlet.PortletRequest)

-	 * @return As per the spec, return null if the user is not authenticated or an empty Map if there are

-	 * no attributes in the properties file or a Map containing only those attributes found in the attribute 

-	 * data store (properties file).

-	 */

-	public Map getAttributes(PortletRequest request)

-			throws PortletContainerException {

-		Map map = null;

-		String user = request.getRemoteUser();

-		if (user == null) {

-			return null;

-		}

-		map = (Map)cache.get(user);

-		if (map == null) {

-			map = new HashMap();

-			int len = P3PAttributes.ATTRIBUTE_ARRAY.length;

-			StringBuffer prefix = new StringBuffer();

-			prefix.append(user);

-			prefix.append('.');

-			StringBuffer name = null;

-			for (int i = 0; i < len ; i++) {

-				name = new StringBuffer();

-				name.append(prefix);

-				String attr = P3PAttributes.ATTRIBUTE_ARRAY[i]; 

-				name.append(attr);

-				String prop = props.getProperty(name.toString()); 

-				//spec says that Map only attributes that have data

-				if ( prop != null) {

-					//TODO: convert user.bdate to milliseconds since January 1, 1970, 00:00:00 GMT.

-					map.put(attr, prop);

-				}

-			}

-			cache.put(user, map);

-		}

-		return map;

-	}

-

-	private static void loadProperties() throws IOException {

-	    //get the properties from prop file

-		if (props.isEmpty()) {

-		    InputStream stream = UserInfoAttributesServiceImpl.class.getResourceAsStream(USER_INFO_ATTR_FILE);

-		    if (stream == null) {

-		    	String msg = "The properties file '" + USER_INFO_ATTR_FILE +"' cannot be found." + 

-		    	" Please make sure this file exists and is in the classpath (i.e. WEB-INF/classes).";

-		    	LOG.error(msg);

-					throw new IOException(msg);

-			}

-			props.load(stream);

-		}

-	}

-

-

-

-}

diff --git a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PortletRegistryServiceImpl.java b/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PortletRegistryServiceImpl.java
deleted file mode 100644
index d196236..0000000
--- a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PortletRegistryServiceImpl.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.impl.resource;

-

-import java.io.InputStream;

-import java.util.Iterator;

-import java.util.Set;

-

-import javax.servlet.ServletContext;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.PortletContainer;

-import org.apache.pluto.PortletContainerException;

-import org.apache.pluto.descriptors.portlet.PortletAppDD;

-import org.apache.pluto.descriptors.portlet.PortletDD;

-import org.apache.pluto.driver.AttributeKeys;

-import org.apache.pluto.driver.config.DriverConfigurationException;

-import org.apache.pluto.driver.services.portal.PortletApplicationConfig;

-import org.apache.pluto.driver.services.portal.PortletRegistryService;

-import org.apache.pluto.driver.services.portal.PortletWindowConfig;

-import org.apache.pluto.driver.services.portal.admin.DriverAdministrationException;

-import org.apache.pluto.driver.services.portal.admin.PortletRegistryAdminService;

-

-/**

- * Implementation of <code>PortletRegistryService</code> and

- * <code>PortletRegistryAdminService</code>.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @since Aug 10, 2005

- */

-public class PortletRegistryServiceImpl

-implements PortletRegistryService, PortletRegistryAdminService {

-

-    private static final Log LOG = LogFactory.getLog(PortletRegistryServiceImpl.class);

-    private ResourceConfig config;

-    private ServletContext servletContext;

-    private PortletContainer container;

-    

-    // Constructor -------------------------------------------------------------

-    

-    /**

-     * Default no-arg constructor.

-     */

-    public PortletRegistryServiceImpl() {

-        // Do nothing.

-    }

-    

-    

-    // DriverConfigurationService Impl -----------------------------------------

-    

-    /**

-     * Initialization Lifecycle Method

-     * @param servletContext  the servlet context.

-     */

-    public void init(ServletContext servletContext)

-    throws DriverConfigurationException {

-        try {

-            this.servletContext = servletContext;

-            InputStream in = servletContext.getResourceAsStream(

-            		ResourceConfigReader.CONFIG_FILE);

-            this.config = ResourceConfigReader.getFactory().parse(in);

-        } catch (Exception ex) {

-            throw new DriverConfigurationException(ex);

-        }

-

-    }

-

-    public void destroy() throws DriverConfigurationException {

-        config = null;

-        servletContext = null;

-    }

-    

-    

-    // PortletRegistryService Impl ---------------------------------------------

-    

-    public Set getPortletApplications() {

-        return config.getPortletApplications();

-    }

-

-    public PortletApplicationConfig getPortletApplication(String id) {

-        return config.getPortletApp(id);

-    }

-

-    public PortletWindowConfig getPortlet(String id) {

-        return config.getPortletWindowConfig(id);

-    }

-    

-    

-    // PortletRegistryAdminService Impl ----------------------------------------

-    

-    public void addPortletApplication(String contextPath)

-    throws DriverAdministrationException {

-        if (contextPath == null) {

-            throw new IllegalArgumentException(

-            		"Portlet application context path cannot be null.");

-        }

-        try {

-            PortletApplicationConfig portletAppConfig =

-            		new PortletApplicationConfig();

-            portletAppConfig.setContextPath(contextPath);

-

-            ServletContext portletAppServletContext = servletContext.getContext(contextPath);

-            if (portletAppServletContext == null) {

-                final String msg = "Unable to locate servlet context: " + contextPath                    

-                    + ": ensure that crossContext support is enabled "

-                    + "and the portlet application has been deployed.";

-                LOG.error(msg);

-                throw new DriverAdministrationException(msg);

-            }

-            

-            PortletContainer container = (PortletContainer)servletContext

-                .getAttribute(AttributeKeys.PORTLET_CONTAINER);

-            

-            PortletAppDD portletAppDD = container.getOptionalContainerServices()

-                .getPortletRegistryService()

-                .getPortletApplicationDescriptor(contextPath);

-            

-            if (portletAppDD == null) {

-                final String msg = "Unable to retrieve portlet application descriptor from "

-                    + contextPath + ": ensure that the portlet application "

-                    + "has been deployed.";

-                LOG.error(msg);

-            	throw new DriverAdministrationException(msg);

-            }

-            for (Iterator it = portletAppDD.getPortlets().iterator();

-            		it.hasNext(); ) {

-                PortletDD portletDD = (PortletDD) it.next();

-                PortletWindowConfig portletWindowConfig = new PortletWindowConfig();

-                portletWindowConfig.setContextPath(contextPath);

-                portletWindowConfig.setPortletName(portletDD.getPortletName());

-                portletAppConfig.addPortlet(portletWindowConfig);

-            }

-            config.addPortletApp(portletAppConfig);

-            

-        } catch (PortletContainerException ex) {

-            final String msg = "Unable to add portlet application from " + contextPath;

-            LOG.error(msg);

-            throw new DriverAdministrationException(msg, ex);

-        }

-    }

-    

-    /**

-     * FIXME: do we really need this public method?

-     */

-    public PortletWindowConfig getPortletWindowConfig(String id) {

-        return config.getPortletWindowConfig(id);

-    }

-            

-}

diff --git a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PropertyConfigServiceImpl.java b/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PropertyConfigServiceImpl.java
deleted file mode 100644
index 834607a..0000000
--- a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PropertyConfigServiceImpl.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.impl.resource;

-

-import org.apache.pluto.driver.config.DriverConfigurationException;

-import org.apache.pluto.driver.services.portal.*;

-

-import javax.servlet.ServletContext;

-import java.util.Set;

-import java.io.InputStream;

-

-/**

- * Default implementation of all of the portal Services.

- * Utilizes resource configuration from

- * <code>pluto-portal-driver-config.xml</code>

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @since Aug 10, 2005

- */

-public class PropertyConfigServiceImpl implements

-    PropertyConfigService {

-

-    private ResourceConfig config;

-

-    public PropertyConfigServiceImpl() {

-        

-    }

-

-    /**

-     * Initialization Lifecycle Method

-     * @param ctx

-     */

-    public void init(ServletContext ctx) {

-        try {

-            InputStream in = ctx.getResourceAsStream(ResourceConfigReader.CONFIG_FILE);

-            config = ResourceConfigReader.getFactory().parse(in);

-        }

-        catch(Exception e) {

-            throw new DriverConfigurationException(e);

-        }

-    }

-

-    /**

-     * Shutdown the ResourceService.

-     */

-    public void destroy() {

-        config = null;

-    }

-

-

-    public String getPortalName() {

-        return config.getPortalName();

-    }

-

-    public String getPortalVersion() {

-        return config.getPortalVersion();

-    }

-

-    public String getContainerName() {

-        return config.getContainerName();

-    }

-

-    public Set getSupportedPortletModes() {

-        return config.getSupportedPortletModes();

-    }

-

-    public Set getSupportedWindowStates() {

-        return config.getSupportedWindowStates();

-    }

-

-    public Set getPortletApplications() {

-        return config.getPortletApplications();

-    }

-}

diff --git a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/RenderConfigServiceImpl.java b/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/RenderConfigServiceImpl.java
deleted file mode 100644
index cb665f4..0000000
--- a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/RenderConfigServiceImpl.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.impl.resource;

-

-import org.apache.pluto.driver.config.DriverConfigurationException;

-import org.apache.pluto.driver.services.portal.*;

-import org.apache.pluto.driver.services.portal.admin.RenderConfigAdminService;

-

-import javax.portlet.PortletContext;

-import javax.servlet.ServletContext;

-import java.util.List;

-import java.util.Set;

-import java.io.InputStream;

-

-/**

- * Default implementation of all of the portal Services.

- * Utilizes resource configuration from

- * <code>pluto-portal-driver-config.xml</code>

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @since Aug 10, 2005

- */

-public class RenderConfigServiceImpl

-    implements RenderConfigService, RenderConfigAdminService {

-

-

-    private ResourceConfig config;

-

-//

-// Lifecycle Methods

-//

-    /**

-     * Initialization Lifecycle Method

-     * @param ctx

-     */

-    public void init(ServletContext ctx) {

-        try {

-            InputStream in = ctx.getResourceAsStream(ResourceConfigReader.CONFIG_FILE);

-            initializeConfig(in);

-        }

-        catch(Exception e) {

-            throw new DriverConfigurationException(e);

-        }

-    }

-    

-    /**

-     * Used by the admin portlet

-     * @param ctx

-     */

-    public void init(PortletContext ctx) {

-        try {

-            InputStream in = ctx.getResourceAsStream(ResourceConfigReader.CONFIG_FILE);

-            initializeConfig(in);

-        }

-        catch(Exception e) {

-            throw new DriverConfigurationException(e);

-        }

-    }

-

-    private void initializeConfig(InputStream in) {

-        try {

-            config = ResourceConfigReader.getFactory().parse(in);

-        }

-        catch(Exception e) {

-            throw new DriverConfigurationException(e);

-        }

-    	

-    }

-    /**

-     * Shutdown the ResourceService.

-     */

-    public void destroy() {

-        config = null;

-    }

-

-

-    public String getPortalName() {

-        return config.getPortalName();

-    }

-

-    public String getPortalVersion() {

-        return config.getPortalVersion();

-    }

-

-    public String getContainerName() {

-        return config.getContainerName();

-    }

-

-    public Set getSupportedPortletModes() {

-        return config.getSupportedPortletModes();

-    }

-

-    public Set getSupportedWindowStates() {

-        return config.getSupportedWindowStates();

-    }

-

-    public Set getPortletApplications() {

-        return config.getPortletApplications();

-    }

-

-    public PortletApplicationConfig getPortletApplication(String id) {

-        return config.getPortletApp(id);

-    }

-

-    public PortletWindowConfig getPortletWindowConfig(String id) {

-        return config.getPortletWindowConfig(id);

-    }

-

-    public PortletWindowConfig getPortlet(String id) {

-        return config.getPortletWindowConfig(id);

-    }

-

-    public List getPages() {

-        return config.getRenderConfig().getPages();

-    }

-

-    public PageConfig getDefaultPage() {

-        return config.getRenderConfig().getPageConfig(null);

-    }

-

-    public PageConfig getPage(String id) {

-        return config.getRenderConfig().getPageConfig(id);

-    }

-

-    public void addPage(PageConfig pageConfig) {

-        config.getRenderConfig().addPage(pageConfig);

-    }

-}

diff --git a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfig.java b/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfig.java
deleted file mode 100644
index c4a4467..0000000
--- a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfig.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.impl.resource;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.driver.services.portal.PortletApplicationConfig;

-import org.apache.pluto.driver.services.portal.PortletWindowConfig;

-import org.apache.pluto.driver.services.portal.RenderConfig;

-

-import java.util.*;

-

-/**

- * Encapsulation of the Pluto Driver ResourceConfig Info.

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since Sep 23, 2004

- */

-public class ResourceConfig {

-

-    /** Internal Logger. */

-    private static final Log LOG =

-        LogFactory.getLog(ResourceConfig.class);

-

-    /** The name of the portal. */

-    private String portalName;

-

-    /** The Version of the Portal. */

-    private String portalVersion;

-

-    /** The name of the container wrapped by this portal. */

-    private String containerName;

-

-    /** The portlet modes we will support. */

-    private Set supportedPortletModes;

-

-    /** The window states we will support. */

-    private Set supportedWindowStates;

-

-    /** The portlet applications registered with us. */

-    private Map portletApplications;

-

-    /** Encapsulation of render configuration data. */

-    private RenderConfig renderConfig;

-

-    /**

-     * Default Constructor.

-     */

-    public ResourceConfig() {

-        this.supportedWindowStates = new HashSet();

-        this.supportedPortletModes = new HashSet();

-        this.portletApplications = new java.util.HashMap();

-    }

-

-    /**

-     * Standard Getter.

-     * @return the name of the portal.

-     */

-    public String getPortalName() {

-        return portalName;

-    }

-

-    /**

-     * Standard Getter.

-     * @param portalName the name of the portal.

-     */

-    public void setPortalName(String portalName) {

-        this.portalName = portalName;

-    }

-

-    /**

-     * Standard Getter.

-     * @return the portal version.

-     */

-    public String getPortalVersion() {

-        return portalVersion;

-    }

-

-    /**

-     * Standard Setter.

-     * @param portalVersion the portal version.

-     */

-    public void setPortalVersion(String portalVersion) {

-        this.portalVersion = portalVersion;

-    }

-

-    /**

-     * Standard Getter.

-     * @return the name of the container.

-     */

-    public String getContainerName() {

-        return containerName;

-    }

-

-    /**

-     * Standard Setter.

-     * @param containerName the name of the container.

-     */

-    public void setContainerName(String containerName) {

-        this.containerName = containerName;

-    }

-

-    /**

-     * Standard Getter.

-     * @return the names of the supported portlet modes.

-     */

-    public Set getSupportedPortletModes() {

-        return supportedPortletModes;

-    }

-

-    /**

-     * Standard Setter.

-     * @param supportedPortletModes the names of the supported portlet modes.

-     */

-    public void setSupportedPortletModes(Set supportedPortletModes) {

-        this.supportedPortletModes = supportedPortletModes;

-    }

-

-    /**

-     * Add the named supported portlet mode to the list of supported modes.

-     * @param mode a supported mode.

-     */

-    public void addSupportedPortletMode(String mode) {

-        supportedPortletModes.add(mode);

-    }

-

-    /**

-     * Standard Getter.

-     * @return the names of the supported window states.

-     */

-    public Set getSupportedWindowStates() {

-        return supportedWindowStates;

-    }

-

-    /**

-     * Standard Setter.

-     * @param supportedWindowStates the names of the supported window states.

-     */

-    public void setSupportedWindowStates(Set supportedWindowStates) {

-        this.supportedWindowStates = supportedWindowStates;

-    }

-

-    /**

-     * Add the named supported window state to the list of supported states.

-     * @param state the name of the supported state.

-     */

-    public void addSupportedWindowState(String state) {

-        this.supportedWindowStates.add(state);

-    }

-

-    /**

-     * Standard Getter.

-     * @return the configuration data of all configured portlet applications.

-     */

-    public Set getPortletApplications() {

-        return new HashSet(portletApplications.values());

-    }

-

-    /**

-     * Add a porltet applicaiton conofiguration to this list of portlet apps.

-     * @param app portlet application coniguration data.

-     */

-    public void addPortletApp(PortletApplicationConfig app) {

-        if (LOG.isDebugEnabled()) {

-            LOG.debug(

-                " - - Adding PortletApp ResourceConfig for: " +

-                app.getContextPath());

-        }

-        portletApplications.put(app.getContextPath(), app);

-    }

-

-    /**

-     * Retrieve the portlet application with the given id.

-     * @param id the id of the portlet application.

-     * @return the portlet application configuration data.

-     */

-    public PortletApplicationConfig getPortletApp(String id) {

-        return (PortletApplicationConfig) portletApplications.get(id);

-    }

-

-    /**

-     * Retrieve the window configuration associated with the given id.

-     * @param id the id of the portlet window.

-     * @return the portlet window configuration data.

-     */

-    public PortletWindowConfig getPortletWindowConfig(String id) {

-        if (id == null) {

-            return null;

-        }

-        String context = getContextFromPortletId(id);

-        String portlet = getPortletNameFromPortletId(id);

-

-        PortletApplicationConfig app = getPortletApp(context);

-        if (app == null) {

-            if (LOG.isErrorEnabled()) {

-                LOG.error("Portlet Application '" + context + "' not found.");

-            }

-            return null;

-        }

-        return app.getPortlet(portlet);

-    }

-

-    /**

-     * Standard Getter.

-     * @return the render configuration.

-     */

-    public RenderConfig getRenderConfig() {

-        return renderConfig;

-    }

-

-    /**

-     * Standard Setter.

-     * @param renderConfig the render configuration.

-     */

-    public void setRenderConfig(RenderConfig renderConfig) {

-        this.renderConfig = renderConfig;

-    }

-

-    /**

-     * Retrieve the id of the context from the portlet id.

-     * @param portletId the id of the portlet.

-     * @return the context, derived from the portlet id.

-     */

-    private String getContextFromPortletId(String portletId) {

-    	if (portletId == null) {

-    		throw new NullPointerException("Portlet ID must not be null.");

-    	}

-        int idx = portletId.lastIndexOf(".");

-        if (idx < 0) {

-        	throw new IllegalArgumentException("Portlet ID does not contain a dot.");

-        }

-        return portletId.substring(0, idx);

-    }

-

-    /**

-     *  Retreive the porlet name from the given portletId.

-     * @param portletId the portlet id.

-     * @return the name of the portlet.

-     */

-    private String getPortletNameFromPortletId(String portletId) {

-    	if (portletId == null) {

-    		throw new NullPointerException("Portlet ID must not be null.");

-    	}

-        int idx = portletId.lastIndexOf(".");

-        if (idx < 0) {

-        	throw new IllegalArgumentException("Portlet ID does not contain a dot.");

-        }

-        return portletId.substring(idx + 1);

-    }

-}

-

diff --git a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfigReader.java b/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfigReader.java
deleted file mode 100644
index 711a532..0000000
--- a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfigReader.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.impl.resource;

-

-import org.apache.commons.digester.Digester;

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.driver.services.portal.PortletApplicationConfig;

-import org.apache.pluto.driver.services.portal.PortletWindowConfig;

-import org.apache.pluto.driver.services.portal.PageConfig;

-import org.apache.pluto.driver.services.portal.RenderConfig;

-import org.xml.sax.SAXException;

-

-import java.io.IOException;

-import java.io.InputStream;

-

-/**

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since Sep 23, 2004

- */

-public class ResourceConfigReader {

-

-    private static final Log LOG = LogFactory.getLog(

-        ResourceConfigReader.class

-    );

-

-    public static final String CONFIG_FILE =

-        "/WEB-INF/pluto-portal-driver-config.xml";

-

-

-    private static ResourceConfigReader factory;

-

-    public static ResourceConfigReader getFactory() {

-        if (factory == null) {

-            factory = new ResourceConfigReader();

-        }

-        return factory;

-    }

-

-    private Digester digester;

-

-    private ResourceConfigReader() {

-        digester = new Digester();

-        // digester.setLogger(LOG);  // Too many log messages.

-        digester.setClassLoader(Thread.currentThread().getContextClassLoader());

-        init();

-    }

-

-    public ResourceConfig parse(InputStream in)

-        throws IOException, SAXException {

-        return (ResourceConfig) digester.parse(in);

-    }

-

-// Digester Setup

-

-    private void init() {

-        if (LOG.isDebugEnabled()) {

-            LOG.debug("Setting up digester...");

-        }

-        digester.addObjectCreate(

-            "pluto-portal-driver",

-            ResourceConfig.class

-        );

-        digester.addBeanPropertySetter(

-            "pluto-portal-driver/portal-name",

-            "portalName"

-        );

-        digester.addBeanPropertySetter(

-            "pluto-portal-driver/portal-version",

-            "portalVersion"

-        );

-        digester.addBeanPropertySetter(

-            "pluto-portal-driver/container-name",

-            "containerName"

-        );

-

-        digester.addCallMethod(

-            "pluto-portal-driver/supports/portlet-mode",

-            "addSupportedPortletMode", 0

-        );

-        digester.addCallMethod(

-            "pluto-portal-driver/supports/window-state",

-            "addSupportedWindowState", 0

-        );

-

-        digester.addObjectCreate(

-            "pluto-portal-driver/portlet-app",

-            PortletApplicationConfig.class

-        );

-        digester.addBeanPropertySetter(

-            "pluto-portal-driver/portlet-app/context-path", "contextPath"

-        );

-

-        digester.addObjectCreate(

-            "pluto-portal-driver/portlet-app/portlets/portlet",

-            PortletWindowConfig.class

-        );

-        digester.addSetProperties(

-            "pluto-portal-driver/portlet-app/portlets/portlet", "name",

-            "portletName"

-        );

-        digester.addSetNext(

-            "pluto-portal-driver/portlet-app/portlets/portlet",

-            "addPortlet"

-        );

-        digester.addSetNext("pluto-portal-driver/portlet-app", "addPortletApp");

-

-        digester.addObjectCreate(

-            "pluto-portal-driver/render-config",

-            RenderConfig.class

-        );

-        digester.addSetProperties(

-            "pluto-portal-driver/render-config",

-            "default", "defaultPageId"

-        );

-        digester.addObjectCreate(

-            "pluto-portal-driver/render-config/page",

-            PageConfig.class

-        );

-        digester.addSetProperties("pluto-portal-driver/render-config/page");

-        digester.addCallMethod(

-            "pluto-portal-driver/render-config/page/portlet", "addPortlet", 2

-        );

-        digester.addCallParam(

-            "pluto-portal-driver/render-config/page/portlet",

-            0, "context"

-        );

-        digester.addCallParam(

-            "pluto-portal-driver/render-config/page/portlet",

-            1, "name"

-        );

-        digester.addSetNext(

-            "pluto-portal-driver/render-config/page",

-            "addPage"

-        );

-        digester.addSetNext(

-            "pluto-portal-driver/render-config",

-            "setRenderConfig"

-        );

-    }

-

-}

-

diff --git a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/SupportedModesServiceImpl.java b/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/SupportedModesServiceImpl.java
deleted file mode 100644
index f5729d3..0000000
--- a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/SupportedModesServiceImpl.java
+++ /dev/null
@@ -1,259 +0,0 @@
-package org.apache.pluto.driver.services.impl.resource;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import javax.portlet.PortletMode;
-import javax.servlet.ServletContext;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.pluto.PortletContainer;
-import org.apache.pluto.PortletContainerException;
-import org.apache.pluto.descriptors.portlet.PortletAppDD;
-import org.apache.pluto.descriptors.portlet.PortletDD;
-import org.apache.pluto.descriptors.portlet.SupportsDD;
-import org.apache.pluto.driver.AttributeKeys;
-import org.apache.pluto.driver.config.DriverConfigurationException;
-import org.apache.pluto.driver.services.portal.PortletApplicationConfig;
-import org.apache.pluto.driver.services.portal.PortletRegistryService;
-import org.apache.pluto.driver.services.portal.PortletWindowConfig;
-import org.apache.pluto.driver.services.portal.PropertyConfigService;
-import org.apache.pluto.driver.services.portal.SupportedModesService;
-
-/**
- * Allows clients to determine if a particular PortletMode is supported
- * by the portal, a particular portlet, or both.
- * 
- * This implementation depends on {@link PropertyConfigService},  
- * {@link PortletRegistryService}, and {@link PortletContainer}.  
- * The two services are injected by Spring, and the container is obtained
- * from the <code>ServletContext</code>. 
- * 
- * @author <a href="mailto:esm@apache.org">Elliot Metsger</a>
- * @version $Id$
- * @since September 9, 2006
- * @todo How will hot-deploy of portlets via the admin portlet work with this impl?
- */
-public class SupportedModesServiceImpl implements SupportedModesService 
-{
-    /** Logger */
-    private static final Log LOG = LogFactory.getLog(SupportedModesServiceImpl.class);
-
-    /** PortletApplicationConfig objects keyed by their String context path */
-    private Map portletApps = new HashMap();
-    
-    /** Sets containing PortletMode objects keyed by String portlet Id */
-    private Map supportedPortletModesByPortlet = new HashMap();
-    
-    /** PortletMode objects supported by the portal */
-    private Set supportedPortletModesByPortal = new HashSet();        
-    
-    /** PortletContainer used to obtain Portlet Descriptors (PortletAppDD) */
-    private PortletContainer container = null;
-    
-    /** PortletRegistryService used to obtain PortletApplicationConfig objects */
-    private PortletRegistryService portletRegistry = null;
-    
-    /** PropertyConfig Service used to obtain supported portal modes */
-    private PropertyConfigService propertySvc = null;
-    
-    
-    /**
-     * Constructs a SupportedModesService with its dependencies.
-     * 
-     * @param portletRegistry the PortletRegistryService
-     * @param propertySvc the PropertyConfigService
-     */
-    public SupportedModesServiceImpl(PortletRegistryService portletRegistry, PropertyConfigService propertySvc)
-    {
-        this.portletRegistry = portletRegistry;
-        this.propertySvc = propertySvc;        
-    }
-    
-    //  SupportedModesService Implementation -----------------
-    
-    public boolean isPortletModeSupported(String portletId, String mode) 
-    {
-        return isPortletModeSupportedByPortal(mode) && isPortletModeSupportedByPortlet(portletId, mode);
-    }
-
-    public boolean isPortletModeSupportedByPortal(String mode) 
-    {
-        LOG.debug("Is mode [" + mode + "] supported by the portal?");
-        return supportedPortletModesByPortal.contains(new PortletMode(mode));
-    }
-
-    public boolean isPortletModeSupportedByPortlet(String portletId, String mode) 
-    {
-        LOG.debug("Is mode [" + mode + "] for portlet [" + portletId + "] supported by the portlet?");
-
-        // hack? or required, can't remember?
-        if(PortletMode.EDIT.toString().equalsIgnoreCase(mode)
-            || PortletMode.HELP.toString().equalsIgnoreCase(mode)
-            || PortletMode.VIEW.toString().equalsIgnoreCase(mode)) {
-            return true;
-        }
-        
-        Set supportedModes = (Set)supportedPortletModesByPortlet.get(portletId);
-        if (supportedModes == null)
-        {
-            return false;
-        }        
-        return supportedModes.contains(new PortletMode(mode));
-    }
-
-    // DriverConfiguration Lifecycle Implementation ---------
-    
-    public void destroy() throws DriverConfigurationException 
-    {
-        LOG.debug("Destroying Supported Modes Service...");
-        supportedPortletModesByPortlet = null;
-        supportedPortletModesByPortal = null;
-        container = null;
-        portletRegistry = null;
-        portletApps = null;        
-        propertySvc = null;
-        LOG.debug("Supported Modes Service destroyed.");
-    }
-
-    public void init(ServletContext ctx) throws DriverConfigurationException 
-    {
-        LOG.debug("Initializing Supported Modes Service...");
-        // Obtain the Portlet Container
-        this.container = (PortletContainer)ctx.getAttribute(AttributeKeys.PORTLET_CONTAINER);
-        initInternal();
-        LOG.debug("Supported Modes Service initalized.");
-    }
-    
-    // Private Methods --------------------------------------
-    
-    /**
-     * Initialize the data structures for supportedPortletModesByPortal,
-     * supportedPortletModesByPortlet, and portletApps.
-     * 
-     * Note that the order of initalization matters.
-     */
-    private void initInternal() 
-    {
-        // portlet applications should be loaded first
-        loadPortletApplications();
-        loadPortalModes();
-        loadPortletModes();        
-    }    
-    
-    /** 
-     * Populates the portletApps map with PortletApplicationConfig objects
-     * keyed by their context path.
-     */
-    private void loadPortletApplications() 
-    {
-        LOG.debug("Loading Portlet Applications...");
-        Iterator apps = portletRegistry.getPortletApplications().iterator();
-        while (apps.hasNext())
-        {
-            PortletApplicationConfig app = (PortletApplicationConfig)apps.next();
-            LOG.debug("Loading [" + app.getContextPath() + "]");
-            portletApps.put(app.getContextPath(), app);
-        }
-        LOG.debug("Loaded [" + portletApps.size() + "] Portlet Applications.");
-    }
-    
-    /** Populates the supportedPortletModesByPortal set. */
-    private void loadPortalModes() 
-    {
-        // Add the PortletModes supported by the portal to the
-        // supportedPortletModesByPortal set.
-        LOG.debug("Loading supported portal modes...");        
-        Iterator modes = propertySvc.getSupportedPortletModes().iterator();
-        while (modes.hasNext()) {
-            String mode = (String) modes.next();
-            LOG.debug("Loading mode [" + mode + "]");
-            supportedPortletModesByPortal.add(new PortletMode(mode));
-        }
-        LOG.debug("Loaded [" + supportedPortletModesByPortal.size() + "] supported portal modes");
-    }
-    
-    /** 
-     * Populates the supportedPortletModesByPortlet map, which contains
-     * Sets of PortletMode objects keyed by String portlet Ids.
-     */
-    private void loadPortletModes()
-    {                
-        // Add the PortletModes supported by each portlet to
-        // the supportedPortletModesByPortlet map.
-        LOG.debug("Loading modes supported by each Portlet...");
-        Iterator apps = portletApps.values().iterator();
-        while (apps.hasNext())
-        {
-            PortletApplicationConfig app = (PortletApplicationConfig)apps.next();            
-            PortletAppDD portletAppDD;
-            try {
-                portletAppDD = container
-                    .getOptionalContainerServices()
-                    .getPortletRegistryService()
-                    .getPortletApplicationDescriptor(app.getContextPath());
-            } catch (PortletContainerException e) {
-                LOG.warn(e);
-                continue;
-            }
-
-            if(portletAppDD == null) {
-                continue;
-            }
-                        
-            // for each portletAppDD, retrieve the portletDD and the supported modes
-            Iterator portlets = portletAppDD.getPortlets().iterator();
-            while (portlets.hasNext()) {                
-                PortletDD portlet = (PortletDD)portlets.next();
-                LOG.debug("Loading modes supported by portlet [" + app.getContextPath() + "]." +
-                        "[" + portlet.getPortletName() + "]");
-                Iterator supports = portlet.getSupports().iterator();
-                Set pModes = new HashSet();
-                while (supports.hasNext())
-                {
-                    SupportsDD supportsDD = (SupportsDD)supports.next();
-                    Iterator portletModes = supportsDD.getPortletModes().iterator();
-                    
-                    while (portletModes.hasNext())
-                    {
-                        PortletMode pMode = new PortletMode((String)portletModes.next());
-                        LOG.debug("Adding mode [" + pMode + "]");
-                        pModes.add(pMode);                                
-                    }                    
-                }
-                
-                supportedPortletModesByPortlet.put(
-                        PortletWindowConfig.createPortletId(app.getContextPath(), portlet.getPortletName()), 
-                        pModes);                     
-            }
-        }
-
-    }
-    
-    /**
-     * Retrieve the PortletApplicationConfig by its context path.
-     * 
-     * @param contextPath the context
-     * @return the PortletApplicationConfig, or null if it wasn't found.
-     */
-    private PortletApplicationConfig getPortletApplication(String contextPath) 
-    {
-        PortletApplicationConfig app = null;
-        // attempt to retrieve the PortletApplicationConfig from the map
-        app = (PortletApplicationConfig)portletApps.get(contextPath);
-        
-        // if it wasn't in the map, perhaps it has been added since 
-        // the container was started
-        if (app == null)
-        {
-            loadPortletApplications();
-        }        
-        app = (PortletApplicationConfig)portletApps.get(contextPath);
-        return app;
-    }    
-
-}
diff --git a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/package.html b/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/package.html
deleted file mode 100644
index 210212f..0000000
--- a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/package.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!--

-Copyright 2005-2006 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<html>

-<body>

-Service implementations which utilizing context resources

-to perform their work.

-</body>

-</html>
\ No newline at end of file
diff --git a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLImpl.java b/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLImpl.java
deleted file mode 100644
index bbc791d..0000000
--- a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLImpl.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.url.impl;

-

-import org.apache.pluto.driver.url.PortalURL;

-import org.apache.pluto.driver.url.PortalURLParameter;

-

-import javax.portlet.PortletMode;

-import javax.portlet.WindowState;

-

-import java.util.Collection;

-import java.util.Collections;

-import java.util.HashMap;

-import java.util.Iterator;

-import java.util.Map;

-

-/**

- * The portal URL.

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @since 1.0

- */

-public class PortalURLImpl implements PortalURL {

-	

-	/** Server URI contains protocol, host name, and (optional) port. */

-    private String serverURI = null;

-    

-    private String servletPath = null;

-    private String renderPath = null;

-    private String actionWindow = null;

-    

-    /** The window states: key is the window ID, value is WindowState. */

-    private Map windowStates = new HashMap();

-    

-    private Map portletModes = new HashMap();

-    

-    /** Parameters of the portlet windows. */

-    private Map parameters = new HashMap();

-    

-    

-    // Constructors ------------------------------------------------------------

-    

-    /**

-     * Constructs a PortalURLImpl instance using default port.

-     * @param protocol  the protocol.

-     * @param hostName  the host name.

-     * @param contextPath  the servlet context path.

-     * @param servletName  the servlet name.

-     */

-    public PortalURLImpl(String protocol,

-                         String hostName,

-                         String contextPath,

-                         String servletName) {

-    	this(protocol, hostName, -1, contextPath, servletName);

-    }

-    

-    /**

-     * Constructs a PortalURLImpl instance using customized port.

-     * @param protocol  the protocol.

-     * @param hostName  the host name.

-     * @param port  the port number: 0 or negative means using default port.

-     * @param contextPath  the servlet context path.

-     * @param servletName  the servlet name.

-     */

-    public PortalURLImpl(String protocol,

-                         String hostName,

-                         int port,

-                         String contextPath,

-                         String servletName) {

-    	StringBuffer buffer = new StringBuffer();

-    	buffer.append(protocol);

-    	buffer.append(hostName);

-    	if (port > 0) {

-    		buffer.append(":").append(port);

-    	}

-    	serverURI = buffer.toString();

-    	

-    	buffer = new StringBuffer();

-    	buffer.append(contextPath);

-    	buffer.append(servletName);

-        servletPath = buffer.toString();

-    }

-    

-    /**

-     * Internal private constructor used by method <code>clone()</code>.

-     * @see #clone()

-     */

-    private PortalURLImpl() {

-    	// Do nothing.

-    }

-    

-    // Public Methods ----------------------------------------------------------

-    

-    public void setRenderPath(String renderPath) {

-        this.renderPath = renderPath;

-    }

-

-    public String getRenderPath() {

-        return renderPath;

-    }

-

-    public void addParameter(PortalURLParameter param) {

-        parameters.put(param.getWindowId() + param.getName(), param);

-    }

-

-    public Collection getParameters() {

-        return parameters.values();

-    }

-

-    public void setActionWindow(String actionWindow) {

-        this.actionWindow = actionWindow;

-    }

-

-    public String getActionWindow() {

-        return actionWindow;

-    }

-

-    public Map getPortletModes() {

-        return Collections.unmodifiableMap(portletModes);

-    }

-

-    public PortletMode getPortletMode(String windowId) {

-        PortletMode mode = (PortletMode) portletModes.get(windowId);

-        if (mode == null) {

-            mode = PortletMode.VIEW;

-        }

-        return mode;

-    }

-

-    public void setPortletMode(String windowId, PortletMode portletMode) {

-        portletModes.put(windowId, portletMode);

-    }

-

-    public Map getWindowStates() {

-        return Collections.unmodifiableMap(windowStates);

-    }

-    

-    /**

-     * Returns the window state of the specified window.

-     * @param windowId  the window ID.

-     * @return the window state. Default to NORMAL.

-     */

-    public WindowState getWindowState(String windowId) {

-        WindowState state = (WindowState) windowStates.get(windowId);

-        if (state == null) {

-            state = WindowState.NORMAL;

-        }

-        return state;

-    }

-

-    /**

-     * Sets the window state of the specified window.

-     * @param windowId  the window ID.

-     * @param windowState  the window state.

-     */

-    public void setWindowState(String windowId, WindowState windowState) {

-        this.windowStates.put(windowId, windowState);

-    }

-    

-    /**

-     * Clear parameters of the specified window.

-     * @param windowId  the window ID.

-     */

-    public void clearParameters(String windowId) {

-    	for (Iterator it = parameters.entrySet().iterator(); it.hasNext(); ) {

-            Map.Entry entry = (Map.Entry) it.next();

-            PortalURLParameter param = (PortalURLParameter) entry.getValue();

-            if (param.getWindowId().equals(windowId)) {

-            	it.remove();

-            }

-        }

-    }

-    

-    /**

-     * Converts to a string representing the portal URL.

-     * @return a string representing the portal URL.

-     * @see org.apache.pluto.driver.url.impl.PortalURLParserImpl#toString(PortalURL)

-     */

-    public String toString() {

-        return PortalURLParserImpl.getParser().toString(this);

-    }

-

-

-    /**

-     * Returns the server URI (protocol, name, port).

-     * @return the server URI portion of the portal URL.

-     */

-    public String getServerURI() {

-        return serverURI;

-    }

-    

-    /**

-     * Returns the servlet path (context path + servlet name).

-     * @return the servlet path.

-     */

-    public String getServletPath() {

-        return servletPath;

-    }

-    

-    /**

-     * Clone a copy of itself.

-     * @return a copy of itself.

-     */

-    public Object clone() {

-    	PortalURLImpl portalURL = new PortalURLImpl();

-    	portalURL.serverURI = this.serverURI;

-    	portalURL.servletPath = this.servletPath;

-    	portalURL.parameters = new HashMap(parameters);

-    	portalURL.portletModes = new HashMap(portletModes);

-    	portalURL.windowStates = new HashMap(windowStates);

-    	portalURL.renderPath = renderPath;

-    	portalURL.actionWindow = actionWindow;

-        return portalURL;

-    }

-}

diff --git a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLParserImpl.java b/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLParserImpl.java
deleted file mode 100644
index 7d28d88..0000000
--- a/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLParserImpl.java
+++ /dev/null
@@ -1,379 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.url.impl;

-

-import java.util.Iterator;

-import java.util.Map;

-import java.util.StringTokenizer;

-import java.net.URLEncoder;

-import java.io.UnsupportedEncodingException;

-

-import javax.portlet.PortletMode;

-import javax.portlet.WindowState;

-import javax.servlet.http.HttpServletRequest;

-

-import org.apache.pluto.util.StringUtils;

-import org.apache.pluto.driver.url.impl.PortalURLImpl;

-import org.apache.pluto.driver.url.PortalURLParser;

-import org.apache.pluto.driver.url.PortalURL;

-import org.apache.pluto.driver.url.PortalURLParameter;

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-

-/**

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since Sep 30, 2004

- */

-public class PortalURLParserImpl implements PortalURLParser {

-	

-	/** Logger. */

-    private static final Log LOG = LogFactory.getLog(PortalURLParserImpl.class);

-    

-    /** The singleton parser instance. */

-    private static final PortalURLParser PARSER = new PortalURLParserImpl();

-    

-    

-    // Constants used for Encoding/Decoding ------------------------------------

-    

-    private static final String PREFIX = "__";

-    private static final String DELIM = "_";

-    private static final String PORTLET_ID = "pd";

-    private static final String ACTION = "ac";

-    private static final String RENDER_PARAM = "rp";

-    private static final String WINDOW_STATE = "ws";

-    private static final String PORTLET_MODE = "pm";

-    private static final String VALUE_DELIM = "0x0";

-

-    private static final String[][] ENCODINGS = new String[][] {

-    		new String[] { "_",  "0x1" },

-            new String[] { ".",  "0x2" },

-            new String[] { "/",  "0x3" },

-            new String[] { "\r", "0x4" },

-            new String[] { "\n", "0x5" },

-            new String[] { "<",  "0x6" },

-            new String[] { ">",  "0x7" },

-            new String[] { " ",  "0x8" },

-            new String[] { "#",  "0x9" },

-    };

-    

-    // Constructor -------------------------------------------------------------

-    

-    /**

-     * Private constructor that prevents external instantiation.

-     */

-    private PortalURLParserImpl() {

-    	// Do nothing.

-    }

-

-    /**

-     * Returns the singleton parser instance.

-     * @return the singleton parser instance.

-     */

-    public static PortalURLParser getParser() {

-    	return PARSER;

-    }

-    

-    

-    // Public Methods ----------------------------------------------------------

-    

-    /**

-     * Parse a servlet request to a portal URL.

-     * @param request  the servlet request to parse.

-     * @return the portal URL.

-     */

-    public PortalURL parse(HttpServletRequest request) {

-        

-    	if (LOG.isDebugEnabled()) {

-            LOG.debug("Parsing URL: " + request.getRequestURI());

-        }

-        

-        String protocol = request.isSecure() ? "https://" : "http://";

-        String server = request.getServerName();

-        int port = request.getServerPort();

-        String contextPath = request.getContextPath();

-        String servletName = request.getServletPath();

-        

-        // Construct portal URL using info retrieved from servlet request.

-        PortalURL portalURL = null;

-        if ((request.isSecure() && port != 443)

-        		|| (!request.isSecure() && port != 80)) {

-        	portalURL = new PortalURLImpl(protocol, server, port, contextPath, servletName);

-        } else {

-        	portalURL = new PortalURLImpl(protocol, server, contextPath, servletName);

-        }

-        

-        String pathInfo = request.getPathInfo();

-        if (pathInfo == null) {

-            return portalURL;

-        }

-        

-        if (LOG.isDebugEnabled()) {

-            LOG.debug("Parsing request pathInfo: " + pathInfo);

-        }

-        StringBuffer renderPath = new StringBuffer();

-        StringTokenizer st = new StringTokenizer(pathInfo, "/", false);

-        while (st.hasMoreTokens()) {

-        	

-        	String token = st.nextToken();

-        	

-        	// Part of the render path: append to renderPath.

-        	if (!token.startsWith(PREFIX)) {

-//        		renderPath.append(token);

-        		//Fix for PLUTO-243

-        		renderPath.append('/').append(token);

-        	}

-        	// Action window definition: portalURL.setActionWindow().

-        	else if (token.startsWith(PREFIX + ACTION)) {

-        		portalURL.setActionWindow(decodeControlParameter(token)[0]);

-        	}

-        	// Window state definition: portalURL.setWindowState().

-        	else if (token.startsWith(PREFIX + WINDOW_STATE)) {

-        		String[] decoded = decodeControlParameter(token);

-        		portalURL.setWindowState(decoded[0], new WindowState(decoded[1]));

-        	}

-        	// Portlet mode definition: portalURL.setPortletMode().

-        	else if (token.startsWith(PREFIX + PORTLET_MODE)) {

-        		String[] decoded = decodeControlParameter(token);

-        		portalURL.setPortletMode(decoded[0], new PortletMode(decoded[1]));

-        	}

-        	// Portal URL parameter: portalURL.addParameter().

-        	else {

-        		String value = null;

-        		if (st.hasMoreTokens()) {

-        			value = st.nextToken();

-        		}

-        		portalURL.addParameter(decodeParameter(token, value));

-        	}

-        }

-        if (renderPath.length() > 0) {

-            portalURL.setRenderPath(renderPath.toString());

-        }

-        

-        // Return the portal URL.

-        return portalURL;

-    }

-    

-    

-    /**

-     * Converts a portal URL to a URL string.

-     * @param portalURL  the portal URL to convert.

-     * @return a URL string representing the portal URL.

-     */

-    public String toString(PortalURL portalURL) {

-    	

-    	StringBuffer buffer = new StringBuffer();

-    	

-        // Append the server URI and the servlet path.

-    	buffer.append(portalURL.getServerURI())

-    			.append(portalURL.getServletPath());

-    	

-        // Start the pathInfo with the path to the render URL (page).

-        if (portalURL.getRenderPath() != null) {

-        	buffer.append("/").append(portalURL.getRenderPath());

-        }

-

-        // Append the action window definition, if it exists.

-        if (portalURL.getActionWindow() != null) {

-        	buffer.append("/");

-        	buffer.append(PREFIX).append(ACTION)

-        			.append(encodeCharacters(portalURL.getActionWindow()));

-        }

-        

-        // Append portlet mode definitions.

-        for (Iterator it = portalURL.getPortletModes().entrySet().iterator();

-        		it.hasNext(); ) {

-            Map.Entry entry = (Map.Entry) it.next();

-            buffer.append("/").append(

-            		encodeControlParameter(PORTLET_MODE, entry.getKey().toString(),

-                       entry.getValue().toString()));

-        }

-        

-        // Append window state definitions.

-        for (Iterator it = portalURL.getWindowStates().entrySet().iterator();

-        		it.hasNext(); ) {

-            Map.Entry entry = (Map.Entry) it.next();

-            buffer.append("/").append(

-            		encodeControlParameter(WINDOW_STATE, entry.getKey().toString(),

-                       entry.getValue().toString()));

-        }

-        

-        // Append action and render parameters.

-        StringBuffer query = new StringBuffer("?");

-        for (Iterator it = portalURL.getParameters().iterator();

-        		it.hasNext(); ) {

-            

-        	PortalURLParameter param = (PortalURLParameter) it.next();

-            

-            // Encode action params in the query appended at the end of the URL.

-            if (portalURL.getActionWindow() != null

-            		&& portalURL.getActionWindow().equals(param.getWindowId())) {

-                for (int i = 0; i < param.getValues().length; i++) {

-                    query.append("&").append(encodeQueryParam(param.getName())).append("=")

-                    		.append(encodeQueryParam(param.getValues()[i]));

-                }

-            }

-            

-            // Encode render params as a part of the URL.

-            else if (param.getValues() != null

-            		&& param.getValues().length > 0) {

-                String valueString = encodeMultiValues(param.getValues());

-                if (valueString.length() > 0) {

-                	buffer.append("/").append(

-                			encodeControlParameter(RENDER_PARAM, param.getWindowId(),

-                               param.getName()));

-                	buffer.append("/").append(valueString);

-                }

-            }

-        }

-        

-        // Construct the string representing the portal URL.

-        return buffer.append(query).toString();

-    }

-

-    private String encodeQueryParam(String param) {

-        try {

-            return URLEncoder.encode(param, "UTF-8");

-        }

-        catch (UnsupportedEncodingException e) {

-            // If this happens, we've got bigger problems.

-            throw new RuntimeException(e);

-        }

-    }

-

-    // Private Encoding/Decoding Methods ---------------------------------------

-    

-    /**

-     * Encode a control parameter.

-     * @param type  the type of the control parameter, which may be:

-     *              portlet mode, window state, or render parameter.

-     * @param windowId  the portlet window ID.

-     * @param name  the name to encode.

-     */

-    private String encodeControlParameter(String type,

-                                          String windowId,

-                                          String name) {

-    	StringBuffer buffer = new StringBuffer();

-    	buffer.append(PREFIX).append(type)

-    			.append(encodeCharacters(windowId))

-    			.append(DELIM).append(name);

-    	return buffer.toString();

-    }

-    

-    /**

-     * Encode a string array containing multiple values into a single string.

-     * This method is used to encode multiple render parameter values.

-     * @param values  the string array to encode.

-     * @return a single string containing all the values.

-     */

-    private String encodeMultiValues(String[] values) {

-    	StringBuffer buffer = new StringBuffer();

-        for (int i = 0; i < values.length; i++) {

-        	buffer.append(values[i] != null ? values[i] : "");

-            if (i + 1 < values.length) {

-            	buffer.append(VALUE_DELIM);

-            }

-        }

-        return encodeCharacters(buffer.toString());

-    }

-    

-    /**

-     * Encode special characters contained in the string value.

-     * @param string  the string value to encode.

-     * @return the encoded string.

-     */

-    private String encodeCharacters(String string) {

-        for (int i = 0; i < ENCODINGS.length; i++) {

-            string = StringUtils.replace(string,

-                                         ENCODINGS[i][0],

-                                         ENCODINGS[i][1]);

-        }

-        return string;

-    }

-

-

-    /**

-     * Decode a control parameter.

-     * @param control  the control parameter to decode.

-     * @return values  a pair of decoded values.

-     */

-    private String[] decodeControlParameter(String control) {

-        String[] valuePair = new String[2];

-        control = control.substring((PREFIX + PORTLET_ID).length());

-        int index = control.indexOf(DELIM);

-        if (index >= 0) {

-        	valuePair[0] = control.substring(0, index);

-        	valuePair[0] = decodeCharacters(valuePair[0]);

-        	if (index + 1 <= control.length()) {

-        		valuePair[1] = control.substring(index + 1);

-        		valuePair[1] = decodeCharacters(valuePair[1]);

-        	} else {

-        		valuePair[1] = "";

-        	}

-        } else {

-        	valuePair[0] = decodeCharacters(control);

-        }

-        return valuePair;

-    }

-

-    /**

-     * Decode a name-value pair into a portal URL parameter.

-     * @param name  the parameter name.

-     * @param value  the parameter value.

-     * @return the decoded portal URL parameter.

-     */

-    private PortalURLParameter decodeParameter(String name, String value) {

-    	

-        if (LOG.isDebugEnabled()) {

-            LOG.debug("Decoding parameter: name=" + name

-            		+ ", value=" + value);

-        }

-    	

-    	// Decode the name into window ID and parameter name.

-        String noPrefix = name.substring((PREFIX + PORTLET_ID).length());

-        String windowId = noPrefix.substring(0, noPrefix.indexOf(DELIM));

-        String paramName = noPrefix.substring(noPrefix.indexOf(DELIM) + 1);

-        

-        // Decode special characters in window ID and parameter value.

-        windowId = decodeCharacters(windowId);

-        if (value != null) {

-        	value = decodeCharacters(value);

-        }

-        

-        // Split multiple values into a value array.

-        String[] paramValues = value.split(VALUE_DELIM);

-        

-        // Construct portal URL parameter and return.

-        return new PortalURLParameter(windowId, paramName, paramValues);

-    }

-    

-    /**

-     * Decode special characters contained in the string value.

-     * @param string  the string value to decode.

-     * @return the decoded string.

-     */

-    private String decodeCharacters(String string) {

-        for (int i = 0; i < ENCODINGS.length; i++) {

-        	string = StringUtils.replace(string,

-        	                             ENCODINGS[i][1],

-        	                             ENCODINGS[i][0]);

-        }

-        return string;

-    }

-

-}

-

diff --git a/trunk/pluto-portal-driver-impl/src/test/java/org/apache/pluto/driver/services/impl/UserInfoAttributesServicesImplTest.java b/trunk/pluto-portal-driver-impl/src/test/java/org/apache/pluto/driver/services/impl/UserInfoAttributesServicesImplTest.java
deleted file mode 100644
index 51053b9..0000000
--- a/trunk/pluto-portal-driver-impl/src/test/java/org/apache/pluto/driver/services/impl/UserInfoAttributesServicesImplTest.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * Copyright 2003,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.driver.services.impl;
-
-import java.io.IOException;
-import java.security.Principal;
-import java.util.Enumeration;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.portlet.PortalContext;
-import javax.portlet.PortletMode;
-import javax.portlet.PortletPreferences;
-import javax.portlet.PortletRequest;
-import javax.portlet.PortletSession;
-import javax.portlet.WindowState;
-
-import org.apache.pluto.PortletContainerException;
-import org.apache.pluto.spi.optional.P3PAttributes;
-
-import junit.framework.TestCase;
-
-/**
- * JUnit test class for UserInfoAttributesServicesImpl.
- * 
- * @author <a href="cdoremus@apache.org">Craig Doremus</a>
- */
-public class UserInfoAttributesServicesImplTest extends TestCase {
-	/* Represents properties in user-info-attributes.properties */
-	private Properties props = new Properties();
-	//Test data
-	/* Test user - used in MockPortletRequest */
-	private static final String TEST_REMOTE_USER = "tomcat";
-	private static final String TEST_USER_GENDER = "male";
-	private static final String TEST_USER_NAME_GIVEN = "Catalina";
-	private static final String TEST_USER_NAME_FAMILY = "Tomcat";
-		
-	protected void setUp() throws Exception {
-		super.setUp();
-		props.setProperty(TEST_REMOTE_USER + "." + P3PAttributes.USER_GENDER, TEST_USER_GENDER);
-		props.setProperty(TEST_REMOTE_USER + "." + P3PAttributes.USER_NAME_GIVEN, TEST_USER_NAME_GIVEN);
-		props.setProperty(TEST_REMOTE_USER + "." + P3PAttributes.USER_NAME_FAMILY, TEST_USER_NAME_FAMILY);
-	}
-
-	/*
-	 * Test method for 'org.apache.pluto.services.optional.UserInfoAttributesServiceImpl.getAttributes(PortletRequest)'
-	 */
-	public void testGetAttributes() {
-		try {
-			Map map = null;
-			UserInfoAttributesServiceImpl uias = UserInfoAttributesServiceImpl.getInstance(props);
-			PortletRequest pr = new MockPortletRequest();
-			map = uias.getAttributes(pr);
-			String sex = (String)map.get(P3PAttributes.USER_GENDER); 
-			assertTrue(sex.equals(TEST_USER_GENDER));
-			System.out.println("Sex: " + sex);
-			String fname = (String)map.get(P3PAttributes.USER_NAME_GIVEN);
-			assertTrue(fname.equals(TEST_USER_NAME_GIVEN));
-			System.out.println("first name: " + fname);
-			String lname = (String)map.get(P3PAttributes.USER_NAME_FAMILY);
-			assertTrue(lname.equals(TEST_USER_NAME_FAMILY));
-			System.out.println("last name: " + lname);
-		} catch (IOException e) {
-			e.printStackTrace();
-			fail(e.toString());
-		} catch (PortletContainerException e) {
-			e.printStackTrace();
-			fail(e.toString());
-		}
-	}
-
-	/**
-	 * Stubbed implementation used only by this class where only
-	 * getRemoteUser() has been implemented to return a constant.
-	 * 
-	 * @author <a href="cdoremus@apache.org">Craig Doremus</a>
-	 */
-	public class MockPortletRequest implements PortletRequest {
-
-		public boolean isWindowStateAllowed(WindowState arg0) {
-			// TODO Auto-generated method stub
-			return false;
-		}
-
-		public boolean isPortletModeAllowed(PortletMode arg0) {
-			// TODO Auto-generated method stub
-			return false;
-		}
-
-		public PortletMode getPortletMode() {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public WindowState getWindowState() {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public PortletPreferences getPreferences() {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public PortletSession getPortletSession() {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public PortletSession getPortletSession(boolean arg0) {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public String getProperty(String arg0) {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public Enumeration getProperties(String arg0) {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public Enumeration getPropertyNames() {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public PortalContext getPortalContext() {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public String getAuthType() {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public String getContextPath() {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public String getRemoteUser() {
-			return TEST_REMOTE_USER;
-		}
-
-		public Principal getUserPrincipal() {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public boolean isUserInRole(String arg0) {
-			// TODO Auto-generated method stub
-			return false;
-		}
-
-		public Object getAttribute(String arg0) {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public Enumeration getAttributeNames() {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public String getParameter(String arg0) {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public Enumeration getParameterNames() {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public String[] getParameterValues(String arg0) {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public Map getParameterMap() {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public boolean isSecure() {
-			// TODO Auto-generated method stub
-			return false;
-		}
-
-		public void setAttribute(String arg0, Object arg1) {
-			// TODO Auto-generated method stub
-
-		}
-
-		public void removeAttribute(String arg0) {
-			// TODO Auto-generated method stub
-
-		}
-
-		public String getRequestedSessionId() {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public boolean isRequestedSessionIdValid() {
-			// TODO Auto-generated method stub
-			return false;
-		}
-
-		public String getResponseContentType() {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public Enumeration getResponseContentTypes() {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public Locale getLocale() {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public Enumeration getLocales() {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public String getScheme() {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public String getServerName() {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		public int getServerPort() {
-			// TODO Auto-generated method stub
-			return 0;
-		}
-
-	}
-}
diff --git a/trunk/pluto-portal-driver/pom.xml b/trunk/pluto-portal-driver/pom.xml
deleted file mode 100644
index 882b732..0000000
--- a/trunk/pluto-portal-driver/pom.xml
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 2005-2006 The Apache Software Foundation
-
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-    <parent>
-        <groupId>org.apache.pluto</groupId>
-        <artifactId>pluto</artifactId>
-        <version>1.1.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>pluto-portal-driver</artifactId>
-    <packaging>jar</packaging>
-    <name>Pluto Portal Driver</name>
-
-    <dependencies>
-
-        <dependency>
-            <groupId>org.apache.pluto</groupId>
-            <artifactId>pluto-container</artifactId>
-            <version>${pom.version}</version>
-            <scope>provided</scope>
-        </dependency>
-
-    <dependency>

-      <groupId>org.apache.pluto</groupId>

-      <artifactId>pluto-util</artifactId>

-      <version>${pom.version}</version>

-      <scope>compile</scope>

-    </dependency>

-        
-
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging-api</artifactId>
-            <version>${commons-logging.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>${commons-logging.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>commons-digester</groupId>
-            <artifactId>commons-digester</artifactId>
-            <version>${commons-digester.version}</version>
-            <scope>compile</scope>
-        </dependency>
-	    <dependency>

-	      <groupId>commons-httpclient</groupId>

-	      <artifactId>commons-httpclient</artifactId>

-	      <version>${commons-httpclient.version}</version>

-          <scope>runtime</scope>

-	    </dependency>

-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>${junit.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>javax.portlet</groupId>
-            <artifactId>portlet-api</artifactId>
-            <version>${portlet-api.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>servlet-api</artifactId>
-            <version>${servlet-api.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>jstl</artifactId>
-            <version>${jstl.version}</version>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
-            <groupId>taglibs</groupId>
-            <artifactId>standard</artifactId>
-            <version>${taglibs.standard.version}</version>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-core</artifactId>
-            <version>${springframework.version}</version>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-beans</artifactId>
-            <version>${springframework.version}</version>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-web</artifactId>
-            <version>${springframework.version}</version>
-            <scope>compile</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <descriptor>src/assemble/bin.xml</descriptor>
-                    <finalName>pluto-portal-${pom.version}</finalName>
-                </configuration>
-            </plugin>
-            <plugin>
-                <artifactId>maven-site-plugin</artifactId>
-                <configuration>
-                    <resourcesDirectory>${basedir}/../pluto-site/src/site/resources</resourcesDirectory>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
-
-
-
diff --git a/trunk/pluto-portal-driver/src/assemble/bin.xml b/trunk/pluto-portal-driver/src/assemble/bin.xml
deleted file mode 100644
index ae17e12..0000000
--- a/trunk/pluto-portal-driver/src/assemble/bin.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<assembly>

-  <id>bin</id>

-  <formats>

-    <format>tar.gz</format>

-    <format>tar.bz2</format>

-    <format>zip</format>

-  </formats>

-  <fileSets>

-    <fileSet>

-      <includes>

-        <include>README*</include>

-        <include>LICENSE*</include>

-        <include>NOTICE*</include>

-      </includes>

-    </fileSet>

-    <fileSet>

-      <directory>target</directory>

-      <outputDirectory></outputDirectory>

-      <includes>

-        <include>*.jar</include>

-      </includes>

-    </fileSet>

-  </fileSets>

-  <dependencySets>

-

-  </dependencySets>

-</assembly>

-

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/AttributeKeys.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/AttributeKeys.java
deleted file mode 100644
index 1884775..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/AttributeKeys.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver;

-

-/**

- * Constants used as attribute keys to bind values to servlet context or servlet

- * request.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- * @since Sep 25, 2004

- */

-public class AttributeKeys {

-

-    /**

-     * Attribute Key used to bind the application's driver config to the

-     * ServletContext.

-     */

-    public static final String DRIVER_CONFIG = "driverConfig";

-

-    /**

-     * Attribute Key used to bind the application's driver admin config

-     * to the ServletContext.

-     */

-    public static final String DRIVER_ADMIN_CONFIG = "driverAdminConfig";

-

-    /**

-     * Attribute Key used to bind the application's portlet container to the

-     * ServletContext.

-     */

-    public static final String PORTLET_CONTAINER = "portletContainer";

-    

-    /** Attribute key used to bind the current page to servlet request. */

-    public static final String CURRENT_PAGE = "currentPage";

-    

-    /** Attribute key used to bind the portlet title to servlet request. */ 

-    public static final String PORTLET_TITLE =

-    		"org.apache.pluto.driver.DynamicPortletTitle";

-

-    public static final String PORTAL_URL_PARSER = "PORTAL_URL_PARSER";

-

-    /** Attribute to hold a message to be displayed by the portlet */

-	public static final String PORTLET_MSG = "portlet_msg";

-

-    // Constructor -------------------------------------------------------------

-    

-    /**

-     * Private constructor that prevents external instantiation.

-     */

-    private AttributeKeys() {

-

-    }

-}

-

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/PortalDriverLogoutServlet.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/PortalDriverLogoutServlet.java
deleted file mode 100644
index 3d6f48d..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/PortalDriverLogoutServlet.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*

- * Copyright 2006 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver;

-

-import java.io.IOException;

-

-import javax.servlet.ServletException;

-import javax.servlet.http.HttpServlet;

-import javax.servlet.http.HttpServletRequest;

-import javax.servlet.http.HttpServletResponse;

-import javax.servlet.http.HttpSession;

-

-/**

- * Process logout from the Pluto portal.

- *

- * @author <a href="cdoremus@apache.org">Craig Doremus</a>

- *

- */

-public class PortalDriverLogoutServlet extends HttpServlet {

-

-	/**

-	 * Processes logout by invalidating the session, creating a new session

-	 * and forwards to the login (home) page.

-	 * 

-	 * @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

-	 */

-	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

-		HttpSession session = req.getSession();

-		session.invalidate();

-	    req.getSession(true);

-	    req.getRequestDispatcher("/").forward(req, resp);

-	}

-

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/PortalDriverServlet.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/PortalDriverServlet.java
deleted file mode 100644
index ed09058..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/PortalDriverServlet.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver;

-

-import java.io.IOException;

-

-import javax.portlet.PortletException;

-import javax.servlet.RequestDispatcher;

-import javax.servlet.ServletContext;

-import javax.servlet.ServletException;

-import javax.servlet.http.HttpServlet;

-import javax.servlet.http.HttpServletRequest;

-import javax.servlet.http.HttpServletResponse;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.PortletContainer;

-import org.apache.pluto.PortletContainerException;

-import org.apache.pluto.driver.config.DriverConfiguration;

-import org.apache.pluto.driver.core.PortalRequestContext;

-import org.apache.pluto.driver.core.PortletWindowImpl;

-import org.apache.pluto.driver.services.portal.PageConfig;

-import org.apache.pluto.driver.services.portal.PortletWindowConfig;

-import org.apache.pluto.driver.services.portal.SupportedModesService;

-import org.apache.pluto.driver.url.PortalURL;

-import org.springframework.context.ApplicationContext;

-import org.springframework.web.context.WebApplicationContext;

-

-/**

- * The controller servlet used to drive the Portal Driver. All requests mapped

- * to this servlet will be processed as Portal Requests.

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @author <a href="mailto:esm@apache.org">Elliot Metsger</a>

- * @version 1.0

- * @since Sep 22, 2004

- */

-public class PortalDriverServlet extends HttpServlet {

-

-    /** Internal Logger. */

-    private static final Log LOG = LogFactory.getLog(PortalDriverServlet.class);    

-    

-    /** The Portal Driver sServlet Context */

-    private ServletContext servletContext = null;

-    

-    /** Is the SupportedModesService initialized? */

-    private boolean isSupportedModesServiceInitialized = false;

-        

-    protected static final String DEFAULT_PAGE_URI =

-    		"/WEB-INF/themes/pluto-default-theme.jsp";

-    

-    /** The portlet container to which we will forward all portlet requests. */

-    protected PortletContainer container = null;

-    

-    

-    

-    

-    // HttpServlet Impl --------------------------------------------------------

-    

-    public String getServletInfo() {

-        return "Pluto Portal Driver Servlet";

-    }

-    

-    /**

-     * Initialize the Portal Driver. This method retrieves the portlet container

-     * instance from the servlet context scope.

-     * @see PortletContainer

-     */

-    public void init() {

-        servletContext = getServletContext();

-        container = (PortletContainer) servletContext.getAttribute(

-        		AttributeKeys.PORTLET_CONTAINER);        

-    }

-    

-

-    /**

-     * Handle all requests. All POST requests are passed to this method.

-     * @param request  the incoming HttpServletRequest.

-     * @param response  the incoming HttpServletResponse.

-     * @throws ServletException  if an internal error occurs.

-     * @throws IOException  if an error occurs writing to the response.

-     */

-    public void doGet(HttpServletRequest request, HttpServletResponse response)

-    throws ServletException, IOException {

-

-        initSupportedModesService();

-        

-        PortalRequestContext portalRequestContext =

-            new PortalRequestContext(getServletContext(), request, response);

-

-        PortalURL portalURL = portalRequestContext.getRequestedPortalURL();

-        String actionWindowId = portalURL.getActionWindow();

-        PortletWindowConfig actionWindowConfig = getDriverConfiguration()

-        		.getPortletWindowConfig(actionWindowId);

-

-        // Action window config will only exist if there is an action request.

-        if (actionWindowConfig != null) {

-            PortletWindowImpl portletWindow = new PortletWindowImpl(

-            		actionWindowConfig, portalURL);

-            if (LOG.isDebugEnabled()) {

-                LOG.debug("Processing action request for window: "

-                		+ portletWindow.getId().getStringId());

-            }

-            try {

-                container.doAction(portletWindow, request, response);

-            } catch (PortletContainerException ex) {

-                throw new ServletException(ex);

-            } catch (PortletException ex) {

-                throw new ServletException(ex);

-            }

-            if (LOG.isDebugEnabled()) {

-            	LOG.debug("Action request processed.\n\n");

-            }

-        }

-        

-        // Otherwise (actionWindowConfig == null), handle the render request.

-        else {

-        	if (LOG.isDebugEnabled()) {

-        		LOG.debug("Processing render request.");

-        	}

-            PageConfig pageConfig = getPageConfig(portalURL);

-            if (pageConfig == null)

-            {

-                LOG.error("PageConfig for render path [" + portalURL.getRenderPath() + "] could not be found.");

-            }

-            

-            request.setAttribute(AttributeKeys.CURRENT_PAGE, pageConfig);

-            String uri = (pageConfig.getUri() != null)

-            		? pageConfig.getUri() : DEFAULT_PAGE_URI;

-            if (LOG.isDebugEnabled()) {

-            	LOG.debug("Dispatching to: " + uri);

-            }

-            RequestDispatcher dispatcher = request.getRequestDispatcher(uri);

-            dispatcher.forward(request, response);

-            if (LOG.isDebugEnabled()) {

-            	LOG.debug("Render request processed.\n\n");

-            }

-        }

-    }

-

-    /**

-     * Pass all POST requests to {@link #doGet(HttpServletRequest, HttpServletResponse)}.

-     * @param request  the incoming servlet request.

-     * @param response  the incoming servlet response.

-     * @throws ServletException if an exception occurs.

-     * @throws IOException if an exception occurs writing to the response.

-     */

-    public void doPost(HttpServletRequest request, HttpServletResponse response)

-    throws ServletException, IOException {

-        doGet(request, response);

-    }

-    

-    

-    // Private Methods ---------------------------------------------------------

-    

-    /**

-     * Returns the config of the portal page to be rendered.

-     * @param currentURL  the current portal URL.

-     * @return the config of the portal page to be rendered.

-     */

-    private PageConfig getPageConfig(PortalURL currentURL) {

-        String requestedPageId = currentURL.getRenderPath();

-        if (LOG.isDebugEnabled()) {

-            LOG.debug("Rendering Portal: Requested Page: " + requestedPageId);

-        }

-        return getDriverConfiguration().getPageConfig(requestedPageId);

-    }

-    

-    /**

-     * Returns the portal driver configuration object.

-     * @return the portal driver configuration object.

-     */

-    private DriverConfiguration getDriverConfiguration() {

-        return (DriverConfiguration) getServletContext().getAttribute(

-        		AttributeKeys.DRIVER_CONFIG);

-    }    

-    

-    private void initSupportedModesService()

-    {

-        if (isSupportedModesServiceInitialized)

-        {

-            return;

-        }

-

-        ApplicationContext springContext = (ApplicationContext)servletContext.getAttribute(

-                WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);

-        SupportedModesService service = (SupportedModesService)springContext.getBean("SupportedModesService");

-        service.init(servletContext);

-        

-        isSupportedModesServiceInitialized = true;

-    }

-    

-}

-

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/PortalStartupListener.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/PortalStartupListener.java
deleted file mode 100644
index 3fdda6d..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/PortalStartupListener.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.*;

-import org.apache.pluto.driver.config.DriverConfigurationException;

-import org.apache.pluto.driver.config.DriverConfiguration;

-import org.apache.pluto.driver.config.AdminConfiguration;

-import org.springframework.web.context.WebApplicationContext;

-

-import javax.servlet.ServletContext;

-import javax.servlet.ServletContextEvent;

-import javax.servlet.ServletContextListener;

-import javax.portlet.PortalContext;

-

-/**

- * Listener used to start up / shut down the Pluto Portal Driver upon startup /

- * showdown of the servlet context in which it resides.

- * <p/>

- * Startup Includes:

- * <ol>

- * <li>Instantiation of the DriverConfiguration</li>

- * <li>Registration of the DriverConfiguration</li>

- * <li>Instantiation of the PortalContext</li>

- * <li>Registration of the PortalContext</li>

- * <li>Instantiation of the ContainerServices</li>

- * <li>Registration of the ContainerServices</li>

- * </ol>

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version $Revision$ $Date$

- * @since Sep 22, 2004

- */

-public class PortalStartupListener implements ServletContextListener {

-

-    /**

-     * Internal logger.

-     */

-    private static final Log LOG = LogFactory.getLog(

-            PortalStartupListener.class);

-

-    /**

-     * The KEY with which the container is bound to the context.

-     */

-    private static final String CONTAINER_KEY = AttributeKeys.PORTLET_CONTAINER;

-

-    /**

-     * The KEY with which the driver configuration is bound to the context.

-     */

-    private static final String DRIVER_CONFIG_KEY = AttributeKeys.DRIVER_CONFIG;

-

-    /**

-     * The KEY with which the admin configuration is bound to the context.

-     */

-    private static final String ADMIN_CONFIG_KEY = AttributeKeys.DRIVER_ADMIN_CONFIG;

-

-    // ServletContextListener Impl ---------------------------------------------

-

-    /**

-     * Receives the startup notification and subsequently starts up the portal

-     * driver. The following are done in this order:

-     * <ol>

-     * <li>Retrieve the ResourceConfig File</li>

-     * <li>Parse the ResourceConfig File into ResourceConfig Objects</li>

-     * <li>Create a Portal Context</li>

-     * <li>Create the ContainerServices implementation</li>

-     * <li>Create the Portlet Container</li>

-     * <li>Initialize the Container</li>

-     * <li>Bind the configuration to the ServletContext</li>

-     * <li>Bind the container to the ServletContext</li>

-     * <ol>

-     *

-     * @param event the servlet context event.

-     */

-    public void contextInitialized(ServletContextEvent event) {

-        LOG.info("Starting up Pluto Portal Driver. . .");

-

-        ServletContext servletContext = event.getServletContext();

-

-        WebApplicationContext springContext = (WebApplicationContext)

-                servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);

-

-        LOG.debug(" [1a] Loading DriverConfiguration. . . ");

-        DriverConfiguration driverConfiguration = (DriverConfiguration)

-                springContext.getBean("DriverConfiguration");

-

-        driverConfiguration.init(servletContext);

-

-        LOG.debug(" [1b] Registering DriverConfiguration. . .");

-        servletContext.setAttribute(DRIVER_CONFIG_KEY, driverConfiguration);

-

-

-        LOG.debug(" [2a] Loading Optional AdminConfiguration. . .");

-        AdminConfiguration adminConfiguration = (AdminConfiguration)

-                springContext.getBean("AdminConfiguration");

-

-        if (adminConfiguration != null) {

-            LOG.debug(" [2b] Registering Optional AdminConfiguration");

-            servletContext.setAttribute(ADMIN_CONFIG_KEY, adminConfiguration);

-        } else {

-            LOG.info("Optional AdminConfiguration not found. Ignoring.");

-        }

-

-        initContainer(servletContext);

-

-        LOG.info("********** Pluto Portal Driver Started **********\n\n");

-    }

-

-    /**

-     * Recieve notification that the context is being shut down and subsequently

-     * destroy the container.

-     *

-     * @param event the destrubtion event.

-     */

-    public void contextDestroyed(ServletContextEvent event) {

-        ServletContext servletContext = event.getServletContext();

-        if (LOG.isInfoEnabled()) {

-            LOG.info("Shutting down Pluto Portal Driver...");

-        }

-        destroyContainer(servletContext);

-        destroyAdminConfiguration(servletContext);

-        destroyDriverConfiguration(servletContext);

-        if (LOG.isInfoEnabled()) {

-            LOG.info("********** Pluto Portal Driver Shut Down **********\n\n");

-        }

-    }

-

-

-    /**

-     * Initializes the portlet container. This method constructs and initializes

-     * the portlet container, and saves it to the servlet context scope.

-     *

-     * @param servletContext the servlet context.

-     */

-    private void initContainer(ServletContext servletContext) {

-

-        WebApplicationContext springContext = (WebApplicationContext)

-                servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);

-

-        // Retrieve the driver configuration from servlet context.

-        DriverConfiguration driverConfig = (DriverConfiguration)

-                servletContext.getAttribute(DRIVER_CONFIG_KEY);

-

-        try {

-            LOG.info("Initializing Portlet Container. . .");

-

-            LOG.debug(" [1] Loading RequiredContainerServices. . .");

-            RequiredContainerServices required =

-                    (RequiredContainerServices) springContext.getBean("RequiredContainerServices");

-

-            LOG.debug(" [2] Loading OptionalContainerServices. . .");

-            OptionalContainerServices optional =

-                    (OptionalContainerServices) springContext.getBean("OptionalContainerServices");

-

-

-            // Create portlet container.

-            LOG.debug(" [3] Creating portlet container...");

-            PortletContainerFactory factory =

-                    PortletContainerFactory.getInstance();

-            PortletContainer container = factory.createContainer(

-                driverConfig.getContainerName(), required, optional

-            );

-

-            // Initialize portlet container.

-            LOG.debug(" [4] Initializing portlet container...");

-            container.init(servletContext);

-

-            // Save portlet container to the servlet context scope.

-            servletContext.setAttribute(CONTAINER_KEY, container);

-            LOG.info("Pluto portlet container started.");

-

-        } catch (DriverConfigurationException ex) {

-            LOG.error("Unable to retrieve driver configuration "

-                    + "due to configuration error: " + ex.getMessage(), ex);

-        } catch (PortletContainerException ex) {

-            LOG.error("Unable to start up portlet container: "

-                    + ex.getMessage(), ex);

-        }

-    }

-

-    // Private Destruction Methods ---------------------------------------------

-

-    /**

-     * Destroyes the portlet container and removes it from servlet context.

-     *

-     * @param servletContext the servlet context.

-     */

-    private void destroyContainer(ServletContext servletContext) {

-        if (LOG.isInfoEnabled()) {

-            LOG.info("Shutting down Pluto Portal Driver...");

-        }

-        PortletContainer container = (PortletContainer)

-                servletContext.getAttribute(CONTAINER_KEY);

-        if (container != null) {

-            try {

-                container.destroy();

-                if (LOG.isInfoEnabled()) {

-                    LOG.info("Pluto Portal Driver shut down.");

-                }

-            } catch (PortletContainerException ex) {

-                LOG.error("Unable to shut down portlet container: "

-                        + ex.getMessage(), ex);

-            } finally {

-                servletContext.removeAttribute(CONTAINER_KEY);

-            }

-        }

-    }

-

-    /**

-     * Destroyes the portal driver config and removes it from servlet context.

-     *

-     * @param servletContext the servlet context.

-     */

-    private void destroyDriverConfiguration(ServletContext servletContext) {

-        DriverConfiguration driverConfig = (DriverConfiguration)

-                servletContext.getAttribute(DRIVER_CONFIG_KEY);

-        if (driverConfig != null) {

-            try {

-                driverConfig.destroy();

-                if (LOG.isInfoEnabled()) {

-                    LOG.info("Pluto Portal Driver Config destroyed.");

-                }

-            } catch (DriverConfigurationException ex) {

-                LOG.error("Unable to destroy portal driver config: "

-                        + ex.getMessage(), ex);

-            } finally {

-                servletContext.removeAttribute(DRIVER_CONFIG_KEY);

-            }

-        }

-    }

-

-    /**

-     * Destroyes the portal admin config and removes it from servlet context.

-     *

-     * @param servletContext the servlet context.

-     */

-    private void destroyAdminConfiguration(ServletContext servletContext) {

-        AdminConfiguration adminConfig = (AdminConfiguration)

-                servletContext.getAttribute(ADMIN_CONFIG_KEY);

-        if (adminConfig != null) {

-            try {

-                adminConfig.destroy();

-                if (LOG.isInfoEnabled()) {

-                    LOG.info("Pluto Portal Admin Config destroyed.");

-                }

-            } catch (DriverConfigurationException ex) {

-                LOG.error("Unable to destroy portal admin config: "

-                        + ex.getMessage(), ex);

-            } finally {

-                servletContext.removeAttribute(ADMIN_CONFIG_KEY);

-            }

-        }

-    }

-

-}

-

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/PublishServlet.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/PublishServlet.java
deleted file mode 100644
index 87eecd6..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/PublishServlet.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver;

-

-import org.apache.pluto.driver.services.portal.admin.DriverAdministrationException;

-import org.apache.pluto.driver.services.portal.admin.PortletRegistryAdminService;

-import org.apache.pluto.driver.config.AdminConfiguration;

-

-import javax.servlet.http.HttpServlet;

-import javax.servlet.http.HttpServletRequest;

-import javax.servlet.http.HttpServletResponse;

-import javax.servlet.ServletException;

-import java.io.IOException;

-

-

-/**

- * Publishing administrative servlet.

- * Allows external clients to connect and notify the portal

- * of available portlet applications.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:

- * @version 1.0

- * @since Nov 23, 2005

- */

-public class PublishServlet extends HttpServlet {

-

-    protected void doGet(HttpServletRequest req,

-                         HttpServletResponse res)

-    throws ServletException, IOException {

-

-        String context = req.getParameter("context");

-        try {

-            doPublish(context);

-        }

-        catch(Throwable t) {

-            StringBuffer sb = new StringBuffer();

-            sb.append("Unable to publish portlet application bound to context '"+context+"'.");

-            sb.append("Reason: ").append(t.getMessage());

-            res.getWriter().println(sb.toString());

-        }

-    }

-

-    private void doPublish(String context) throws DriverAdministrationException {

-        AdminConfiguration adminConfig = (AdminConfiguration)getServletContext()

-            .getAttribute(AttributeKeys.DRIVER_ADMIN_CONFIG);

-

-        PortletRegistryAdminService admin = adminConfig.getPortletRegistryAdminService();

-

-        admin.addPortletApplication(context);

-    }

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/TCKDriverServlet.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/TCKDriverServlet.java
deleted file mode 100644
index f52d8c8..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/TCKDriverServlet.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver;

-

-import org.apache.pluto.PortletContainer;

-import org.apache.pluto.driver.services.portal.PageConfig;

-import org.apache.pluto.driver.config.AdminConfiguration;

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-

-import javax.servlet.http.HttpServletRequest;

-import javax.servlet.http.HttpServletResponse;

-import javax.servlet.ServletContext;

-import javax.servlet.ServletException;

-import java.io.IOException;

-import java.text.DecimalFormat;

-

-/**

- * TCK Driver Servlet.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- * @since Dec 11, 2005

- */

-public class TCKDriverServlet extends PortalDriverServlet {

-	

-	/** Logger. */

-    private static final Log LOG = LogFactory.getLog(TCKDriverServlet.class);

-    

-    private int pageCounter = 0;

-    

-    public String getServletInfo() {

-        return "Pluto TCK Driver Servlet";

-    }

-

-    public void init() {

-        super.init();

-        ServletContext servletContext = getServletContext();

-        container = (PortletContainer) servletContext.getAttribute(

-                AttributeKeys.PORTLET_CONTAINER);

-    }

-    

-    /**

-     * Overwrites <code>super.doGet(..)</code>. If <code>portletName</code>

-     * (multiple occurrences) parameter is received, the driver is attempting

-     * to create a new page. This page must be setup and then redirected to the

-     * actual page. Otherwise, the driver calls <code>super.doGet(..)</code>

-     * to continue as normal.

-     * @param request  the incoming servlet request.

-     * @param response  the incoming servlet response.

-     * @throws IOException

-     * @throws ServletException

-     */

-    public void doGet(HttpServletRequest request, HttpServletResponse response)

-    throws IOException, ServletException {

-        String[] portletNames = request.getParameterValues("portletName");

-        if (portletNames != null && portletNames.length > 0) {

-        	debugWithName("Initializing new TCK page...");

-            doSetup(request, response);

-        } else {

-        	debugWithName("No portlet names specified. Continue as normal.");

-        	super.doGet(request, response);

-        }

-    }

-

-    public void doPost(HttpServletRequest req, HttpServletResponse response)

-    throws IOException, ServletException {

-        super.doGet(req, response);

-    }

-    

-    

-    // Private Methods ---------------------------------------------------------

-    

-    private void doSetup(HttpServletRequest request,

-                         HttpServletResponse response)

-    throws IOException, ServletException {

-        String[] portletNames = request.getParameterValues("portletName");

-        String pageName = request.getParameter("pageName");

-        if (pageName != null) {

-        	debugWithName("Retrieved page name from request: " + pageName);

-        } else {

-        	debugWithName("Creating page name...");

-        	AdminConfiguration adminConfig = (AdminConfiguration)

-            		getServletContext()

-            		.getAttribute(AttributeKeys.DRIVER_ADMIN_CONFIG);

-            if (adminConfig == null) {

-                throw new ServletException("Invalid configuration: "

-                		+ "an AdminConfiguration must be specified "

-                		+ "to run the TCK.");

-            }

-            

-            pageName = (new DecimalFormat("TCK00000")).format(pageCounter++);

-            PageConfig pageConfig = new PageConfig();

-            pageConfig.setName(pageName);

-            pageConfig.setUri(DEFAULT_PAGE_URI);

-            for (int i = 0; i < portletNames.length; i++) {

-            	debugWithName("Processing portlet name: " + portletNames[i]);

-                int index = portletNames[i].indexOf("/");

-                String contextPath = "/" + portletNames[i].substring(0, index);

-                String portletName = portletNames[i].substring(index + 1);

-                pageConfig.addPortlet(contextPath, portletName);

-                adminConfig.getPortletRegistryAdminService()

-                		.addPortletApplication(contextPath);

-            }

-

-            adminConfig.getRenderConfigAdminService().addPage(pageConfig);

-            debugWithName("Created TCK Page: " + pageName);

-        }

-

-        // The other possibility would be to redirect to the actual portal.

-        //   I'm not sure which is better at this point.

-        StringBuffer buffer = new StringBuffer();

-        buffer.append(request.getRequestURL().toString());

-        if (!request.getRequestURL().toString().endsWith("/")) {

-        	buffer.append("/");

-        }

-        buffer.append(pageName);

-        debugWithName("Sending redirect to: " + buffer.toString());

-        response.sendRedirect(buffer.toString());

-    }

-    

-    /**

-     * Prints debug message with a <code>[Pluto TCK Driver]</code> prefix.

-     * @param message  message to debug.

-     */

-    private void debugWithName(String message) {

-    	if (LOG.isDebugEnabled()) {

-    		LOG.debug("[Pluto TCK Driver] " + message);

-    	}

-    }

-    

-}
\ No newline at end of file
diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/AdminConfiguration.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/AdminConfiguration.java
deleted file mode 100644
index 68bd94b..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/AdminConfiguration.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.config;

-

-import org.apache.pluto.driver.services.portal.admin.DeployWarAdminService;

-import org.apache.pluto.driver.services.portal.admin.PortletRegistryAdminService;

-import org.apache.pluto.driver.services.portal.admin.ReassembleWarAdminService;

-import org.apache.pluto.driver.services.portal.admin.RenderConfigAdminService;

-import org.apache.pluto.driver.services.portal.admin.WarUploadAdminService;

-

-import javax.servlet.ServletContext;

-

-/**

- * Interface defining a means for obtaining administrative

- * services for portal configuration.  An implementation

- * of this interface will be bound to the portal's

- * ServletContext IF administrative functions are

- * supported by the current implementation.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:

- * @version 1.0

- * @since Nov 30, 2005

- */

-public interface AdminConfiguration {

-

-    /**

-     * Lifecyle method used to initialize the configuration

-     * @param context

-     */

-    void init(ServletContext context) throws DriverConfigurationException;

-

-    /**

-     * Lifecylce method used to remove the configuration

-     * from service.

-     */

-    void destroy() throws DriverConfigurationException;

-

-    /**

-     * Retrieve the administrative service for managing the

-     * portlet registry.

-     *

-     * @return the service if one has been provided

-     */

-    PortletRegistryAdminService getPortletRegistryAdminService();

-

-    /**

-     * Retrieve the administrative service for managing the

-     * render configuration.

-     * @return the service if one has been provided

-     */

-    RenderConfigAdminService getRenderConfigAdminService();

-

-    public WarUploadAdminService getWarUploadAdminService();

-    

-    public ReassembleWarAdminService getReassembleWarAdminService();

-    

-    public DeployWarAdminService getDeployWarAdminService();

-

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/DriverConfiguration.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/DriverConfiguration.java
deleted file mode 100644
index fc68bda..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/DriverConfiguration.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.config;

-

-import org.apache.pluto.driver.services.portal.PortletApplicationConfig;

-import org.apache.pluto.driver.services.portal.PortletWindowConfig;

-import org.apache.pluto.driver.services.portal.PageConfig;

-import org.apache.pluto.driver.url.PortalURLParser;

-import org.apache.pluto.spi.PortalCallbackService;

-import org.apache.pluto.spi.optional.PortletPreferencesService;

-

-import javax.servlet.ServletContext;

-import java.util.Collection;

-

-/**

- * Interface defining a means for retrieving driver services

- * based upon configuration information. Within the portal,

- * an implementation of this interface should be bound to

- * the portal's ServletContext.

- *

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @since Sep 2, 2005

- *

- */

-public interface DriverConfiguration {

-

-//

-// Lifecycle Methods

-//

-

-    /**

-     * Initialization method used to place the driver

-     * configuration into service.

-     * @throws DriverConfigurationException when an error occurs during startup.

-     * @param context

-     */

-    void init(ServletContext context) throws DriverConfigurationException;

-

-    /**

-     * Shutdown method used to remove the driver

-     * configuration from service;

-     * @throws DriverConfigurationException when an error occurs during shutdown.

-     */

-    void destroy() throws DriverConfigurationException;

-

-//

-// Service / Configuration Methods

-//

-

-    /**

-     * Retrieve the name of the portal

-     * as should be returned in

-     * {@link javax.portlet.PortalContext#getPortalInfo()}

-     * @return the name of the portal.

-     */

-    String getPortalName();

-

-    /**

-     * Retrieve the version of the portal

-     * as should be returned in

-     * {@link javax.portlet.PortalContext#getPortalInfo()}

-     * @return the portal version.

-     */

-    String getPortalVersion();

-

-    /**

-     * Retrieves the name of the container which

-     * pluto should create and embed.

-     * @return the container name.

-     */

-    String getContainerName();

-

-    Collection getSupportedPortletModes();

-

-    Collection getSupportedWindowStates();

-

-    Collection getPortletApplications();

-

-    PortletApplicationConfig getPortletApp(String id);

-

-    PortletWindowConfig getPortletWindowConfig(String id);

-

-    Collection getPages();

-

-    PageConfig getPageConfig(String pageId);

-    

-    boolean isPortletModeSupportedByPortal(String mode);

-    

-    boolean isPortletModeSupportedByPortlet(String portletId, String mode);

-    

-    boolean isPortletModeSupported(String portletId, String mode);

-

-//

-// Utility methods for the container

-//

-    PortalCallbackService getPortalCallbackService();

-

-    PortletPreferencesService getPortletPreferencesService();

-

-    PortalURLParser getPortalUrlParser();

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/DriverConfigurationException.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/DriverConfigurationException.java
deleted file mode 100644
index c4bf18a..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/DriverConfigurationException.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.config;

-

-/**

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @todo Document

- * @since Aug 10, 2005

- */

-public class DriverConfigurationException extends RuntimeException {

-

-    public DriverConfigurationException() {

-    }

-

-    public DriverConfigurationException(String message) {

-        super(message);

-    }

-

-    public DriverConfigurationException(String message, Throwable cause) {

-        super(message, cause);

-    }

-

-    public DriverConfigurationException(Throwable cause) {

-        super(cause);

-    }

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/package.html b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/package.html
deleted file mode 100644
index b01f8b8..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/package.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!--

-Copyright 2005-2006 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<html>

-<body>

-  Provides a single interface for retrieving configuration

-  and instantiating services.

-</body>

-</html>
\ No newline at end of file
diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/core/PortalRequestContext.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/core/PortalRequestContext.java
deleted file mode 100644
index 3b6cef1..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/core/PortalRequestContext.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.core;

-

-import javax.servlet.http.HttpServletRequest;

-import javax.servlet.http.HttpServletResponse;

-import javax.servlet.ServletContext;

-

-import org.apache.pluto.driver.url.PortalURL;

-import org.apache.pluto.driver.url.PortalURLParser;

-import org.apache.pluto.driver.AttributeKeys;

-import org.apache.pluto.driver.config.DriverConfiguration;

-

-/**

- * Defines the context of the currentl portal request.

- * Allows for the retrieval of the original request

- * and response throughout the lifetime of the request.

- *

- * Provides a consistent interface for parsing/creating

- * PortalURLs to the outside world.

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class PortalRequestContext {

-

-    /**

-     * The attribute key to bind the portal environment instance to servlet

-     * request.

-     */

-    public final static String REQUEST_KEY =

-            PortalRequestContext.class.getName();

-

-    /** The servletContext of execution. **/

-    private ServletContext servletContext = null;

-

-    /** The incoming servlet request. */

-    private HttpServletRequest request = null;

-

-    /** The incoming servlet response. */

-    private HttpServletResponse response = null;

-

-    /** The requested portal URL. */

-    private PortalURL requestedPortalURL = null;

-

-

-    // Constructor -------------------------------------------------------------

-

-    /**

-     * Creates a PortalRequestContext instance.

-     * @param request  the incoming servlet request.

-     * @param response  the incoming servlet response.

-     */

-    public PortalRequestContext(ServletContext servletContext,

-                                HttpServletRequest request,

-                                HttpServletResponse response) {

-        this.servletContext = servletContext;

-        this.request = request;

-        this.response = response;

-

-        // Bind the instance to servlet request for later use.

-        request.setAttribute(REQUEST_KEY, this);

-    }

-

-    /**

-     * Returns the portal environment from the servlet request. The portal

-     * envirionment instance is saved in the request scope.

-     * @param request  the servlet request.

-     * @return the portal environment.

-     */

-    public static PortalRequestContext getContext(

-            HttpServletRequest request) {

-        return (PortalRequestContext) request.getAttribute(REQUEST_KEY);

-    }

-

-    /**

-     * Returns the servlet request.

-     * @return the servlet request.

-     */

-    public HttpServletRequest getRequest() {

-        return request;

-    }

-

-    /**

-     * Returns the servlet response.

-     * @return the servlet response.

-     */

-    public HttpServletResponse getResponse() {

-        return response;

-    }

-

-    /**

-     * Returns the requested portal URL.

-     * @return the requested portal URL.

-     */

-    public PortalURL getRequestedPortalURL() {

-        if(requestedPortalURL == null) {

-            DriverConfiguration config = (DriverConfiguration)

-                servletContext.getAttribute(AttributeKeys.DRIVER_CONFIG);

-            PortalURLParser parser = config.getPortalUrlParser();

-            requestedPortalURL = parser.parse(request);

-        }

-        return requestedPortalURL;

-    }

-

-    public PortalURL createPortalURL() {

-        return (PortalURL)getRequestedPortalURL().clone();

-    }

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/core/PortalServletRequest.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/core/PortalServletRequest.java
deleted file mode 100644
index 5d480b9..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/core/PortalServletRequest.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.core;

-

-import java.util.Collections;

-import java.util.Enumeration;

-import java.util.HashMap;

-import java.util.Iterator;

-import java.util.Map;

-

-import javax.servlet.http.HttpServletRequest;

-import javax.servlet.http.HttpServletRequestWrapper;

-

-import org.apache.pluto.PortletWindow;

-import org.apache.pluto.driver.url.PortalURLParameter;

-import org.apache.pluto.driver.url.PortalURL;

-

-public class PortalServletRequest extends HttpServletRequestWrapper {

-

-    private PortletWindow portletWindow = null;

-

-    private PortalURL url;

-    private Map portletParameters;

-

-    public PortalServletRequest(HttpServletRequest request,

-                                PortletWindow window) {

-        super(request);

-        this.portletWindow = window;

-

-        url =

-        PortalRequestContext.getContext(request).getRequestedPortalURL();

-    }

-

-

-// HttpServletRequestWrapper overlay

-

-    public java.lang.String getContentType() {

-        String contentType = super.getContentType();

-        return contentType;

-    }

-

-// ServletRequestWrapper overlay

-

-    public String getParameter(String name) {

-        String[] values = (String[]) this.getParameterMap().get(name);

-        if (values != null) {

-            return values[0];

-        }

-        return null;

-    }

-

-    /**

-     * Retreive the Parameters.

-     * @return Map of parameters targeted to the window associated with this

-     *         request.

-     */

-    public Map getParameterMap() {

-        if (portletParameters == null) {

-            initParameterMap();

-        }

-        return Collections.unmodifiableMap(portletParameters);

-    }

-

-    /**

-     * Initialize parameters for this request.  We must be careful to make sure

-     * that render parameters are only made available if they were targeted for

-     * this specific window.

-     */

-    private void initParameterMap() {

-        portletParameters = new HashMap();

-

-        Iterator iterator = url.getParameters().iterator();

-        while (iterator.hasNext()) {

-            PortalURLParameter param = (PortalURLParameter) iterator.next();

-            String name = param.getName();

-            String[] values = param.getValues();

-            if (param.getWindowId().equals(portletWindow.getId().getStringId())) {

-                portletParameters.put(name, values);

-            }

-        }

-

-        String id = portletWindow.getId().getStringId();

-        if (portletWindow.getId().getStringId().equals(id)) {

-            Enumeration params = super.getParameterNames();

-            while (params.hasMoreElements()) {

-                String name = params.nextElement().toString();

-                String[] values = super.getParameterValues(name);

-                if (portletParameters.containsKey(name)) {

-                    String[] temp = (String[]) portletParameters.get(name);

-                    String[] all = new String[values.length + temp.length];

-                    System.arraycopy(values, 0, all, 0, values.length);

-                    System.arraycopy(temp, 0, all, values.length, temp.length);

-                }

-                portletParameters.put(name, values);

-            }

-        }

-    }

-

-    /**

-     * Get an enumeration which contains each of the names for which parameters

-     * exist.

-     * @return an enumeration of all names bound as parameters.

-     */

-    public Enumeration getParameterNames() {

-        return Collections.enumeration(getParameterMap().keySet());

-    }

-

-    /**

-     * Get the values associated with the given parameter key.

-     * @param name the Parameter name used to key the parameter.

-     * @return a String[] of all values bound to the given name as a parameter.

-     */

-    public String[] getParameterValues(String name) {

-        return (String[]) getParameterMap().get(name);

-    }

-

-}

-

-

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/core/PortalServletResponse.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/core/PortalServletResponse.java
deleted file mode 100644
index 5d8092b..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/core/PortalServletResponse.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.core;

-

-import java.io.IOException;

-import java.io.PrintWriter;

-import java.io.StringWriter;

-

-import javax.servlet.http.HttpServletResponse;

-

-public class PortalServletResponse

-    extends javax.servlet.http.HttpServletResponseWrapper {

-

-    private StringWriter buffer = null;

-    private PrintWriter writer = null;

-    private String contentType = "text/html";

-

-    public PortalServletResponse(HttpServletResponse response) {

-        super(response);

-        buffer = new StringWriter();

-        writer = new PrintWriter(buffer);

-    }

-

-    public String getContentType() {

-        return contentType;

-    }

-

-    public PrintWriter getWriter() {

-        return writer;

-    }

-

-    public StringWriter getInternalBuffer() {

-        return buffer;

-    }

-

-    public PrintWriter getInternalResponseWriter()

-        throws IOException {

-        return super.getWriter();

-    }

-

-

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/core/PortletWindowIDImpl.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/core/PortletWindowIDImpl.java
deleted file mode 100644
index 35ff97c..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/core/PortletWindowIDImpl.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.core;

-

-import java.io.IOException;

-import java.io.ObjectInputStream;

-import java.io.ObjectOutputStream;

-import java.io.Serializable;

-

-import org.apache.pluto.PortletWindowID;

-

-/**

- * Wraps around the internal Object IDs. By holding both the string and the

- * integer version of an Object ID this class helps speed up the internal

- * processing.

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class PortletWindowIDImpl implements PortletWindowID, Serializable {

-	

-	// Private Member Variables ------------------------------------------------

-	

-    private String stringId = null;

-    private int intId;

-    

-    

-    // Constructor -------------------------------------------------------------

-    

-    /**

-     * Private constructor that prevents external instantiation.

-     * @param intId  the integer ID.

-     * @param stringId  the string ID.

-     */

-    private PortletWindowIDImpl(int intId, String stringId) {

-        this.stringId = stringId;

-        this.intId = intId;

-    }   

-    

-    

-    // PortletWindowID Impl ----------------------------------------------------

-    

-    public String getStringId() {

-        return stringId;

-    }

-    

-    // Internal Methods --------------------------------------------------------

-    

-    private void readObject(ObjectInputStream stream) throws IOException {

-    	intId = stream.readInt();

-        stringId = String.valueOf(intId);

-    }

-

-    private void writeObject(ObjectOutputStream stream) throws IOException {

-        stream.write(intId);

-    }

-

-    // Common Object Methods ---------------------------------------------------

-    

-    /**

-    public boolean equals(Object object) {

-        boolean result = false;

-        if (object instanceof PortletWindowIDImpl) {

-            result = (intId == ((PortletWindowIDImpl) object).intId);

-        } else if (object instanceof String) {

-            result = stringId.equals(object);

-        } else if (object instanceof Integer) {

-            result = (intId == ((Integer) object).intValue());

-        }

-        return (result);

-    }

-    **/

-    

-    public int hashCode() {

-        return intId;

-    }

-    

-    

-    // Additional Methods ------------------------------------------------------

-    

-    public int intValue() {

-        return intId;

-    }

-    

-    /**

-     * Creates a portlet window ID instance from a string.

-     * @param stringId  the string ID from which the instance is created.

-     * @return a portlet window ID instance created from the string ID.

-     */

-    static public PortletWindowIDImpl createFromString(String stringId) {

-        char[] id = stringId.toCharArray();

-        int _id = 1;

-        for (int i = 0; i < id.length; i++) {

-            if ((i % 2) == 0) {

-                _id *= id[i];

-            } else {

-                _id ^= id[i];

-            }

-            _id = Math.abs(_id);

-        }

-        return new PortletWindowIDImpl(_id, stringId);

-    }

-    

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/core/PortletWindowImpl.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/core/PortletWindowImpl.java
deleted file mode 100644
index 3b64049..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/core/PortletWindowImpl.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.core;

-

-import javax.portlet.PortletMode;

-import javax.portlet.WindowState;

-

-import org.apache.pluto.PortletWindow;

-import org.apache.pluto.PortletWindowID;

-import org.apache.pluto.driver.services.portal.PortletWindowConfig;

-import org.apache.pluto.driver.url.PortalURL;

-

-/**

- * Implementation of <code>PortletWindow</code> interface.

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- */

-public class PortletWindowImpl implements PortletWindow {

-

-    // Private Member Variables ------------------------------------------------

-

-    private PortletWindowConfig config = null;

-    private PortalURL portalURL = null;

-    private PortletWindowIDImpl objectIdImpl = null;

-

-

-    // Constructor -------------------------------------------------------------

-

-    /**

-     * Constructs an instance.

-     * @param config  the portlet window configuration.

-     * @param portalURL  the portal URL.

-     */

-    public PortletWindowImpl(PortletWindowConfig config, PortalURL portalURL) {

-        this.config = config;

-        this.portalURL = portalURL;

-    }

-

-

-    // PortletWindow Impl ------------------------------------------------------

-

-    public String getContextPath() {

-        return config.getContextPath();

-    }

-

-    public String getPortletName() {

-        return config.getPortletName();

-    }

-

-    public WindowState getWindowState() {

-        return portalURL.getWindowState(getId().getStringId());

-    }

-

-    public PortletMode getPortletMode() {

-        return portalURL.getPortletMode(getId().getStringId());

-    }

-

-    public PortletWindowID getId() {

-        if (objectIdImpl == null) {

-            objectIdImpl = PortletWindowIDImpl.createFromString(config.getId());

-        }

-        return objectIdImpl;

-    }

-}
\ No newline at end of file
diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/core/ResourceURLProviderImpl.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/core/ResourceURLProviderImpl.java
deleted file mode 100644
index 88f3ff9..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/core/ResourceURLProviderImpl.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.core;

-

-import java.net.MalformedURLException;

-import java.net.URL;

-

-import javax.servlet.http.HttpServletRequest;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.PortletWindow;

-import org.apache.pluto.spi.ResourceURLProvider;

-

-public class ResourceURLProviderImpl implements ResourceURLProvider {

-

-    private static final Log LOG =

-        LogFactory.getLog(ResourceURLProviderImpl.class);

-

-    private String stringUrl = "";

-    private String base = "";

-

-    public ResourceURLProviderImpl(HttpServletRequest req,

-                                   PortletWindow internalPortletWindow) {

-        PortalRequestContext ctx = (PortalRequestContext)

-            req.getAttribute(PortalRequestContext.REQUEST_KEY);

-

-        this.base = ctx.createPortalURL().getServerURI();

-        if (LOG.isDebugEnabled()) {

-            LOG.debug("Resource URL Created with base: " + base);

-        }

-    }

-

-    public void setAbsoluteURL(String path) {

-        stringUrl = path;

-    }

-

-    public void setFullPath(String path) {

-        stringUrl = base + path;

-    }

-

-    public String toString() {

-        URL url = null;

-

-        if (!"".equals(stringUrl)) {

-            try {

-                url = new URL(stringUrl);

-            } catch (MalformedURLException e) {

-                throw new java.lang.IllegalArgumentException(

-                    "A malformed URL has occured");

-            }

-        }

-

-        return ((url == null) ? "" : url.toString());

-

-    }

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AboutPortlet.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AboutPortlet.java
deleted file mode 100644
index 70ab594..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AboutPortlet.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.portlets;

-

-import java.io.IOException;

-

-import javax.portlet.GenericPortlet;

-import javax.portlet.PortletContext;

-import javax.portlet.PortletException;

-import javax.portlet.PortletRequestDispatcher;

-import javax.portlet.RenderRequest;

-import javax.portlet.RenderResponse;

-

-/**

- * The pluto portal driver about portlet.

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @since 2006-02-09

- */

-public class AboutPortlet extends GenericPortlet {

-	

-	private static final String VIEW_PAGE = "/WEB-INF/fragments/about/view.jsp";

-	private static final String EDIT_PAGE = "/WEB-INF/fragments/about/edit.jsp";

-	private static final String HELP_PAGE = "/WEB-INF/fragments/about/help.jsp";

-	

-	// GenericPortlet Impl -----------------------------------------------------

-	

-    public void doView(RenderRequest request, RenderResponse response)

-    throws PortletException, IOException {

-        PortletContext context = getPortletContext();

-        PortletRequestDispatcher requestDispatcher =

-        		context.getRequestDispatcher(VIEW_PAGE);

-        requestDispatcher.include(request, response);

-    }

-

-    protected void doEdit(RenderRequest request, RenderResponse response)

-    throws PortletException, IOException {

-        PortletContext context = getPortletContext();

-        PortletRequestDispatcher requestDispatcher =

-        		context.getRequestDispatcher(EDIT_PAGE);

-        requestDispatcher.include(request, response);

-    }

-    

-    protected void doHelp(RenderRequest request, RenderResponse response)

-    throws PortletException, IOException {

-    	PortletContext context = getPortletContext();

-    	PortletRequestDispatcher requestDispatcher =

-    			context.getRequestDispatcher(HELP_PAGE);

-    	requestDispatcher.include(request, response);

-    }

-    

-    	

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AdminDeploymentPortlet.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AdminDeploymentPortlet.java
deleted file mode 100644
index dc8162b..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AdminDeploymentPortlet.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*

- * Copyright 2006 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.portlets;

-

-import java.io.File;

-import java.io.IOException;

-import java.util.Locale;

-import java.util.ResourceBundle;

-

-import javax.portlet.ActionRequest;

-import javax.portlet.ActionResponse;

-import javax.portlet.GenericPortlet;

-import javax.portlet.PortletConfig;

-import javax.portlet.PortletContext;

-import javax.portlet.PortletException;

-import javax.portlet.PortletSession;

-import javax.portlet.RenderRequest;

-import javax.portlet.RenderResponse;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.driver.config.AdminConfiguration;

-import org.apache.pluto.driver.config.DriverConfiguration;

-import org.apache.pluto.driver.services.portal.admin.DeployWarAdminService;

-import org.apache.pluto.driver.services.portal.admin.PortletRegistryAdminService;

-import org.apache.pluto.driver.services.portal.admin.ReassembleWarAdminService;

-import org.apache.pluto.driver.services.portal.admin.RenderConfigAdminService;

-import org.apache.pluto.driver.services.portal.admin.WarUploadAdminService;

-import org.apache.pluto.driver.AttributeKeys;

-import org.apache.pluto.util.UtilityException;

-import org.apache.pluto.util.deploy.DeploymentException;

-import org.apache.pluto.util.fileupload.FileUploaderException;

-import org.apache.pluto.util.ui.PortletUiMessage;

-import org.apache.pluto.util.ui.PortletUiMessageType;

-

-/**  

- * Administrative portlet used to deploy wars into the Pluto portal driver.

- * 

- * @author <a href="mailto:cdoremus@apache.org">Craig Doremus</a>

- */

-public class AdminDeploymentPortlet extends GenericPortlet {

-

-	public static final Log LOG = LogFactory.getLog(AdminDeploymentPortlet.class); 

-	

-	/**

-	 * JSP file used for the view mode

-	 */

-	public static final String VIEW_JSP = "/WEB-INF/fragments/admin/deploy/view.jsp";

-	/**

-	 * JSP file used for the edit mode

-	 */

-	public static final String EDIT_JSP = "/WEB-INF/fragments/admin/deploy/edit.jsp";

-	/**

-	 * JSP file used for the help mode

-	 */

-	public static final String HELP_JSP = "/WEB-INF/fragments/admin/deploy/help.jsp";

-	

-	public static final String ISCONFIGURED_PARAM = "isconfigured";

-	public static final String BUNDLE_ATTR = "bundle";

-	public static final String MAXUPLOAD_SIZE_ATTR = "maxupload_size"; 

-	public static final String  FILEUPLOAD_CMD = "uploadfile";

-	public static final String UPLOAD_PATH_PARAM = "fileupload";

-	/**

-	 * Resources held in a properties file.

-	 */

-	private ResourceBundle _bundle = null;

-	

-	private PortletContext _context = null;

-	

-	/**

-	 * Service to upload the war file

-	 */

-	private WarUploadAdminService _wuService = null;

-	/**

-	 * Service to modify the web.xml, reassemble the war with it

-	 * and move it into place

-	 */

-	private ReassembleWarAdminService _awService = null;

-	/**

-	 * Service to create a deployment descriptor and move it into place

-	 */

-	private DeployWarAdminService _dwService = null;

-	/**

-	 * Holds admin configuration info from Spring config file

-	 */

-	private AdminConfiguration _adminConfig = null;

-	/**

-	 * Service to get information on the portal driver servlet from Spring

-	 * config file

-	 */

-	private DriverConfiguration _driverConfig = null;

-

-	private PortletRegistryAdminService _portletRegistry;

-    private RenderConfigAdminService _renderConfig;

-

-	/**

-	 * 

-	 */

-	public void init(PortletConfig config) throws PortletException {

-		super.init(config);

-		//create a PortletContext reference

-		_context = getPortletContext();

-		//create a ResourceBundle reference 

-		_bundle = config.getResourceBundle(Locale.getDefault());

-

-

-			//Get admin service implementations

-			//First get the Admin config from the context that contains Spring config info

-			//loaded by the PortalStartupListener

-			//NOTE: This makes use of the shared nature of the Servlet and Portlet context

-			_adminConfig = (AdminConfiguration)_context.getAttribute(AttributeKeys.DRIVER_ADMIN_CONFIG);

-			_wuService = _adminConfig.getWarUploadAdminService();

-			_awService = _adminConfig.getReassembleWarAdminService();

-			_dwService = _adminConfig.getDeployWarAdminService();

-//			TODO: Configure registry and render service

-//			_renderConfig = _adminConfig.getRenderConfigAdminService();

-

-

-			//TODO:

-//			Get handle to DriverConfiguration for hot deployment

-//			_driverConfig = (DriverConfiguration)_context.getAttribute(AttributeKeys.DRIVER_CONFIG);

-			//TODO: ??Hot deploy by adding new Portlet to DriverConfiguration

-			//portlet application Collection and new config info in XML file to

-			//PortletApplicationConfiguration object(reread the file?) 

-//		}

-	}

-

-	public void doView(RenderRequest req, RenderResponse res)

-		throws IOException, PortletException {

-		//add bundle to session for use on JSP pages

-		PortletSession session = req.getPortletSession();

-		try {

-//			if (session.getAttribute(BUNDLE_ATTR) == null) {

-//				session.setAttribute(BUNDLE_ATTR, _bundle);

-//			}

-			res.setContentType("text/html;charset=UTF-8");

-			//get any messages passed from processAction()

-//			PortletUiMessage msg = (PortletUiMessage) req.getPortletSession().getAttribute(MSG_PARAM);

-//			req.getPortletSession().removeAttribute(MSG_PARAM);

-//			LOG.debug("Message in doView(): " + msg);

-//			if (msg == null) {

-//				//set default blank message

-//				msg = new PortletUiMessage("",PortletUiMessageType.INFO);

-//			}

-//			req.setAttribute(MSG_PARAM, msg);

-			//TODO: pass MAX_FILE_UPLOAD_SIZE_PARAM and UPLOAD_PATH_PARAM to view

-//			req.setAttribute(MAX_FILE_UPLOAD_SIZE_PARAM, Long.toString(MAX_FILE_UPLOAD_SIZE));

-//			req.setAttribute(UPLOAD_PATH_PARAM, UPLOAD_PATH);

-		} catch (Throwable e) {

-			LOG.error(e);

-			session.setAttribute(AttributeKeys.PORTLET_MSG, new PortletUiMessage(e));			

-		}

-		getPortletContext().getRequestDispatcher(VIEW_JSP).include(req, res);

-	}

-

-	public void doEdit(RenderRequest req, RenderResponse res)

-		throws IOException, PortletException {

-		res.setContentType("text/html;charset=UTF-8");

-		PortletSession session = req.getPortletSession();

-		try {

-//			validateParams(req);

-			//get any messages passed from processAction()

-			PortletUiMessage msg = (PortletUiMessage) session.getAttribute(AttributeKeys.PORTLET_MSG);

-			session.removeAttribute(AttributeKeys.PORTLET_MSG);

-			if (msg == null) {

-				//set default blank message

-				msg = new PortletUiMessage("",PortletUiMessageType.INFO);

-			}

-			session.setAttribute(AttributeKeys.PORTLET_MSG, msg);

-		} catch (Throwable e) {

-			LOG.error(e);

-			session.setAttribute(AttributeKeys.PORTLET_MSG, new PortletUiMessage(e));			

-		}

-		getPortletContext().getRequestDispatcher(EDIT_JSP).include(req, res);

-	}

-	

-

-	public void doHelp(RenderRequest req, RenderResponse res)

-	throws IOException, PortletException {

-		res.setContentType("text/html;charset=UTF-8");

-		getPortletContext().getRequestDispatcher(HELP_JSP).include(req, res);

-	}

-

-	public void processAction(ActionRequest req, ActionResponse res)

-		throws IOException, PortletException {

-		PortletSession session = req.getPortletSession();

-		String command = req.getParameter("command");

-		if (command.equalsIgnoreCase("uploadfile")) {

-			//tmpWarPath is path to temp directory where war is uploaded to

-			File tmpWarPath = null;

-			File newWar = null;

-			try {

-				//set max file upload size if present

-				Integer oMaxuploadsize = (Integer)session.getAttribute(MAXUPLOAD_SIZE_ATTR);

-				if (oMaxuploadsize != null) {

-					_wuService.setMaxUploadSize(oMaxuploadsize.intValue());

-				}

-				tmpWarPath = _wuService.uploadWar(req);

-				//Check a flag to see if assembly was NOT requested

-				String isAssemblyNotRequested = req.getParameter("no-assembly");

-				if (isAssemblyNotRequested == null || 

-						(isAssemblyNotRequested != null && 

-						(isAssemblyNotRequested.equalsIgnoreCase("no") || 

-								isAssemblyNotRequested.equalsIgnoreCase("false")))) {				

-						newWar = _awService.reassembleWar(tmpWarPath);

-				}

-				/* Deploy: Move reassembled war into place and create deployment descriptor and move it into place  */

-				//check parameter to skip configuration if already done

-				boolean isConfigured = false; 

-				String strIsConfigured = req.getParameter(ISCONFIGURED_PARAM);

-				if (strIsConfigured != null && (strIsConfigured.equalsIgnoreCase("true") || strIsConfigured.equalsIgnoreCase("yes"))) {

-					isConfigured = true;

-				}

-				_dwService.deployWar(newWar != null ? newWar : tmpWarPath, isConfigured);

-	

-				

-//				String strWarFile = tmpWarPath.getAbsolutePath();

-//				String warFile = strWarFile.substring(strWarFile.indexOf(File.separator) + 1);

-//				String context = warFile.substring(0, warFile.indexOf('.'));

-

-			//TODO: ???Add parameter to skip publishing in pluto-portal-driver-config.xml			

-			//TODO: call registry service to register the war in 

-			//	pluto-portal-driver-config.xml file by adding a portlet-app element

-	//			try {

-	//				_portletRegistry.addPortletApplication(context);

-	//			} catch (DriverAdministrationException e) {

-	//				LOG.error("Problem registering portlet app.", e);

-	//				req.setAttribute(MSG_PARAM, 

-	//						new PortletUiMessage(e.getMessage(), PortletUiMessageType.ERROR));			

-	//			}

-				//TODO: call render service to add the war in 

-				//	pluto-portal-driver-config.xml file to render-config section

-	//			PageConfig pconfig = new PageConfig();		

-	//			pconfig.setName(context);

-	//			pconfig.setPortletIds(portlets);

-	//			pconfig.setUri("/" + context);

-	//			_renderConfig.addPage(pconfig);	

-				

-				session.setAttribute(AttributeKeys.PORTLET_MSG, 

-						new PortletUiMessage("Portlet successfully deployed!", PortletUiMessageType.INFO));			

-			} catch (FileUploaderException e) {

-				LOG.error("File upload problem", e);

-				//TODO: Check to see if message is in the resource bundle

-				session.setAttribute(AttributeKeys.PORTLET_MSG, new PortletUiMessage(e));			

-			} catch (UtilityException e) {

-				LOG.error("Reassembly problem", e);

-				session.setAttribute(AttributeKeys.PORTLET_MSG, new PortletUiMessage(e));			

-			} catch (DeploymentException e) {

-				LOG.error("Deployment problem", e);

-				session.setAttribute(AttributeKeys.PORTLET_MSG, new PortletUiMessage(e));			

-			} catch (Exception e) {

-				LOG.error("Deployment problem", e);

-				session.setAttribute(AttributeKeys.PORTLET_MSG, new PortletUiMessage(e));			

-			}

-			

-		} else if (command.equalsIgnoreCase("config")) {

-			//TODO: Actions for edit mode???

-			// 1. Put the max file upload size in the PortletSession 

-//			_service.doEditAction(req, res);

-		}

-		

-	}

-	

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AdminPortlet.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AdminPortlet.java
deleted file mode 100644
index 53d7edc..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AdminPortlet.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.portlets;

-

-import java.io.IOException;

-

-import javax.portlet.GenericPortlet;

-import javax.portlet.PortletContext;

-import javax.portlet.PortletException;

-import javax.portlet.PortletRequestDispatcher;

-import javax.portlet.RenderRequest;

-import javax.portlet.RenderResponse;

-

-public class AdminPortlet extends GenericPlutoPortlet {

-

-	private static final String VIEW_PAGE = "/WEB-INF/fragments/admin/view.jsp";

-	private static final String EDIT_PAGE = "/WEB-INF/fragments/admin/edit.jsp";

-	private static final String HELP_PAGE = "/WEB-INF/fragments/admin/help.jsp";

-	

-	// GenericPortlet Impl -----------------------------------------------------

-

-

-    public String getViewPage() {

-        return VIEW_PAGE;

-    }

-

-    public String getEditPage() {

-        return EDIT_PAGE;

-    }

-

-    public String getHelpPage() {

-        return HELP_PAGE;

-    }

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/GenericPlutoPortlet.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/GenericPlutoPortlet.java
deleted file mode 100644
index 67dd992..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/GenericPlutoPortlet.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.driver.portlets;
-
-import javax.portlet.GenericPortlet;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.portlet.PortletException;
-import javax.portlet.PortletContext;
-import javax.portlet.PortletRequestDispatcher;
-import java.io.IOException;
-
-
-public abstract class GenericPlutoPortlet extends GenericPortlet {
-
-    public abstract String getViewPage();
-    public abstract String getEditPage();
-    public abstract String getHelpPage();
-
-    public void doView(RenderRequest request, RenderResponse response)
-    throws PortletException, IOException {
-        PortletContext context = getPortletContext();
-        PortletRequestDispatcher requestDispatcher =
-        		context.getRequestDispatcher(getViewPage());
-        requestDispatcher.include(request, response);
-    }
-
-    protected void doEdit(RenderRequest request, RenderResponse response)
-    throws PortletException, IOException {
-        PortletContext context = getPortletContext();
-        PortletRequestDispatcher requestDispatcher =
-        		context.getRequestDispatcher(getEditPage());
-        requestDispatcher.include(request, response);
-    }
-
-    protected void doHelp(RenderRequest request, RenderResponse response)
-    throws PortletException, IOException {
-    	PortletContext context = getPortletContext();
-    	PortletRequestDispatcher requestDispatcher =
-    			context.getRequestDispatcher(getHelpPage());
-    	requestDispatcher.include(request, response);
-    }
-}
diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/PageAdminPortlet.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/PageAdminPortlet.java
deleted file mode 100644
index 43e84e9..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/PageAdminPortlet.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.driver.portlets;
-
-
-public class PageAdminPortlet extends GenericPlutoPortlet {
-
-    private static final String VIEW_PAGE = "/WEB-INF/fragments/admin/page/view.jsp";
-    private static final String EDIT_PAGE = "/WEB-INF/fragments/admin/page/edit.jsp";
-    private static final String HELP_PAGE = "/WEB-INF/fragments/admin/page/help.jsp";
-
-
-    public String getViewPage() {
-        return VIEW_PAGE;
-    }
-
-    public String getEditPage() {
-        return EDIT_PAGE;
-    }
-
-    public String getHelpPage() {
-        return HELP_PAGE;
-    }
-}
diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/impl/package.html b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/impl/package.html
deleted file mode 100644
index 9047110..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/impl/package.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--

-Copyright 2005-2006 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<HTML>

-<BODY>

-Service implementations of the driver configuration services.

-

-<li><b>rdbms</b>:

-    Relational Database Management System implementations.

-</li>

-

-<li><b>resource</b>:

-    Classpath Resources (file) based implementations.

-</li>

-

-</BODY>

-</HTML>
\ No newline at end of file
diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/package.html b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/package.html
deleted file mode 100644
index 83a7d74..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/package.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!--

-Copyright 2005-2006 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<HTML>

-<BODY>

-Services required by the portal.  Contains Portal Driver specific

-interfaces and the following childern:

-

-<li><b>container</b>:

-The services package contains implementations of the services required

-to integrate with the Pluto Container.

-</li>

-

-<li><b>impl</b>:

-Default Implementations of the portal services

-</li>

-

-</BODY>

-</HTML>
\ No newline at end of file
diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/DriverConfigurationService.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/DriverConfigurationService.java
deleted file mode 100644
index c2becda..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/DriverConfigurationService.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.portal;

-

-import org.apache.pluto.driver.config.DriverConfigurationException;

-

-import javax.servlet.ServletContext;

-

-/**

- * Abstract interface defining lifecycle methods for

- * Driver configuration services.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @since Aug 10, 2005

- */

-public interface DriverConfigurationService {

-

-    /**

-     * Initialize the service for use by the driver.

-     * This method allows the service to retrieve required

-     * resources from the context and instantiate any required

-     * services.

-     *

-     * @param ctx the Portal's servlet context in which the

-     * service will be executing.

-     *

-     */

-    void init(ServletContext ctx) throws DriverConfigurationException;

-

-    /**

-     * Destroy the service, notifying it of shutdown.

-     */

-    void destroy() throws DriverConfigurationException;

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/PageConfig.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/PageConfig.java
deleted file mode 100644
index 6e21141..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/PageConfig.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.portal;

-

-import org.apache.pluto.driver.services.portal.PortletWindowConfig;

-

-import java.util.ArrayList;

-import java.util.Collection;

-

-/**

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- */

-public class PageConfig {

-

-    private String name;

-    private String uri;

-    private Collection portletIds;

-    private int orderNumber;

-

-    public PageConfig() {

-        this.portletIds = new ArrayList();

-    }

-

-    public String getName() {

-        return name;

-    }

-

-    public void setName(String name) {

-        this.name = name;

-    }

-

-    public String getUri() {

-        return uri;

-    }

-

-    public void setUri(String uri) {

-        this.uri = uri;

-    }

-

-    public Collection getPortletIds() {

-        return portletIds;

-    }

-

-    public void setPortletIds(Collection ids) {

-        this.portletIds = ids;

-    }

-

-    public void addPortlet(String contextPath, String portletName) {

-        portletIds.add(

-            PortletWindowConfig.createPortletId(contextPath, portletName));

-    }

-

-    void setOrderNumber(int number) {

-        this.orderNumber = number;

-    }

-

-    int getOrderNumber() {

-        return orderNumber;

-    }

-

-

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/PortletApplicationConfig.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/PortletApplicationConfig.java
deleted file mode 100644
index 0268a3f..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/PortletApplicationConfig.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.portal;

-

-import java.util.Collection;

-import java.util.Map;

-

-/**

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class PortletApplicationConfig {

-

-    private String contextPath;

-    private Map portlets;

-

-    public PortletApplicationConfig() {

-        portlets = new java.util.HashMap();

-    }

-

-    public String getContextPath() {

-        return contextPath;

-    }

-

-    public void setContextPath(String contextPath) {

-        this.contextPath = contextPath;

-    }

-

-    public Collection getPortlets() {

-        return portlets.values();

-    }

-

-    public PortletWindowConfig getPortlet(String portletName) {

-        return (PortletWindowConfig) portlets.get(portletName);

-    }

-

-    public void addPortlet(PortletWindowConfig portlet) {

-        portlet.setContextPath(getContextPath());

-        portlets.put(portlet.getPortletName(), portlet);

-    }

-

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/PortletRegistryService.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/PortletRegistryService.java
deleted file mode 100644
index 581c09c..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/PortletRegistryService.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.portal;

-

-import java.util.Set;

-

-/**

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @since Aug 10, 2005

- */

-public interface PortletRegistryService extends DriverConfigurationService {

-

-    /**

-     * A set of all Portlet Applications

-     * @return a set of uniqe PortletAppConfig instances.

-     */

-    public Set getPortletApplications();

-

-    /**

-     * Retrieves the PortletAppConfig associated

-     * with the specified id.

-     * @param id the unique id of the portlet application config

-     * @return the PortletAppConfig instance for the specified id.

-     */

-    public PortletApplicationConfig getPortletApplication(String id);

-

-    /**

-     * Utility method used to retrieve a portlet

-     * directly from the service to prevent the driver

-     * from needing to navigate the portlet application

-     * object graph.

-     *

-     * @param id the unique id of the portlet being requested.

-     * @return PortletWindowConfig for the specified id.

-     */

-    public PortletWindowConfig getPortlet(String id);

-

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/PortletWindowConfig.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/PortletWindowConfig.java
deleted file mode 100644
index 45ea13a..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/PortletWindowConfig.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.portal;

-

-/**

- * Configuration of a portlet window on the portal page.

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class PortletWindowConfig {

-	

-	// Private Member Variables ------------------------------------------------

-	

-    /** The context path of the associated portlet. */

-    private String contextPath = null;

-    

-    /** The portlet name. */

-    private String portletName = null;

-    

-    

-    // Constructor -------------------------------------------------------------

-    

-    /**

-     * No-arg constructor.

-     */

-    public PortletWindowConfig() {

-    	// Do nothing.

-    }

-    

-    

-    // Public Methods ----------------------------------------------------------

-    

-    public String getId() {

-    	return createPortletId(contextPath, portletName);

-    }

-

-    public String getContextPath() {

-        return contextPath;

-    }

-

-   public void setContextPath(String contextPath) {

-        this.contextPath = contextPath;

-    }

-

-    public String getPortletName() {

-        return portletName;

-    }

-

-    public void setPortletName(String portletName) {

-        this.portletName = portletName;

-    }

-    

-    

-    // Public Static Methods ---------------------------------------------------

-    

-    /**

-     * Creates the portlet ID from context path and portlet name. The portlet ID

-     * is constructed by concatinating the context path and the portlet name

-     * using a dot ('.').

-     * 

-     * The method checks that the portlet name parameter does not have a dot. This check

-     * is not done for the portlet ID.

-     * 

-     * @param contextPath  the portlet context path.

-     * @param portletName  the portlet name.

-     * @throws IllegalArgumentException if the portletName has a dot

-     * @throws NullPointerException if the portlet Name or context path is null.

-     */

-    public static String createPortletId(String contextPath, String portletName) 

-    	throws NullPointerException, IllegalArgumentException {

-    	

-    	if (contextPath == null) {

-    		throw new NullPointerException("Context path must not be null.");    		

-    	}

-    	if (portletName == null) {

-    		throw new NullPointerException("Portlet name must not be null.");    		    		

-    	}

-    	if (portletName.indexOf('.') != -1) {

-    		throw new IllegalArgumentException("Portlet name must not have a dot(period). Please remove the dot from the value of the portlet-name element ("+ portletName + ") in portlet.xml");

-    	}

-        return contextPath + "." + portletName;

-    }

-    

-    /**

-     * Parses out the portlet context path from the portlet ID.

-     * @param portletId  the portlet ID to parse.

-     * @return the portlet context path.

-     */

-    public static String parseContextPath(String portletId) {

-    	int index = getSeparatorIndex(portletId);

-        return portletId.substring(0, index);

-    }

-    

-    /**

-     * Parses out the portlet context path from the portlet ID.

-     * @param portletId  the portlet ID to parse.

-     * @return the portlet context path.

-     */

-    public static String parsePortletName(String portletId) {

-    	int index = getSeparatorIndex(portletId);

-        return portletId.substring(index + 1);

-    }

-    

-    

-    // Private Static Method ---------------------------------------------------

-    

-    /**

-     * Parses the portlet ID and returns the separator (".") index. The portlet

-     * ID passed in should be a valid ID: not null, not starts with ".",

-     * not ends with ".", and contains ".". The portlet ID can have more than

-     * one dot, but the last one is taken to be the separator.

-     * 

-     * @param portletId  the portlet ID to parse.

-     * @return the separator index.

-     * @throws IllegalArgumentException if portlet ID does not contain a dot or the dot is the first or last character.

-     * @throws NullPointerException if the portlet ID is null

-     */

-    private static int getSeparatorIndex(String portletId)

-    	throws NullPointerException, IllegalArgumentException {

-    	

-    	if (portletId == null) {

-    		throw new NullPointerException("Portlet ID is null");

-    	}

-    	int index = portletId.lastIndexOf(".");

-    	if (index <= 0 || index == portletId.length() - 1) {

-    		throw new IllegalArgumentException("Portlet ID '" + portletId + "' does not contain a dot or the dot is the first or last character");

-    	}

-    	return index;

-    }

-    

-}

-

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/PropertyConfigService.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/PropertyConfigService.java
deleted file mode 100644
index 420a4eb..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/PropertyConfigService.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.portal;

-

-import java.util.Set;

-

-/**

- * Service interface which defines the methods required

- * for a provider wishing to provide property management.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @since Aug 10, 2005

- */

-public interface PropertyConfigService extends DriverConfigurationService {

-

-    /**

-     * Name of the portal driver.

-     * @return the name of this portal implementation

-     */

-    String getPortalName();

-

-    /**

-     * Portal driver version.

-     * @return version information

-     */

-    String getPortalVersion();

-

-    /**

-     * Unique name of the Portlet Container

-     * used to service this portal instance.

-     * @return container name

-     */

-    String getContainerName();

-

-    /**

-     * Set of unique Portlet Modes.

-     * The set must include

-     * {@link javax.portlet.PortletMode#VIEW},

-     * {@link javax.portlet.PortletMode#EDIT}, and

-     * {@link javax.portlet.PortletMode#HELP}

-     * @return set of unique portlet modes.

-     */

-    Set getSupportedPortletModes();

-

-    /**

-     * Set of unique Window States.

-     * The set must include:

-     * {@link javax.portlet.WindowState#NORMAL},

-     * {@link javax.portlet.WindowState#MAXIMIZED}, and

-     * {@link javax.portlet.WindowState#MINIMIZED}

-     * @return set of unique window states.

-     */

-    Set getSupportedWindowStates();

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/RenderConfig.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/RenderConfig.java
deleted file mode 100644
index 71b7bab..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/RenderConfig.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.portal;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.driver.services.portal.PageConfig;

-

-import java.util.*;

-

-/**

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- */

-public class RenderConfig {

-    private static final Log LOG =

-        LogFactory.getLog(RenderConfig.class);

-

-    private Map pages;

-    private String defaultPageId;

-

-    // internally used.

-    private int orderNumberCounter = 0;

-    private Comparator pageComparator;

-

-    public RenderConfig() {

-        this.pages = new java.util.HashMap();

-        this.pageComparator = new Comparator() {

-            public int compare(Object a, Object b) {

-                PageConfig pa = (PageConfig)a;

-                PageConfig pb = (PageConfig)b;

-                if(pa.getOrderNumber() > pb.getOrderNumber()) {

-                    return 1;

-                }

-                else if(pa.getOrderNumber() == pb.getOrderNumber()) {

-                    return 0;

-                }

-                else {

-                    return -1;

-                }

-            }

-

-            public boolean equals(Object a) {

-                return false;

-            }

-        };

-    }

-

-

-    public String getDefaultPageId() {

-        return defaultPageId;

-    }

-

-    public void setDefaultPageId(String defaultPageId) {

-        this.defaultPageId = defaultPageId;

-    }

-

-    public List getPages() {

-        List col =  new ArrayList(pages.values());

-        Collections.sort(col, pageComparator);

-        return col;

-    }

-

-    public PageConfig getPageConfig(String pageId) {

-        if (pageId == null || "".equals(pageId)) {

-            if (LOG.isDebugEnabled()) {

-                LOG.debug(

-                    "Requested page is null.  Returning default: " +

-                    defaultPageId);

-            }

-            pageId = defaultPageId;

-        }

-//        return (PageConfig) pages.get(pageId);

-         

-         // TODO: Make sure this is needed. 

-         //This is the PLUTO-251 fix submitted by Charles Severence. Thank you!!!

-         // Sometimes pages come with a prefix of a slash - if the page is not 

-         // found, and the first character of the pageId is a slash we attempt 

-         // to look up the page without the slash. 

-         

-         PageConfig retval = (PageConfig) pages.get(pageId); 

-         

-         if ( retval == null && pageId.startsWith("/") && pageId.length() > 2 ) { 

-        	 retval = (PageConfig) pages.get(pageId.substring(1)); 

-         }

-

-         

-         if (retval == null)

-         {             

-             LOG.warn("Couldn't find a PageConfig for page ID: [" + pageId + "]");

-             if ((retval = (PageConfig)pages.get(defaultPageId)) != null)

-             {

-                 if (LOG.isDebugEnabled())

-                 {                                      

-                     LOG.debug("Returning default page ID: [" + defaultPageId + "]");

-                 }

-             }

-             else

-             {

-                 LOG.error("Could not find default page Id for render config!");                 

-             }             

-         }

-         return retval; 

-    }

-

-    public void addPage(PageConfig config) {

-        config.setOrderNumber(orderNumberCounter++);

-        pages.put(config.getName(), config);

-    }

-

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/RenderConfigService.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/RenderConfigService.java
deleted file mode 100644
index cead3b7..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/RenderConfigService.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.portal;

-

-import java.util.List;

-

-/**

- * Service interface defining methods necessary for

- * a provider wishing to manage page administration.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @since Aug 10, 2005

- */

-public interface RenderConfigService extends DriverConfigurationService {

-

-    /**

-     * Retrieve an ordered list of all PageConfig instances.

-     * @return list of all PageConfig instances.

-     */

-    List getPages();

-

-    /**

-     * Retrieve the PageConfig for the default

-     * page.

-     * @return PageConfig instance of the default page.

-     */

-    PageConfig getDefaultPage();

-

-    /**

-     * Retrieve the PageConfig for the given

-     * page id.

-     *

-     * @param id

-     * @return PageConfig instance for the specified id.

-     */

-    PageConfig getPage(String id);

-

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/SupportedModesService.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/SupportedModesService.java
deleted file mode 100644
index 4b987c9..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/SupportedModesService.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.driver.services.portal;
-
-/**
- * Allows clients to determine if a particular PortletMode is supported
- * by the portal, a particular portlet, or both. 
- * 
- * @author <a href="mailto:esm@apache.org">Elliot Metsger</a>
- * @version $Id$
- * @since September 9, 2006
- * @see javax.portlet.PortletMode
- */
-public interface SupportedModesService extends DriverConfigurationService {
-    
-    /**
-     * Returns true if the portlet and the portal support the supplied mode.
-     * @param portletId the id uniquely identifiying the portlet
-     * @param mode the portlet mode
-     * @return true if the portlet and portal both support the supplied mode
-     */
-    boolean isPortletModeSupported(String portletId, String mode);
-    
-    /**
-     * Returns true if the portal supports the supplied mode.
-     * @param mode the portlet mode
-     * @return true if the portal supports the supplied mode
-     */
-    boolean isPortletModeSupportedByPortal(String mode);
-    
-    /**
-     * Returns true if the portlet supports the supplied mode.
-     * @param portletId the id uniquely identifying the portlet
-     * @param mode the portlet mode
-     * @return true if the portlet supports the supplied mode.
-     */
-    boolean isPortletModeSupportedByPortlet(String portletId, String mode);
-
-}
diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/AdminDeploymentException.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/AdminDeploymentException.java
deleted file mode 100644
index 8911169..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/AdminDeploymentException.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.apache.pluto.driver.services.portal.admin;

-

-import org.apache.pluto.driver.portlets.AdminDeploymentPortlet;

-

-/**

- * Indicates a problem with deployment using the admin

- * deployment portlet.

- *

- * @author <a href="cdoremus@apache.org">Craig Doremus</a>

- * @see AdminDeploymentPortlet

- *

- */

-public class AdminDeploymentException extends Exception {

-

-	public AdminDeploymentException(String msg) {

-		super(msg);

-	}

-

-	public AdminDeploymentException(Throwable e) {

-		super(e);

-	}

-

-	public AdminDeploymentException(String msg, Throwable e) {

-		super(msg, e);

-	}

-

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/DeployWarAdminService.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/DeployWarAdminService.java
deleted file mode 100644
index edd7d9d..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/DeployWarAdminService.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package org.apache.pluto.driver.services.portal.admin;

-

-import java.io.File;

-

-import org.apache.pluto.util.deploy.DeploymentException;

-

-public interface DeployWarAdminService {

-

-	public void deployWar(File war, boolean configure) throws DeploymentException;

-

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/DriverAdministrationException.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/DriverAdministrationException.java
deleted file mode 100644
index b586afb..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/DriverAdministrationException.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.portal.admin;

-

-import javax.servlet.ServletException;

-

-/**

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:

- * @version 1.0

- * @since Nov 23, 2005

- */

-public class DriverAdministrationException extends ServletException {

-

-    public DriverAdministrationException(String string) {

-        super(string);

-    }

-

-    public DriverAdministrationException(String string, Throwable throwable) {

-        super(string, throwable);

-    }

-

-    public DriverAdministrationException(Throwable cause) {

-        super(cause);

-    }

-

-

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/PortletRegistryAdminService.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/PortletRegistryAdminService.java
deleted file mode 100644
index 2d7bca4..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/PortletRegistryAdminService.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*

- * Copyright 2005-2006 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.portal.admin;

-

-/**

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- * @since Nov 30, 2005

- */

-public interface PortletRegistryAdminService {

-

-    public void addPortletApplication(String portletContext)

-    throws DriverAdministrationException;

-

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/ReassembleWarAdminService.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/ReassembleWarAdminService.java
deleted file mode 100644
index 49a36d2..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/ReassembleWarAdminService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.apache.pluto.driver.services.portal.admin;

-

-import java.io.File;

-

-import org.apache.pluto.util.UtilityException;

-

-

-public interface ReassembleWarAdminService {

-	/**

-	 * 

-	 * @param warFilePath War file to reassemble

-	 * @return Reference to new war file

-	 * @throws UtilityException

-	 */

-	public File reassembleWar(File warFilePath) throws UtilityException ;

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/RenderConfigAdminService.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/RenderConfigAdminService.java
deleted file mode 100644
index d8a9199..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/RenderConfigAdminService.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*

- * Copyright 2005-2006 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.portal.admin;

-

-import org.apache.pluto.driver.services.portal.PageConfig;

-import org.apache.pluto.driver.config.DriverConfigurationException;

-

-/**

- *

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:

- * @version 1.0

- * @since Nov 30, 2005

- */

-public interface RenderConfigAdminService {

-

-    public void addPage(PageConfig config)

-        throws DriverConfigurationException;

-

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/WarUploadAdminService.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/WarUploadAdminService.java
deleted file mode 100644
index 2f4c262..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/WarUploadAdminService.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.apache.pluto.driver.services.portal.admin;

-

-import java.io.File;

-

-import javax.portlet.ActionRequest;

-

-import org.apache.pluto.util.fileupload.FileUploaderException;

-

-public interface WarUploadAdminService {

-

-	/**

-	 * Processes an uploaded file and puts it on the file system in a temporary

-	 * directory (<code>AdminPortletConfig.getInstance().getTempUploadDir()</code>.

-	 * 

-	 * @param req ActionRequest

-	 * @return The uploaded file name.

-	 * @throws AdminPortletException If there is no upload file. This is a RuntimeException that 

-	 * wraps a FileUploaderException, IOException and any other Exception thrown during the processing 

-	 * of the uploaded file.

-	 */

-	public File uploadWar(ActionRequest req) throws FileUploaderException;	

-	

-	/**

-	 * Change the max upload size via a session variable set in the edit mode or configured using Spring.

-	 * 

-	 * @param maxUploadSize

-	 */

-	public void setMaxUploadSize(int maxUploadSize);

-

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/impl/ReassembleWarAdminServiceImpl.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/impl/ReassembleWarAdminServiceImpl.java
deleted file mode 100644
index 3cf38e1..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/impl/ReassembleWarAdminServiceImpl.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package org.apache.pluto.driver.services.portal.admin.impl;

-

-import java.io.File;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.driver.services.portal.admin.ReassembleWarAdminService;

-import org.apache.pluto.util.UtilityException;

-import org.apache.pluto.util.assemble.ReassemblerConfig;

-import org.apache.pluto.util.assemble.WarReassembler;

-

-public class ReassembleWarAdminServiceImpl implements ReassembleWarAdminService {

-

-	private static final Log LOG = LogFactory.getLog(ReassembleWarAdminService.class);

-	private WarReassembler reassembler = null;//reassembly utility

-	/**

-	 * Base directory to do the unzipping for reassembly

-	 */

-	private String unzipBaseDir = System.getProperty("user.home") + "/pluto";

-	/** 

-	 * Destination directory of the reassembled war

-	 */

-	private String destination = System.getProperty("user.home") + "/pluto/war";

-	

-	public ReassembleWarAdminServiceImpl() {

-		super();

-	}

-

-	public File reassembleWar(File warFilePath) throws UtilityException {

-		ReassemblerConfig config = new ReassemblerConfig();

-		config.setRootUnassemblyDir(new File(unzipBaseDir));

-		config.setWarFilePath(warFilePath);

-		File dest = new File(destination);

-		if (!dest.exists()) {

-			dest.mkdirs();

-		}

-		config.setWarDestination(dest);

-		return reassembler.reassemble(config);

-	}

-

-	private String getWarBaseName(File warFilePath) {

-		String baseName = null;

-		String name = warFilePath.getName();

-		baseName = name.substring(0, name.lastIndexOf('.'));

-		if (LOG.isDebugEnabled()) {

-			LOG.debug("Base file name: " + baseName);

-		}

-		return baseName;

-	}

-	public WarReassembler getReassembler() {

-		return reassembler;

-	}

-

-	public void setReassembler(WarReassembler reassembler) {

-		this.reassembler = reassembler;

-	}

-

-	public String getUnzipBaseDir() {

-		return unzipBaseDir;

-	}

-

-	public void setUnzipBaseDir(String unzipBaseDir) {

-		this.unzipBaseDir = unzipBaseDir;

-	}

-

-	public String getDestination() {

-		return destination;

-	}

-

-	public void setDestination(String destination) {

-		this.destination = destination;

-	}

-

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/impl/Tomcat5DeployWarAdminServiceImpl.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/impl/Tomcat5DeployWarAdminServiceImpl.java
deleted file mode 100644
index ef46f35..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/impl/Tomcat5DeployWarAdminServiceImpl.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.apache.pluto.driver.services.portal.admin.impl;

-

-import java.io.File;

-import java.io.FileNotFoundException;

-import java.io.IOException;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.driver.services.portal.admin.DeployWarAdminService;

-import org.apache.pluto.util.deploy.Deployer;

-import org.apache.pluto.util.deploy.DeploymentException;

-import org.apache.pluto.util.deploy.Undeployer;

-import org.apache.pluto.util.deploy.file.Tomcat5FileSystemDeployer;

-import org.apache.pluto.util.deploy.file.TomcatDeploymentConfig;

-import org.apache.pluto.util.deploy.http.HttpTomcatDeployer;

-import org.apache.pluto.util.install.file.TomcatCrossContextGenerator;

-

-public class Tomcat5DeployWarAdminServiceImpl implements DeployWarAdminService {

-

-	private static final Log LOG = LogFactory.getLog(TomcatDeploymentConfig.class);

-	

-	private Deployer deployer = null;//configure with Spring

-	private Undeployer undeployer = null;//configure with Spring

-	private String tomcatService = "Catalina";//configure with Spring

-	private String host = "localhost";//configure with Spring

-	private String port = "8080";//configure with Spring

-	private String protocol = "http";//configure with Spring

-	private String tomcatHome = System.getProperty("catalina.home");//configure with Spring

-

-	

-	public Tomcat5DeployWarAdminServiceImpl() {

-		super();

-	}

-	/* (non-Javadoc)

-	 * @see org.apache.pluto.driver.services.portal.admin.DeployWarAdminService#deployWar(java.io.File)

-	 */

-	public void deployWar(File war, boolean configure)  throws DeploymentException{

-		String strWar = war.getAbsolutePath();

-		if (LOG.isDebugEnabled()) {

-			LOG.debug("New War to deploy:" + strWar);

-		}

-		String warName = strWar.substring(strWar.lastIndexOf(File.separator) +1);

-		String deploymentName = warName.substring(0, warName.lastIndexOf('.'));

-		// 

-		TomcatDeploymentConfig config = new TomcatDeploymentConfig(deploymentName);

-		//is the war configured already or is it a redeployment?

-		config.setConfigured(configure);

-		config.setDeploymentName(deploymentName);

-		//Add other info for deployment

-		config.addDeploymentProperty("tomcat.home", tomcatHome);

-		config.addDeploymentProperty("tomcat.service", tomcatService);

-		config.addDeploymentProperty("tomcat.host", host);

-		config.addDeploymentProperty("tomcat.port", port);		

-		config.addDeploymentProperty("tomcat.protocol", protocol);

-				

-		undeployer = new HttpTomcatDeployer();

-		deployer = new Tomcat5FileSystemDeployer();

-		

-		

-		try { 

-			undeployer.undeploy(config, war);

-			deployer.deploy(config, war);

-		} catch (FileNotFoundException e) {

-			DeploymentException de = new DeploymentException("War file cannot be found");

-			de.initCause(e);

-			throw de;

-		} catch (IOException e) {

-			DeploymentException de = new DeploymentException("Generic I/O issue with war file");

-			de.initCause(e);

-			throw de;

-		} 

-	}

-	

-	public String getHost() {

-		return host;

-	}

-	public void setHost(String host) {

-		this.host = host;

-	}

-	public String getTomcatHome() {

-		return tomcatHome;

-	}

-	public void setTomcatHome(String tomcatHome) {

-		this.tomcatHome = tomcatHome;

-	}

-	public String getTomcatService() {

-		return tomcatService;

-	}

-	public void setTomcatService(String tomcatService) {

-		this.tomcatService = tomcatService;

-	}

-	public Deployer getDeployer() {

-		return deployer;

-	}

-	public void setDeployer(Deployer deployer) {

-		this.deployer = deployer;

-	}

-	public String getPort() {

-		return port;

-	}

-	public void setPort(String port) {

-		this.port = port;

-	}

-	public String getProtocol() {

-		return protocol;

-	}

-	public void setProtocol(String protocol) {

-		this.protocol = protocol;

-	}

-	public Undeployer getUndeployer() {

-		return undeployer;

-	}

-	public void setUndeployer(Undeployer undeployer) {

-		this.undeployer = undeployer;

-	}

-	

-

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/impl/WarUploadAdminServiceImpl.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/impl/WarUploadAdminServiceImpl.java
deleted file mode 100644
index 17bd4c3..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/impl/WarUploadAdminServiceImpl.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package org.apache.pluto.driver.services.portal.admin.impl;

-

-import java.io.File;

-

-import javax.portlet.ActionRequest;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.driver.services.portal.admin.WarUploadAdminService;

-import org.apache.pluto.util.fileupload.FileUploaderConfig;

-import org.apache.pluto.util.fileupload.FileUploader;

-import org.apache.pluto.util.fileupload.FileUploaderException;

-

-/**

- * Uploads the war using a <code>FileUploader</code> utility.

- *

- * @author <a href="cdoremus@apache.org">Craig Doremus</a>

- * @see FileUploader

- */

-public class WarUploadAdminServiceImpl implements WarUploadAdminService {

-

-	public static final Log LOG = LogFactory.getLog(WarUploadAdminServiceImpl.class);

-	/**

-	 * Implementation of FileUploader utility used to upload

-	 * file, which can be configured using Spring. 

-	 */

-	FileUploader fileUploader = null;//configure with Spring

-	/**

-	 * Directory to upload the war to, which should be configured

-	 * by Spring. By default, it is a .pluto directory underneath

-	 * the user's home directory.

-	 */

-	String uploadDir = System.getProperty("user.home") + "/pluto";

-	/**

-	 * Maximum size of file upload in megabytes, which should be configured

-	 * by String. By default it is 10 megabytes.

-	 */

-	int maxUploadSize = 10;//configure with Spring

-	

-	public WarUploadAdminServiceImpl() {

-		super();

-	}

-	

-	/**

-	 * Uploads the war using a FileUploader implementation.

-	 * 

-	 * @param request The portlet request

-	 * @return Pointer to the uploaded file

-	 */

-	public File uploadWar(ActionRequest request) throws FileUploaderException {

-		File uploadedFile = null;

-		if (fileUploader == null) {

-			throw new FileUploaderException("FileUploader is null. Please check Spring configuration.");

-		}

-		FileUploaderConfig config = new FileUploaderConfig();

-		config.setMaxUploadSize(maxUploadSize * 1000000);

-		File fUploadDir = new File(uploadDir);

-		if (!fUploadDir.exists()) {

-			fUploadDir.mkdir();

-		}

-		config.setUploadPath(fUploadDir);

-		uploadedFile = fileUploader.upload(request,config);

-		if (LOG.isDebugEnabled()) {

-			LOG.debug("Uploaded file: " + uploadedFile.getAbsolutePath());

-		}

-		return uploadedFile;

-	}

-	

-	/**

-	 * @return the maxUploadSize

-	 */

-	public int getMaxUploadSize() {

-		return maxUploadSize;

-	}

-	

-	/**

-	 * @param maxUploadSize the maxUploadSize to set

-	 */

-	public void setMaxUploadSize(int maxUploadSize) {

-		this.maxUploadSize = maxUploadSize;

-	}

-	

-	/**

-	 * @return the uploadDir

-	 */

-	public String getUploadDir() {

-		return uploadDir;

-	}

-	

-	/**

-	 * @param uploadDir the uploadDir to set

-	 */

-	public void setUploadDir(String uploadDir) {

-		this.uploadDir = uploadDir;

-	}

-	

-	/**

-	 * @return the fileUploader

-	 */

-	public FileUploader getFileUploader() {

-		return fileUploader;

-	}

-	

-	/**

-	 * @param fileUploader the fileUploader to set

-	 */

-	public void setFileUploader(FileUploader fileUploader) {

-		this.fileUploader = fileUploader;

-	}

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/IsMaximizedTag.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/IsMaximizedTag.java
deleted file mode 100644
index c835bce..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/IsMaximizedTag.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.apache.pluto.driver.tags;
-
-import org.apache.pluto.driver.core.PortalRequestContext;
-import org.apache.pluto.driver.url.PortalURL;
-
-import javax.servlet.jsp.tagext.TagSupport;
-import javax.servlet.jsp.JspException;
-import javax.servlet.http.HttpServletRequest;
-import javax.portlet.WindowState;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * Created by IntelliJ IDEA.
- * User: ddewolf
- * Date: Sep 4, 2006
- * Time: 9:27:35 PM
- * To change this template use File | Settings | File Templates.
- */
-public class IsMaximizedTag extends TagSupport {
-
-    private String var;
-
-    public int doStartTag() throws JspException {
-        PortalRequestContext portalEnv = PortalRequestContext.getContext(
-                (HttpServletRequest) pageContext.getRequest());
-
-        PortalURL portalURL = portalEnv.getRequestedPortalURL();
-
-        // Check if someone else is maximized. If yes, don't show content.
-        Map windowStates = portalURL.getWindowStates();
-        for (Iterator it = windowStates.values().iterator(); it.hasNext();) {
-            WindowState windowState = (WindowState) it.next();
-            if (WindowState.MAXIMIZED.equals(windowState)) {
-                pageContext.setAttribute(var, Boolean.TRUE);
-                break;
-            }
-        }
-        return SKIP_BODY;
-    }
-
-    public String getVar() {
-        return var;
-    }
-
-    public void setVar(String var) {
-        this.var = var;
-    }
-
-}
diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/PortletModeAnchorTag.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/PortletModeAnchorTag.java
deleted file mode 100644
index 1944f53..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/PortletModeAnchorTag.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Copyright 2006 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.driver.tags;
-
-import java.io.IOException;
-
-import javax.portlet.PortletMode;
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.JspWriter;
-import javax.servlet.jsp.tagext.BodyTagSupport;
-import javax.servlet.jsp.tagext.TagSupport;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.pluto.driver.AttributeKeys;
-import org.apache.pluto.driver.config.DriverConfiguration;
-import org.apache.pluto.driver.core.PortalRequestContext;
-import org.apache.pluto.driver.services.portal.PortletWindowConfig;
-import org.apache.pluto.driver.url.PortalURL;
-import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager;
-
-/**
- * The tag is used to render a portlet mode anchor specified by the portlet ID and mode.
- * This is designed to live inside of a <pluto:portlet/> tag.
- * 
- * <pluto:modeAnchor portletId="" portletMode="edit"/>
- *
- * @author <a href="mailto:esm@apache.org">Elliot Metsger</a>
- * @author <a href="mailto:cdoremus@apache.org">Craig Doremus</a>
- * @todo Test supported Window States using a version of ActionResponseImpl.isWindowStateAllowed()
- */
-public class PortletModeAnchorTag extends BodyTagSupport {
-    
-    /** Logger. */
-    private static final Log LOG = LogFactory.getLog(PortletModeAnchorTag.class);
-        
-    
-    // Private Member Variables ------------------------------------------------
-    private String portletMode = null;
-    
-    /** The portlet ID attribute obtained from parent tag. */
-    private String portletId = null;
-    
-    /** The evaluated value of the portlet ID attribute. */
-    private String evaluatedPortletId = null;       
-    
-    // BodyTagSupport Impl -----------------------------------------------------
-    
-    /**
-     * Method invoked when the start tag is encountered.
-     * @throws JspException  if an error occurs.
-     */
-    public int doStartTag() throws JspException {
-        
-        // Ensure that the modeAnchor tag resides within a portlet tag.
-        PortletTag parentTag = (PortletTag) TagSupport.findAncestorWithClass(
-                this, PortletTag.class);
-        if (parentTag == null) {
-            throw new JspException("Portlet window controls may only reside "
-                    + "within a pluto:portlet tag.");
-        }
-        
-        portletId = parentTag.getPortletId();        
-        // Evaluate portlet ID attribute.
-        evaluatePortletId();
-        
-        // Retrieve the portlet window config for the evaluated portlet ID.
-        ServletContext servletContext = pageContext.getServletContext();
-        DriverConfiguration driverConfig = (DriverConfiguration)
-                servletContext.getAttribute(AttributeKeys.DRIVER_CONFIG);
-        PortletWindowConfig windowConfig = driverConfig
-                .getPortletWindowConfig(evaluatedPortletId);
-       
-        if (isPortletModeAllowed(driverConfig, windowConfig, portletMode)) {
-            // Retrieve the portal environment.
-            PortalRequestContext portalEnv = PortalRequestContext.getContext(
-                    (HttpServletRequest) pageContext.getRequest());        
-
-            PortalURL portalUrl =  portalEnv.createPortalURL();
-            portalUrl.setPortletMode(evaluatedPortletId, new PortletMode(portletMode));
-
-            // Print the mode anchor tag.
-            try {
-                JspWriter out = pageContext.getOut();
-                out.print("<a href=\"");
-                out.print(portalUrl.toString());
-                out.print("\">");
-                out.print("<span class=\"");
-                out.print(portletMode);
-                out.print("\"></span></a>");
-            } catch (IOException ex) {
-                throw new JspException(ex);
-            }
-        }
-        
-        
-        // Continue to evaluate the tag body.
-        return EVAL_BODY_INCLUDE;
-    }
-    
-    
-    // Package Methods ---------------------------------------------------------
-    
-    /**
-     * Returns the evaluated portlet ID.
-     * @return the evaluated portlet ID.
-     */
-    String getEvaluatedPortletId() {
-        return evaluatedPortletId;
-    }
-
-    
-    
-    // Private Methods ---------------------------------------------------------
-    
-    /**
-     * Evaluates the portlet ID attribute passed into this tag. This method
-     * evaluates the member variable <code>portletId</code> and saves the
-     * evaluated result to <code>evaluatedPortletId</code>
-     * @throws JspException  if an error occurs.
-     */
-    private void evaluatePortletId() throws JspException {
-        Object obj = ExpressionEvaluatorManager.evaluate(
-                "portletId", portletId, String.class, this, pageContext);
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Evaluated portletId to: " + obj);
-        }
-        evaluatedPortletId = (String) obj;
-    }
-
-    /**
-     * @return the portletMode
-     */
-    public String getPortletMode() {
-        return portletMode;
-    }
-
-    /**
-     * @param portletMode the portletMode to set
-     */
-    public void setPortletMode(String portletMode) {
-        this.portletMode = portletMode;
-    }
-    
-    private boolean isPortletModeAllowed(DriverConfiguration config, PortletWindowConfig window, String mode) {
-        LOG.debug("Testing if PortletWindowConfig [" + Integer.toHexString(window.hashCode()) + "] supports mode [" + mode + "]");
-        return config.isPortletModeSupported(getEvaluatedPortletId(), mode);       
-    }
-
-    
-}
\ No newline at end of file
diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/PortletPortalURLTag.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/PortletPortalURLTag.java
deleted file mode 100644
index db42529..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/PortletPortalURLTag.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.tags;

-

-import java.io.IOException;

-

-import javax.portlet.PortletMode;

-import javax.portlet.WindowState;

-import javax.servlet.http.HttpServletRequest;

-import javax.servlet.jsp.JspException;

-import javax.servlet.jsp.tagext.BodyTagSupport;

-import javax.servlet.jsp.tagext.TagSupport;

-

-import org.apache.pluto.driver.url.PortalURL;

-import org.apache.pluto.driver.core.PortalRequestContext;

-

-/**

- * The portlet URL tag is used to generate portal URL pointing to the current

- * portlet with specified portlet mode and window state.

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- * @since Oct 4, 2004

- */

-public class PortletPortalURLTag extends BodyTagSupport {

-

-    // Private Member Variables ------------------------------------------------

-

-    /** The window state to be encoded in the portal URL. */

-    private String windowState = null;

-

-    /** The portlet mode to be encoded in the portal URL. */

-    private String portletMode = null;

-

-

-    // Tag Attribute Accessors -------------------------------------------------

-

-    public String getWindowState() {

-        return windowState;

-    }

-

-    public void setWindowState(String windowState) {

-        this.windowState = windowState;

-    }

-

-    public String getPortletMode() {

-        return portletMode;

-    }

-

-    public void setPortletMode(String portletMode) {

-        this.portletMode = portletMode;

-    }

-

-

-    // BodyTagSupport Impl -----------------------------------------------------

-

-    /**

-     * Creates the portal URL pointing to the current portlet with specified

-     * portlet mode and window state, and print the URL to the page.

-     * @see PortletTag

-     */

-    public int doStartTag() throws JspException {

-

-        // Ensure that the portlet render tag resides within a portlet tag.

-        PortletTag parentTag = (PortletTag) TagSupport.findAncestorWithClass(

-                this, PortletTag.class);

-        if (parentTag == null) {

-            throw new JspException("Portlet window controls may only reside "

-                    + "within a pluto:portlet tag.");

-        }

-

-        // Create portal URL.

-        HttpServletRequest request = (HttpServletRequest)

-                pageContext.getRequest();

-

-        PortalRequestContext ctx = (PortalRequestContext)

-            request.getAttribute(PortalRequestContext.REQUEST_KEY);

-

-        PortalURL portalUrl =  ctx.createPortalURL();

-

-        // Encode window state of the current portlet in the portal URL.

-        String portletId = parentTag.getEvaluatedPortletId();

-        if (windowState != null) {

-            portalUrl.setWindowState(portletId, new WindowState(windowState));

-        }

-

-        // Encode portlet mode of the current portlet in the portal URL.

-        if (portletMode != null) {

-            portalUrl.setPortletMode(portletId, new PortletMode(portletMode));

-        }

-

-        // Print the portal URL as a string to the page.

-        try {

-            pageContext.getOut().print(portalUrl.toString());

-        } catch (IOException ex) {

-            throw new JspException(ex);

-        }

-

-        // Skip the tag body.

-        return SKIP_BODY;

-    }

-

-

-}

-

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/PortletRenderTag.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/PortletRenderTag.java
deleted file mode 100644
index 557590b..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/PortletRenderTag.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.tags;

-

-import java.io.IOException;

-import java.io.PrintWriter;

-

-import javax.servlet.jsp.JspException;

-import javax.servlet.jsp.tagext.TagSupport;

-

-/**

- * The portlet render tag is used to print portlet rendering result (or error

- * details) to the page.

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since Oct 4, 2004

- */

-public class PortletRenderTag extends TagSupport {

-	

-	// TagSupport Impl ---------------------------------------------------------

-	

-	/**

-	 * 

-	 * @see PortletTag

-	 */

-    public int doEndTag() throws JspException {

-    	

-    	// Ensure that the portlet render tag resides within a portlet tag.

-        PortletTag parentTag = (PortletTag) TagSupport.findAncestorWithClass(

-        		this, PortletTag.class);

-        if (parentTag == null) {

-            throw new JspException("Portlet render tag may only reside "

-            		+ "within a pluto:portlet tag.");

-        }

-        

-        // If the portlet is rendered successfully, print the rendering result.

-        if (parentTag.getStatus() == PortletTag.SUCCESS) {

-            try {

-                StringBuffer buffer = parentTag.getPortalServletResponse()

-                		.getInternalBuffer().getBuffer();

-                pageContext.getOut().print(buffer.toString());

-            } catch (IOException ex) {

-                throw new JspException(ex);

-            }

-        }

-        // Otherwise, print the error stack trace.

-        else {

-            try {

-                pageContext.getOut().print("Error rendering portlet.");

-                pageContext.getOut().print("<pre>");

-                parentTag.getThrowable().printStackTrace(

-                		new PrintWriter(pageContext.getOut()));

-                pageContext.getOut().print("</pre>");

-            } catch (IOException ex) {

-                throw new JspException(ex);

-            }

-        }

-        

-        // Return.

-        return SKIP_BODY;

-    }

-

-

-}

-

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/PortletTag.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/PortletTag.java
deleted file mode 100644
index 253beb6..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/PortletTag.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.tags;

-

-import java.util.Iterator;

-import java.util.Map;

-

-import javax.portlet.WindowState;

-import javax.servlet.ServletContext;

-import javax.servlet.http.HttpServletRequest;

-import javax.servlet.http.HttpServletResponse;

-import javax.servlet.jsp.JspException;

-import javax.servlet.jsp.tagext.BodyTagSupport;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.PortletContainer;

-import org.apache.pluto.PortletWindow;

-import org.apache.pluto.driver.AttributeKeys;

-import org.apache.pluto.driver.services.portal.PortletWindowConfig;

-import org.apache.pluto.driver.url.PortalURL;

-import org.apache.pluto.driver.config.DriverConfiguration;

-import org.apache.pluto.driver.core.PortalRequestContext;

-import org.apache.pluto.driver.core.PortalServletRequest;

-import org.apache.pluto.driver.core.PortalServletResponse;

-import org.apache.pluto.driver.core.PortletWindowImpl;

-import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager;

-

-/**

- * The portlet tag is used to render a portlet specified by the portlet ID.

- * 

- * @see javax.portlet.Portlet#render(RenderRequest, RenderResponse)

- * @see org.apache.pluto.PortletContainer#doRender(PortletWindow, HttpServletRequest, HttpServletResponse)

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class PortletTag extends BodyTagSupport {

-	

-	/** Logger. */

-    private static final Log LOG = LogFactory.getLog(PortletTag.class);

-    

-    /** Status constant for failed rendering. */

-    public static final int FAILED = 0;

-    

-    /** Status constant for successful rendering. */

-    public static final int SUCCESS = 1;

-    

-    

-    // Private Member Variables ------------------------------------------------

-    

-    /** The portlet ID attribute passed into this tag. */

-    private String portletId = null;

-    

-    /** The evaluated value of the portlet ID attribute. */

-    private String evaluatedPortletId = null;

-    

-    /** The cached portal servlet response holding rendering result. */

-    private PortalServletResponse response = null;

-    

-    /** The cached rendering status: SUCCESS or FAILED. */

-    private int status;

-    

-    /** The cached Throwable instance when fail to render the portlet. */

-    private Throwable throwable = null;

-    

-    

-    // Tag Attribute Accessors -------------------------------------------------

-    

-    /**

-     * Returns the portlet ID attribute.

-     * @return the portlet ID attribute.

-     */

-    public String getPortletId() {

-        return portletId;

-    }

-    

-    /**

-     * Sets the portlet ID attribute.

-     * @param portletId  the portlet ID attribute.

-     */

-    public void setPortletId(String portletId) {

-        this.portletId = portletId;

-    }

-    

-    

-    // BodyTagSupport Impl -----------------------------------------------------

-    

-    /**

-     * Method invoked when the start tag is encountered.

-     * @throws JspException  if an error occurs.

-     */

-    public int doStartTag() throws JspException {

-        

-    	// Evaluate portlet ID attribute.

-    	evaluatePortletId();

-        

-    	// Retrieve the portlet window config for the evaluated portlet ID.

-        ServletContext servletContext = pageContext.getServletContext();

-        DriverConfiguration driverConfig = (DriverConfiguration)

-            	servletContext.getAttribute(AttributeKeys.DRIVER_CONFIG);

-        PortletWindowConfig windowConfig = driverConfig

-        		.getPortletWindowConfig(evaluatedPortletId);

-        if (LOG.isDebugEnabled()) {

-            LOG.debug("Rendering Portlet Window: " + windowConfig);

-        }

-        

-        // Retrieve the current portal URL.

-        PortalRequestContext portalEnv = PortalRequestContext.getContext(

-                (HttpServletRequest) pageContext.getRequest());

-        PortalURL portalURL = portalEnv.getRequestedPortalURL();

-        

-        // Create the portlet window to render.

-        PortletWindow window = new PortletWindowImpl(windowConfig, portalURL);

-        

-        // Check if someone else is maximized. If yes, don't show content.

-        Map windowStates = portalURL.getWindowStates();

-        for (Iterator it = windowStates.keySet().iterator(); it.hasNext(); ) {

-            String windowId = (String) it.next();

-            WindowState windowState = (WindowState) windowStates.get(windowId);

-            if (WindowState.MAXIMIZED.equals(windowState)

-            		&& !window.getId().getStringId().equals(windowId)) {

-                return SKIP_BODY;

-            }

-        }

-        

-        // Create portal servlet request and response to wrap the original

-        // HTTP servlet request and response.

-        PortalServletRequest portalRequest = new PortalServletRequest(

-        		(HttpServletRequest) pageContext.getRequest(), window);

-        PortalServletResponse portalResponse = new PortalServletResponse(

-                (HttpServletResponse) pageContext.getResponse());

-        

-        // Retrieve the portlet container from servlet context.

-        PortletContainer container = (PortletContainer)

-            	servletContext.getAttribute(AttributeKeys.PORTLET_CONTAINER);

-        

-        // Render the portlet and cache the response.

-        try {

-            container.doRender(window, portalRequest, portalResponse);

-            response = portalResponse;

-            status = SUCCESS;

-        } catch (Throwable th) {

-            status = FAILED;

-            throwable = th;

-        }

-        

-        // Continue to evaluate the tag body.

-        return EVAL_BODY_INCLUDE;

-    }

-    

-    

-    // Package Methods ---------------------------------------------------------

-    

-    /**

-     * Returns the rendering status.

-     * @return the rendering status.

-     */

-    int getStatus() {

-        return status;

-    }

-    

-    /**

-     * Returns the portal servlet response holding rendering result. 

-     * @return the portal servlet response holding rendering result.

-     */

-    PortalServletResponse getPortalServletResponse() {

-        return response;

-    }

-    

-    /**

-     * Returns the error that has occurred when rendering portlet.

-     * @return the error that has occurred when rendering portlet.

-     */

-    Throwable getThrowable() {

-        return throwable;

-    }

-    

-    /**

-     * Returns the evaluated portlet ID.

-     * @return the evaluated portlet ID.

-     */

-    String getEvaluatedPortletId() {

-        return evaluatedPortletId;

-    }

-

-    

-    

-    // Private Methods ---------------------------------------------------------

-    

-    /**

-     * Evaluates the portlet ID attribute passed into this tag. This method

-     * evaluates the member variable <code>portletId</code> and saves the

-     * evaluated result to <code>evaluatedPortletId</code>

-     * @throws JspException  if an error occurs.

-     */

-    private void evaluatePortletId() throws JspException {

-        Object obj = ExpressionEvaluatorManager.evaluate(

-        		"portletId", portletId, String.class, this, pageContext);

-        if (LOG.isDebugEnabled()) {

-            LOG.debug("Evaluated portletId to: " + obj);

-        }

-        evaluatedPortletId = (String) obj;

-    }

-    

-}

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/PortletTitleTag.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/PortletTitleTag.java
deleted file mode 100644
index 5350c75..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/PortletTitleTag.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.tags;

-

-import java.io.IOException;

-

-import javax.servlet.jsp.JspException;

-import javax.servlet.jsp.tagext.TagSupport;

-

-import org.apache.pluto.driver.AttributeKeys;

-

-/**

- * The portlet title tag is used to print the dynamic portlet title to the page.

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- * @since Oct 4, 2004

- */

-public class PortletTitleTag extends TagSupport {

-	

-	// TagSupport Impl ---------------------------------------------------------

-	

-	/**

-     * Method invoked when the start tag is encountered. This method retrieves

-     * the portlet title and print it to the page.

-     * 

-	 * @see org.apache.pluto.services.PortalCallbackService#setTitle(HttpServletRequest, PortletWindow, String)

-	 * @see org.apache.pluto.driver.services.container.PortalCallbackServiceImpl#setTitle(HttpServletRequest, PortletWindow, String)

-	 * 

-	 * @throws JspException

-	 */

-    public int doStartTag() throws JspException {

-    	

-    	// Ensure that the portlet title tag resides within a portlet tag.

-        PortletTag parentTag = (PortletTag) TagSupport.findAncestorWithClass(

-        		this, PortletTag.class);

-        if (parentTag == null) {

-            throw new JspException("Portlet title tag may only reside "

-            		+ "within a pluto:portlet tag.");

-        }

-        

-        // Print out the portlet title to page.

-        try {

-            pageContext.getOut().print(pageContext.getRequest().getAttribute(

-            		AttributeKeys.PORTLET_TITLE));

-        } catch (IOException ex) {

-            throw new JspException(ex);

-        }

-        return SKIP_BODY;

-    }

-}

-

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/PortletUiMessageTag.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/PortletUiMessageTag.java
deleted file mode 100644
index dfa3133..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/PortletUiMessageTag.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*

- * Copyright 2006 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.tags;

-

-import java.io.IOException;

-import java.io.PrintWriter;

-import java.util.MissingResourceException;

-import java.util.ResourceBundle;

-

-import javax.portlet.PortletRequest;

-import javax.portlet.PortletSession;

-import javax.servlet.jsp.JspException;

-import javax.servlet.jsp.JspTagException;

-import javax.servlet.jsp.JspWriter;

-import javax.servlet.jsp.tagext.TagSupport;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.Constants;

-import org.apache.pluto.driver.AttributeKeys;

-import org.apache.pluto.util.ui.PortletUiMessage;

-

-/**

- * Tag to print an error, info, alert, status or success message in a portlet

- * as defined by Cascading Syle Sheet classes in Appendix PLT C of the

- * Java Portlet Specification (JSR-168) version 1.0 (pg 116).

- * <p>

- * This class uses the PortletUiMessage to encapsulates message information. 

- * Messages are wrapped in a &lt;div&gt; element containing a 'class' attribute with a

- * spec-defined CSS value, which assumes these are defined in a CSS style

- * sheet used by the JSP page. Right now this class can only handle one

- * message per JSP page. Error information can be found in the

- * Throwable member of the PortletUiMessage class. If this is non-null,

- * the stack trace will be displayed in an HTML comment.

- * </p>

- * <p>

- * There are two ways a message can be displayed using this tag:<br/>

- * 1. Use the tag's message attribute on the JSP page to set the message

- * as a String or expression that evaluates to a String. Optionally, the

- * message can be a key to a value in a ResourceBundle. If so, the

- * bundle attribute must be set to the ResourceBundle where the message

- * can be found.<br/>

- * 2. Put a message in the portlet session encapsulated in a PortletMessage

- * object with a AttributeKeys.PORTLET_MSG key ("protlet_msg"). This class

- * takes care of getting the attribute from the session.<br/>

- * </p>

- *

- * @author <a href=mailto:cdoremus@apache.org>Craig Doremus</a>

- * 

- * @see PortletUiMessage

- * @see PortletUiMessageType

- */

-public class PortletUiMessageTag extends TagSupport {

-	private static final Log LOG = LogFactory.getLog(PortletUiMessage.class);

-	private String message = null;

-	/* User-defined CSS class */

-	private String cssClass = "portlet-msg-info";

-	private String bundle = "AdminDeploymentPortlet";

-	

-	/************ JSR-168 defined CSS classes for messages ************/

-	/** CSS class for Error messages. Example: Portlet not available*/

-	public static final String MSG_ERROR_CSS_CLASS = "portlet-msg-error";

-	/** CSS class for Help messages, general additional information, etc. Example: Info about */

-	public static final String MSG_INFO_CSS_CLASS = "portlet-msg-info";

-	/** CSS class for Status of the current operation. Example: Progress: 80% */

-	public static final String MSG_STATUS_CSS_CLASS = "portlet-msg-status";

-	/** CSS class for Warning messages. Example: Timeout occurred, try again later */

-	public static final String MSG_ALERT_CSS_CLASS = "portlet-msg-alert";

-	/** CSS class for Verification of the successful completion of a task. Example: Operation completed successfully */

-	public static final String MSG_SUCCESS_CSS_CLASS = "portlet-msg-success";

-	/* ************************************************************* */

-

-	/**

-	 * Does the work of the tag.

-	 */

-	public int doStartTag()	throws JspException {

-

-	    PortletRequest request = (PortletRequest)pageContext.getRequest().getAttribute(Constants.PORTLET_REQUEST);

-	    PortletSession session = request.getPortletSession();

-	    PortletUiMessage oMsg = (PortletUiMessage)session.getAttribute(AttributeKeys.PORTLET_MSG);

-		session.removeAttribute(AttributeKeys.PORTLET_MSG);

-	    Throwable error = null;

-	    if (oMsg != null) {

-	        error = oMsg.getException();

-	    }

-	

-	    try {

-	      final String NL = System.getProperty("line.separator");	

-	      JspWriter out = pageContext.getOut();

-	      if (oMsg != null) {

-	          message = oMsg.getMessage();    	  

-	      }

-	      //print out message

-	      if (message != null ) {

-	    	//First, check resource bundle using 'message' as the key

-	    	  boolean bundleFound = false;

-	    	  try {

-				ResourceBundle rb = ResourceBundle.getBundle(bundle);

-				bundleFound = true;

-				message = rb.getString(message);

-			} catch (MissingResourceException e) {

-				if (bundleFound) {

-					if (LOG.isWarnEnabled()) {

-						LOG.warn("Missing resource from ResourceBundle '" + bundle + "'. Key used: " + message);											

-					}

-				} else {

-					if (LOG.isWarnEnabled()) {

-						LOG.warn("Missing ResourceBundle '" + bundle + "'.");						

-					}

-				}

-			}

-	    	//Get css class 

-	      	if (oMsg != null && oMsg.getCssClass() != null) {

-	      		cssClass = oMsg.getCssClass();

-	      	}

-		      	out.print(wrapHtml(message, cssClass));

-	      }  	

-		    //print out error info if present  	

-	      	if (error != null ) {

-		    	StringBuffer sb = new StringBuffer();

-		    	sb.append(error.getMessage());

-		        if (error.getCause() != null) {

-		        	sb.append("<br>Underlying Exception cause: ");

-		  	    	sb.append(error.getCause().getMessage());

-		        }

-	        out.print(wrapHtml(sb.toString(), MSG_ERROR_CSS_CLASS));

-	        //print out the stack trace in an HTML comment

-	       	out.println("<!-- " + NL);

-	        PrintWriter writer = new PrintWriter(out, true);

-	        error.printStackTrace(writer);

-	       	out.print(NL + "-->");

-		    } 

-	    } catch (IOException e) {

-	    	String msg = "Problem in PortletUiMessageTag";

-	    	LOG.error(msg, e);

-	    	JspTagException jte = new JspTagException(msg);

-	    	jte.initCause(e);

-	    	throw jte;

-	    }

-		return SKIP_BODY;

-	}

-

-	private String wrapHtml(String msg, String css){

-		StringBuffer sb = new StringBuffer();

-		sb.append("<div class=\"" + css + "\">");

-	    sb.append(msg);

-	    sb.append("</div>");

-	    return sb.toString();

-	}

-

-	/**

-	 * @param message The error message

-	 */

-	public void setMessage(String message) {

-		this.message = message;

-	}

-

-	/**

-	 * @param cssClass The cssClass to set.

-	 */

-	public void setCssClass(String cssClass) {

-		this.cssClass = cssClass;

-	}

-

-	public void setBundle(String bundle) {

-		this.bundle = bundle;

-	}

-}
\ No newline at end of file
diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURL.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURL.java
deleted file mode 100644
index 3b677df..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURL.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.apache.pluto.driver.url;
-
-import javax.portlet.PortletMode;
-import javax.portlet.WindowState;
-import java.util.Collection;
-import java.util.Map;
-
-/**
- * Created by IntelliJ IDEA.
- * User: ddewolf
- * Date: Sep 4, 2006
- * Time: 5:17:34 PM
- * To change this template use File | Settings | File Templates.
- */
-public interface PortalURL extends Cloneable {
-    void setRenderPath(String renderPath);
-
-    String getRenderPath();
-
-    void addParameter(PortalURLParameter param);
-
-    Collection getParameters();
-
-    void setActionWindow(String actionWindow);
-
-    String getActionWindow();
-
-    Map getPortletModes();
-
-    PortletMode getPortletMode(String windowId);
-
-    void setPortletMode(String windowId, PortletMode portletMode);
-
-    Map getWindowStates();
-
-    WindowState getWindowState(String windowId);
-
-    void setWindowState(String windowId, WindowState windowState);
-
-    void clearParameters(String windowId);
-
-    String toString();
-
-    String getServerURI();
-
-    String getServletPath();
-
-    Object clone();
-}
diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURLParameter.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURLParameter.java
deleted file mode 100644
index 34661f8..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURLParameter.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.url;

-

-/**

- * The portal URL parameter.

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- * @since Sep 30, 2004

- */

-public class PortalURLParameter {

-

-

-    private String window;

-    private String name;

-    private String[] values;

-

-    public PortalURLParameter(String window, String name, String value) {

-        this.window = window;

-        this.name = name;

-        this.values = new String[]{value};

-    }

-

-    public PortalURLParameter(String window, String name, String[] values) {

-        this.window = window;

-        this.name = name;

-        this.values = values;

-    }

-

-    public String getName() {

-        return name;

-    }

-

-    public void setName(String name) {

-        this.name = name;

-    }

-

-    public String[] getValues() {

-        return values;

-    }

-

-    public void setValues(String[] values) {

-        this.values = values;

-    }

-

-    public String getWindowId() {

-        return window;

-    }

-

-}

-

diff --git a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURLParser.java b/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURLParser.java
deleted file mode 100644
index d6de748..0000000
--- a/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURLParser.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.apache.pluto.driver.url;
-
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * Created by IntelliJ IDEA.
- * User: ddewolf
- * Date: Sep 4, 2006
- * Time: 5:49:37 PM
- * To change this template use File | Settings | File Templates.
- */
-public interface PortalURLParser {
-    PortalURL parse(HttpServletRequest request);
-
-    String toString(PortalURL portalURL);
-}
diff --git a/trunk/pluto-portal-driver/src/main/resources/pluto-portal-driver-config.xsd b/trunk/pluto-portal-driver/src/main/resources/pluto-portal-driver-config.xsd
deleted file mode 100644
index 6b4b8b2..0000000
--- a/trunk/pluto-portal-driver/src/main/resources/pluto-portal-driver-config.xsd
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0"?>

-<!--

-	Copyright 2005-2006 The Apache Software Foundation

-	

-	Licensed under the Apache License, Version 2.0 (the "License");

-	you may not use this file except in compliance with the License.

-	You may obtain a copy of the License at

-	

-	http://www.apache.org/licenses/LICENSE-2.0

-	

-	Unless required by applicable law or agreed to in writing, software

-	distributed under the License is distributed on an "AS IS" BASIS,

-	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-	See the License for the specific language governing permissions and

-	limitations under the License.

--->

-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

-	targetNamespace="http://portals.apache.org/pluto/xsd/pluto-portal-driver-config.xsd"

-	elementFormDefault="qualified">

-

-	<xs:element name="pluto-portal-driver">

-		<xs:complexType>

-			<xs:sequence>

-				<xs:element name="portal-name" type="xs:string"

-					default="pluto-portal-driver" />

-				<xs:element name="portal-version" type="xs:string" />

-				<xs:element name="container-name" type="xs:string" />

-

-				<xs:element name="supports">

-					<xs:complexType>

-						<xs:sequence>

-							<xs:element name="portlet-mode"

-								type="xs:string" minOccurs="1" maxOccurs="unbounded" />

-							<xs:element name="window-state"

-								type="xs:string" minOccurs="1" maxOccurs="unbounded" />

-						</xs:sequence>

-					</xs:complexType>

-				</xs:element>

-

-				<xs:element name="portlet-app" minOccurs="1"

-					maxOccurs="unbounded">

-					<xs:complexType>

-

-						<xs:sequence>

-							<xs:element name="context-path">

-								<xs:simpleType>

-									<xs:restriction base="xs:string">

-										<xs:pattern

-											value="/[a-zA-Z0-9_ /]*" />

-									</xs:restriction>

-								</xs:simpleType>

-							</xs:element>

-

-							<xs:element name="portlets">

-								<xs:complexType>

-									<xs:sequence>

-										<xs:element name="portlet"

-											minOccurs="1" maxOccurs="unbounded">

-											<xs:complexType>

-												<xs:attribute

-													name="name" type="xs:string" />

-											</xs:complexType>

-										</xs:element>

-									</xs:sequence>

-								</xs:complexType>

-							</xs:element>

-

-						</xs:sequence>

-					</xs:complexType>

-				</xs:element>

-

-				<xs:element name="render-config">

-					<xs:complexType>

-

-						<xs:sequence>

-							<xs:element name="page" minOccurs="1"

-								maxOccurs="unbounded">

-								<xs:complexType>

-									<xs:sequence>

-										<xs:element name="portlet"

-											minOccurs="1" maxOccurs="unbounded">

-											<xs:complexType>

-												<xs:attribute

-													name="context" type="xs:string" />

-												<xs:attribute

-													name="name" type="xs:string" />

-											</xs:complexType>

-										</xs:element>

-									</xs:sequence>

-									<xs:attribute name="name"

-										type="xs:string" />

-									<xs:attribute name="uri"

-										type="xs:string" />

-								</xs:complexType>

-							</xs:element>

-						</xs:sequence>

-						<xs:attribute name="default" type="xs:string" />

-					</xs:complexType>

-				</xs:element>

-			</xs:sequence>

-		</xs:complexType>

-	</xs:element>

-

-</xs:schema>
\ No newline at end of file
diff --git a/trunk/pluto-portal-driver/src/test/java/org/apache/pluto/driver/services/portal/PortletWindowConfigTest.java b/trunk/pluto-portal-driver/src/test/java/org/apache/pluto/driver/services/portal/PortletWindowConfigTest.java
deleted file mode 100644
index 8273ff8..0000000
--- a/trunk/pluto-portal-driver/src/test/java/org/apache/pluto/driver/services/portal/PortletWindowConfigTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.driver.services.portal;

-

-import junit.framework.TestCase;

-

-/**

- * TODO JavaDoc

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:

- * @version 1.0

- * @since Dec 1, 2005

- */

-public class PortletWindowConfigTest extends TestCase {

-

-

-    public void testCreatePortletId() {

-        assertEquals("context.PortletName", PortletWindowConfig.createPortletId("context", "PortletName"));

-        assertEquals("c.PortletName", PortletWindowConfig.createPortletId("c", "PortletName"));

-        assertEquals("context.P", PortletWindowConfig.createPortletId("context", "P"));

-        assertEquals("c.P", PortletWindowConfig.createPortletId("c", "P"));

-    }

-

-    public void testParsePortletName() {

-        assertEquals("PortletName", PortletWindowConfig.parsePortletName("context.PortletName"));

-        assertEquals("PortletName", PortletWindowConfig.parsePortletName("c.PortletName"));

-        assertEquals("P", PortletWindowConfig.parsePortletName("context.P"));

-        assertEquals("P", PortletWindowConfig.parsePortletName("c.P"));

-    }

-

-    public void testParseContextPath() {

-        assertEquals("context", PortletWindowConfig.parseContextPath("context.PortletName"));

-        assertEquals("c", PortletWindowConfig.parseContextPath("c.PortletName"));

-        assertEquals("context", PortletWindowConfig.parseContextPath("context.P"));

-        assertEquals("c", PortletWindowConfig.parseContextPath("c.P"));

-    }

-

-    public void testParseInvalidId() {

-        testParseInvalid(".NoContext");

-        testParseInvalid("Use/Slash");

-        testParseInvalid("NoPortlet.");

-    }

-

-    private void testParseInvalid(String id) {

-        try {

-            PortletWindowConfig.parseContextPath(id);

-            fail("Exception should have been thrown.");

-        }

-        catch(IllegalArgumentException iae) {

-

-        }

-    }

-

-}

diff --git a/trunk/pluto-portal/pom.xml b/trunk/pluto-portal/pom.xml
deleted file mode 100644
index e066ee0..0000000
--- a/trunk/pluto-portal/pom.xml
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 2005-2006 The Apache Software Foundation
-
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-    <parent>
-        <groupId>org.apache.pluto</groupId>
-        <artifactId>pluto</artifactId>
-        <version>1.1.0-SNAPSHOT</version>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>pluto-portal</artifactId>
-    <packaging>war</packaging>
-    <name>Pluto Portal</name>
-
-    <dependencies>
-
-        <dependency>
-            <groupId>org.apache.pluto</groupId>
-            <artifactId>pluto-portal-driver</artifactId>
-            <version>${pom.version}</version>
-            <scope>compile</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>javax.servlet</groupId>
-                    <artifactId>jsp-api</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>xml-apis</groupId>
-                    <artifactId>xml-apis</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>junit</groupId>
-                    <artifactId>junit</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.pluto</groupId>
-            <artifactId>pluto-portal-driver-impl</artifactId>
-            <version>${pom.version}</version>
-            <scope>compile</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>javax.servlet</groupId>
-                    <artifactId>jsp-api</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>xml-apis</groupId>
-                    <artifactId>xml-apis</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>junit</groupId>
-                    <artifactId>junit</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <artifactId>junit</artifactId>
-            <groupId>junit</groupId>
-            <version>${junit.version}</version>
-            <scope>test</scope>
-        </dependency>
-

-        <dependency>

-            <groupId>commons-fileupload</groupId>

-            <artifactId>commons-fileupload</artifactId>

-            <version>${commons-fileupload.version}</version>

- 		    <scope>runtime</scope>

-        </dependency>

-

-    </dependencies>
-
-
-    <build>
-        <finalName>pluto-portal</finalName>
-
-        <plugins>
-            <plugin>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <configuration>
-                    <tasks>
-                        <get src="http://archive.apache.org/dist/tomcat/tomcat-5/archive/v5.5.9/bin/jakarta-tomcat-5.5.9.tar.gz"
-                             dest="target/tomcat.tar.gz"/>
-                        <gunzip src="target/tomcat.tar.gz"/>
-                        <untar src="target/tomcat.tar"/>
-                    </tasks>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <descriptor>src/assemble/bin.xml</descriptor>
-                    <finalName>pluto-portal-${pom.version}</finalName>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <artifactId>maven-site-plugin</artifactId>
-                <configuration>
-                    <resourcesDirectory>${basedir}/../pluto-site/src/site/resources</resourcesDirectory>
-                </configuration>
-            </plugin>
-        </plugins>
-
-    </build>
-
-</project>
-
-
diff --git a/trunk/pluto-portal/src/assemble/bin.xml b/trunk/pluto-portal/src/assemble/bin.xml
deleted file mode 100644
index 9be4af7..0000000
--- a/trunk/pluto-portal/src/assemble/bin.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<!--

-To manually build this distribution:

-	1. Download Tomcat 5.5.9 and unpack it into the root drive of your machine.

-	2. Add pluto user in pluto role to Tomcat's conf/tomcat-users.xml

-	3. Add emptySessionPath="true" to Tomcat's conf/server.xml.

-	4. Run mvn clean followed by mvn install from the root dir.

-	5. Run mvn pluto:install -DinstallDir=/jakarta-tomcat-5.5.9 from the root dir.

-	6. Run mvn site:site to build web site from the pluto-portal dir.

-	7. Run mvn assembly:assembly from the pluto-portal dir to create the archives.

--->

-<assembly>

-  <id>bin</id>

-  <formats>

-    <format>tar.gz</format>

-    <format>tar.bz2</format>

-    <format>zip</format>

-  </formats>

-  <fileSets>

-    <fileSet>

-      <directory>../</directory>	

-	  <outputDirectory>/</outputDirectory>

-      <includes>

-        <include>README*</include>

-        <include>LICENSE*</include>

-        <include>NOTICE*</include>

-      </includes>

-    </fileSet>

-

-    <fileSet>

-      <directory>target/tomcat</directory>

-      <outputDirectory></outputDirectory>

-    </fileSet>

-

-    <fileSet>

-      <directory>../pluto-site/target/site</directory>

-	  <outputDirectory>webapps/ROOT</outputDirectory>

-    </fileSet>

-  </fileSets>

-  <dependencySets>

-  </dependencySets>

-</assembly>

diff --git a/trunk/pluto-portal/src/assemble/config/pluto-docs.xml b/trunk/pluto-portal/src/assemble/config/pluto-docs.xml
deleted file mode 100644
index 2bc0a06..0000000
--- a/trunk/pluto-portal/src/assemble/config/pluto-docs.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<Context path="/" docBase="..\PlutoDomain\docs" crossContext="false"></Context>

diff --git a/trunk/pluto-portal/src/main/resources/pluto.xml b/trunk/pluto-portal/src/main/resources/pluto.xml
deleted file mode 100644
index befb34a..0000000
--- a/trunk/pluto-portal/src/main/resources/pluto.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<!-- 

-Copyright 2004 The Apache Software Foundation.

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<Context path="/pluto" docBase="pluto-portal.war" crossContext="true">

-</Context>

diff --git a/trunk/pluto-portal/src/main/resources/server.xml b/trunk/pluto-portal/src/main/resources/server.xml
deleted file mode 100644
index 479107c..0000000
--- a/trunk/pluto-portal/src/main/resources/server.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<!-- Pluto ResourceConfig File -->
-
-<Server port="8005" shutdown="SHUTDOWN">
-  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
-  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
-
-  <GlobalNamingResources>
-    <!-- Editable user database that can also be used by
-         UserDatabaseRealm to authenticate users -->
-    <Resource name="UserDatabase" auth="Container"
-              type="org.apache.catalina.UserDatabase"
-       description="User database that can be updated and saved"
-           factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
-          pathname="conf/tomcat-users.xml" />
-  </GlobalNamingResources>
-
-  <Service name="Catalina">
-    <Connector port="8080"
-               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
-               enableLookups="false" redirectPort="8443" acceptCount="100"
-               connectionTimeout="20000" disableUploadTimeout="true"
-               emptySessionPath="true" />
-
-    <Engine name="Catalina" defaultHost="localhost">
-      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
-             resourceName="UserDatabase"/>
-
-      <Host name="localhost" appBase="webapps"
-            unpackWARs="true" autoDeploy="true"
-            xmlValidation="false" xmlNamespaceAware="false">
-        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-      </Host>
-    </Engine>
-  </Service>
-</Server>
diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/AdminDeploymentPortlet.properties b/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/AdminDeploymentPortlet.properties
deleted file mode 100644
index 811f026..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/AdminDeploymentPortlet.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-#

-#ResourceBundle for this portlet

-javax.portlet.title=Apache Pluto Deploy War Portlet

-

-admin-deploy.view.title=Deploy War Portlet

-admin-deploy.view.subtitle=Please select a portlet war file to deploy

-admin-deploy.edit.title=Deploy War Portlet Configuration

-admin-deploy.edit.subtitle=

diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/castor.properties b/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/castor.properties
deleted file mode 100644
index 99fed2d..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/castor.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-# 

-# Copyright 2004 The Apache Software Foundation.

-# Licensed  under the  Apache License,  Version 2.0  (the "License");

-# you may not use  this file  except in  compliance with the License.

-# You may obtain a copy of the License at 

-# 

-#   http://www.apache.org/licenses/LICENSE-2.0

-# 

-# Unless required by applicable law or agreed to in writing, software

-# distributed  under the  License is distributed on an "AS IS" BASIS,

-# WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-# implied.

-#  

-# See the License for the specific language governing permissions and

-# limitations under the License.

-#

-#

-# Example properties indent the output, require validation

-# on input and turn debugging on.

-#

-org.exolab.castor.parser.validation=false

-org.exolab.castor.parser.namespaces=true

-org.exolab.castor.indent=true

-org.exolab.castor.debug=false

-

-

diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/logging.properties b/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/logging.properties
deleted file mode 100644
index 5e3d950..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/logging.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-# 

-# Copyright 2004-2006 The Apache Software Foundation

-# Licensed  under the  Apache License,  Version 2.0  (the "License");

-# you may not use  this file  except in  compliance with the License.

-# You may obtain a copy of the License at 

-# 

-#   http://www.apache.org/licenses/LICENSE-2.0

-# 

-# Unless required by applicable law or agreed to in writing, software

-# distributed  under the  License is distributed on an "AS IS" BASIS,

-# WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-# implied.

-#  

-# See the License for the specific language governing permissions and

-# limitations under the License.

-

-handlers = org.apache.juli.FileHandler

-

-############################################################

-#

-# JDK 1.4+ logging handler specific properties for Pluto portal

-# using Tomcat's custom implementation of LogManager.

-# Logging level can be set to any one of:

-# SEVERE, WARN, INFO, CONFIG, FINE, FINEST or ALL. 

-# See the Tomcat documentation for more details.

-# 

-############################################################

-

-org.apache.juli.FileHandler.level = FINE

-org.apache.juli.FileHandler.directory = ${catalina.base}/logs

-#Log file will be named pluto.<yyyy-mm-dd>.log

-org.apache.juli.FileHandler.prefix = pluto.

-

-org.apache.pluto.level=FINE
\ No newline at end of file
diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/user-info-attributes.properties b/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/user-info-attributes.properties
deleted file mode 100644
index 6554f29..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/user-info-attributes.properties
+++ /dev/null
@@ -1,101 +0,0 @@
-# 

-# Copyright 2004-2006 The Apache Software Foundation.

-# Licensed  under the  Apache License,  Version 2.0  (the "License");

-# you may not use  this file  except in  compliance with the License.

-# You may obtain a copy of the License at 

-# 

-#   http://www.apache.org/licenses/LICENSE-2.0

-# 

-# Unless required by applicable law or agreed to in writing, software

-# distributed  under the  License is distributed on an "AS IS" BASIS,

-# WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-# implied.

-#  

-# See the License for the specific language governing permissions and

-# limitations under the License.

-#

-#

-#user-info-attributes.properties

-#

-#This a the file used add user information attributes 

-#defined in PLT.D of the JSR-168 specification. All

-#attributes in this file are prefixed with the name

-#of the authenticated user (returned from PortletRequest.getRemoteUser())

-#followed by a dot. Use the user-info-attributes.properties.template file

-#as a template for adding other users to this file. All users

-#must also be registered in tomcat-users.xml.

-#

-#

-#Please format the user.bdate attribute as mm/dd/yyyy.

-#As noted in PLT.D of the JSR-168 spec, the user.bdate 

-#value returned will be the time in milliseconds 

-#since January 1, 1970, 00:00:00 GMT.

-tomcat.user.bdate=

-tomcat.user.gender=male

-tomcat.user.employer=Sun Microsystems Inc.

-tomcat.user.department=

-tomcat.user.jobtitle=Reference Implementation

-tomcat.user.name.prefix=

-tomcat.user.name.given=Catalina

-tomcat.user.name.family=Tomcat

-tomcat.user.name.middle=

-tomcat.user.name.suffix=

-tomcat.user.name.nickName=Tomcat

-tomcat.user.home-info.postal.name=

-tomcat.user.home-info.postal.street=

-tomcat.user.home-info.postal.city=

-tomcat.user.home-info.postal.stateprov=

-tomcat.user.home-info.postal.postalcode=

-tomcat.user.home-info.postal.country=

-tomcat.user.home-info.postal.organization=

-tomcat.user.home-info.telecom.telephone.intcode=

-tomcat.user.home-info.telecom.telephone.loccode=

-tomcat.user.home-info.telecom.telephone.number=

-tomcat.user.home-info.telecom.telephone.ext=

-tomcat.user.home-info.telecom.telephone.comment=

-tomcat.user.home-info.telecom.fax.intcode=

-tomcat.user.home-info.telecom.fax.loccode=

-tomcat.user.home-info.telecom.fax.number=

-tomcat.user.home-info.telecom.fax.ext=

-tomcat.user.home-info.telecom.fax.comment=

-tomcat.user.home-info.telecom.mobile.intcode=

-tomcat.user.home-info.telecom.mobile.loccode=

-tomcat.user.home-info.telecom.mobile.number=

-tomcat.user.home-info.telecom.mobile.ext=

-tomcat.user.home-info.telecom.mobile.comment=

-tomcat.user.home-info.telecom.pager.intcode=

-tomcat.user.home-info.telecom.pager.loccode=

-tomcat.user.home-info.telecom.pager.number=

-tomcat.user.home-info.telecom.pager.ext=

-tomcat.user.home-info.telecom.pager.comment=

-tomcat.user.home-info.online.email=

-tomcat.user.home-info.online.uri=

-tomcat.user.business-info.postal.name=

-tomcat.user.business-info.postal.street=

-tomcat.user.business-info.postal.city=

-tomcat.user.business-info.postal.stateprov=

-tomcat.user.business-info.postal.postalcode=

-tomcat.user.business-info.postal.country=

-tomcat.user.business-info.postal.organization=

-tomcat.user.business-info.telecom.telephone.intcode=

-tomcat.user.business-info.telecom.telephone.loccode=

-tomcat.user.business-info.telecom.telephone.number=

-tomcat.user.business-info.telecom.telephone.ext=

-tomcat.user.business-info.telecom.telephone.comment=

-tomcat.user.business-info.telecom.fax.intcode=

-tomcat.user.business-info.telecom.fax.loccode=

-tomcat.user.business-info.telecom.fax.number=

-tomcat.user.business-info.telecom.fax.ext=

-tomcat.user.business-info.telecom.fax.comment=

-tomcat.user.business-info.telecom.mobile.intcode=

-tomcat.user.business-info.telecom.mobile.loccode=

-tomcat.user.business-info.telecom.mobile.number=

-tomcat.user.business-info.telecom.mobile.ext=

-tomcat.user.business-info.telecom.mobile.comment=

-tomcat.user.business-info.telecom.pager.intcode=

-tomcat.user.business-info.telecom.pager.loccode=

-tomcat.user.business-info.telecom.pager.number=

-tomcat.user.business-info.telecom.pager.ext=

-tomcat.user.business-info.telecom.pager.comment=

-tomcat.user.business-info.online.email=dev@tomcat.apache.org

-tomcat.user.business-info.online.uri=http://tomcat.apache.org/
\ No newline at end of file
diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/user-info-attributes.properties.template b/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/user-info-attributes.properties.template
deleted file mode 100644
index f831925..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/user-info-attributes.properties.template
+++ /dev/null
@@ -1,107 +0,0 @@
-# 

-# Copyright 2004-2006 The Apache Software Foundation.

-# Licensed  under the  Apache License,  Version 2.0  (the "License");

-# you may not use  this file  except in  compliance with the License.

-# You may obtain a copy of the License at 

-# 

-#   http://www.apache.org/licenses/LICENSE-2.0

-# 

-# Unless required by applicable law or agreed to in writing, software

-# distributed  under the  License is distributed on an "AS IS" BASIS,

-# WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-# implied.

-#  

-# See the License for the specific language governing permissions and

-# limitations under the License.

-#

-#

-#user-info-attributes.properties.template

-#

-#This a template of all user information attributes 

-#defined in PLT.D of the JSR-168 specification. All

-#attributes in this file are prefixed with the name

-#of the authenticated user (returned from PortletRequest.getRemoteUser()).

-#To use this file, search and replace the 'remoteUser' token with the

-#name of a user you will use to log into the Pluto portal (The user must be 

-#registered in tomcat-users.xml). Then copy all or a selection of the 

-#attributes into the user-info-attributes.properties

-#file and enter the values for each attribute. After restarting

-#Tomcat, you should be able to access the Map of all attributes

-#for your user by calling PortletRequest.getAttribute(PortletRequest.USER_INFO)

-#as explained in PLT.17 of the JSR-168 specification.

-#

-#

-#

-#Please format the user.bdate attribute as mm/dd/yyyy.

-#As noted in PLT.D of the JSR-168 spec, the user.bdate 

-#value returned will be the time in milliseconds 

-#since January 1, 1970, 00:00:00 GMT.

-remoteUser.user.bdate=

-remoteUser.user.gender=

-remoteUser.user.employer=

-remoteUser.user.department=

-remoteUser.user.jobtitle=

-remoteUser.user.name.prefix=

-remoteUser.user.name.given=

-remoteUser.user.name.family=

-remoteUser.user.name.middle=

-remoteUser.user.name.suffix=

-remoteUser.user.name.nickName=

-remoteUser.user.home-info.postal.name=

-remoteUser.user.home-info.postal.street=

-remoteUser.user.home-info.postal.city=

-remoteUser.user.home-info.postal.stateprov=

-remoteUser.user.home-info.postal.postalcode=

-remoteUser.user.home-info.postal.country=

-remoteUser.user.home-info.postal.organization=

-remoteUser.user.home-info.telecom.telephone.intcode=

-remoteUser.user.home-info.telecom.telephone.loccode=

-remoteUser.user.home-info.telecom.telephone.number=

-remoteUser.user.home-info.telecom.telephone.ext=

-remoteUser.user.home-info.telecom.telephone.comment=

-remoteUser.user.home-info.telecom.fax.intcode=

-remoteUser.user.home-info.telecom.fax.loccode=

-remoteUser.user.home-info.telecom.fax.number=

-remoteUser.user.home-info.telecom.fax.ext=

-remoteUser.user.home-info.telecom.fax.comment=

-remoteUser.user.home-info.telecom.mobile.intcode=

-remoteUser.user.home-info.telecom.mobile.loccode=

-remoteUser.user.home-info.telecom.mobile.number=

-remoteUser.user.home-info.telecom.mobile.ext=

-remoteUser.user.home-info.telecom.mobile.comment=

-remoteUser.user.home-info.telecom.pager.intcode=

-remoteUser.user.home-info.telecom.pager.loccode=

-remoteUser.user.home-info.telecom.pager.number=

-remoteUser.user.home-info.telecom.pager.ext=

-remoteUser.user.home-info.telecom.pager.comment=

-remoteUser.user.home-info.online.email=

-remoteUser.user.home-info.online.uri=

-remoteUser.user.business-info.postal.name=

-remoteUser.user.business-info.postal.street=

-remoteUser.user.business-info.postal.city=

-remoteUser.user.business-info.postal.stateprov=

-remoteUser.user.business-info.postal.postalcode=

-remoteUser.user.business-info.postal.country=

-remoteUser.user.business-info.postal.organization=

-remoteUser.user.business-info.telecom.telephone.intcode=

-remoteUser.user.business-info.telecom.telephone.loccode=

-remoteUser.user.business-info.telecom.telephone.number=

-remoteUser.user.business-info.telecom.telephone.ext=

-remoteUser.user.business-info.telecom.telephone.comment=

-remoteUser.user.business-info.telecom.fax.intcode=

-remoteUser.user.business-info.telecom.fax.loccode=

-remoteUser.user.business-info.telecom.fax.number=

-remoteUser.user.business-info.telecom.fax.ext=

-remoteUser.user.business-info.telecom.fax.comment=

-remoteUser.user.business-info.telecom.mobile.intcode=

-remoteUser.user.business-info.telecom.mobile.loccode=

-remoteUser.user.business-info.telecom.mobile.number=

-remoteUser.user.business-info.telecom.mobile.ext=

-remoteUser.user.business-info.telecom.mobile.comment=

-remoteUser.user.business-info.telecom.pager.intcode=

-remoteUser.user.business-info.telecom.pager.loccode=

-remoteUser.user.business-info.telecom.pager.number=

-remoteUser.user.business-info.telecom.pager.ext=

-remoteUser.user.business-info.telecom.pager.comment=

-remoteUser.user.business-info.online.email=

-remoteUser.user.business-info.online.uri=
\ No newline at end of file
diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/about/edit.jsp b/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/about/edit.jsp
deleted file mode 100644
index bc02f9f..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/about/edit.jsp
+++ /dev/null
@@ -1,19 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-

-THIS IS THE EDIT PAGE

-

diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/about/help.jsp b/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/about/help.jsp
deleted file mode 100644
index 36d8c20..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/about/help.jsp
+++ /dev/null
@@ -1,19 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-

-THIS IS THE HELP PAGE

-

diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/about/view.jsp b/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/about/view.jsp
deleted file mode 100644
index 28968f3..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/about/view.jsp
+++ /dev/null
@@ -1,58 +0,0 @@
-<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

-

-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-

-<!-- Pluto about portlet fragment (displayed in VIEW mode). -->

-

-<table>

-  

-  <tr>

-    <td colspan="2"><h2>About Pluto Portal Driver</h2></td>

-  </tr>

-  

-  <tr>

-    <td>Portal Name:</td>

-    <td><c:out value="${driverConfig.portalName}"/></td>

-  </tr>

-  <tr>

-    <td>Portal Version:</td>

-    <td><c:out value="${driverConfig.portalVersion}"/></td>

-  </tr>

-  <tr>

-    <td>Servlet Container:</td>

-    <td><%= config.getServletContext().getServerInfo() %></td>

-  </tr>

-  <tr>

-    <td>Pluto Website:</td>

-    <td>

-      <a href="http://portals.apache.org/pluto/" target="_blank">

-        http://portals.apache.org/pluto/

-      </a>

-    </td>

-  </tr>

-  

-  <tr>

-    <td colspan="2">

-      <i>Please use the <a href="http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10560" target="_blank">

-      Jira issue tracking site</a> to record any problems you are having with

-      the Pluto portal server.</i>

-    </td>

-  </tr>

-  

-</table>

-

diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/deploy/edit.jsp b/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/deploy/edit.jsp
deleted file mode 100644
index 643a8d2..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/deploy/edit.jsp
+++ /dev/null
@@ -1,45 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

-<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>

-<%@ taglib uri='http://java.sun.com/portlet' prefix='portlet'%>

-<%@page import="org.apache.pluto.driver.services.portal.admin.PlutoAdminPortlet"%>

-<%@page import="java.util.ResourceBundle"%>

-

-<portlet:defineObjects/>

-

-<fmt:bundle basename="FileUploadPortlet">

-	<fmt:message key="fileupload.edit.title" var="title"/>

-	<fmt:message key="fileupload.edit.subtitle" var="subtitle"/>

-</fmt:bundle> 

-

-<h2><c:out value="${title}"/></h2>

-<h4><c:out value="${subtitle}"/></h4>

-

-<c:set value="${portlet_msg.cssClass}" var="css"/>

-<div class="<c:out value='${css}'/>">

-	<c:out value="${portlet_msg}"/>	

-</div>

-

-<portlet:actionURL var="configaction">

-	<portlet:param name="command" value="config"/>

-</portlet:actionURL>

-<form action="<c:out value='${configaction}'/>" enctype="application/x-www-form-urlencoded" method="post">

-	<div><label>Max File Size:</label> <input type="text" name="<%= FileUploadPortlet.MAX_FILE_UPLOAD_SIZE_PARAM %>" value="<c:out value='${maxfileuploadsize}'/>" /></div>

-	<div><label>Upload directory:</label><input type="text" name="<%= FileUploadPortlet.UPLOAD_PATH_PARAM %>" value="<c:out value='${uploadpath}'/>" /></div>

-	<div><label></label><input type="submit" value="Submit"/></div>

-</form>

diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/deploy/help.jsp b/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/deploy/help.jsp
deleted file mode 100644
index fa2946f..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/deploy/help.jsp
+++ /dev/null
@@ -1,21 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-<%@ taglib uri='http://java.sun.com/portlet' prefix='portlet'%>

-

-<portlet:defineObjects/>

-

-<h2>Deploy War Portlet Help Mode</h2>

diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/deploy/view.jsp b/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/deploy/view.jsp
deleted file mode 100644
index 103c5e0..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/deploy/view.jsp
+++ /dev/null
@@ -1,42 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

-<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>

-<%@ taglib uri='http://java.sun.com/portlet' prefix='portlet'%>

-<%@ taglib uri='http://portals.apache.org/pluto' prefix='pluto'%>

-<%@page import="org.apache.pluto.driver.portlets.AdminDeploymentPortlet"%>

-

-<portlet:defineObjects/>

-

-<fmt:bundle basename="AdminDeploymentPortlet">

-	<fmt:message key="admin-deploy.view.title" var="title"/>

-	<fmt:message key="admin-deploy.view.subtitle" var="subtitle"/>

-</fmt:bundle> 

-

-<div class="portlet-section-header"><c:out value="${title}"/></div>

-<div class="portlet-section-subheader"><c:out value="${subtitle}"/></div>

-

-<portlet:actionURL var="uploadaction">

-	<portlet:param name="command" value="uploadfile"/>

-</portlet:actionURL>

-<form action="<c:out value='${uploadaction}'/>" enctype="multipart/form-data" method="post">

-	<div><input type="file" name="<%= AdminDeploymentPortlet.UPLOAD_PATH_PARAM %>"/></div>

-	<div><input type="submit" value="Submit"/></div>

-</form>

-

-<pluto:message/>

-

diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/edit.jsp b/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/edit.jsp
deleted file mode 100644
index bc02f9f..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/edit.jsp
+++ /dev/null
@@ -1,19 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-

-THIS IS THE EDIT PAGE

-

diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/help.jsp b/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/help.jsp
deleted file mode 100644
index 36d8c20..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/help.jsp
+++ /dev/null
@@ -1,19 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-

-THIS IS THE HELP PAGE

-

diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/page/view.jsp b/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/page/view.jsp
deleted file mode 100644
index 8b71ffb..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/page/view.jsp
+++ /dev/null
@@ -1,82 +0,0 @@
-<%--
-Copyright 2004 The Apache Software Foundation
-Licensed  under the  Apache License,  Version 2.0  (the "License");
-you may not use  this file  except in  compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed  under the  License is distributed on an "AS IS" BASIS,
-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or
-implied.
-
-See the License for the specific language governing permissions and
-limitations under the License.
---%>
-<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
-
-<div>
-  <h2>Portal Pages</h2>
-  <p>
-    <select name="page">
-    <c:forEach items="${driverConfig.pages}" var="page">
-      <option value="<c:out value="${page.name}"/>"><c:out value="${page.name}"/></option>
-    </c:forEach>
-    </select>
-  </p>
-</div>
-
-<div>
-  <h2>Portlet Applications</h2>
-  <p>
-    <!-- TODO: Should be namespaced! -->
-    <form name="adminForm" action="#">
-
-    <script type="text/javascript">
-        var portlets = new Array();
-        <c:forEach items="${portletContainer.optionalContainerServices.portletRegistryService.registeredPortletApplications}" var="app">
-            var i = 0;
-            portlets['<c:out value="${app.applicationId}"/>'] = new Array();
-            portlets['<c:out value="${app.applicationId}"/>'][i++] = 'Select. . .';
-          <c:forEach items="${app.portletApplicationDefinition.portlets}" var="portlet">
-            portlets['<c:out value="${app.applicationId}"/>'][i++] = '<c:out value="${portlet.portletName}"/>';
-          </c:forEach>
-        </c:forEach>
-
-        function doSwitch(select) {
-            var portletsSelectBox = document.forms['adminForm'].elements['portlets'];
-            if (select.value == '-') {
-                document.forms['adminForm'].elements['portlets'].disabled = true;
-            } else {
-                portletsSelectBox.disabled = false;
-                var pList = portlets[select.value];
-                for (i = 0; i < pList.length; i++) {
-                    portletsSelectBox.options[i] = new Option(pList[i], pList[i]);
-                }
-            }
-            doSwitchButton(portletsSelectBox);
-        }
-
-        function doSwitchButton(select) {
-            document.forms['adminForm'].elements['submitButton'].disabled = (select.value == 'Select. . .' || select.disabled);
-        }
-    </script>
-
-        <select name="applications" onChange="doSwitch(this)">
-            <option value='-'>Select. . .</option>
-            <c:forEach items="${portletContainer.optionalContainerServices.portletRegistryService.registeredPortletApplications}" var="app">
-        <option value="<c:out value="${app.applicationId}"/>"><c:out value="${app.applicationName}"/></option>
-    </c:forEach>
-    </select>
-
-    <select name="portlets" disabled="true" onChange='doSwitchButton(this)'>
-
-    </select>
-
-    <button onClick="alert('Sorry, this feature has not yet been implemented'); return false;" name="submitButton" disabled="true">
-        Add Portlet
-    </button>
-    </form>
-  </p>
-</div>
diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/view.jsp b/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/view.jsp
deleted file mode 100644
index 5e397e8..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/view.jsp
+++ /dev/null
@@ -1,51 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

-

-<div>

-  <h2>Portlet Applications</h2>

-  <p>

-    <ul>

-      <c:forEach items="${driverConfig.portletApplications}" var="app">

-        <li>

-          <c:out value="${app.contextPath}"/>

-          <ul>

-            <c:forEach items="${app.portlets}" var="portlet">

-              <c:out value="${portlet.portletName}"/>

-            </c:forEach>

-          </ul>

-        </li>

-      </c:forEach>

-    </ul>

-  </p>

-</div>

-

-<div>

-  <h2>Portal Pages</h2>

-  <p>

-    <ul>

-      <c:forEach items="${driverConfig.pages}" var="page">

-        <li>

-          <c:out value="${page.name}"/><br/>

-          &nbsp;&nbsp;<small><c:out value="${page.uri}"/></small>

-        </li>

-      </c:forEach>

-    </ul>

-  </p>

-</div>

-

-

diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/pluto-portal-driver-config.xml b/trunk/pluto-portal/src/main/webapp/WEB-INF/pluto-portal-driver-config.xml
deleted file mode 100644
index 7b915c7..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/pluto-portal-driver-config.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-Copyright 2004 The Apache Software Foundation.

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-

-<pluto-portal-driver

-    xmlns="http://portals.apache.org/pluto/xsd/pluto-portal-driver-config.xsd"

-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-    xsi:schemaLocation="http://portals.apache.org/pluto/xsd/pluto-portal-driver-config.xsd

-                        http://portals.apache.org/pluto/xsd/pluto-portal-driver-config.xsd"

-    version="1.1">

-

-  <portal-name>pluto-portal-driver</portal-name>

-  <portal-version>1.1.0-SNAPSHOT</portal-version>

-  <container-name>Pluto Portal Driver</container-name>

-

-  <supports>

-    <portlet-mode>view</portlet-mode>

-    <portlet-mode>edit</portlet-mode>

-    <portlet-mode>help</portlet-mode>

-    <portlet-mode>config</portlet-mode>

-

-    <window-state>normal</window-state>

-    <window-state>maximized</window-state>

-    <window-state>minimized</window-state>

-  </supports>

-

-

-    <!--

-

-    NOTE: Once all of the services are re-implemented correctly, we will

-    remove this registry from the config. This is because it is no longer

-    necessary, as each portlet registers itself as it starts up!

-    -->

-    

-  <portlet-app>

-    <context-path>/pluto</context-path>

-    <portlets>

-      <portlet name="AboutPortlet"/>

-      <portlet name="AdminPortlet"/>

-      <portlet name="AdminDeploymentPortlet"/>

-      <portlet name="PlutoPageAdmin"/>

-    </portlets>

-  </portlet-app>

-  

-  <portlet-app>

-    <context-path>/testsuite</context-path>

-    <portlets>

-      <portlet name="TestPortlet1"/>

-      <portlet name="TestPortlet2"/>

-    </portlets>

-  </portlet-app>

-

-  <!-- Render configuration which defines the portal pages. -->

-  <render-config default="Test Page">

-    <page name="Test Page" uri="/WEB-INF/themes/pluto-default-theme.jsp">

-      <portlet context="/testsuite" name="TestPortlet1"/>

-      <portlet context="/testsuite" name="TestPortlet2"/>

-    </page>

-    <page name="Secondary Page" uri="/WEB-INF/themes/pluto-default-theme.jsp">

-      <portlet context="/testsuite" name="TestPortlet1"/>

-      <portlet context="/testsuite" name="TestPortlet2"/>

-    </page>

-    <page name="About Pluto" uri="/WEB-INF/themes/pluto-default-theme.jsp">

-      <portlet context="/pluto" name="AboutPortlet"/>

-    </page>

-    <page name="Pluto Admin" uri="/WEB-INF/themes/pluto-default-theme.jsp">

-      <portlet context="/pluto" name="AdminDeploymentPortlet"/>

-      <portlet context="/pluto" name="AdminPortlet"/>

-      <portlet context="/pluto" name="PlutoPageAdmin"/>

-    </page>

-  </render-config>

-  

-</pluto-portal-driver>

-

-

diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/pluto-portal-driver-services-config.xml b/trunk/pluto-portal/src/main/webapp/WEB-INF/pluto-portal-driver-services-config.xml
deleted file mode 100644
index c6d2529..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/pluto-portal-driver-services-config.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"

-        "http://www.springframework.org/dtd/spring-beans.dtd">

-<!-- 

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<!--

-

-  ************************************************************

-

-  NOTE:

-

-  The following configuration file contains the spring bean

-  configuration needed to run the pluto-portal in memory

-  mode.  Optional services are available which allow

-  persistence to an rdbms, xml files, etc. . . however,

-  we strongly recomend that if you are looking at these

-  advanced features that you consider an enterprise portal

-  such as Apache Jetspeed.

-

-  Service Functions Include:

-   - Preference Persistence

-   - User Attribute Persistence

-   - Portlet Registry

-   - Page Registry

-  ************************************************************

-

-  -->

-

-<beans>

-

-    <bean id="RequiredContainerServices"

-          name="OptionalContainerServices"

-          class="org.apache.pluto.driver.services.container.ContainerServicesImpl"

-          singleton="true">

-      <constructor-arg><ref bean="PortalContext"/></constructor-arg>

-      <constructor-arg><ref bean="DriverConfiguration"/></constructor-arg>

-    </bean>

-

-    <bean id="PortalContext"

-          class="org.apache.pluto.driver.services.container.PortalContextImpl">

-        <constructor-arg><ref bean="DriverConfiguration"/></constructor-arg>

-    </bean>

-

-

-

-    <!-- ================================================ -->

-    <!-- The single top element of the configuration tree -->

-    <!-- ================================================ -->

-    <bean id="DriverConfiguration"

-          class="org.apache.pluto.driver.config.impl.DriverConfigurationImpl">

-

-      <!-- ===== Portal Services ===== -->

-      <constructor-arg><ref bean="PortalURLParser"/></constructor-arg>

-      <constructor-arg><ref bean="PropertyConfigService"/></constructor-arg>

-      <constructor-arg><ref bean="PortletRegistryConfig"/></constructor-arg>

-      <constructor-arg><ref bean="RenderConfigService"/></constructor-arg>

-      <constructor-arg><ref bean="SupportedModesService"/></constructor-arg>

-

-      <!-- === Container Services === -->

-      <constructor-arg><ref bean="PortalCallbackService"/></constructor-arg>

-

-      <!--  Optional Container Services -->

-      <!--

-      <property name="portletPreferencesService"><ref bean="PortletPreferencesService"/></property>

-      <property name="userAttributeService"><ref bean="UserAttributeService"/></property>

-      -->

-    </bean>

-

-    <!-- ================================================ -->

-    <!-- The single top element of the administration tree -->

-    <!-- ================================================ -->

-    <bean id="AdminConfiguration" class="org.apache.pluto.driver.config.impl.AdminConfigurationImpl">

-    	<!-- Upload the war -->

-      <property name="warUploadAdminService"><ref bean="WarUploadAdminService"/></property>

-    	<!-- Modify web.xml and reassemble the war in its proper deployment location -->

-      <property name="reassembleWarAdminService"><ref bean="ReassemblerWarAdminService"/></property>

-      	<!-- Create the deployment descriptor and deploy it -->

-      <property name="deployWarAdminService"><ref bean="DeployWarAdminService"/></property>

-      	<!-- Register the war in pluto-portal-driver-config file by adding a portlet-app element -->

-      <!--  property name="portletRegistryAdminService"><ref bean="PortletRegistryConfig"/></property -->

-      	<!-- Add the war in pluto-portal-driver-config file to render-config section -->

-      <!-- property name="renderConfigAdminService"><ref bean="RenderConfigService"/></property -->

-    </bean>

-

-	<bean id="WarUploadAdminService" class="org.apache.pluto.driver.services.portal.admin.impl.WarUploadAdminServiceImpl">

-		<property name="fileUploader"><ref bean="FileUploader"/></property>

-		<property name="maxUploadSize"><value>10</value></property>

-		<property name="uploadDir"><value>${user.home}/.pluto</value></property>

-	</bean>

-	

-	<bean id="ReassemblerWarAdminService" class="org.apache.pluto.driver.services.portal.admin.impl.ReassembleWarAdminServiceImpl">

-		<property name="reassembler"><ref bean="WarReassembler"/></property>

-		<property name="unzipBaseDir"><value>${user.home}/.pluto</value></property>

-		<property name="destination"><value>${catalina.home}/PlutoDomain</value></property>		

-	</bean>

-

-	<bean id="DeployWarAdminService" class="org.apache.pluto.driver.services.portal.admin.impl.Tomcat5DeployWarAdminServiceImpl">

-		<property name="deployer"><ref bean="FileSystemDeployer"/></property>

-		<property name="undeployer"><ref bean="HttpTomcatDeployer"/></property>

-		<property name="tomcatService"><value>Catalina</value></property>

-		<property name="host"><value>localhost</value></property>

-		<property name="port"><value>8080</value></property>

-		<property name="protocol"><value>http</value></property>

-	</bean>

-	

-	<bean id="FileUploader" class="org.apache.pluto.util.fileupload.http.PortletFileUploader">

-	</bean>

-

-	<bean id="WarReassembler" class="org.apache.pluto.util.assemble.file.WarFileReassembler">

-	</bean>

-	

-	<bean id="FileSystemDeployer" class="org.apache.pluto.util.deploy.file.Tomcat5FileSystemDeployer">

-	</bean>

-	

-	<bean id="HttpTomcatDeployer" class="org.apache.pluto.util.deploy.http.HttpTomcatDeployer">

-	</bean>

-    <!-- ================================================ -->

-    <!-- Portal Services injected into the Configuration  -->

-    <!-- ================================================ -->

-    <bean id="PortalURLParser"

-          class="org.apache.pluto.driver.url.impl.PortalURLParserImpl"

-          factory-method="getParser"

-          singleton="true">

-    </bean>

-

-    <bean id="PropertyConfigService"

-          class="org.apache.pluto.driver.services.impl.resource.PropertyConfigServiceImpl"

-          singleton="true">

-    </bean>

-

-    <bean id="PortletRegistryConfig"

-          class="org.apache.pluto.driver.services.impl.resource.PortletRegistryServiceImpl"

-          singleton="true">

-    </bean>

-

-    <bean id="RenderConfigService"

-          class="org.apache.pluto.driver.services.impl.resource.RenderConfigServiceImpl"

-          singleton="true">

-    </bean>

-    

-    <bean id="SupportedModesService"

-          class="org.apache.pluto.driver.services.impl.resource.SupportedModesServiceImpl"

-          singleton="true">

-          <constructor-arg><ref bean="PortletRegistryConfig"/></constructor-arg>

-          <constructor-arg><ref bean="PropertyConfigService"/></constructor-arg>          
-    </bean>

-

-    <!-- ================================================ -->

-    <!-- Container Services injected into  Configuration  -->

-    <!-- ================================================ -->

-    <bean id="PortalCallbackService"

-          class="org.apache.pluto.driver.services.container.PortalCallbackServiceImpl"

-          singleton="true">

-    </bean>

-

-</beans>
\ No newline at end of file
diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/portlet.xml b/trunk/pluto-portal/src/main/webapp/WEB-INF/portlet.xml
deleted file mode 100644
index c1073d0..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/portlet.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!-- 

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<portlet-app

-    xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"

-    version="1.0"

-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-    xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd

-                        http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">

-                        

-    <portlet>

-        <description>AboutPortletDescription</description>

-        <portlet-name>AboutPortlet</portlet-name>

-        <display-name>About Portlet</display-name>

-        <portlet-class>org.apache.pluto.driver.portlets.AboutPortlet</portlet-class>

-        <supports>

-            <mime-type>text/html</mime-type>

-            <portlet-mode>VIEW</portlet-mode>

-            <portlet-mode>EDIT</portlet-mode>

-            <portlet-mode>HELP</portlet-mode>

-        </supports>

-        <portlet-info>

-            <title>About Apache Pluto</title>

-        </portlet-info>

-    </portlet>

-

-    <portlet>

-        <description>AdminPortletDescription</description>

-        <portlet-name>AdminPortlet</portlet-name>

-        <display-name>Admin Portlet</display-name>

-        <portlet-class>org.apache.pluto.driver.portlets.AdminPortlet</portlet-class>

-        <supports>

-            <mime-type>text/html</mime-type>

-            <portlet-mode>VIEW</portlet-mode>

-            <portlet-mode>EDIT</portlet-mode>

-            <portlet-mode>HELP</portlet-mode>

-        </supports>

-        <portlet-info>

-            <title>Apache Pluto Portal Admin</title>

-        </portlet-info>

-    </portlet>

-

-	<portlet>

-    	<description>Admin portlet to deploy admin war files</description>

-		<portlet-name>AdminDeploymentPortlet</portlet-name>

-	    <display-name>Admin Deploy Portlet</display-name>

-		<portlet-class>org.apache.pluto.driver.portlets.AdminDeploymentPortlet</portlet-class>

-		<supports>

-			<mime-type>text/html</mime-type>

-            <portlet-mode>VIEW</portlet-mode>

-            <portlet-mode>EDIT</portlet-mode>

-        	<portlet-mode>HELP</portlet-mode>

-		</supports>

-	    <supported-locale>en</supported-locale>

-    	<resource-bundle>AdminDeploymentPortlet</resource-bundle>

-	    <portlet-info>

-			<title>Admin Deploy Portlet</title>

-	    </portlet-info>

-	</portlet>  

-

-    <portlet>

-        <description>Used to administer pluto pages</description>

-        <portlet-name>PlutoPageAdmin</portlet-name>

-        <display-name>Pluto Page Administration Portlet</display-name>

-        <portlet-class>org.apache.pluto.driver.portlets.PageAdminPortlet</portlet-class>

-        <supports>

-            <mime-type>text/html</mime-type>

-            <portlet-mode>VIEW</portlet-mode>

-            <portlet-mode>EDIT</portlet-mode>

-            <portlet-mode>HELP</portlet-mode>

-        </supports>

-        <portlet-info>

-            <title>Pluto Page Administrator</title>

-        </portlet-info>

-    </portlet>

->>>>>>> .r481784

-</portlet-app>

-

-

diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/themes/pluto-default-theme.jsp b/trunk/pluto-portal/src/main/webapp/WEB-INF/themes/pluto-default-theme.jsp
deleted file mode 100644
index 7f24681..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/themes/pluto-default-theme.jsp
+++ /dev/null
@@ -1,128 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

-<%@ taglib uri="http://portals.apache.org/pluto" prefix="pluto" %>

-

-<!--

-Portal page template for default theme used by the Pluto Portal Driver.

-This template divides all portlets into two groups (div blocks): the first

-group (the left column) displays portlets with odd IDs, while the second group

-(the right column) displays portlets with even IDs.

--->

-

-<html>

-

-<head>

-    <title>Pluto Portal</title>

-    <style type="text/css" title="currentStyle" media="screen">

-        @import "<c:out value="${pageContext.request.contextPath}"/>/pluto.css";

-    </style>

-    <script type="text/javascript"

-            src="<c:out value="${pageContext.request.contextPath}"/>/pluto.js">

-    </script>

-</head>

-

-<body>

-

-<div id="portal">

-

-    <!-- Header block: the Apache Pluto banner image and description -->

-    <div id="header">

-        <h1>Apache Pluto</h1>

-

-        <p>An Apache Portals Project</p>

-    </div>

-

-    <!-- Logout link -->

-    <div id="logout">

-        <a href="<c:url value='/Logout'/>">Logout</a>

-    </div>

-

-    <!-- Navigation block: links to portal pages -->

-    <div id="navigation">

-        <h2>Navigation:</h2>

-        <ul>

-            <c:forEach var="page" items="${driverConfig.pages}">

-                <c:choose>

-                    <c:when test="${page == currentPage}">

-                        <li class="selected">

-                            <a href='<c:out value="${pageContext.request.contextPath}"/>/portal/<c:out value="${page.name}"/>'>

-                                <c:out value="${page.name}"/>

-                            </a>

-                        </li>

-                    </c:when>

-                    <c:otherwise>

-                        <li>

-                            <a href='<c:out value="${pageContext.request.contextPath}"/>/portal/<c:out value="${page.name}"/>'>

-                                <c:out value="${page.name}"/>

-                            </a>

-                        </li>

-                    </c:otherwise>

-                </c:choose>

-            </c:forEach>

-        </ul>

-    </div>

-

-    <!-- Content block: portlets are divided into two columns/groups -->

-    <div id="content">

-        <pluto:isMaximized var="isMax"/>

-

-        <!-- Left column -->

-        <c:choose>

-            <c:when test="${isMax}">

-                    <c:forEach var="portlet" varStatus="status"

-                               items="${currentPage.portletIds}">

-                        <c:set var="portlet" value="${portlet}" scope="request"/>

-                        <jsp:include page="portlet-skin.jsp"/>

-                    </c:forEach>

-             </c:when>

-

-            <c:otherwise>

-                <div id="portlets-left-column">

-                    <c:forEach var="portlet" varStatus="status"

-                               items="${currentPage.portletIds}" step="2">

-                        <c:set var="portlet" value="${portlet}" scope="request"/>

-                        <jsp:include page="portlet-skin.jsp"/>

-                    </c:forEach>

-                </div>

-

-                <!-- Right column -->

-                <div id="portlets-right-column">

-                    <c:forEach var="portlet" varStatus="status"

-                               items="${currentPage.portletIds}" begin="1" step="2">

-                        <c:set var="portlet" value="${portlet}" scope="request"/>

-                        <jsp:include page="portlet-skin.jsp"/>

-                    </c:forEach>

-                </div>

-

-            </c:otherwise>

-        </c:choose>

-

-    </div>

-

-    <!-- Footer block: copyright -->

-    <div id="footer">

-        &copy; 2003-2005 Apache Software Foundation

-    </div>

-

-</div>

-

-</body>

-

-</html>

-

-

diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/themes/portlet-skin.jsp b/trunk/pluto-portal/src/main/webapp/WEB-INF/themes/portlet-skin.jsp
deleted file mode 100644
index 5827f65..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/themes/portlet-skin.jsp
+++ /dev/null
@@ -1,42 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-<%@ taglib uri="http://portals.apache.org/pluto" prefix="pluto" %>

-

-<!-- Use pluto portlet tag to render the portlet -->

-<pluto:portlet portletId="${portlet}">

-

-  <!-- Assemble the rendering result -->

-  <div class="portlet" id='<c:out value="${portlet}"/>'>

-    <div class="header">

-      <!-- Portlet Mode Controls -->

-      <pluto:modeAnchor portletMode="view"/>

-      <pluto:modeAnchor portletMode="edit"/>

-      <pluto:modeAnchor portletMode="help"/>

-      <!-- Window State Controls -->

-      <a href="<pluto:url windowState="minimized"/>"><span class="min"></span></a>

-      <a href="<pluto:url windowState="maximized"/>"><span class="max"></span></a>

-      <a href="<pluto:url windowState="normal"/>"><span class="norm"></span></a>

-      <!-- Portlet Title -->

-      <h2 class="title"><pluto:title/></h2>

-    </div>

-    <div class="body">

-      <pluto:render/>

-    </div>

-  </div>

-

-</pluto:portlet>

-

diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/tld/pluto.tld b/trunk/pluto-portal/src/main/webapp/WEB-INF/tld/pluto.tld
deleted file mode 100644
index 3d3da1d..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/tld/pluto.tld
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<!DOCTYPE taglib PUBLIC

-  "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"

-  "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">

-<!-- 

-Copyright 2004-2006 The Apache Software Foundation.

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-

-<taglib>

-  

-  <tlibversion>1.0</tlibversion>

-  <jspversion>1.1</jspversion>

-  <shortname>pluto</shortname>

-  <uri>http://portals.apache.org/pluto</uri>

-

-  <!-- Insert the rendering of a portlet -->

-  <tag>

-    <name>portlet</name>

-    <tagclass>org.apache.pluto.driver.tags.PortletTag</tagclass>

-    <bodycontent>JSP</bodycontent>

-    <attribute>

-      <name>portletId</name>

-      <required>true</required>

-      <rtexprvalue>true</rtexprvalue>

-    </attribute>

-  </tag>

-

-  <tag>

-    <name>modeAnchor</name>

-    <tagclass>org.apache.pluto.driver.tags.PortletModeAnchorTag</tagclass>

-    <bodycontent>empty</bodycontent>

-    <attribute>

-      <name>portletMode</name>

-      <required>true</required>

-      <rtexprvalue>false</rtexprvalue>

-    </attribute>

-  </tag>

-     

-  <tag>

-    <name>title</name>

-    <tagclass>org.apache.pluto.driver.tags.PortletTitleTag</tagclass>

-    <bodycontent>empty</bodycontent>

-  </tag>

-

-  <tag>

-    <name>url</name>

-    <tagclass>org.apache.pluto.driver.tags.PortletPortalURLTag</tagclass>

-    <bodycontent>empty</bodycontent>

-    <attribute>

-      <name>portletMode</name>

-      <required>false</required>

-      <rtexprvalue>false</rtexprvalue>

-    </attribute>

-    <attribute>

-      <name>windowState</name>

-      <required>false</required>

-      <rtexprvalue>false</rtexprvalue>

-    </attribute>

-  </tag>

-

-  <tag>

-    <name>render</name>

-    <tagclass>org.apache.pluto.driver.tags.PortletRenderTag</tagclass>

-    <bodycontent>empty</bodycontent>

-  </tag>

-

-    <tag>

-        <name>isMaximized</name>

-        <tagclass>org.apache.pluto.driver.tags.IsMaximizedTag</tagclass>

-        <bodycontent>empty</bodycontent>

-        <attribute>

-            <name>var</name>

-            <required>true</required>

-            <rtexprvalue>false</rtexprvalue>

-        </attribute>

-    </tag>

-

-  <tag>

-    <name>message</name>

-    <tagclass>org.apache.pluto.driver.tags.PortletUiMessageTag</tagclass>

-    <bodycontent>empty</bodycontent>

-    <info>

-    	Displays a message or one in a resource bundle (properties file) or a message 

-    	encapsulated into the PortletUiMessage class and held in a portlet session attribute

-    	called 'portlet_msg' (org.apache.pluto.driver.AttributeKeys.PORTLET_MSG).

-    	Attributes include:

-    	1. message: the message.

-    	2. cssClass: the Cascading Stylesheet class name

-    	3. bundle: the resource bundle as defined in the java.util.ResourceBundle class

-    	The message and cssClass attributes should not be used if the message is in

-    	the portlet_msg portlet session attribute.

-    </info>

-    <attribute>

-    	<!-- Message can be a ResourceBundle key, but specify the bundle attribute value too -->

-      <name>message</name>

-      <required>false</required>

-      <rtexprvalue>true</rtexprvalue>

-    </attribute>

-    <attribute>

-      <name>cssClass</name>

-      <required>false</required>

-      <rtexprvalue>false</rtexprvalue>

-    </attribute>

-    <attribute>

-    	<!-- ResourceBundle name -->

-      <name>bundle</name>

-      <required>false</required>

-      <rtexprvalue>false</rtexprvalue>

-    </attribute>

-  </tag>

-

-</taglib>

-

diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/tld/portlet.tld b/trunk/pluto-portal/src/main/webapp/WEB-INF/tld/portlet.tld
deleted file mode 100644
index cb9f0ae..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/tld/portlet.tld
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>

-<!DOCTYPE taglib PUBLIC

-  "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"

-  "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">

-<!-- 

-Copyright 2004 The Apache Software Foundation.

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<taglib>

-    <tlibversion>1.0</tlibversion>

-    <jspversion>1.1</jspversion>

-    <shortname>portlet</shortname>

-    <uri>http://java.sun.com/portlet</uri>

-    <tag>

-        <name>defineObjects</name>

-        <tagclass>org.apache.pluto.tags.DefineObjectsTag</tagclass>

-        <teiclass>org.apache.pluto.tags.DefineObjectsTag$TEI</teiclass>

-        <bodycontent>empty</bodycontent>

-    </tag>

-    <tag>

-        <name>param</name>

-        <tagclass>org.apache.pluto.tags.ParamTag</tagclass>

-        <bodycontent>empty</bodycontent>

-        <attribute>

-            <name>name</name>

-            <required>true</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>value</name>

-            <required>true</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-    </tag>

-    <tag>

-        <name>actionURL</name>

-        <tagclass>org.apache.pluto.tags.ActionURLTag</tagclass>

-        <teiclass>org.apache.pluto.tags.BasicURLTag$TEI</teiclass>

-        <bodycontent>JSP</bodycontent>

-        <attribute>

-            <name>windowState</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>portletMode</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>secure</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>var</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-    </tag>

-    <tag>

-        <name>renderURL</name>

-        <tagclass>org.apache.pluto.tags.RenderURLTag</tagclass>

-        <teiclass>org.apache.pluto.tags.BasicURLTag$TEI</teiclass>

-        <bodycontent>JSP</bodycontent>

-        <attribute>

-            <name>windowState</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>portletMode</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>secure</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>var</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-    </tag>

-    <tag>

-        <name>namespace</name>

-        <tagclass>org.apache.pluto.tags.NamespaceTag</tagclass>

-        <bodycontent>empty</bodycontent>

-    </tag>

-</taglib>
\ No newline at end of file
diff --git a/trunk/pluto-portal/src/main/webapp/WEB-INF/web.xml b/trunk/pluto-portal/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e2f7bd0..0000000
--- a/trunk/pluto-portal/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,185 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<!DOCTYPE web-app PUBLIC

-        "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

-        "http://java.sun.com/dtd/web-app_2_3.dtd">

-<!-- 

-Copyright 2004 The Apache Software Foundation.

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-

-<web-app>

-

-    <display-name>Apache Pluto Portal Driver</display-name>

-

-    <context-param>

-        <param-name>contextConfigLocation</param-name>

-        <param-value>/WEB-INF/pluto-portal-driver-services-config.xml</param-value>

-    </context-param>

-

-    <listener>

-        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

-    </listener>

-

-    <listener>

-        <listener-class>org.apache.pluto.driver.PortalStartupListener</listener-class>

-    </listener>

-

-    <servlet>

-        <servlet-name>plutoPortalDriver</servlet-name>

-        <display-name>Pluto Portal Driver</display-name>

-        <description>Pluto Portal Driver Controller</description>

-        <servlet-class>org.apache.pluto.driver.PortalDriverServlet</servlet-class>

-    </servlet>

-

-    <servlet>

-        <servlet-name>plutoPortalDriverLogout</servlet-name>

-        <display-name>Pluto Portal Driver</display-name>

-        <description>Pluto Portal Driver Logout</description>

-        <servlet-class>org.apache.pluto.driver.PortalDriverLogoutServlet</servlet-class>

-    </servlet>

-

-    <servlet>

-        <servlet-name>portletApplicationPublisher</servlet-name>

-        <display-name>Portlet Application Publisher</display-name>

-        <description>Portlet Application Publisher Service</description>

-        <servlet-class>org.apache.pluto.driver.PublishServlet</servlet-class>

-    </servlet>

-

-    <servlet>

-        <servlet-name>tckDriver</servlet-name>

-        <display-name>Pluto TCK Driver</display-name>

-        <description>Pluto TCK Driver Controller</description>

-        <servlet-class>org.apache.pluto.driver.TCKDriverServlet</servlet-class>

-    </servlet>

-

-    <servlet>

-        <servlet-name>AboutPortlet</servlet-name>

-        <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>

-        <init-param>

-            <param-name>portlet-name</param-name>

-            <param-value>AboutPortlet</param-value>

-        </init-param>

-        <load-on-startup>1</load-on-startup>

-    </servlet>

-

-    <servlet>

-        <servlet-name>AdminPortlet</servlet-name>

-        <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>

-        <init-param>

-            <param-name>portlet-name</param-name>

-            <param-value>AdminPortlet</param-value>

-        </init-param>

-        <load-on-startup>1</load-on-startup>

-    </servlet>

-

-    <servlet>

-        <servlet-name>AdminDeploymentPortlet</servlet-name>

-        <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>

-        <init-param>

-            <param-name>portlet-name</param-name>

-            <param-value>AdminDeploymentPortlet</param-value>

-        </init-param>

-        <load-on-startup>1</load-on-startup>

-    </servlet>

-

-    <servlet>

-        <servlet-name>PlutoPageAdmin</servlet-name>

-        <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>

-        <init-param>

-            <param-name>portlet-name</param-name>

-            <param-value>PlutoPageAdmin</param-value>

-        </init-param>

-        <load-on-startup>1</load-on-startup>

-    </servlet>

-

-    <servlet-mapping>

-        <servlet-name>plutoPortalDriver</servlet-name>

-        <url-pattern>/portal/*</url-pattern>

-    </servlet-mapping>

-

-    <servlet-mapping>

-        <servlet-name>plutoPortalDriverLogout</servlet-name>

-        <url-pattern>/Logout</url-pattern>

-    </servlet-mapping>

-

-    <servlet-mapping>

-        <servlet-name>portletApplicationPublisher</servlet-name>

-        <url-pattern>/admin/Publish</url-pattern>

-    </servlet-mapping>

-

-    <servlet-mapping>

-        <servlet-name>tckDriver</servlet-name>

-        <url-pattern>/tck/*</url-pattern>

-    </servlet-mapping>

-

-    <servlet-mapping>

-        <servlet-name>AboutPortlet</servlet-name>

-        <url-pattern>/PlutoInvoker/AboutPortlet</url-pattern>

-    </servlet-mapping>

-

-    <servlet-mapping>

-        <servlet-name>AdminPortlet</servlet-name>

-        <url-pattern>/PlutoInvoker/AdminPortlet</url-pattern>

-    </servlet-mapping>

-

-    <servlet-mapping>

-        <servlet-name>AdminDeploymentPortlet</servlet-name>

-        <url-pattern>/PlutoInvoker/AdminDeploymentPortlet</url-pattern>

-    </servlet-mapping>

-

-    <servlet-mapping>

-        <servlet-name>PlutoPageAdmin</servlet-name>

-        <url-pattern>/PlutoInvoker/PlutoPageAdmin</url-pattern>

-    </servlet-mapping>

-

-    <taglib>

-        <taglib-uri>http://java.sun.com/portlet</taglib-uri>

-        <taglib-location>/WEB-INF/tld/portlet.tld</taglib-location>

-    </taglib>

-

-    <taglib>

-        <taglib-uri>http://portals.apache.org/pluto</taglib-uri>

-        <taglib-location>/WEB-INF/tld/pluto.tld</taglib-location>

-    </taglib>

-

-    <security-constraint>

-        <web-resource-collection>

-            <web-resource-name>portal</web-resource-name>

-            <url-pattern>/portal</url-pattern>

-            <url-pattern>/portal/*</url-pattern>

-            <http-method>GET</http-method>

-            <http-method>POST</http-method>

-            <http-method>PUT</http-method>

-        </web-resource-collection>

-        <auth-constraint>

-            <role-name>pluto</role-name>

-        </auth-constraint>

-    </security-constraint>

-

-    <login-config>

-        <auth-method>FORM</auth-method>

-        <form-login-config>

-            <form-login-page>/login.jsp</form-login-page>

-            <form-error-page>/login.jsp?error=1</form-error-page>

-        </form-login-config>

-    </login-config>

-

-    <security-role>

-        <role-name>pluto</role-name>

-    </security-role>

-

-</web-app>

-

diff --git a/trunk/pluto-portal/src/main/webapp/images/apache-portals.png b/trunk/pluto-portal/src/main/webapp/images/apache-portals.png
deleted file mode 100644
index e1ae109..0000000
--- a/trunk/pluto-portal/src/main/webapp/images/apache-portals.png
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-portal/src/main/webapp/images/banner.png b/trunk/pluto-portal/src/main/webapp/images/banner.png
deleted file mode 100644
index 12177e8..0000000
--- a/trunk/pluto-portal/src/main/webapp/images/banner.png
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-portal/src/main/webapp/images/controls/edit.png b/trunk/pluto-portal/src/main/webapp/images/controls/edit.png
deleted file mode 100644
index 1b99ffc..0000000
--- a/trunk/pluto-portal/src/main/webapp/images/controls/edit.png
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-portal/src/main/webapp/images/controls/help.png b/trunk/pluto-portal/src/main/webapp/images/controls/help.png
deleted file mode 100644
index b572dab..0000000
--- a/trunk/pluto-portal/src/main/webapp/images/controls/help.png
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-portal/src/main/webapp/images/controls/max.png b/trunk/pluto-portal/src/main/webapp/images/controls/max.png
deleted file mode 100644
index c4f3789..0000000
--- a/trunk/pluto-portal/src/main/webapp/images/controls/max.png
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-portal/src/main/webapp/images/controls/min.png b/trunk/pluto-portal/src/main/webapp/images/controls/min.png
deleted file mode 100644
index af5ac34..0000000
--- a/trunk/pluto-portal/src/main/webapp/images/controls/min.png
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-portal/src/main/webapp/images/controls/norm.png b/trunk/pluto-portal/src/main/webapp/images/controls/norm.png
deleted file mode 100644
index 72c8bc3..0000000
--- a/trunk/pluto-portal/src/main/webapp/images/controls/norm.png
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-portal/src/main/webapp/images/controls/view.png b/trunk/pluto-portal/src/main/webapp/images/controls/view.png
deleted file mode 100644
index 2820583..0000000
--- a/trunk/pluto-portal/src/main/webapp/images/controls/view.png
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-portal/src/main/webapp/images/logo1616.png b/trunk/pluto-portal/src/main/webapp/images/logo1616.png
deleted file mode 100644
index 93a7f86..0000000
--- a/trunk/pluto-portal/src/main/webapp/images/logo1616.png
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-portal/src/main/webapp/images/logo3232.png b/trunk/pluto-portal/src/main/webapp/images/logo3232.png
deleted file mode 100644
index 19a8b14..0000000
--- a/trunk/pluto-portal/src/main/webapp/images/logo3232.png
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-portal/src/main/webapp/images/pluto.png b/trunk/pluto-portal/src/main/webapp/images/pluto.png
deleted file mode 100644
index be15ad5..0000000
--- a/trunk/pluto-portal/src/main/webapp/images/pluto.png
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-portal/src/main/webapp/images/powered-by.png b/trunk/pluto-portal/src/main/webapp/images/powered-by.png
deleted file mode 100644
index c1946f3..0000000
--- a/trunk/pluto-portal/src/main/webapp/images/powered-by.png
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-portal/src/main/webapp/index.jsp b/trunk/pluto-portal/src/main/webapp/index.jsp
deleted file mode 100644
index ce42a72..0000000
--- a/trunk/pluto-portal/src/main/webapp/index.jsp
+++ /dev/null
@@ -1,19 +0,0 @@
-<%--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

---%>

-<%
-  // Redirect to the portal driver servlet.
-  response.sendRedirect("portal");
-%>
diff --git a/trunk/pluto-portal/src/main/webapp/login.jsp b/trunk/pluto-portal/src/main/webapp/login.jsp
deleted file mode 100644
index 4c358b9..0000000
--- a/trunk/pluto-portal/src/main/webapp/login.jsp
+++ /dev/null
@@ -1,71 +0,0 @@
-<%--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

---%>

-<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
-
-<html>
-  
-  <head>
-    <title>Pluto Portal</title>
-    <style type="text/css" title="currentStyle" media="screen">
-      @import "<c:out value="${pageContext.request.contextPath}"/>/pluto.css";
-    </style>
-    <script type="text/javascript"
-            src="<c:out value="${pageContext.request.contextPath}"/>/pluto.js">
-    </script>
-  </head>
-
-  <body>
-    <div id="portal" style="width: 600px;">
-      <div id="header">
-        <h1>Apache Pluto</h1>
-        <p>A Apache Portals Project</p>
-      </div>
-      <div id="content">
-        <c:if test='${param.error == "1"}'>
-          <p style="color:red;text-align:center">
-            Invalid credentials. Please try again
-          </p>
-        </c:if>
-        <form method="POST" action="j_security_check">
-          <fieldset>
-            <legend>Login to Pluto</legend>
-            <div>
-              <label for="j_username">User Name</label>
-              <input type="text" name="j_username" id="j_username"/>
-            </div>
-            <div>
-              <label for="j_password">Password</label>
-              <input type="password" name="j_password" id="j_password"/>
-            </div>
-            <div>
-              <label for="j_login"></label>
-              <input type="submit" value="Login" name="login" id="j_login"/>
-            </div>
-          </fieldset>
-        </form>
-      </div>
-      
-      <div id="footer">
-        &copy; 2003-2005 Apache Software Foundation
-      </div>
-      
-    </div>
-  
-  </body>
-  
-</html>
-
-
diff --git a/trunk/pluto-portal/src/main/webapp/pluto.css b/trunk/pluto-portal/src/main/webapp/pluto.css
deleted file mode 100644
index 236cf13..0000000
--- a/trunk/pluto-portal/src/main/webapp/pluto.css
+++ /dev/null
@@ -1,241 +0,0 @@
-/*

-* Copyright 2005-2005 The Apache Software Foundation

-*

-* Licensed under the Apache License, Version 2.0 (the "License");

-* you may not use this file except in compliance with the License.

-* You may obtain a copy of the License at

-*

-*     http://www.apache.org/licenses/LICENSE-2.0

-*

-* Unless required by applicable law or agreed to in writing, software

-* distributed under the License is distributed on an "AS IS" BASIS,

-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-* See the License for the specific language governing permissions and

-* limitations under the License.

-*/

-body, th, td {

-  background-color: #FFFFFF;

-  font-family: Arial, Helvetica, Sans-serif;

-  font-size: 95%;

-}

-

-/** 'portal' block **/

-

-#portal {

-

-}

-

-/** 'header' block **/

-

-#header {

-  background: #8DB7DF url('images/banner.png') no-repeat top left;;

-  border-bottom: 1px solid #2E6794;

-  width: auto;

-  height: 50px;

-  margin: 0px;

-  vertical-align: top;

-}

-

-#header h1 {

-  display: none;

-  margin: 5px 10px 5px 10px;

-  font-family: "Trebuchet MS", Trebuchet, Arial, Helvetica, Sans-serif;

-  font-size: 200%;

-}

-

-#header p {

-  display: none;

-  margin: 0px 10px 0px 10px;

-  font-family: "Trebuchet MS", Trebuchet, Arial, Helvetica, Sans-serif;

-  font-size: smaller;

-}

-

-#logout {

-  float:right;

-  font-size:smaller;

-}

-

-/** 'navigation' block **/

-

-#navigation {

-  clear: both;

-}

-

-#navigation h2 {

-  padding: 5px 10px 5px 10px;

-  margin: 0px;

-  color: #6D97BF;

-  font-family: "Trebuchet MS", Trebuchet, Arial, Helvetica, Sans-serif;

-  font-size: 100%;

-}

-

-#navigation ul {

-  margin: 0px;

-  padding: 5px 10px 5px 10px;

-  list-style: none;

-  position: absolute;

-  background-color: #F0F0F0;

-  border-width: 0px 1px 1px 1px;

-  border-style: solid;

-  border-color: #000000;

-}

-

-#navigation ul li {

-  color: #888888;

-  font-family: "Trebuchet MS", Trebuchet, Arial, Helvetica, Sans-serif;

-  font-size: smaller;

-}

-

-#navigation ul li a {

-  color: #888888;

-  text-decoration: none;

-}

-

-#navigation ul li a:hover {

-  color: #6D97BF;

-  text-decoration: underline;

-}

-

-#navigation .selected, #navigation .selected a {

-  color: #6D97BF;

-  font-weight: bold;

-}

-

-

-/** 'content' block **/

-

-#content {

-

-}

-

-/** 'portlet' block **/

-

-#portlets-left-column {

-  margin: 0;

-  padding: 0;

-  width: 49%;

-  float: left;

-}

-

-#portlets-right-column {

-  margin: 0;

-  padding: 0;

-  width: 49%;

-  float: right;

-}

-

-.portlet {

-  margin: 10px 0px 10px 0px;

-  padding: 0px;

-  border: 1px solid #2E6794;

-}

-

-.portlet .header {

-  white-space: nowrap;

-  padding-left: 0.25em;

-  background-color: #8DB7DF;

-  color: #FFFFFF;

-  font-weight: bold;

-  border-width: 0px 0px 1px 0px;

-  border-style: solid;

-  border-color: #2E6794;

-}

-

-.portlet .header h2 {

-  margin: 0px;

-  padding: 0px;

-  font-family: "Trebuchet MS", Trebuchet, Arial, Helvetica, Sans-serif;

-  font-size: 100%;

-  float: none;

-}

-

-.portlet .header span {

-  width: 16px;

-  height: 16px;

-  float: right;

-}

-

-

-/** 'portlet' block: portlet mode and window state controls **/

-

-.portlet .header span.min {

-  background: url(images/controls/min.png) no-repeat;

-}

-

-.portlet .header span.max {

-  background: url(images/controls/max.png) no-repeat;

-}

-

-.portlet .header span.norm {

-  background: url(images/controls/norm.png) no-repeat;

-}

-

-.portlet .header span.view {

-  background: url(images/controls/view.png) no-repeat;

-}

-

-.portlet .header span.edit {

-  background: url(images/controls/edit.png) no-repeat;

-}

-

-.portlet .header span.help {

-  background: url(images/controls/help.png) no-repeat;

-}

-

-.portlet .body {

-  padding: 10px;

-}

-

-

-/** 'footer' block **/

-

-#footer {

-  clear: both;

-  font-family: "Trebuchet MS", Trebuchet, Arial, Helvetica, Sans-serif;

-  font-size: smaller;

-  color: #808080;

-  text-align: center;

-  margin: 0px;

-  padding: 4px 20px 4px 20px;

-  border-top-width: 1px;

-  border-top-color: #888888;

-  border-top-style: dotted;

-}

-

-

-/** Login page styles **/

-

-fieldset {

-  margin: 0.5em;

-  border-width: 1px;

-  border-style: solid;

-  border-color: #2E6794;

-}

-

-legend {

-  color: #2E6794;

-  font-family: "Trebuchet MS", Trebuchet, Arial, Helvetica, Sans-serif;

-  font-weight: bold;

-}

-

-label {

-  clear: both;

-  width: 40%;

-  float: left;

-  text-align: right;

-  margin: 0px 5px 10px 0px;

-}

-

-input {

-  color: #2E6794;

-  background-color: #8DB7DF;

-  margin: 0px 0px 10px 5px;

-  border-width: 1px;

-  border-style: solid;

-  border-color: #2E6794;

-}

-

-

-

-

-

diff --git a/trunk/pluto-portal/src/main/webapp/pluto.js b/trunk/pluto-portal/src/main/webapp/pluto.js
deleted file mode 100644
index 7c2bc74..0000000
--- a/trunk/pluto-portal/src/main/webapp/pluto.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/*

- * Copyright 2005-2006 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-toggleNavigation = function() {

-    if (document.getElementById) {

-        navigationRoot = document.getElementById("navigation");

-        if (navigationRoot) {

-            navigationList = navigationRoot.getElementsByTagName("ul")[0];

-            if (navigationList) {

-                navigationList.style.visibility = "hidden";

-                navigationRoot.onmouseover = function() {

-                    navigationList.style.visibility = "visible";

-                }

-                navigationRoot.onmouseout = function() {

-                    navigationList.style.visibility = "hidden";

-                }

-            }

-        }

-    }

-}

-

-window.onload = toggleNavigation;

-

-

-

diff --git a/trunk/pluto-portal/src/main/webapp/portlet-spec-1.0.css b/trunk/pluto-portal/src/main/webapp/portlet-spec-1.0.css
deleted file mode 100644
index b67132a..0000000
--- a/trunk/pluto-portal/src/main/webapp/portlet-spec-1.0.css
+++ /dev/null
@@ -1,275 +0,0 @@
-/*

-Copyright 2004,2005,2006 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

-*/

-/*

-NOTE: 

-This stylesheet is a formatted copy of Appendix PLT. C in the Portlet API specification, which defines

-CSS styles to be used in portlets conforming to the spec.

-*/

-

-/*****************************************************************************************

-Java(TM) Portlet Specification, version 1.0 (10/07/2003) pp. 115-118

-

-PLT.C

-CSS Style Definitions

-To achieve a common look and feel throughout the portal page, all portlets in the portal

-page should use a common CSS style sheet when generating content.

-This appendix defines styles for a variety of logical units in the markup. It follows the

-style being considered by the OASIS Web Services for Remote Portlets Technical Committee.

-******************************************************************************************/

-

-/*****************************************************************************************

-PLT.C.1 Links (Anchor)

-A custom CSS class is not defined for the <a> tag. The entity should use the default

-classes when embedding anchor tags.

-******************************************************************************************/

-

-/*****************************************************************************************

-PLT.C.2 Fonts

-The font style definitions affect the font attributes only (font face, size, color, style, etc).

-******************************************************************************************/

-

-/* Font attributes for the "normal" fragment font. Used for the display of non-accentuated information. 

-Example: Normal Text */

-.portlet-font {

-	font-family: Arial,Helvetica,sans-serif;

-	font-style: normal;

-	font-weight: normal;

-	font-size: 10pt;

-	color:black;

-}

-

-/* Font attributes similar to the portlet-font but the color is lighter. Example: Dim Text */

-.portlet-font-dim {

-	font-family: Arial,Helvetica,sans-serif;

-	font-style: normal;

-	font-weight: normal;

-	font-size: 10pt;

-	color:lightgrey;

-}

-

-/*****************************************************************************************

-PLT.C.3 Messages

-Message style definitions affect the rendering of a paragraph (alignment, borders,

-background color, etc) as well as text attributes.

-******************************************************************************************/

-/* Status of the current operation. Example: Progress: 80% */

-.portlet-msg-status {

-	font-family: Arial,Helvetica,sans-serif;

-	font-style: normal;

-	font-weight: bold;

-	font-size:10pt;

-   	color:black;

-}

-

-/* Help messages, general additional information, etc. Example: Info about */

-.portlet-msg-info {

-	font-family: Arial,Helvetica,sans-serif;

-	font-style: normal;

-	font-weight: bold;

-	font-size:10pt;

-   	color:blue;

-}

-

-/* Error messages. 

-Example: Portlet not available*/

-.portlet-msg-error {

-	font-family: Arial,Helvetica,sans-serif;

-	font-style: normal;

-	font-weight: bold;

-	font-size:8pt;

-   	color:red;

-}

-

-/* Warning messages. 

-Example: Timeout occurred, try again later */

-.portlet-msg-alert {

-	font-family: Arial,Helvetica,sans-serif;

-	font-style: normal;

-	font-weight: bold;

-	font-size:10pt;

-   	color:yellow;

-}

-

-/* Verification of the successful completion of a task. Example: Operation completed successfully */

-.portlet-msg-success {

-	font-family: Arial,Helvetica,sans-serif;

-	font-style: normal;

-	font-weight: bold;

-	font-size:10pt;

-   	color:green;

-}

-

-/*****************************************************************************************

-PLT.C.4 Sections

-Section style definitions affect the rendering of markup sections such as table, div and  

-span (alignment, borders, background color, etc) as well as their text attributes.

-******************************************************************************************/

-/* Table or section header */

-.portlet-section-header {

-	font-family: Arial,Helvetica,sans-serif;

-	font-style: normal;

-	font-weight: bold;

-	font-size: 16pt;

-	margin-top: 0; 

-	margin-bottom: 1em;

-}

-

-/* Normal text in a table cell */

-.portlet-section-body {

-	font-family: Arial,Helvetica,sans-serif;

-	font-style: normal;

-	font-weight: normal;

-	font-size: 12pt;

-

-}

-

-/* Text in every other row in the cell */

-.portlet-section-alternate {

-

-}

-

-/* Text in a selected cell range */

-.portlet-section-selected {

-

-}

-

-/* Text of a subheading */

-.portlet-section-subheader {

-	font-family: Arial,Helvetica,sans-serif;

-	font-style: normal;

-	font-weight: bold;

-	font-size: 12pt;

-}

-

-/* Table or section footnote */

-.portlet-section-footer {

-

-}

-

-/* Text that belongs to the table but does not fall in one of

-the other categories (e.g. explanatory or help text that is

-associated with the section). */

-.portlet-section-text {

-

-}

-

-/*****************************************************************************************

-PLT.C.5 Forms

-Form styles define the look-and-feel of the elements in an HTML form.

-******************************************************************************************/

-/* Text used for the descriptive label of the whole form (not the labels for fields). */

-.portlet-form-label {

-	font-family: Arial,Helvetica,sans-serif;

-	font-style: normal;

-	font-weight: bold;

-	font-size: 12pt;

-	color: black;

-}

-

-/* Text of the user-input in an input field. */

-.portlet-form-input-field {

-	font-family: Arial,Helvetica,sans-serif;

-	font-style: normal;

-	font-weight: normal;

-	font-size: 10pt;

-	color: black;

-}

-

-/* Text on a button */

-.portlet-form-button {

-	font-family: Arial,Helvetica,sans-serif;

-	font-style: normal;

-	font-weight: normal;

-	font-size: 12pt;

-	color: black;

-}

-

-/* Text that appears beside a context dependent action icon. */

-.portlet-icon-label {

-

-}

-

-/* Text that appears beside a "standard" icon (e.g. Ok, or Cancel) */

-.portlet-dlg-icon-label {

-

-}

-

-/* Text for a separator of fields (e.g. checkboxes, etc.) */

-.portlet-form-field-label {

-	font-family: Arial,Helvetica,sans-serif;

-	font-style: normal;

-	font-weight: bold;

-	font-size: 10pt;

-	color: black;

-}

-

-/* Text for a field (not input field, e.g. checkboxes, etc) */

-.portlet-form-field {

-

-}

-

-/*****************************************************************************************

-PLT.C.6 Menus

-Menu styles define the look-and-feel of the text and background of a menu structure. This

-structure may be embedded in the aggregated page or may appear as a context sensitive

-popup menu.

-******************************************************************************************/

-/* General menu settings such as background color, margins, etc */

-.portlet-menu {

-

-}

-

-/* Normal, unselected menu item. */

-.portlet-menu-item {

-

-}

-

-/* Selected menu item. */

-.portlet-menu-item-selected {

-

-}

-

-/* Normal, unselected menu item when the mouse hovers over it. */

-.portlet-menu-item-hover {

-

-}

-

-/* Selected menu item when the mouse hovers over it. */

-.portlet-menu-item-hover-selected {

-

-}

-

-/* Normal, unselected menu item that has submenus. */

-.portlet-menu-cascade-item {

-

-}

-

-/* Selected sub-menu item that has sub-menus. */

-.portlet-menu-cascade-item-selected {

-

-}

-

-/* Descriptive text for the menu (e.g. in a help context below the menu) */

-.portlet-menu-description {

-

-}

-

-/* Menu caption */

-.portlet-menu-caption {

-

-}

-

diff --git a/trunk/pluto-portal/src/main/webapp/test_session.jsp b/trunk/pluto-portal/src/main/webapp/test_session.jsp
deleted file mode 100644
index 3dd441c..0000000
--- a/trunk/pluto-portal/src/main/webapp/test_session.jsp
+++ /dev/null
@@ -1,19 +0,0 @@
-<%--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

---%>

-<%

-    RequestDispatcher rd = application.getContext("/testsuite").getRequestDispatcher("/test_session.jsp");

-    rd.forward(request, response);

-%>
\ No newline at end of file
diff --git a/trunk/pluto-portal/src/site/apt/getting-started.apt b/trunk/pluto-portal/src/site/apt/getting-started.apt
deleted file mode 100644
index 15b0618..0000000
--- a/trunk/pluto-portal/src/site/apt/getting-started.apt
+++ /dev/null
@@ -1,28 +0,0 @@
-~~

-~~ Copyright 2005-2006 The Apache Software Foundation.

-~~

-~~ Licensed under the Apache License, Version 2.0 (the "License");

-~~ you may not use this file except in compliance with the License.

-~~ You may obtain a copy of the License at

-~~

-~~      http://www.apache.org/licenses/LICENSE-2.0

-~~

-~~ Unless required by applicable law or agreed to in writing, software

-~~ distributed under the License is distributed on an "AS IS" BASIS,

-~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-~~ See the License for the specific language governing permissions and

-~~ limitations under the License.

-~~

- ------

- Getting Started

- ------

- David H. DeWolf

- ------

- 17 Nov 2005

- ------

-

-Getting Started

-

-  Documentation needed.  Please help

-

-

diff --git a/trunk/pluto-portal/src/site/site.xml b/trunk/pluto-portal/src/site/site.xml
deleted file mode 100644
index 3de3b73..0000000
--- a/trunk/pluto-portal/src/site/site.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>

-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<project name="Maven">

-  <bannerLeft>

-    <name>Pluto</name>

-    <src>http://portals.apache.org/pluto/images/pluto.png</src>

-    <href>http://portals.apache.org/pluto</href>

-  </bannerLeft>

-  <bannerRight>

-    <src>http://portals.apache.org/pluto/images/banner.png</src>

-  </bannerRight>

-  <body>

-    <links>

-      <item name="Pluto Home" href="http://portals.apache.org/pluto"/>

-      <item name="JSR 168" href="http://jcp.org/en/jsr/detail?id=168"/>

-	  <item name="Chinese Translation" href="http://heavyz.sourceforge.net/pluto_zh/pluto-container"/>

-    </links>

-

-	<menu name="Pluto Portal">

-      <item name="Getting Started" href="/getting-started.html"/>

-	</menu>

-

-    ${reports}

-  </body>

-</project>

diff --git a/trunk/pluto-site/pom.xml b/trunk/pluto-site/pom.xml
deleted file mode 100644
index 9b2178a..0000000
--- a/trunk/pluto-site/pom.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<project xmlns="http://maven.apache.org/POM/4.0.0"

-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

-  

-  <parent>

-    <artifactId>pluto</artifactId>

-    <groupId>org.apache.pluto</groupId>

-    <version>1.1.0-SNAPSHOT</version>

-  </parent>

-  

-  <modelVersion>4.0.0</modelVersion>

-  <artifactId>pluto-site</artifactId>

-  <name>Pluto Website Documentation</name>

-  <url>http://portals.apache.org/pluto/</url>

-  <inceptionYear>2001</inceptionYear>

-  

-  <distributionManagement>

-    <site>

-      <id>website</id>

-      <url>scp://minotaur.apache.org/www/portals.apache.org/pluto</url>

-    </site>

-  </distributionManagement>

-  

-  <reporting>

-    <plugins>

-      <plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-project-info-reports-plugin</artifactId>

-      </plugin>

-      <plugin>

-        <artifactId>maven-assembly-plugin</artifactId>

-        <configuration>

-          <descriptor>src/assemble/bin.xml</descriptor>

-        </configuration>

-      </plugin>

-    </plugins>

-  </reporting>

-  <!-- repeated here so that pluto-site is not appended -->

-  <scm>

-    <connection>scm:svn:http://svn.apache.org/repos/asf/portals/pluto/trunk/</connection>

-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/portals/pluto/trunk/</developerConnection>

-    <url>http://svn.apache.org/viewcvs.cgi/portals/pluto/trunk/</url>

-  </scm>

-

-</project>

-

diff --git a/trunk/pluto-site/src/site/resources/css/site.css b/trunk/pluto-site/src/site/resources/css/site.css
deleted file mode 100644
index 8e74653..0000000
--- a/trunk/pluto-site/src/site/resources/css/site.css
+++ /dev/null
@@ -1,207 +0,0 @@
-/*

-* Copyright 2005-2006 The Apache Software Foundation

-*

-* Licensed under the Apache License, Version 2.0 (the "License");

-* you may not use this file except in compliance with the License.

-* You may obtain a copy of the License at

-*

-*     http://www.apache.org/licenses/LICENSE-2.0

-*

-* Unless required by applicable law or agreed to in writing, software

-* distributed under the License is distributed on an "AS IS" BASIS,

-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-* See the License for the specific language governing permissions and

-* limitations under the License.

-*/

-/**

- * =============================================================================

- * Customized stylesheet for maven-generated site.

- * =============================================================================

- */

-

-

-html {

-    border-width: 10px;

-    border-style: solid;

-    border-color: #2E6794;

-}

-

-body {

-    

-}

-

-.composite {

-    background-color: #FFFFFF;

-    border-width: 1px;

-    border-style: solid;

-    border-color: #000000;

-}

-

-/**

- * The top banner, which contains the apache portals logo and pluto logo.

- */

-#banner {

-    background-color: #8DB7DF;

-    border-bottom-width: 1px;

-    border-bottom-style: solid;

-    border-bottom-color: #000000;

-    vertical-align: top;

-}

-

-/**

- * The left part of the top banner, which is the apache portals logo.

- */

-#bannerLeft {

-    display: none;

-}

-

-/**

- * The right part of the top banner.

- */

-#bannerRight {

-    width: 450px;

-    margin: 0px;

-    float: left;

-}

-

-/**

- * Breadcrumbs under the top banner: last published date and quick links.

- */

-#breadcrumbs {

-    background-color: #F0F0F0;

-}

-

-.highlightBox {

-    width: 240px;

-    float: right;

-    clear: right;

-    background-color: #EEEEEE;

-    margin: 0px 0px 20px 20px;

-    padding: 5px;

-    border-width: 1px;

-    border-style: solid;

-    border-color: #909090;

-}

-

-.highlightBox h5 {

-    margin: 0;

-    padding: 0;

-    color: #000000;

-    font-size: smaller;

-    border-width: 0px 0px 1px 0px;

-    border-style: solid;

-    border-color: #909090;

-}

-

-.highlightBox p {

-    margin: 1em 0 0.5em 0;

-    padding: 0;

-    font-size: smaller;

-}

-

-.highlightBox ul {

-    margin-top: 0;

-    margin-bottom: 1em;

-    list-style-type: square;

-}

-

-.highlightBox li {  

-    margin: 0;

-    padding: 0;

-    font-size: smaller;

-}

-

-#leftColumn {

-    background-color: #FFFFFF;

-    border-width: 1px;

-    border-style: solid;

-    border-color: #CCCCCC;

-}

-

-

-#bodyColumn {

-    

-}

-

-/**

- * The section title.

- */

-.section h2 {

-    padding: 0em;

-    margin: 0.25em 0em 0.25em 0em;

-    background-color: #FFFFFF;

-    color: #6D97BF;

-    font-family: "Trebuchet MS", Trebuchet, Arial, Verdana, Sans-serif;

-    font-weight: bold;

-    white-space: nowrap;

-    border-width: 0px 0px 1px 0px;

-    border-style: solid;

-    border-color: #8DB7DF;

-}

-

-/**

- * The subsection title.

- */

-.section h3 {

-    padding: 0em;

-    margin: 0.25em 0em 0.25em 0em;

-    background-color: #FFFFFF;

-    color: #000000;

-    font-family: "Trebuchet MS", Trebuchet, Arial, Verdana, Sans-serif;

-    font-weight: bold;

-    white-space: nowrap;

-    border-width: 0px;

-}

-

-/**

- * The subsection title.

- */

-.section h4 {

-    padding: 0em;

-    margin: 0.25em 0em 0.25em 0em;

-    background-color: #FFFFFF;

-    color: #000000;

-    font-family: "Trebuchet MS", Trebuchet, Arial, Verdana, Sans-serif;

-    font-size: 120%;

-    font-weight: bold;

-    border-width: 0px;

-}

-

-/**

- * The FAQ.

- */

-

-.section dl {

-    background-color: #FFFFFF;

-    border-width: 0px;

-}

-

-.section dt {

-    padding: 10px 0px 5px 0px;

-}

-

-.section dt b {

-    font-family: "Trebuchet MS", Trebuchet, Arial, Verdana, Sans-serif;

-    font-size: 120%;

-}

-

-.section dd {

-    border-width: 0px 0px 1px 0px;

-    border-color: #808080;

-    border-style: dotted;

-}

-

-.section dd hr {

-    visibility: hidden;

-}

-

-/**

- * The footer.

- */

-

-#footer {

-    border-top-width: 1px;

-    border-top-style: solid;

-    border-top-color: #2E6794;

-}

-

diff --git a/trunk/pluto-site/src/site/resources/images/banner.png b/trunk/pluto-site/src/site/resources/images/banner.png
deleted file mode 100644
index 12177e8..0000000
--- a/trunk/pluto-site/src/site/resources/images/banner.png
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-site/src/site/resources/images/download.gif b/trunk/pluto-site/src/site/resources/images/download.gif
deleted file mode 100644
index 3955d19..0000000
--- a/trunk/pluto-site/src/site/resources/images/download.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-site/src/site/resources/images/pluto11.png b/trunk/pluto-site/src/site/resources/images/pluto11.png
deleted file mode 100644
index 0937fdb..0000000
--- a/trunk/pluto-site/src/site/resources/images/pluto11.png
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-site/src/site/resources/images/v101/Relations.jpg b/trunk/pluto-site/src/site/resources/images/v101/Relations.jpg
deleted file mode 100644
index 94a50d2..0000000
--- a/trunk/pluto-site/src/site/resources/images/v101/Relations.jpg
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-site/src/site/resources/images/v101/default_portal_layout.jpg b/trunk/pluto-site/src/site/resources/images/v101/default_portal_layout.jpg
deleted file mode 100644
index 1251884..0000000
--- a/trunk/pluto-site/src/site/resources/images/v101/default_portal_layout.jpg
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-site/src/site/resources/images/v101/jw-0801-RI_deploy.jpg b/trunk/pluto-site/src/site/resources/images/v101/jw-0801-RI_deploy.jpg
deleted file mode 100644
index c7df2df..0000000
--- a/trunk/pluto-site/src/site/resources/images/v101/jw-0801-RI_deploy.jpg
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-site/src/site/resources/images/v101/jw-0801-pluto_arch.jpg b/trunk/pluto-site/src/site/resources/images/v101/jw-0801-pluto_arch.jpg
deleted file mode 100644
index 0a9d0a1..0000000
--- a/trunk/pluto-site/src/site/resources/images/v101/jw-0801-pluto_arch.jpg
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-site/src/site/resources/images/v101/jw-0801-portal_arch.jpg b/trunk/pluto-site/src/site/resources/images/v101/jw-0801-portal_arch.jpg
deleted file mode 100644
index c3ed83c..0000000
--- a/trunk/pluto-site/src/site/resources/images/v101/jw-0801-portal_arch.jpg
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-site/src/site/resources/images/v11/architecture.png b/trunk/pluto-site/src/site/resources/images/v11/architecture.png
deleted file mode 100644
index 84c4040..0000000
--- a/trunk/pluto-site/src/site/resources/images/v11/architecture.png
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-site/src/site/site.xml b/trunk/pluto-site/src/site/site.xml
deleted file mode 100644
index fd5cd7f..0000000
--- a/trunk/pluto-site/src/site/site.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-

-<project name="Pluto">

-  

-  <bannerLeft>

-    <name>Pluto</name>

-    <src>http://portals.apache.org/pluto/images/apache-portals.gif</src>

-    <href>http://portals.apache.org/pluto/</href>

-  </bannerLeft>

-  <bannerRight>

-    <src>http://portals.apache.org/pluto/images/banner.png</src>

-  </bannerRight>

-  

-  <body>

-    

-    <links>

-      <item name="JSR 168" href="http://jcp.org/en/jsr/detail?id=168"/>

-      <item name="JSR 286" href="http://jcp.org/en/jsr/detail?id=286"/>

-      <item name="Chinese Translation" href="http://people.apache.org/~zheng/pluto/chinese/"/>

-    </links>

-    

-    <menu name="The Pluto Project">

-      <item name="About Pluto" href="/index.html"/>

-      <item name="Mission" href="/mission.html"/>

-      <item name="Download" href="/download.html"/>

-      <item name="News" href="/news.html"/>

-      <item name="FAQ" href="/faq.html"/>

-      <item name="Wiki" href="http://wiki.apache.org/portals/Pluto"/>

-      <item name="Powered By Pluto" href="/powered.html"/>

-      <item name="Get Involved" href="/get-involved.html"/>

-    </menu>

-    

-    <menu name="Pluto 1.0.1">

-      <item name="Getting Started" href="/v101/install.html"/>

-      <item name="Resources" href="/v101/resources.html"/>

-      <item name="User Guide" href="/v101/userguide/index.html">

-        <item name="Portal Guide" href="/v101/userguide/portal.html"/>

-        <item name="Testsuite Guide" href="/v101/userguide/testsuite.html"/>

-      </item>

-      <item name="Developer Guide" href="/v101/developer/index.html">

-        <item name="Architecture" href="/v101/developer/arch.html"/>

-        <item name="Obtaining Source" href="/v101/developer/subversion.html"/>

-        <item name="Building From Source" href="/v101/developer/build_source.html"/>

-        <item name="Integrating" href="/v101/developer/integrate.html"/>

-      </item>

-    </menu>

-    

-    <menu name="Pluto 1.1">

-      <item name="Getting Started" href="/v11/getting-started.html"/>

-      <item name="Deploying" href="/v11/deploying.html"/>

-      <item name="App Servers" href="/v11/app-servers.html"/>

-      <item name="Architecture" href="/v11/architecture.html"/>

-      <item name="Resources" href="/v11/resources.html"/>

-      <item name="Subprojects" href="/v11/subprojects.html" collapsed="true">

-        <item name="Portlet Container" href="/pluto-container/index.html"/>

-        <item name="Portlet Tags" href="/pluto-taglib/index.html"/>

-        <item name="Portal Driver" href="/pluto-portal-driver/index.html"/>

-        <item name="Portal" href="/pluto-portal/index.html"/>

-        <item name="Testsuite" href="/pluto-testsuite/index.html"/>

-        <item name="Descriptor API" href="/pluto-descriptor-api/index.html"/>

-        <item name="Descriptor Impl" href="/pluto-descriptor-impl/index.html"/>

-        <item name="Optional Services" href="/pluto-optional-services/index.html"/>

-        <item name="Maven Plugin" href="/maven-pluto-plugin/index.html"/>

-        <item name="Ant Tasks" href="/pluto-ant-tasks/index.html"/>

-        <item name="Util" href="/pluto-util/index.html"/>

-      </item>

-    </menu>

-    

-    ${reports}

-    

-  </body>

-  

-</project>

diff --git a/trunk/pluto-site/src/site/xdoc/download.xml b/trunk/pluto-site/src/site/xdoc/download.xml
deleted file mode 100644
index f4644be..0000000
--- a/trunk/pluto-site/src/site/xdoc/download.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-

-<document>

-  

-  <properties>

-    <title>Apache Pluto Downloads</title>

-  </properties>

-  

-  <body>

-    

-    <section name="Download Pluto">

-      <p>

-        The Apache Pluto source and binary distributions can be downloaded from

-        <a href="http://www.apache.org/dyn/closer.cgi/portals/pluto/">a Pluto

-        distribution mirror</a>.

-      </p>

-    </section>

-    

-    <section name="Browse Distribution Archives">

-      <p>

-        You can browse and download our distribution archive

-        <a href="http://archive.apache.org/dist/portals/pluto/">from here</a>.

-      </p>

-    </section>

-  

-  </body>

-  

-</document>

diff --git a/trunk/pluto-site/src/site/xdoc/get-involved.xml b/trunk/pluto-site/src/site/xdoc/get-involved.xml
deleted file mode 100644
index 60d1c13..0000000
--- a/trunk/pluto-site/src/site/xdoc/get-involved.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-

-<document>

-  

-  <properties>

-    <title>Get Involved</title>

-    <author email="zheng.aT.apache.D0T.org">ZHENG Zhong</author>

-  </properties>

-  

-  <body>

-    

-    <section name="Get Involved in Apache Pluto!">

-      

-      <p>

-        Welcome to the Apache Pluto community! We invite you to participate as

-        a user or as a contributor -- or both!

-      </p>

-      

-      <subsection name="Provide Feedback">

-        <p>

-          The Pluto project will grow and thrive from those who use it, so send

-          the community your feedback:

-          <ul>

-            <li>

-              <a href="download.html">Download</a> Pluto or

-              <a href="source-repository.html">check out the current source code

-              from Subversion</a>, and start using it.

-            </li>

-            <li>

-              Subscribe to the <a href="mail-lists.html">Pluto mailing lists</a>

-              and participate in the discussion.

-            </li>

-            <li>

-              Participate in the <a href="http://wiki.apache.org/portals/Pluto">

-              Pluto Wiki</a>.

-            </li>

-            <li>

-              Pluto uses <a href="http://issues.apache.org/jira/browse/PLUTO">

-              Apache's Jira issue tracker</a> to log bugs and enhancement

-              requests. Anyone can browse the Jira database and create issues.

-            </li>

-          </ul>

-        </p>

-      </subsection>

-      

-    </section>

-    

-  </body>

-  

-</document>

diff --git a/trunk/pluto-site/src/site/xdoc/index.xml b/trunk/pluto-site/src/site/xdoc/index.xml
deleted file mode 100644
index be7710d..0000000
--- a/trunk/pluto-site/src/site/xdoc/index.xml
+++ /dev/null
@@ -1,145 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-

-<document>

-  

-  <properties>

-    <title>Welcome to Pluto</title>

-    <author email="ddewolf@apache.org">David DeWolf</author>

-  </properties>

-  

-  <body>

-    

-    <section name="Welcome to Pluto">

-      

-      <div class="highlightBox">

-        <h5>JSR-286 - The Java Portlet API 2.0</h5>

-        <p>

-          The Java Portlet API version 2.0 specification is now under

-          development by the JSR-286 Expert Group under the auspices of the

-          <a href="http://www.jcp.org">Java Community Process</a>.

-          JSR-286 builds on JSR-168. Details on the specification work can be

-          found at the <a href="http://jcp.org/en/jsr/detail?id=286">JSR-286 web

-          site</a>. The Expert Group is very interested in feedback from the

-          community. Send your comments to <a href="mailto:jsr-286-comments@jcp.org">

-          jsr-286-comments@jcp.org</a> or post to the

-          <a href="http://wiki.apache.org/portals/Pluto/IdeasAndCommentsForJSR286">

-          'Comments and ideas for JSR286'</a> wiki page.

-        </p>

-      </div>

-      

-      <div class="highlightBox">

-        <h5>Get Pluto 1.1.0</h5>

-        <p>

-          <a href="http://www.apache.org/dyn/closer.cgi/portals/pluto/">

-            <img valign="top" src="images/download.gif" border="0" title="download"/>

-            Download

-          </a>

-          Pluto 1.1.0-beta2 (19Mb)

-        </p>

-        <ul>

-          <li><a href="v11/getting-started.html">Installation Guide</a></li>

-        </ul>

-      </div>

-

-      <div class="highlightBox">

-        <h5>Get Pluto 1.0.1</h5>

-        <p>

-          <a href="http://archive.apache.org/dist/portals/pluto/">

-            <img valign="top" src="images/download.gif" border="0" title="download"/>

-            Download

-          </a>

-          Pluto 1.0.1 (12Mb)

-        </p>

-        <ul>

-          <li><a href="v101/install.html">Installation Guide</a></li>

-        </ul>

-      </div>

-      

-      <p>

-        Pluto is the Reference Implementation of the Java Portlet Specfication.

-        The current version of this specification is JSR 168.

-      </p>

-      <p>

-        Portlets are designed to run in the context of a portal. They are

-        written to the Portlet API which are similar to the Servlet API.

-      </p>

-      <p>

-        In contrast to servlets, portlets may not do things like sending

-        redirects or errors to browsers directly, forwarding requests or writing

-        arbitrary markup to the output stream to assure that they don?t distract

-        the portal web application which uses them. Another difference compared

-        to servlets is that portlets rely on portal specific infrastructure

-        functions such as access to user profile information, standard interface

-        for storing/retrieving persistent settings, getting client information,

-        etc. Generally, portlets are administrated more dynamically than

-        servlets typically are.

-      </p>

-      <p>

-        A portlet container provides a runtime environment for portlets

-        implemented according to the Portlet API. In this environment portlets

-        can be instantiated, used and finally destroyed. The portlet container

-        is not a stand-alone container like the servlet container; instead it is

-        implemented as a thin layer on top of the servlet container and reuses

-        the functionality provided by the servlet container.

-      </p>

-      <p>

-        Pluto serves as portlet container that implements the Portlet API and

-        offers developers a working example platform from which they can test

-        their portlets. However, it's cumbersome to execute and test the portlet

-        container without a driver, in this case, the portal. Pluto's simple

-        portal component is built only on the portlet container's and the JSR

-        168's requirements. (In contrast, the more sophisticated, Jetspeed

-        project concentrates on the portal itself rather than the portlet

-        container, and considers requirements from other groups.)

-      </p>

-    </section>

-

-    <section name="Project Status">

-      <p>

-        Apache Pluto is a subproject of the Apache Portals Project. The current

-        stable release of Apache Pluto is version 1.0.1. The current version

-        actively being developed is version 1.1.

-      </p>

-      <subsection name="Pluto 1.0.1">

-        <p>

-          Pluto 1.0.1 is the current stable release of Pluto. This version of

-          pluto is utilized as the portlet container for Jetspeed and other

-          portals. In addition, Pluto 1.0.1 is embeded within Apache Geronimo.

-        </p>

-      </subsection>

-      <subsection name="Pluto 1.1">

-        <p>

-          Pluto 1.1 introduces a new container architecture. If you are

-          embedding Pluto in your portal, realize that 1.1 is not binarily

-          compatible with Pluto 1.0.x.

-        </p>

-        <p>

-          Pluto 1.1 aims to simplify the architecture in order to make it more

-          user and developer friendly. You should find Pluto 1.1 easier to get

-          started with, easier to understand, and easier to embed with your

-          portal. Your feedback regarding how far we've come is always welcome

-          on the user and developer mailing lists!

-        </p>

-      </subsection>

-    </section>

-    

-  </body>

-  

-</document>

-

diff --git a/trunk/pluto-site/src/site/xdoc/mission.xml b/trunk/pluto-site/src/site/xdoc/mission.xml
deleted file mode 100644
index e800962..0000000
--- a/trunk/pluto-site/src/site/xdoc/mission.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-

-<document>

-  

-  <properties>

-    <title>The Pluto Project Mission</title>

-  </properties>

-  

-  <body>

-    <section name="The Pluto Project Mission">

-      <p>

-        The Pluto Portlet Container is the Reference Implementation of the Java

-        Portlet Specification. As such, Pluto offers the development community

-        a reference for interpretation of the specification, portlet developers

-        a container with which compliant portlets can be tested, and portal

-        developers a compliant container with which they can integrate.

-      </p>

-      <p>

-        The following document attempts to clarify the development priorities 

-        of the Apache Pluto project.

-      </p>

-      <p>

-        The primary concern of the pluto community is to ensure that the Pluto

-        Container maintains compatibility with the most current Java Portlet

-        Specification. Enhancements and bug fixes should be completed in a

-        manner in which compatibility is maintained.

-      </p>

-      <p>

-        It is the responsibility of the pluto development team to ensure that

-        no ambiguity is introduced into the reference implementation. No

-        enhancements should be implemented which introduce questions about the

-        specification.

-      </p>

-      <p>

-        It is desirable for Pluto to become a robust and easy to use portlet

-        container. This will facilitate its wider acceptance and usage in the

-        community. In order to accomplish these goals, it is assumed that

-        enhancements which are above and beyond the specification will be

-        introduced. These enhancements may be integrated with Pluto as long as

-        they do not compromise the integrity of the reference implementation as

-        described above.

-      </p>

-      <p>

-        Furthermore, functionality which is clearly beyond the scope of the

-        specification should be documented as such and placed into a package

-        which helps to distinguish it as such. The Pluto container should

-        always remain fully specification compliant and in working state when

-        these enhancements are removed. In most cases, this removal should be

-        supported through configuration parameters.

-      </p>

-      <p>

-        Finally, while the pluto project contains several subprojects, it is

-        important to realize that the container itself is the most important

-        aspect of the project. It, in an of itself, is the Java Portlet

-        reference implementation. The portal driver (Pluto Test Portal),

-        testsuite, and deployer exist to simplfy the use and testing of the

-        container. As such, any significant enhancements to these components

-        (most especially the portal driver) should be scrutinized before

-        implementation, as most likely, it is outside the scope of the pluto

-        project and belong in a portal full implementation.

-      </p>

-    </section>

-  </body>

-  

-</document>

-

diff --git a/trunk/pluto-site/src/site/xdoc/news.xml b/trunk/pluto-site/src/site/xdoc/news.xml
deleted file mode 100644
index d644f96..0000000
--- a/trunk/pluto-site/src/site/xdoc/news.xml
+++ /dev/null
@@ -1,192 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-

-<document>

-  

-  <properties>

-    <title>Pluto Project News and Status</title>

-    <author email="ddewolf.aT.apache.D0T.org">David H. DeWolf</author>

-    <author email="cdoremus.aT.hannaford.D0T.com">Craig Doremus</author>

-    <author email="zheng.aT.apache.D0T.org">ZHENG Zhong</author>

-  </properties>

-  

-  <body>

-    

-    <section name="News and Status">

-	<h4>12 October 2006 - Portals Pluto 1.1.0 beta2 released</h4>

-	<p>

-		The Apache Pluto project is proud to announce the release of Pluto 1.1.0 beta2. 

-		This is the second release of the 1.1 version of Pluto, which is a major refactoring of Pluto 1.0.1 

-		to allow for easier integration of Pluto's portlet container into a portal and easier 

-		configuration of the Pluto portal driver, a bare-bones portal included with Pluto.

-	</p>

-	<p>

-		This release fixes a number of bugs in Pluto 1.1 including ones that prevented standard portlet modes and

-		window states from functioning properly. We've also updated the binary release to deploy Pluto into 

-		Tomcat 5.5.17.

-	</p>

-	<p>

-		Pluto is the reference implementation of the JSR-168 (Portlet 1.0) specification for a portlet container. 

-		Pluto 1.1 is the basis for the reference implementation of the JSR-286 (Portlet 2.0) specification 

-		now under development by the JSR-286 Expert Group.

-	</p>

-	      

-

-	<h4>1 June 2006 - Portals Pluto 1.1.0 beta1 released</h4>

-	<p>

-		The Apache Pluto project is proud to announce the release of Pluto 1.1.0 beta1. 

-		This is the first release of the 1.1 version of Pluto, which is a major refactoring of Pluto 1.0.1. 

-		This refactoring allows for easier integration of Pluto's portlet container into a portal and easier 

-		configuration of the Pluto portal driver, a bare-bones portal included with Pluto.

-	</p>

-	<p>

-		Pluto is the reference implementation of the JSR-168 (Portlet 1.0) specification for a portlet container. 

-		Pluto 1.1 will be the basis for the reference implementation of the JSR-286 (Portlet 2.0) specification 

-		now under development by the JSR-286 Expert Group.

-	</p>

-	      

-      <h4>18 September 2005 - Portals Pluto 1.0.1 General Availability Released</h4>

-      <p>

-        The Apache Pluto Community is proud to announce the General

-        Availablility release of Pluto 1.0.1, the reference implementation of

-        the Java Portlet Specification (JSR-168).

-      </p>

-      <p>

-    	  Nearly all the outstanding bugs have been fixed in this release.

-        In addition, the Admin Portlet Application now supports hot deployment

-        of custom portlets.

-      </p>

-      

-      <h4>24 July 2005 - Portals Pluto 1.0.1-rc4 Released</h4>

-      

-      <h4>11 July 2005 - Portals Pluto 1.0.1-rc3 Released</h4>

-      <p>

-        The Apache Pluto Community is proud to announce the release of Apache

-        Pluto 1.0.1-rc-2: the third binary release of the reference

-        implementation of the Java Portlet Specification.

-      </p>

-      <p>

-        The third release candidate contains several bug fixes and will be

-        followed by a general availability of Pluto 1.0.1. In addition to bug

-        fixes, the release contains a new administrative portlet which can be

-        used to deploy portlets.

-      </p>

-      

-      <h4>22 December 2004 - Portals Pluto 1.0.1-rc2 Released</h4>

-      <p>

-        The Apache Pluto Community is proud to announce the release of Apache

-        Pluto 1.0.1-rc-2: the second binary release of the reference

-        implementation of the Java Portlet Specification.

-      </p>

-      <p>

-        Community feedback will decide if a further release candidate is

-        required before a final release.

-      </p>

-      

-      <h4>8 October 2004 - Portals Pluto 1.0.1-rc1 Released</h4>

-      <p>

-        The Apache Pluto Community is proud to announce the release of Apache

-        Pluto 1.0.1-rc-1: the first binary release of the reference

-        implementation of the Java Portlet Specification.

-      </p>

-      <p>

-        Pluto 1.0.1-rc-1 is considered a release candidate. The promotion of

-        this release candidate to general availability is expected within the

-        few weeks, pending feedback from the community.

-      </p>

-      <p>

-        The Java Portlet Specification defines a Portlet API very similar to

-        the Servlet API. The API provides a means for aggregating disperate

-        content sources.  The specification addresses security and

-        personalization considerations and defines a standard with which these

-        sources, or portlets can be deployed.

-      </p>

-      <p>

-        Pluto is an embedable portlet container which will typically be bundled

-        within a fully functional Portal.  The Pluto community has developed a

-        simple portal driver implementation which allows for the testing and

-        development of portlets with the container. The Pluto testsuite is an

-        implementation agnostic portlet application which tests several basic

-        operations of the container in which it is deployed.

-      </p>

-      <p>

-        The distribution is organized into four releases:

-        <ul>

-          <li>A binary distribution bundled with Tomcat. This distribution is

-          the easiest to install.</li>

-          <li>A source distribution.</li>

-          <li>A binary distribution containing the container library.</li>

-          <li>A binary tools distribution with the portal driver and testsuite.</li>

-        </ul>

-      </p>

-      

-      <h4>September 2004 - Releasing Pluto</h4>

-      <p>

-        The Pluto Team is currently working on the first public release which

-        is expected by the end of September.

-      </p>

-      

-      <h4>July/August 2004 - Pluto moved out of the Incubator</h4>

-      <p>

-        The Pluto Project is now a sub project under the portals PMC and has

-        moved out of the incubator. This move comes with some changes regarding

-        mailing addresses etc. In addition Pluto now uses Subversion instead of

-        CVS.

-      </p>

-      

-      <h4>May 2004 - Pluto moved issues to JIRA</h4>

-      <p>

-        As most projects in the ASF, we are superseding Bugzilla and using JIRA

-        to manage project issues. New URL for

-        <a href="http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10560">

-        Pluto issues</a>.

-      </p>

-      

-      <h4>21 March 2004 - Pluto Declaration of Intent Finalized</h4>

-      <p>

-        The Pluto Community has finalized a declaration of intent which

-        clarifies the direction with which Pluto development will move forward.

-      </p>

-      

-      <h4>27 February 2004 - Pluto SubProject Documentation Available</h4>

-      <p>

-        The maven subproject documentation is now being generated and included

-        in the Pluto documentation builds.

-      </p>

-      

-      <h4>10 November 2003 - Pluto Gets a Face Lift</h4>

-      <p>

-        Pluto is now managed by maven and it's website has subsequently recieved

-        a face lift. http://jakarta.apache.org/pluto now contains additional

-        information that should be helpfull in establishing this community.

-      </p>

-      

-      <h4>9 November 2003 - Pluto added to Bugzilla</h4>

-      <p>

-        Pluto has been added to Bugzilla

-        (<a href="http://issues.apache.org/bugzilla">http://issues.apache.org/bugzilla</a>).

-        Issues, bugs, and enhancements will now be managed through this bug

-        database.

-      </p>

-    

-    </section>

-    

-  </body>

-  

-</document>

-

diff --git a/trunk/pluto-site/src/site/xdoc/powered.xml b/trunk/pluto-site/src/site/xdoc/powered.xml
deleted file mode 100644
index 689e633..0000000
--- a/trunk/pluto-site/src/site/xdoc/powered.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0"?>

-<!-- 

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<document>

-  <properties>

-    <author email="ddewolf.AT.apache.D0T.org">David H. DeWolf</author>

-    <title>Pluto Project | Declaration of Intent</title>

-  </properties>

-

-<body>

-  <section name="Portal using Pluto">

-    <p>

-	  The following portals use Pluto for their portlet container:

-	  <table>

-      <tr><th>Portal</th><th>Website</th><th>License</th><th>Status</th><th>Pluto Version</th></tr>

-	  <tr><td>Apache Jetspeed 2</td>

-          <td><a href="http://portals.apache.org/jetspeed-2">http://portals.apache.org/jetspeed-2</a></td>

-          <td>Apache 2.0</td>

-          <td></td>

-          <td>1.0.1</td></tr>

-	  <tr><td>Apache Cocoon</td>

-          <td><a href="http://cocoon.apache.org">http://cocoon.apache.org</a></td>

-          <td>Apache 2.0</td>

-          <td></td>

-          <td>1.0.1</td></tr>

-      <tr><td>uPortal</td>

-          <td><a href="http://www.uportal.org">http://www.uportal.org</a></td>

-          <td>JA-SIG</td>

-          <td></td>

-          <td>1.0.1</td></tr>

-      <tr><td>InfoGlue</td>

-          <td><a href="http://www.infoglue.org">http://www.infoglue.org</a></td>

-          <td>GPL</td>

-          <td></td>

-          <td>1.0.1</td></tr>

-      <tr><td>Jahia</td>

-          <td><a href="http://www.jahia.org">http://www.jahia.org</a></td>

-          <td><a href="http://www.collaborativesource.org">Proprietary</a></td>

-          <td>(http://www.jahia.org/cvs), branch JAHIA_PLUTO_BRANCH</td>

-          <td>1.0.1</td></tr>

-	  </table>

-    </p>

-

-	<p>

-    The following applications utilize Pluto for providing Plugin Extensibility:

-    <table>

-      <tr><th>Portal</th><th>Website</th><th>License</th><th>Status</th><th>Pluto Version</th></tr>

-	  <tr><td>Apache Geronimo </td>

-          <td><a href="http://geronimo.apache.org/">http://geronimo.apache.org</a></td>

-          <td>Apache 2.0</td>

-          <td>Web Management Console</td>

-          <td>1.0.1</td></tr>

-	  <tr><td>Java Studio Creator 2.0</td>

-          <td><a href="http://developers.sun.com/prodtech/javatools/jscreator/">http://developers.sun.com/prodtech/javatools/jscreator/</a></td>

-          <td>Sun Microsystems Inc.</td>

-          <td>Development Portal Server</td>

-          <td>1.0.1</td></tr>

-    </table>

-	</p>

-  </section>

-</body>

-</document>

-

-

diff --git a/trunk/pluto-site/src/site/xdoc/v101/developer/arch.xml b/trunk/pluto-site/src/site/xdoc/v101/developer/arch.xml
deleted file mode 100644
index 86e19d5..0000000
--- a/trunk/pluto-site/src/site/xdoc/v101/developer/arch.xml
+++ /dev/null
@@ -1,185 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!-- 

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<document>

-  <properties>

-    <author email="unknown">Jean-Baptiste Joret</author>

-    <author email="david.AT.daviddewolf.DOT.com">David H. DeWolf</author>

-    <title>Pluto Project</title>

-  </properties>

-

-<body>

-  <section name="Architecture Overview">

-

-<p>

-    Let's begin by examining Pluto's architecture and underlying concepts.

-    First, we briefly explain the portal that runs the RI, and see where 

-    to find a portlet container inside a portal architecture. Next, we 

-    investigate Pluto's architecture in detail. Last, we look at how it 

-    solves one challenging item of the portlet container: portlet deployment.

-</p>

-

-<p><strong>The Portal</strong>

-   <blockquote>

-   Pluto normally serves to show how the Portlet API works and 

-   offers developers a working example platform from which they can test 

-   their portlets. However, it's cumbersome to execute and test the portlet 

-   container without a driver, in this case, the portal. Pluto's simple 

-   portal component is built only on the portlet container's and the JSR 

-   168's requirements. (In contrast, the more sophisticated, open source 

-   Apache Jetspeed project concentrates on the portal itself rather than 

-   the portlet container, and considers requirements from other groups.)

-   </blockquote>

-

-   <blockquote>

-   Figure 1 depicts the portal's basic architecture. The portal Web 

-   application processes the client request, retrieves the portlets on 

-   the user's current page, and then calls the portlet container to 

-   retrieve each portlet's content. The portal accesses the portlet 

-   container with the Portlet Container Invoker API, representing the 

-   portlet container's main interface supporting request-based methods 

-   to call portlets from a portal's viewpoint. The container's user must 

-   implement the portlet container's Container Provider SPI (Service 

-   Provider Interface) callback interface to get portal-related 

-   information. Finally, the portlet container calls all portlets 

-   via the Portlet API.

-   </blockquote>

-

-   <blockquote>

-   <div align="center">

-		   <p>

-         <a href="../../images/v101/jw-0801-portal_arch.jpg">

-           <img src="../../images/v101/jw-0801-portal_arch.jpg"

-                alt="Portal Architecture" width="500"/></a></p>

-        <p><b><i><font size="-1">Figure 1. The simple portal included with Pluto. Click on the picture to enlarge it</font></i></b></p>

-   </div>

-   </blockquote>

-</p>

-

-<p><strong>The Portlet Container</strong>

-   <blockquote>

-   The portlet container, the portlets' runtime environment and a core

-   component of each portal, requires knowledge about the portal itself 

-   and must reuse common code from it. Consequently, the portlet 

-   container remains completely separated from every other portal component.

-   That said, you can embed the standalone portlet container in any portal 

-   by complying with the portlet container's requirements, such as 

-   implementing all SPIs.

-   </blockquote>

-

-   <blockquote>

-   The Portlet Container Invoker API, also called an entrance point, acts 

-   as the portlet container's main calling interface. The API combines a 

-   portlet container's lifecycle (init, destroy) with request-based 

-   calling methods (initPage(), performTitle(), portletService(), and so 

-   on). Because the portlet container calls a portlet in the end, the 

-   method signature resembles the Portlet API's main portlet interface, 

-   except that a portlet identifier must be passed. With this additional 

-   portlet identifier, the container can determine the portlet and call 

-   it accordingly.

-   </blockquote>

-

-   <blockquote>

-   Besides using the APIs to access the portlet container, the portal

-   must implement SPIs defined for the portlet container. Therefore, 

-   the RI introduces container services: pluggable components that can 

-   be registered at the container to either extend or provide basic 

-   functionality. The RI includes the following built-in container services 

-   (the first four must be implemented to run the portlet container, while 

-   the fifth is optional): 

-   </blockquote>

-

-   <blockquote>

-   <ul>

-   <li> Information provider: Gives the portlet container information about 

-        the portal and its framework. Only known information or information 

-        that should be stored within the portal is present through this 

-        interface. Such information includes URL generation with navigational 

-        state, portlet context, portlet mode, and window-state handling</li>

-   <li> Factory manager: Defines how to get an implementation through a 

-        factory. (A normal portal should already own such an implementation.)</li>

-   <li> Log service: Defines a logging facility. (A normal portal should 

-        already own such an implementation.)</li>

-   <li> Config service: Defines how to get configuration values. (A normal portal 

-        should already own such an implementation.)</li>

-   <li> Property manager (optional): A property manager interface implementation 

-        lets a portal handle properties as defined in the JSR 168 specification.</li>

-   </ul>

-   </blockquote>

-

-   <blockquote>

-   Strictly speaking, the Portlet Object Model also acts as an SPI, but has an 

-   exceptional position among the SPIs. Therefore, don't consider it part of the 

-   container services as it deals with all portlet objects and comprises a collection

-   of interwoven interfaces.

-   </blockquote>

-

-   <blockquote>

-   <div align="center">

-        <p>

-          <a href="../../images/v101/jw-0801-pluto_arch.jpg">

-            <img src="../../images/v101/jw-0801-pluto_arch.jpg"

-                 alt="Pluto Architecture" width="500"/></a></p>

-        <p><b><i><font size="-1">Figure 2. The portlet container's architecture. Click on the picture to enlarge it</font></i></b></p>

-   </div>

-   </blockquote>	   

-</p>

-<p><strong>Portlet Deployment</strong>

-   <blockquote>

-   The portlet container can leverage the servlet container's functionality, upon 

-   which the portlet container is built. To accomplish that, the portlet container 

-   must inject servlet artifacts into each portlet-application war file, as Figure 

-   3 shows. The portlet component, Deployment, takes the original war file, then 

-   injects a new or modified web.xml and a servlet to wrap each portlet and uses 

-   it as a calling point. Then the portlet deployment passes the modified war 

-   file to the application server deployment, which deploys it into the 

-   application server's system. During the portlet's invocation, the portlet 

-   container calls the injected servlet as an entrance point into the deployed 

-   portlet war file.

-   </blockquote>

-

-   <blockquote>

-   <div align="center">

-       <p><a href="../../images/v101/jw-0801-RI_deploy.jpg">

-         <img src="../../images/v101/jw-0801-RI_deploy.jpg"

-              alt="Deployment" width="500"/></a></p>

-       <p><b><i><font size="-1">Figure 3. Portlet deployment in the RI. Click on thumbnail to view full-size image.</font></i></b></p>

-   </div>

-   </blockquote>	   

-</p>

-

-

-<p><strong>Pluto and the WSRP standard</strong>

-   <blockquote>

-   The JSR 168 aligns closely with the Web Services for Remote Portlets (WSRP) standard. 

-   Both standards, which emerged at the same time, released open source implementations 

-   capable of all necessary functions described in the respective specifications. 

-   As a mutual goal, both standards strive to work well together. As a result, 

-   the portlet container can run WSRP portlets as a consumer as well as a producer.

-   </blockquote>

-

-   <blockquote>

-   Pluto must be able to run multiple portlet containers in one portal. Consequently, 

-   Pluto's portlet container can be instantiated multiple times and, more importantly,

-   it can be instrumented in different ways. Each portlet container, therefore, can 

-   use different implementations for SPIs.

-   </blockquote>

-</p>

-</section>

-</body>

-</document>

-

diff --git a/trunk/pluto-site/src/site/xdoc/v101/developer/build_source.xml b/trunk/pluto-site/src/site/xdoc/v101/developer/build_source.xml
deleted file mode 100644
index b6d5988..0000000
--- a/trunk/pluto-site/src/site/xdoc/v101/developer/build_source.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version="1.0"?>
-<!-- 
-Copyright 2004 The Apache Software Foundation
-Licensed  under the  Apache License,  Version 2.0  (the "License");
-you may not use  this file  except in  compliance with the License.
-You may obtain a copy of the License at 
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed  under the  License is distributed on an "AS IS" BASIS,
-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or
-implied.
-
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<document>
-  <properties>
-    <author email="unknown">Jean-Baptiste Joret</author>
-    <author email="david.AT.daviddewolf.DOT.com">David H. DeWolf</author>
-    <author email="nl.AT.essential.DOT.com.DOT.au">Nick Lothian</author>
-    <title>Pluto Project</title>
-  </properties>
-
-<body>
-<section name="Installation">
-<subsection name="Prerequisites">
-<p>It is expected that the user is familiar with the <a href="http://maven.apache.org">Apache
-  Maven</a> project tool.</p>
-</subsection>
-<subsection name="Requirements">
-<ul>
-  <li><a href="http://maven.apache.org/start/download.html">Maven 1.0.2</a></li>
-  <li>Java 1.4 or higher (If using JDK 1.4 in Tomcat 5.5, see Running.txt in Tomcat's home directory for modification instructions)</li>
-  <li>Servlet 2.3 compatible container: Tomcat 5.5 is suggested</li>
-</ul>
-</subsection>
-<subsection name="Get Maven Ready">
-<p>If you have not already done so, download and install Maven.</p>
-<p>2. build.properties settings:</p>
-<p>Please set these values in your <code>build.properties</code>
-  file:</p>
-<table width="650" border="1" cellspacing="0" cellpadding="3">
-  <tr>
-    <th width="134">property</th>
-    <th width="229">example</th>
-    <th width="261">what is it?</th>
-  </tr>
-  <tr>
-    <td width="134">maven.tomcat.home</td>
-    <td width="229">/tomcat</td>
-    <td width="261">location of the Tomcat install where you want to deploy Pluto</td>
-  </tr>
-  <tr>
-    <td width="134">maven.tomcat.version.major</td>
-    <td width="229">5</td>
-    <td width="261">Major version of Tomcat</td>
-  </tr>
-</table>
-<p>You can copy the <code>build.properties.sample</code> file and name it
-	<code>build.properties</code> and use this is a starting point.</p>
-</subsection>
-<subsection name="Building and deploying">
-
-<ul>
-  <li>change your directory to root of the Pluto project.</li>
-  <li>maven fullDeployment</li>
-  <li>This will take care of everything for you including copying shared jars,
-    and deploy the base Pluto portal along with the Portlet Test Suite</li>
-</ul>
-</subsection>
-<subsection name="Start Tomcat">
-<p>Run Tomcat, go to http://localhost:8080/pluto/portal.</p>
-</subsection>
-</section>
-
-<section name="What if I just want the Pluto container jar (like for Jetspeed 2)?">
-<ol>
-  <li>cd to /container directory</li>
-  <li>maven jar:install</li>
-</ol>
-<p>This will create the container jar in /container/target and also copy into
-  you maven repository.</p>
- </section>
-
-<section name="What if I just want to deploy the Pluto portal without the test suite?">
-<ol>
-  <li>Follow all the steps from &quot;<i>What if I just want the Pluto container
-    jar (like for Jetspeed 2)?</i>&quot;</li>
-  <li>cd to the /portal directory.</li>
-  <li>maven (with no goal)</li>
-</ol>
-<p>This will invoke the default maven goal for the /portal sub-project, tomcat:deploy.
-  This will build and deploy the Pluto portal minus the test suite into
-  tomcat.</p>
-</section>
-
-<section name="What if I decide I want to deploy the test suite portlets after I deploy the Pluto portal by itself?">
-<ol>
-  <li>Follow all the steps from &quot;<i>What if I decide I want to deploy the
-    test suite portlets after I deploy JUST the Pluto portal?</i>&quot;</li>
-  <li>cd to the /testsuite directory.</li>
-  <li>maven (with no goal)</li>
-</ol>
-<p>This will invoke the default maven goal for the /testsute sub-project, deployTestsuite.
-  This will build and deploy the test suite portlets into your already deployed
-  Pluto portal.</p>
-</section>
-
-<section name="Install Portlets">
-   <p>
-    <ul>To install portlets after you successfully installed Pluto, 
-       invoke Maven from the deploy subdirectory of the base install directory to deploy the portlet's war by executing:<br/>
-		<code>maven deploy -Ddeploy=FULL_PATH_TO_YOUR_PORTLET_WAR</code><br/>		
-	Alternatively, you could use the <a href="../install.html#Admin_Portlet_Application">Admin Portlet Application</a>
-	to install custom portlets.
-    </ul>
-   </p>
-</section>
-
-</body>
-</document>
-
diff --git a/trunk/pluto-site/src/site/xdoc/v101/developer/index.xml b/trunk/pluto-site/src/site/xdoc/v101/developer/index.xml
deleted file mode 100644
index 8e0fd68..0000000
--- a/trunk/pluto-site/src/site/xdoc/v101/developer/index.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>

-<!-- 

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<document>

-	<properties>

-		<author email="ddewolf@apache.org">David DeWolf</author>

-		<title>User Guide: Developing with Pluto</title>

-	</properties>

-<body>

-  <section name="Pluto Developer Guide">

-

-  </section>

-</body>

-</document>

diff --git a/trunk/pluto-site/src/site/xdoc/v101/developer/integrate.xml b/trunk/pluto-site/src/site/xdoc/v101/developer/integrate.xml
deleted file mode 100644
index c3c1631..0000000
--- a/trunk/pluto-site/src/site/xdoc/v101/developer/integrate.xml
+++ /dev/null
@@ -1,344 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!-- 

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-

-<document>

-  

-	<properties>

-		<author email="sthepper@apache.org">Stefan Hepper</author>

-		<author email="shesmer@apache.org">Stephan Hesmer</author>

-		<title>Integrating Pluto Into Your Container</title>

-	</properties>

-  

-	<body>

-		<section name="Integrating Pluto Into Your Container">

-			

-      <div align="center">

-        Stefan Hepper (sthepper@apache.org)<br/>

-        Stephan Hesmer (shesmer@apache.org)<br/>

-      </div>

-      

-			<subsection name="1 Introduction">

-				<p>

-					<a href="http://portals.apache.org/pluto/">Pluto</a> is a project at

-          Apache Portals (http://portals.apache.org/pluto) that provides the

-          reference implementation of the Java Portlet Specification. The first

-          version of this specification is available as

-          <a href="http://jcp.org/en/jsr/detail?id=168">JSR 168</a>.

-          The pluto project contains two parts: the portlet container and

-          a simple test portal driver. This document is about how to use the

-          pluto portlet container and replace the sample portal driver with your

-          own portal.

-        </p>

-        <div align="center">

-          <p>

-            <a href="../../images/v101/jw-0801-portal_arch.jpg">

-              <img src="../../images/v101/jw-0801-portal_arch.jpg"

-                   alt="Portal Architecture" width="500"/>

-            </a>

-          </p>

-          <p>

-            <b><i>Figure 1. Basic portal architecture. Click on the picture to

-            enlarge it</i></b>

-          </p>

-        </div>

-				<p>

-          Figure 1 depicts a portal's basic architecture. The portal's web

-          application processes the client request, retrieves the portlets on

-          the user's current page, and then calls the portlet container to

-          retrieve each portlet's content. The portal accesses the Portlet

-          Container by using the Portlet Container Invoker API. This interface

-          represents the main interface of the portlet container supporting

-          request-base methods to call portlets from a portal's point of view.

-          The Container Provider SPI (Service Provider Interface) is a callback

-          interface of the Portlet Container which needs to be implemented by

-          the portal to get portal related information, the container cannot

-          know about, like URL creation. Finally, the portlet container calls

-          all portlets via the Portlet API.

-        </p>

-      </subsection>

-      

-      <subsection name="2 Portlet container pluto">

-        <p>

-          The portlet container provides the runtime environment for the

-          portlets. It is a core component of each portal, requires knowledge

-          about the portal itself and has a need to reuse common code of the

-          portal. Due to these requirements the pluto portlet container is built

-          in a manner that completely separates the container from every other

-          portal component. Said that, the portlet container is a standalone

-          component that can be embedded in any portal by complying with the

-          requirements of the portlet container, such as implementing all SPIs.

-          The interfaces of the portlet container and its internal components

-          are described in more detail in the next paragraphs.

-        </p>

-				<div align="center">

-          <p>

-            <a href="../../images/v101/jw-0801-pluto_arch.jpg">

-              <img src="../../images/v101/jw-0801-pluto_arch.jpg"

-                   alt="Pluto Architecture" width="500"/>

-            </a>

-          </p>

-          <p>

-            <b><i>Figure 2. The portlet container's architecture. Click on the

-            picture to enlarge it</i></b>

-          </p>

-        </div>

-        <p>

-          The Portlet Container Invoker API, also called entrance point, is the

-          main calling interface of a portlet container. It combines the

-          lifecycle (init, destroy) of a portlet container as well as the

-          request based calling methods (processAction, render). Due to its

-          nature of calling a portlet in the end, the method signature looks

-          similar to the main portlet interface of the Portlet API except that

-          a portlet identifier needs to be passed additionally. With this

-          additional parameter the container is able to determine the portlet

-          and call it accordingly.

-        </p>

-        <p>

-          Besides of the application programming interfaces the portlet

-          container can be instrumented by providing different implementations

-          through service provider interfaces. Therefore, the reference

-          implementation introduces a concept called Container Services.

-          This concept will be described in more detail in a later chapter.

-        </p>

-      </subsection>

-      

-      <subsection name="3 How to integrate pluto with a portal framework">

-        

-        <p>

-          This section covers in detail how the portal can call the container

-          and which SPIs needs to be implemented by the portal in order to

-          re-use pluto. The portal calls the pluto container via the portlet

-          container entrance point and needs to provide implementations for the

-          SPIs container services and the portlet object model.

-        </p>

-        

-        <subsection name="3.1 Portlet Container Entrance Point">

-          <p>

-            The portlet container entrance point

-            <code>org.apache.pluto.PortletContainer</code>, is the main

-            interface between the portal's framework / aggregation and the

-            portlet environment. This interface is used to call the portlet

-            environment and execute portlets. It doesn't match exactly to the

-            Portlet API methods (init, processAction, render, destroy) but

-            generalizes the interface wherever possible.

-          </p>

-          <p>

-            The entrance point has methods with different scopes:

-            <ul>

-              <li>

-                <p>Lifecycle methods are called only <b>once</b> (init/shutdown).</p>

-                <p>These methods are normally called directly from the service interfaces.</p>

-              </li>

-              <li>

-                <p>Request-based methods are called for each request, but only

-                once for all portlets (portletLoad).</p>

-                <p>These methods must be called before the page aggregation

-                actually starts and after aggregating the page, affecting all

-                portlets being rendered on the page. Currently the only method

-                in this category is portletLoad that ensures that the portlet is

-                loaded and initialized before the request processing starts.</p>

-              </li>

-              <li>

-                <p>Request-based methods are called for each request and for

-                each portlet (processPortletAction, renderPortlet).</p>

-                <p>These methods are normally called during the page aggregation

-                as each portlet is being rendered.</p>

-              </li>

-            </ul>

-          </p>

-					<p>

-            The contract defined by this interface must be fulfilled by the

-            calling party to guarantee that the portlet environment will work

-            correctly.

-          </p>

-        </subsection>

-        

-        <subsection name="3.2 Container Services">

-          <p>

-            ContainerServices are a generic plug-in concept for extending the

-            core portlet container with additional functionality.

-            A ContainerService is defined by an interface, accessed by the

-            portlet container and provided by the calling party (mostly

-            portal/framework). In some cases the flow goes in the other

-            direction, from container to portal. The nature of a service can be

-            viewed as a service made available for the portlet container:

-            The container needs it to run, but cannot implement the service

-            itself.

-          </p>

-					<p>

-            The Container Service concept makes the portlet container

-            independent of portal functions so that it can be used by different

-            portals and furthermore new services can be plugged in to get a

-            richer portlet container experience. A ContainerServiceEnvironment

-            describing all services must be created and passed to the portlet

-            environment during initialization.

-          </p>

-          <p>

-            Container Services can be split into two different categories:

-            <ul>

-              <li>

-                <p><b>Mandatory Base Services</b></p>

-                <p>ContainerServices that must be provided by the calling party

-                so that the portlet container is able to run.</p>

-                <ul>

-                  <li><b>Information Provider Service:</b> described in the next

-                  sub section</li>

-								  <li><b>Factory Manager Service:</b> Factory Service enables

-                  the portlet container to get implementation objects through a

-                  factory concept.</li>

-                  <li><b>Log Service:</b> This interface defines a logging

-                  facility.</li>

-                </ul>

-              </li>

-              <li>

-                <p><b>Optional Base Services</b></p>

-                <p>ContainerServices that can be provided by the calling party,

-                but the container can run without it.</p>

-                <ul>

-                  <li><b>Property Manager Service:</b> The implementation of the

-                  Property Service interface enables a portal to deal with

-                  properties as defined in the JSR 168 specification.</li>

-                  <li><b>Dynamic Title Service:</b> Allows to support dynamic

-                  titles.</li>

-                </ul>

-              </li>

-            </ul>

-          </p>

-          

-          <subsection name="3.2.1 Information Provider Service">

-            <p>

-              The Information Provider is a callback mechanism for the portlet

-              environment into the calling party (mostly framework), to get hold

-              of necessary information that can only be known by the portal,

-              like hostname and URL generation. To differentiate between the

-              scopes of the requested information, the portlet environment

-              defines two interfaces: the DynamicInformationProvider and the

-              StaticInformationProvider.

-            </p>

-            <p>

-              The DynamicInformationProvider provides request-based information,

-              which changes for each request. Consequently a new

-              DynamicInformationProvider needs to be passed to the portlet

-              environment for each request. Typical information provided by this

-              Information Provider is a URL to a portlet. Additional provider

-              interfaces retrieved via getter methods of the

-              DynamicInformationProvider are PortletURLProvider and

-              PortletActionProvider.

-            </p>

-            <p>

-              The StaticInformationProvider on the other hand provides

-              non-request-based information, which is constant across all

-              requests. Therefore only one StaticInformationProvider needs to be

-              provided to the portlet environment (singleton). Typical

-              information provided by this Information Provider is the root

-              context of the portal. An additional provider interface retrieved

-              via a getter method of the StaticInformationProvider is the

-              PortalContextProvider that contains further information about the

-              portal, which need to be provided to the portlet.

-            </p>

-            <p>

-              Both Information Providers are not actively passed by the calling

-              party to the environment. Instead they are made available to the

-              portlet environment through the Container Service mechanism

-              described in the next section. Basically, the portlet environment

-              asks the calling party for an instance of one of the Information

-              Providers and the calling party returns the correct Information

-              Provider.

-            </p>

-          </subsection>

-          

-          <subsection name="3.3 Portlet Object Model">

-						<p>The Portlet Object Model interfaces are defined in the package org.apache.pluto.om. These interfaces should be seen as an internal interface that can be used by other components of the portal. The portlet environment only defines the interfaces that are necessary to execute the object model the portal that uses the portlet environment must implement the object model. </p>

-						<p>The object model represents the information available on different levels about portlets and the portlet application, like the deployment descriptors and customization data. </p>

-						<p>The following definitions are used to represent the different levels of information:</p>

-						<ul>

-							<li>

-								<p>

-									<strong>WebApplicationDefinition</strong> represents the context for the Portlet Application defined in the web.xml deployment descriptor.</p>

-							</li>

-							<li>

-								<p>

-									<strong>PortletApplicationDefinition</strong> describes a set (either all or a subset) of portlets that participate all in the same WebApplicationDefinition.</p>

-							</li>

-							<li>

-								<p>

-									<strong>PortletApplicationEntity</strong> is an instantiation of a PortletApplicationDefinition that is bound to a portal resource. It contains a set (either all or a subset) of portlets that participate all in the same PortletApplicationDefinition.</p>

-							</li>

-							<li>

-								<p>

-									<strong>ServletDefinition</strong> describes the portlet and its initial read-only properties that is not bound to any portal resource.</p>

-							</li>

-							<li>

-								<p>

-									<strong>Portlet Definition</strong> basic settings defined in the portlet.xml or set by administrators (read-only for users).</p>

-							</li>

-							<li>

-								<p>

-									<strong>Portlet Entity</strong> is a parameterized portlet definition, belonging to a user. </p>

-							</li>

-							<li>

-								<p>

-									<strong>Portlet Window</strong> is part of an aggregation tree that contains the portlet markup. The portlet window has navigational state attached to it.<!--&#11;-->

-								</p>

-							</li>

-						</ul>

-						<p>Figure 3 depicts the relation between the different definitions and their hierarchical structure. The servlet definitions are embedded in the web application definition. From a web application definition several portlet application definitions can be created that may consist of portlet definitions based on the servlet definitions defined in the web application definition. Using the portlet application definition several portlet application entities can be created that include portlet entities that are based on the corresponding portlet definitions. Finally the portlet windows of a portlet entity are linked to their corresponding portlet entity.</p>

-						<div align="center">

-							<p>

-									<a href="../../images/v101/Relations.jpg">

-										<img src="../../images/v101/Relations.jpg" alt="Portal Architecture"/>

-								</a>

-							</p>

-							<p>

-								<b>

-									<i>Figure 3. Relations between the different application and portlet representations

-									</i>

-								</b>

-							</p>

-						</div>

-						<p>The portlet object model represents these different layers allowing the portlet container to access the information layer-based.</p>

-						<p>The object model is split into four different sub-packages:</p>

-						<ul>

-							<li>

-								<p>common</p>

-								<p>contains generic interfaces that can be reused</p>

-							</li>

-							<li>

-								<p>window</p>

-								<p>contains all interfaces handling with portlet windows</p>

-							</li>

-							<li>

-								<p>entity</p>

-								<p>contains all interfaces handling with portlet application entities and portlet entities</p>

-							</li>

-							<li>

-								<p>portlet</p>

-								<p>contains all interfaces handling with portlet application definitions and portlet definitions</p>

-							</li>

-							<li>

-								<p>servlet</p>

-								<p>contains all interfaces representing the web application definitions and servlet definitions</p>

-							</li>

-						</ul>

-						<p>For the implementation of the different artifacts in the object model the model-view-controller pattern is used and for each artifact a read-only interface exists, and if required an interface with the setter methods and the ending Ctrl is provided.</p>

-					</subsection>

-				</subsection>

-			</subsection>

-		</section>

-	</body>

-</document>

diff --git a/trunk/pluto-site/src/site/xdoc/v101/developer/subversion.xml b/trunk/pluto-site/src/site/xdoc/v101/developer/subversion.xml
deleted file mode 100644
index 60725cc..0000000
--- a/trunk/pluto-site/src/site/xdoc/v101/developer/subversion.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Copyright 2004 The Apache Software Foundation
-Licensed  under the  Apache License,  Version 2.0  (the "License");
-you may not use  this file  except in  compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed  under the  License is distributed on an "AS IS" BASIS,
-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or
-implied.
-
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<document>
-<properties>
-  <author email="ddewolf@apache.org">David DeWolf</author>
-  <title>Developer Guide: Obtaining the Source Code</title>
-</properties>
-
-<body>
-  <section name="Developer Guide: Obtaining the Pluto 1.0.1 Source Code">
-  <p>
-    There are several reasons why you may want to have access to
-    the Pluto source code.  Some may want to participate in
-    the development of Pluto by submiting patches.  Others may want
-    to utilize Pluto as a reference implementation to clarify
-    the Portlet Specification.  Whatever the reason, there are two
-    ways to access the source code:
-  </p>
-
-  <p>
-  <ol>
-  	<li>
-    <a href="#Downloading_the_Source_Distribution">Downloading the
-    most recent Source Distribution</a> is the easiest
-    way to access the source.  Of course, because this method is
-    reliant on releases, you may not have the most recent source.
-    That said, you do have a better chance at recieving a more
-    stable codebase if you are using a distribution.
-  	</li>
-  	<li>
-    <A href="#Using_Subversion">Using Subversion</A> to checkout the
-    absolute up-to-date version of the code is the best way to
-    retrieve the source code.  If you plan to submit patches,
-    we ask that you use the Subversion Trunk to create your
-    diffs.
-  	</li>
-  </ol>
-  </p>
-    <subsection name="Downloading the Source Distribution">
-		<p>See the <a href="../../mirrors.cgi">download instructions</a></p>
-    </subsection>
-
-    <subsection name="Using Subversion">
-		<p>The Pluto project uses the
-		<a href="http://subversion.tigris.org/">Subversion</a> version control
-		system.  If you're new to Subversion, you can check out the
-		<a href="http://svnbook.red-bean.com/">online book</a> about Subversion.
-		Note that we are currently using Subversion 1.1.x (there are separate
-		versions of the book covering 1.0 and 1.1).
-		</p>
-
-    	<h2>Web Access to Subversion</h2>
-		<p>
-		If you just want to browse the Pluto 1.0.1 source code, you can use the
-		<a
-		href="http://svn.apache.org/viewcvs.cgi/portals/pluto/tags/release-1.0.1?root=Apache-SVN">ViewCVS
-		web interface</a> to Subversion.  This is current at all times.
-		</p>
-
-		<h2>Normal Subversion Access</h2>
-		<p>Anyone can check code out of Subversion anonymously.  However, you need to specify a
-		username and password in order to update the Subversion repository, and only
-		Pluto committers have the permissions to do that.  We run Subversion
-		over standard HTTPS, so hopefully you won't have problems with intervening
-		firewalls.</p>
-
-		<h3>Check out from Subversion</h3>
-		
-		<p>Again, anyone can do this.  To check out Pluto 1.0.1 (general release) to a directory 
-		called 'pluto' use this command:
-		</p>
-
-		<pre>svn checkout https://svn.apache.org/repos/asf/portals/pluto/tags/release-1.0.1/ pluto</pre>
-
-		<p>To check out Pluto 1.0.1 (bug fix version) use this command:
-		</p>
-
-		<pre>svn checkout https://svn.apache.org/repos/asf/portals/pluto/branches/pluto-1.0.2/ pluto</pre>
-
-		<p>This code base will become Pluto 1.0.2 if we feel necessary to release a new version.
-		</p>
-
-  
-    </subsection>
-
-  </section>
-</body>
-</document>
diff --git a/trunk/pluto-site/src/site/xdoc/v101/install.xml b/trunk/pluto-site/src/site/xdoc/v101/install.xml
deleted file mode 100644
index 512518c..0000000
--- a/trunk/pluto-site/src/site/xdoc/v101/install.xml
+++ /dev/null
@@ -1,280 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-Copyright 2004, 2005 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-

-<document>

-  

-  <properties>

-    <author email="unknown">Jean-Baptiste Joret</author>

-    <author email="ddewolf.AT.apache.DOT.org">David H. DeWolf</author>

-    <author email="nl.AT.essential.DOT.com.DOT.au">Nick Lothian</author>

-    <author email="cdoremus.AT.apache.DOT.org">Craig Doremus</author>

-    <author email="zheng.AT.apache.DOT.org">ZHENG Zhong</author>

-    <title>Getting Started with Pluto 1.0.1</title>

-  </properties>

-  

-  <body>

-    

-    <section name="Installation Guide">

-      <p>

-        This install guide covers the following types of installations:

-        <ul>

-          <li><a href="#Installing_Pluto_Distributions">Installing Pluto Distributions</a></li>

-          <li><a href="#Installing_Portlets">Installing Portlets</a></li>

-          <ul>

-            <li><a href="#Installing_With_Maven">Installing with Maven</a></li>

-            <li><a href="#Using_the_Admin_Portlet_Application">Using the Admin Portlet Application</a></li>

-          </ul>

-        </ul>

-      </p>

-    </section>

-    

-    <section name="Installing Pluto Distributions">

-      

-      <subsection name="Binary Distribution">

-        <p>

-          The binary distribution of Pluto is packaged with Tomcat (currently

-          version 5.5.9).  Pluto leverages Tomcat to provide the web container

-          in which the Pluto portlet container executes. The binary distribution

-          includes the Pluto Portlet Container, The Portal Driver, the Pluto

-          Testsuite and the Admin Portlet application.

-        </p>

-        <p>

-          To install the binary distribution:

-          <ul>

-            <li><a href="mirrors.cgi">Download</a> the current binary

-            distribution of Pluto</li>

-            <li>Extract the binary distribution to a directory from here forward

-            refered to as <code>"&lt;PLUTO_HOME&gt;"</code>.</li>

-            <li>Startup the server by using the appropriate tomcat startup

-            script located at <code>&lt;PLUTO_HOME&gt;/bin</code>.

-            For *nix use <code>startup.sh</code>; for windows use

-            <code>startup.bat</code>.</li>

-            <li>By default Tomcat 5.5 uses JDK 1.5 (J2SE 5.0). In order to run

-            it with JDK 1.4, a compatibility package needs to be downloaded and

-            installed. See the Running.txt file in the root directory for

-            details.</li>

-            <li>Point your browser to <code>http://localhost:8080/pluto/portal</code>,

-            the Pluto Driver, and your ready to go!</li>

-          </ul>

-        </p>

-      </subsection>

-      

-      <subsection name="Library Distributions">

-        <p>

-          The pluto library distributions are packaged to allow integration with

-          an external portal server.

-        </p>

-        <p>

-          To install the library distributions to your portal server, ensure

-          that the pluto-x.x.x.jar is loaded by a classloader to which both the

-          portal and portlet application web apps have access.

-        </p>

-      </subsection>

-      

-      <subsection name="Source Distribution">

-        <p>

-          Installing the source distribution requires the most effort, and is

-          recomended only for those individuals who are interested in modifying

-          the container.  The source distribution is basically a snapshot of the

-          source code repository at a given time. Because of this, please see

-          the build instructions, which will provide information about how to

-          build Pluto from scratch.

-        </p>

-        <p>

-          To install the source distribution into Tomcat:

-          <ul>

-            <li>Install Java 1.4 or greater</li>

-            <li>Install Maven 1.0 or greater</li>

-            <li>Install Tomcat 4.x or Tomcat 5.x to a directory from here

-            forward refered to as <code>&lt;TOMCAT_HOME&gt;</code></li>

-            <li>Edit your <code>&lt;PLUTO_HOME&gt;/build.properties</code> to

-            include the following properties:

-              <table>

-                <tr>

-                  <th>Property</th>

-                  <th>Value</th>

-                  <th>Example(s)</th>

-                </tr>

-                <tr>

-                  <td>maven.tomcat.home</td>

-                  <td>Tomcat Installation Directory</td>

-                  <td><code>/usr/local/apache-tomcat.5.0.27</code>,

-                      <code>c:\\apache-tomcat.5.0.27</code></td>

-                </tr>

-                <tr>

-                  <td>maven.tomcat.version.major</td>

-                  <td>Tomcat Major Version Number</td>

-                  <td>5</td>

-                </tr>

-              </table>

-            </li>

-            <li>From <code>&lt;PLUTO_HOME&gt;</code> issue the command:

-            <code>maven fullDeployment</code></li>

-            <li>Startup the server by using the appropriate Tomcat startup

-            script located at <code>&lt;PLUTO_HOME&gt;/bin</code>.

-            For *nix use <code>startup.sh</code>; for windows use

-            <code>startup.bat</code>.</li>

-            <li>Point your browser to

-            <code>http://localhost:8080/pluto/portal</code>, the Pluto Driver,

-            and your ready to go!</li>

-          </ul>

-        </p>

-      </subsection>

-      

-    </section>

-    

-    <section name="Installing Portlets">

-      

-      <subsection name="Installing with Maven">

-        <p>

-          <span style="color: #FF0000;">Currently, to automate the

-          deployment/installation of portlets you must utilize the source

-          distribution of pluto. Alternatively, you could use the

-          <a href="#Using_the_Admin_Portlet_Application">Admin Portlet

-          Application</a> to install custom portlets.</span>

-        </p>

-        <p>

-          In order to deploy a portlet application to pluto, you must follow the

-          steps below:

-        </p>

-        <p>

-          <b>Step 1:</b> Assemble your portlet application into a valid war.

-        </p>

-        <p>

-          <b>Step 2:</b> Run the maven deploy goal on your war. This can be done

-          by running this command line in the deploy subdirectory:

-          <source><![CDATA[

-maven deploy -Ddeploy=/MyPathToMyPortlet/target/MyPortlet.war

-          ]]></source>

-          See the <a href="developer/build_source.html">Building From Source</a>

-          document for detailed instructions.

-        </p>

-        <p>

-          Alternatively, there is an interactive ant script in the

-          <code>portlet-deploy</code> directory that will perform the same task

-          as the Maven deployment goal.

-        </p>

-        <p>

-          <b>Step 3:</b> Modify the Portlet Entity Registry and the Page

-          Registry and Portlet Contexts files. These configuration files are

-          located at:

-          <ul>

-            <li><code>[portal-home]/WEB-INF/data/portletentityregistry.xml</code></li>

-            <li><code>[portal-home]/WEB-INF/data/pageregistry.xml</code></li>

-            <li><code>[portal-home]/WEB-INF/data/portletcontexts.txt</code></li>

-          </ul>

-        </p>

-        <p>

-          The Portlet Entity Registry file requires that you specify an

-          application and a Portlet ID for your new Portlet. The Application ID

-          must be unique. It also needs to know the name of the Portlet so that

-          it can go out and find it in the webapps path. Furthermore, this

-          information is used to map the Portlet name to the appropriate class

-          path for loading the class. The following is an example of some

-          additions you can make to the entity registry file:

-        </p>

-        <p>

-          <source><![CDATA[

-<application id="6">

-  <definition-id>MyPortlet</definition-id>

-  <portlet id="1">

-    <definition-id>MyPortlet.MyPortlet</definition-id>

-  </portlet>

-</application>

-          ]]></source>

-        </p>

-        <p>

-          The Page Registry provides Pluto with the layout information for your

-          Portlet. The names used in the fragments must be unique as done in

-          the following example:

-        </p>

-        <p>

-          <source><![CDATA[

-<fragment name="MyPortlet" type="page">

-  <navigation>

-    <title>My First Portlet</title>

-    <description>...</description>

-  </navigation>

-  

-  <fragment name="row3" type="row">

-    <fragment name="col3" type="column">

-      <fragment name="p4" type="portlet">

-        <property name="portlet" value="6.1"/>

-      </fragment>

-    </fragment>

-  </fragment>

-  

-  ... ...

-

-</fragment>

-          ]]></source>

-        </p>

-        <p>

-          The Portlet Contexts file (<code>portletcontexts.txt</code>) lists

-          the webapp contexts for each portlet application that runs in Pluto.

-          Each portlet app has a line in this file corresponding to a path and

-          starting with a slash ('/'). In Tomcat, this path is the value of the

-          'path' attribute of the 'Context' element in a context XML descriptor

-          in <code>&lt;TOMCAT_HOME&gt;/conf/Catalina/localhost</code>

-          (or another 'conf' subdirectory).

-        </p>

-      </subsection>

-      

-      <subsection name="Using the Admin Portlet Application">

-        <p>

-          The Admin Portlet Application allows you to deploy custom portlets

-          using an interface in Pluto's portal. This application automatically

-          places the custom portlets to their proper place and updates the

-          registries.

-        </p>

-        <p>

-          Deploying a custom portlet application to Pluto using the Admin

-          Portlet Application requires the following steps:

-          <ul>

-            <li>Assemble your portlet application into a valid war.</li>

-            <li>Start Pluto and navigate to

-            <code>http://localhost:8080/pluto/portal</code>, the local Pluto

-            home page.</li>

-            <li>Click on the Admin navigation link. The Admin Portlet App should

-            appear.</li>

-            <li>In the Deploy War Portlet, click on the Browse button and select

-            your war file</li>

-            <li>Click on the Submit button of the Deploy War Portlet</li>

-            <li>In the resulting page, fill in the Title, Description (optional),

-            and the number of rows and columns you desire for laying out the

-            portlets. Click on Submit</li>

-            <li>In the resulting page, select from the drop downs which portlet

-            will be deployed in a particular row and column. Click on Submit.</li>

-            <li>After returning to the Deploy War Portlet 'home page', click on

-            the blue 'Hot deploy ...' link to hot deploy the new portlet app and

-            get redirected to its page.</li>

-          </ul>

-        </p>

-        <p>

-          Check out the Deploy War Portlet's help mode (help link) for

-          information on redeploying and undeploying portlets and

-          troubleshooting problems.

-        </p>

-      </subsection>

-      

-    </section>

-    

-  </body>

-  

-</document>

-

diff --git a/trunk/pluto-site/src/site/xdoc/v101/resources.xml b/trunk/pluto-site/src/site/xdoc/v101/resources.xml
deleted file mode 100644
index 33028d4..0000000
--- a/trunk/pluto-site/src/site/xdoc/v101/resources.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!-- 

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-

-<document>

-  <properties>

-    <author email="unknown">Jean-Baptiste Joret</author>

-    <author email="david.AT.daviddewolf.DOT.com">David H. DeWolf</author>

-    <title>Pluto Project</title>

-  </properties>

-  

-  <body>

-    

-    <section name="Resources">

-      <p>

-        <table>

-          <tr>

-            <th>Resource</th>

-            <th>Type</th>

-          </tr>

-          <tr>

-            <td><a href="http://jcp.org/en/jsr/detail?id=168">JSR 168</a></td>

-            <td>JCP Request Info</td>

-          </tr>

-          <tr>

-            <td><a href="http://jcp.org/en/jsr/detail?id=286">JSR 286</a></td>

-            <td>JCP Request Info</td>

-          </tr>

-          <tr>

-            <td><a href="http://jcp.org/aboutJava/communityprocess/final/jsr168/index.html">Portlet Specification 1.0</a></td>

-            <td>Specification</td>

-          </tr>

-          <tr>

-            <td><a href="http://people.apache.org/~zheng/pluto/chinese/">Chinese translation of Pluto website</a></td>

-            <td>Documentation</td>

-          </tr>

-          <tr>

-            <td><a href="http://today.java.net/pub/a/today/2005/02/18/josso.html">Integrating Java Open Single Sign-On in Pluto</a></td>

-            <td>Documentation</td>

-          </tr>

-          <tr>

-            <td><a href="http://www.theserverside.com/articles/article.tss?l=ClusteringTomcat">Clustering JSR-168 Portlet Applications in Tomcat</a></td>

-            <td>Documentation</td>

-          </tr>

-        </table>

-      </p>

-    </section>

-    

-  </body>

-</document>

-

diff --git a/trunk/pluto-site/src/site/xdoc/v101/userguide/index.xml b/trunk/pluto-site/src/site/xdoc/v101/userguide/index.xml
deleted file mode 100644
index b89d1a3..0000000
--- a/trunk/pluto-site/src/site/xdoc/v101/userguide/index.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0"?>

-<!--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<document>

-  <properties>

-  <author email="ddewolf.AT.apache.D0T.org">David DeWolf</author>

-  <title>Pluto User Guide</title>

-</properties>

-

-<body>

-<section name="User Guide">

-<subsection name="Prerequisites">

-  <p>It is expected that the reader of the user guide documentation

-     should has an understanding of Java Web Application development, and 

-     Java Portlet Development.</p>

-</subsection>

-

-<subsection name="Pluto - The Pluto Container">

-<p>

-   Pluto is the reference implementation of the Portlet Specification.

-   It is a portlet container which manages the lifecycle and request

-   processing of portlets which adhere to the specification.

-</p>

-   

-<p>

-   In an of itself, Pluto is not very usefull to the end user.

-   As a container, it does not have any understanding of portlet

-   invocation, portlet aggregation or other portal specific features. 

-</p>

-

-<p>

-  For more information on how to integrate Pluto into your portal, 

-  please see the <A href="../developer/integration.html">developer guides</A>.

-</p>

-

-</subsection>

-

-<subsection name="Pluto Portal Driver - The Test Portal">

-<p>

-  The Pluto Portal Driver is a simple portal implementation that

-  is provided for convenience sake. It's purpose is to provide

-  aggregation support so that Pluto may be easily tested, and

-  portlets may be easily developed.

-</p>

-

-<p>

-  For information on how to use, configure, and customize the 

-  Portal Driver, please see the 

-  <A href="portal.html">Portal Driver User Guide</A>.

-</p>

-

-</subsection>

-

-<subsection name="Pluto TestSuite - The Test Portlet Application">

-<p>

-  The Pluto TestSuite is a Portlet Application which can be used to test

-  Portlet Implementations.  The TestSuite tests several basic portlet

-  functions and is a quick and dirty way to test for Portlet Specification

-  compliance.  While a quick test of a portal using the testsuite won't 

-  garuntee compliance, it will help flag any notable incompliance.

-</p>

-

-<p>

-  For information on how to use and configure the TestSuite, please see

-  the <A href="testsuite.html">TestSuite User Guide</A>

-</p>

-</subsection>

-

-</section>

-

-</body>

-</document>

-

diff --git a/trunk/pluto-site/src/site/xdoc/v101/userguide/portal.xml b/trunk/pluto-site/src/site/xdoc/v101/userguide/portal.xml
deleted file mode 100644
index 258dc71..0000000
--- a/trunk/pluto-site/src/site/xdoc/v101/userguide/portal.xml
+++ /dev/null
@@ -1,448 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<document>

-<properties>

-  <author email="nlothian.AT.apache.DOT.org">Nick Lothian</author>

-  <author email="ddewolf.AT.apache.DOT.org">David DeWolf</author>

-  <author email="cdoremus.AT.apache.DOT.org">Craig Doremus</author>

-  <author email="zheng.AT.apache.DOT.org">ZHENG Zhong</author>

-  <title>User Guide: Pluto Portal Driver</title>

-</properties>

-

-<body>

-<section name="User Guide: Pluto 1.0.1 Portal Driver">

-  <p>

-  <ul>

-  <li><A href="#Limitations">Limitations</A></li>

-  <li><A href="#Configuration">Configuration</A></li>

-  <li><A href="#Defining_the_Portal_Layout">Defining the Portal Layout</A></li>

-  <li><A href="#Advanced_Customization">Advanced Customization</A></li>

-  <li><A href="#Internationalization">Internationalization</A></li>

-  <li><A href="#Further_Information">Further Information</A></li>

-  </ul>

-  </p>

-</section>

-

-

-<section name="Limitations">

-    <p>

-       The Pluto Portal is intended to provide an example implementation of

-       how to integrate Pluto into a portal. Additionally, it may be used for

-       the development of compliant portlets.  In some places it lacks the 

-       flexibility a true portal supplies. The portal is not designed for 

-       maximum performance, but rather simplicity.

-     </p>

-

-     <p>

-       To learn how to embed Pluto in your own portal, see the

-	   "<a href="../developer/integrate.html">Integration Guide</a>" document.</p>

-</section>

-

-<section name="Configuration">

-  <subsection name="Default Configuration">

-    <p>

-      Upon installation of the binary distribution of Pluto 1.0.1, the portal

-      driver is made available at <code>http://localhost:8080/pluto/portal</code>.

-      The default installation is configured with a portal page which

-      contains two instances of the testsuite portlet and an administration.

-      portlet for installing custom portlets and viewing the repositories.  

-      This configuration is also the default for installations completed from the source distribution

-      (or Subversion repository) and deployed using the Pluto deploy tool.

-    </p>

-    <p>

-      <table>

-      <caption><B>Default Configuration for Binary Distributions:</B></caption>

-      <tr><th>Configuration</th>

-          <th>Platform</th>

-          <th>Value</th><th>Description</th></tr>

-      <tr><td>Installation Directory</td>

-          <td>All</td>

-          <td>&lt;PLUTO_HOME&gt;</td>

-          <td>The directory to which you unarchived the distribution</td></tr>

-      <tr><td>Startup Scripts</td>

-          <td>*nix</td>

-          <td>&lt;PLUTO_HOME&gt;/bin/startup.sh</td>

-          <td>The script used to startup the portal driver</td></tr>

-      <tr><td>Startup Scripts</td>

-          <td>Windows</td>

-          <td>&lt;PLUTO_HOME&gt;/bin/startup.bat</td>

-          <td>The script used to startup the portal driver</td></tr>

-      <tr><td>Context Configuration</td>

-          <td>All</td>

-          <td>&lt;PLUTO_HOME&gt;/conf/Catalina/localhost/pluto.xml</td>

-          <td>The Tomcat Context Configuration file</td></tr>

-      </table>

-    </p>

-

-    <p>

-      <table>

-      <caption><B>Default Configuration for Source Distributions:</B></caption>

-      <tr><th>Configuration</th>

-          <th>Platform</th>

-          <th>Value</th><th>Description</th></tr>

-      <tr><td>Installation Directory</td>

-          <td>All</td>

-          <td>${maven.tomcat.home}</td>

-          <td>The tomcat installation directory to which pluto has been installed</td></tr>

-      <tr><td>Startup Scipts</td>

-          <td>*nix</td>

-          <td>${maven.tomcat.home}/bin/startup.sh</td>

-          <td>The script used to startup the portal driver</td></tr>

-      <tr><td>Startup Scipts</td>

-          <td>Windows</td>

-          <td>${maven.tomcat.home}/bin/startup.bat</td>

-          <td>The script used to startup the portal driver</td></tr>

-      <tr><td>Context Configuration</td>

-          <td>Tomcat 5.5</td>

-          <td>${maven.tomcat.home}/conf/Catalina/localhost/pluto.xml</td>

-          <td>The Tomcat Context Configuration file</td></tr>

-      </table>

-    </p>

-

-    <p>When the Pluto Portal is first installed, it is made available at 

-       the address http://localhost:8080/pluto/portal/.</p>

-

-				<p>This location can be customized, using standard Tomcat functionality. To modify the <i>pluto</i> part of the

-				location, alter the path mapping in pluto's context configuration file <i>pluto.xml</i></p>

-

-				<p>Under Tomcat 5.5, pluto.xml will be located

-				in the ${TOMCAT_HOME}/conf/Catalina/ directory. </p>

-

-				<p>In order to modify the context Pluto is running under, modify the <i>path</i> attribute:</p>

-				<p>

-				<b>Before:</b>

-				<source>

-	&lt;Context path="/pluto" docBase="pluto" crossContext="true"&gt;

-	&lt;/Context&gt;

-				</source>

-				</p>

-				<p><b>After:</b>

-				<source>

-	&lt;Context path="/newlocation" docBase="pluto" crossContext="true"&gt;

-	&lt;/Context&gt;

-				</source>

-				</p>

-				

-				<p>You might also need to modify host.name and portletcontainer.uniquename in 

-				${TOMCAT_HOME}/webapps/pluto/WEB-INF/config/services/ConfigService.properties.

-				</p>

-

-				<p>After this modification (and restarting Tomcat),

-				the Pluto Portal will be available at the address http://servername/newlocation/portal/.

-				Further information on customizing the context configuration is available for

-				<a href="http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html">Tomcat 5.5</a>.

-				</p>

-

-				<p>To modify the <i>portal</i> part of the location, alter the <i>url-pattern</i> for the

-				<i>pluto</i> servlet. This mapping can be found in the <i>web.xml</i> configuration file

-				for the Pluto web application.</p>

-				<p>

-				<b>Before:</b>

-				<source>

-    &lt;servlet-mapping&gt;

-       &lt;servlet-name&gt;pluto&lt;/servlet-name&gt;

-       &lt;url-pattern&gt;/portal/*&lt;/url-pattern&gt;

-    &lt;/servlet-mapping&gt;

-				</source>

-				</p>

-				<p>

-				<b>After:</b>

-				<source>

-    &lt;servlet-mapping&gt;

-       &lt;servlet-name&gt;pluto&lt;/servlet-name&gt;

-       &lt;url-pattern&gt;/app/*&lt;/url-pattern&gt;

-    &lt;/servlet-mapping&gt;

-				</source>

-				</p>

-				

-				<p>You will also need to modify servlet.insecure in ${TOMCAT_HOME}/webapps/pluto/WEB-INF/config/services/ConfigService.properties.

-				</p>

-				

-				<p>After these modifications (and restarting Tomcat),

-				the Pluto Portal will be available at the address http://servername/newlocation/app/

-				(assuming that the previous modification was also applied).

-				</p>

-			</subsection>

-

-			<subsection name="Registering Portlets for use">

-				<p>In order to use a Portlet in the Pluto Portal it needs to be registered. The Pluto Portal

-				keeps page registrations in a file named <i>portletentityregistry.xml</i> in the directory

-				${TOMCAT_HOME}/webapps/pluto/data.</p>

-

-				<p>By default, this file looks like this:

-				<source>

-&lt;?xml version="1.0" encoding="UTF-8"?&gt;

-&lt;portlet-entity-registry&gt;

-    &lt;application id="3"&gt;

-        &lt;definition-id&gt;testsuite&lt;/definition-id&gt;

-        &lt;portlet id="1"&gt;

-            &lt;definition-id&gt;testsuite.TestPortlet1&lt;/definition-id&gt;

-            &lt;preferences&gt;

-                &lt;pref-name&gt;TestName4&lt;/pref-name&gt;

-                &lt;pref-value&gt;TestValue4&lt;/pref-value&gt;

-                &lt;read-only&gt;true&lt;/read-only&gt;

-            &lt;/preferences&gt;

-        &lt;/portlet&gt;

-    &lt;/application&gt;

-    &lt;application id="4"&gt;

-        &lt;definition-id&gt;testsuite&lt;/definition-id&gt;

-        &lt;portlet id="1"&gt;

-            &lt;definition-id&gt;testsuite.TestPortlet2&lt;/definition-id&gt;

-            &lt;preferences&gt;

-                &lt;pref-name&gt;TestName4&lt;/pref-name&gt;

-                &lt;pref-value&gt;TestValue4&lt;/pref-value&gt;

-                &lt;read-only&gt;true&lt;/read-only&gt;

-            &lt;/preferences&gt;

-        &lt;/portlet&gt;

-    &lt;/application&gt;

-&lt;/portlet-entity-registry&gt;

-				</source>

-				</p>

-				<p>Each &lt;application&gt; tag defines one application (corresponding to one web-app on the

-				portal container), which can contain multiple &lt;portlet&gt; tags.

-				The "id" attribute in this tag identifies the application, and it does not need to be numeric.</p>

-

-				<p>The &lt;definition-id&gt; tag within the &lt;application&gt; refers to the name of the

-				web-app that contains the portlets in this application.</p>

-

-				<p>Each &lt;portlet&gt; tag defines one portlet. The "id"

-				attribute in this tag identifies the portlet. Note that the application id concatenated with the portlet

-				id will be mapped to the "value" attribute in the &lt;proprety&gt; tag in pageregistry.xml

-				(which is explained later).</p>

-

-				<p>Each &lt;preferences&gt; tag within the &lt;portlet&gt; tag defines name/value pairs for

-				the PorletPreferences.</p>

-

-				<p>In the example above two Portlet applications are made available to the portal with the

-				ids of "3" and "4". Both happen to point to the same webapp (<tt>&lt;definition-id&gt;testsuite&lt;/definition-id&gt;</tt>).

-				Both applications define a single Portlet each. Application id 3 uses the Portlet <i>TestPortlet1</i>

-				(<tt>&lt;definition-id&gt;testsuite.TestPortlet1&lt;/definition-id&gt;</tt>), while Application id 4 uses

-				the Portlet <i>TestPortlet2</i>	(<tt>&lt;definition-id&gt;testsuite.TestPortlet2&lt;/definition-id&gt;</tt>).

-				Note that prefixing the name of the Portlet with the name of web application (<i><b>testsuite</b>.TestPortlet1</i>)

-				is required.

-				</p>

-

-				<p>

-					Since Pluto 1.0.1-rc2, another configuration file, portletcontexts.txt, has been 

-				        included in the Pluto portal. The Portlet Contexts file ($PLUTO_HOME/WEB-INF/data/portletcontexts.txt) 

-				        lists the webapp 

-				        contexts for each portlet application that runs in Pluto. Each portlet app has a line in this 

-				        file corresponding to a path and starting with a slash ('/'). In Tomcat, this path is the value 

-				        of the 'path' attribute of the 'Context' element in a context XML descriptor in 

-				        $TOMCAT_HOME/conf/Catalina/localhost (or another 'conf' subdirectory).

-

-				</p>

-

-				<p>The Portlets themselves are defined in the portlet.xml configuration file within the

-				testsuite web application.	In that file there are two Portlets defined,

-				<i>TestPortlet1</i> and <i>TestPortlet2</i>, both of which point to the same

-				portlet class (<tt>org.apache.pluto.portalImpl.portlet.TestPortlet</tt>).

-				See the javax.portlet specification (JSR-168) for futher details on using the portlet.xml file.

-				</p>

-			</subsection>

-

-			<subsection name="Defining the Portal Layout">

-				<p>Once the Portlets available have been defined the Portal layout needs to be defined.	In the

-				Pluto Portal the file <i>pageregistry.xml</i> in the directory ${TOMCAT_HOME}/webapps/pluto/data defines this layout.</p>

-

-				<p>When Pluto is first installed, pageregistry.xml looks like this:

-			<source>

-&lt;?xml version="1.0"?&gt;

-&lt;portal&gt;

-    &lt;fragment name="navigation" class="org.apache.pluto.portalImpl.aggregation.navigation.TabNavigation"&gt;

-    &lt;/fragment&gt;

-

-    &lt;fragment name="test" type="page"&gt;

-        &lt;navigation&gt;

-            &lt;title&gt;Test&lt;/title&gt;

-            &lt;description&gt;...&lt;/description&gt;

-        &lt;/navigation&gt;

-

-        &lt;fragment name="row" type="row"&gt;

-            &lt;fragment name="col1" type="column"&gt;

-

-                &lt;fragment name="p1" type="portlet"&gt;

-                    &lt;property name="portlet" value="3.1"/&gt;

-                &lt;/fragment&gt;

-                &lt;fragment name="p2" type="portlet"&gt;

-                    &lt;property name="portlet" value="4.1"/&gt;

-                &lt;/fragment&gt;

-

-            &lt;/fragment&gt;

-        &lt;/fragment&gt;

-    &lt;/fragment&gt;

-&lt;/portal&gt;

-			</source>

-				</p>

-

-				<p>This configuration results in the Portal being displayed

-				(from the url http://servername/pluto/portal/test/) as Figure 1 shows.</p>

-

-				<div align="center">

-					<p>

-							<a href="../../images/v101/default_portal_layout.jpg">

-                <img src="../../images/v101/default_portal_layout.jpg"

-                     alt="Default Portal Layout" width="500"/></a>

-					</p>

-					<p>

-						<i><b><font size="-1">Figure 1. Default Portal Layout. Click on the picture to enlarge it</font></b></i>

-					</p>

-				</div>

-

-				<p>Working from the top of pageregistry.xml down, the first important section we come to is:

-				<source>

-&lt;fragment name="navigation" class="org.apache.pluto.portalImpl.aggregation.navigation.TabNavigation"&gt;

-&lt;/fragment&gt;

-				</source>

-				</p>

-				<p>This section tells the Portal to add a navigation menu to the user interface. Each fragment of

-				type <i>page</i> will be displayed in the navigation menu, provided the fragment has a &lt;navigation&gt;

-				sub-element. Removing the <tt>&lt;fragment name="navigation" ...&gt;&lt;/fragment&gt;</tt> section

-				will result in no navigation menu being displayed.

-				</p>

-

-				<p>

-				The next section is:

-				<source>

-    &lt;fragment name="test" type="page"&gt;

-        &lt;navigation&gt;

-            &lt;title&gt;Test&lt;/title&gt;

-            &lt;description&gt;...&lt;/description&gt;

-        &lt;/navigation&gt;

-		...

-		...

-    &lt;/fragment&gt;

-				</source>

-				</p>

-				<p>

-				This section defines a Portal "page", which is simply a container for one or more Portlets. The <i>name</i>

-				attribute must be unique within the pageregistry.xml file (if this constraint is not met an error

-				message <i>Fragment with this name &lt;duplicated name&gt; already exists in the pageregistry.xml.</i> will be written to your

-				log and your Pluto web application will fail to load).

-				</p>

-				<p>

-				The navigation subsection is used by the navigation menu (discussed previously). The &lt;title&gt;...&lt;/title&gt;

-				defines the label that will be shown in the navigation menu. The &lt;description&gt;...&lt;/description&gt;element

-				is not used.

-				</p>

-

-				<p>Inside the <tt>&lt;fragment type="page" .... &gt;&lt;/fragment&gt;</tt> elements we find

-				<source>

-    &lt;fragment name="row" type="row"&gt;

-        &lt;fragment name="col1" type="column"&gt;

-

-            &lt;fragment name="p1" type="portlet"&gt;

-                &lt;property name="portlet" value="3.1"/&gt;

-            &lt;/fragment&gt;

-            &lt;fragment name="p2" type="portlet"&gt;

-                &lt;property name="portlet" value="4.1"/&gt;

-            &lt;/fragment&gt;

-

-        &lt;/fragment&gt;

-    &lt;/fragment&gt;

-				</source>

-				</p>

-				<p>This defines the layout of the Portal "page". In this case two Portlets will be laid out in two columns,

-				nested inside a single row.

-				</p>

-				<p>The configuration below will give the page a layout of two rows, with a Portlet in each. Note that the names of all fragments

-				need to be unique.

-				<source>

-	&lt;fragment name="row1" type="row"&gt;

-	    &lt;fragment name="col1" type="column"&gt;

-	        &lt;fragment name="p1" type="portlet"&gt;

-	            &lt;property name="portlet" value="3.1"/&gt;

-	        &lt;/fragment&gt;

-	    &lt;/fragment&gt;

-	&lt;/fragment&gt;

-	&lt;fragment name="row2" type="row"&gt;

-	    &lt;fragment name="col2" type="column"&gt;

-	        &lt;fragment name="p2" type="portlet"&gt;

-	            &lt;property name="portlet" value="4.1"/&gt;

-	        &lt;/fragment&gt;

-	    &lt;/fragment&gt;

-	&lt;/fragment&gt;

-				</source>

-				</p>

-				<p>The section

-				<source>

-    &lt;fragment name="p1" type="portlet"&gt;

-        &lt;property name="portlet" value="3.1"/&gt;

-    &lt;/fragment&gt;

-    			</source>

-    			</p>

-    			<p>defines which portlet to display. <tt>&lt;property name="portlet" value="3.1"/&gt;</tt> tells the Portal

-				to lookup the Portlet "3.1" and display it in this location. The value "3.1" means refers to the ids given

-				in <i>portletentityregistry.xml</i> (discussed previously). In this case, it mean application id "3",

-				portlet id "1".

-				</p>

-			</subsection>

-		</section>

-

-		<section name="Advanced Customization">

-			<subsection name="JSP Templates">

-				<p>It is possible to customize the JSP templates Pluto uses. This is beyond the scope of this document,

-				but a brief outline follows to get you started.</p>

-

-				<p>By default, Pluto uses JSP templates from the directory

-				${TOMCAT_HOME}/webapps/pluto/WEB-INF/aggregation directory. This can be overridden by

-				adding a line like

-				<source>

-aggregation.base.dir=/WEB-INF/templates/

-				</source>

-				to the file ${TOMCAT_HOME}/webapps/pluto/WEB-INF/config/services/ConfigService.properties.

-				</p>

-				<p>The following JSP files are used by the Portal:

-					<ul>

-						<li>Banner.jsp - The blue title bar which says "Pluto - Reference Implementation". Only called from RootFragment.jsp</li>

-						<li>ColumnFragment.jsp - Called for each column fragment.</li>

-						<li>Head.jsp - The HTML header. Only called from RootFragment.jsp</li>

-						<li>PageFragment.jsp - Called for each Portal page displayed.</li>

-						<li>PortletFragmentFooter.jsp - The footer of each Portlet.</li>

-						<li>PortletFragmentHeader.jsp - The header of each Portlet.</li>

-						<li>RootFragment.jsp - Defines the layout of the Portal. This is the file to modify if you need

-							to modify the width of the navigation bar, for instance.</li>

-						<li>RowFragment.jsp - Called for each row fragment.</li>

-						<li>TabNavigation.jsp - Displays the navigation menu.</li>

-					</ul>

-				</p>

-				<p>

-				Most customization of the Portal can be done in RootFragment.jsp,

-				PortletFragmentHeader.jsp and PortletFragmentFooter.jsp.

-				</p>

-			</subsection>

-			<subsection name="Internationalization">

-				<p>The Pluto portal supports non latin-1 character-sets in its output. To enable this, uncomment the section

-				<source>

-	 &lt;init-param&gt;

-	     &lt;param-name&gt;charset&lt;/param-name&gt;

-	     &lt;param-value&gt;utf-8&lt;/param-value&gt;

-	 &lt;/init-param&gt;

-				</source>

-				from the "pluto" Servlet section in the file ${TOMCAT_HOME}/webapps/pluto/WEB-INF/web.xml.</p>

-			</subsection>

-			<subsection name="Further Information">

-				<p>

-				Further information can be found in the <a href="../faq.html">FAQ</a>, on the <a href="../../mail-lists.html">Mailing Lists</a>

-				and on the <a href="../../wiki.html">Wiki</a>

-				</p>

-			</subsection>

-		</section>

-	</body>

-</document>

-

diff --git a/trunk/pluto-site/src/site/xdoc/v101/userguide/testsuite.xml b/trunk/pluto-site/src/site/xdoc/v101/userguide/testsuite.xml
deleted file mode 100644
index 3cf0809..0000000
--- a/trunk/pluto-site/src/site/xdoc/v101/userguide/testsuite.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0"?>

-<!--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<document>

-<properties>

-  <author email="ddewolf@apache.org">David DeWolf</author>

-  <title>User Guide: Testsuite</title>

-</properties>

-

-<body>

-<section name="Testsuite Overview">

-<p>

-

-</p>

-</section>

-

-

-</body>

-</document>

-

diff --git a/trunk/pluto-site/src/site/xdoc/v11/app-servers.xml b/trunk/pluto-site/src/site/xdoc/v11/app-servers.xml
deleted file mode 100644
index d15b90b..0000000
--- a/trunk/pluto-site/src/site/xdoc/v11/app-servers.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-

-<document>

-  

-  <properties>

-    <title>Supported Application Servers</title>

-    <author email="ddewolf@apache.org">David DeWolf</author>

-  </properties>

-  

-  <body>

-    <section name="Supported Application Servers">

-      <p>The following application servers have been tested with Pluto 1.1:</p>

-      <p>

-        <table>

-          <tr>

-            <th>App Server</th>

-            <th>Version</th>

-            <th>Status</th>

-            <th>Notes</th>

-          </tr>

-          <tr>

-            <td>Tomcat</td>

-            <td>5.5.9</td>

-            <td>WORKING</td>

-            <td>

-              Use <code>mvn pluto:install -DinstallDir=/path/to/tomcat</code> 

-              to install the container and portal into Tomcat.

-            </td>

-          </tr>

-          <tr>

-            <td>Tomcat</td>

-            <td>5.5.12</td>

-            <td>MANUAL</td>

-            <td>

-              Tomcat contains a bug and does not recognize the context

-              configuration.  Manual Installation and renaming will work.

-            </td>

-          </tr>

-          <tr>

-            <td>Tomcat</td>

-            <td>5.5.17</td>

-            <td>Working</td>

-            <td>

-              Use <code>mvn pluto:install -DinstallDir=/path/to/tomcat</code> 

-              to install the container and portal into Tomcat.

-            </td>

-          </tr>

-          <tr>

-            <td>Jetty</td>

-            <td>5.1.5rc2</td>

-            <td>BEING FIXED</td>

-            <td>Deployment Descriptor Error. See Issue Log.</td>

-          </tr>

-          <tr>

-            <td>WebLogic</td>

-            <td></td>

-            <td>UNTESTED</td>

-            <td></td>

-          </tr>

-          <tr>

-            <td>WebSphere</td>

-            <td></td>

-            <td>UNTESTED</td>

-            <td></td>

-          </tr>

-          <tr>

-            <td>SunOne</td>

-            <td></td>

-            <td>UNTESTED</td>

-            <td></td>

-          </tr>

-        </table>

-      </p>

-    </section>

-  </body>

-  

-</document>

-

diff --git a/trunk/pluto-site/src/site/xdoc/v11/architecture.xml b/trunk/pluto-site/src/site/xdoc/v11/architecture.xml
deleted file mode 100644
index 57ac441..0000000
--- a/trunk/pluto-site/src/site/xdoc/v11/architecture.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright 2004 The Apache Software Foundation
-Licensed  under the  Apache License,  Version 2.0  (the "License");
-you may not use  this file  except in  compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed  under the  License is distributed on an "AS IS" BASIS,
-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or
-implied.
-
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-
-<document>
-  
-  <properties>
-    <title>Architectural Diagrams</title>
-    <author email="ddewolf@apache.org">David DeWolf</author>
-  </properties>
-  
-  <body>
-    <section name="Architectural Diagrams">
-      <p>
-        The following diagram depicts the architectural
-        components of Pluto 1.1. More details coming soon.
-        <img src="../images/v11/architecture.png"/>
-      </p>
-    </section>
-  </body>
-  
-</document>
-
diff --git a/trunk/pluto-site/src/site/xdoc/v11/deploying.xml b/trunk/pluto-site/src/site/xdoc/v11/deploying.xml
deleted file mode 100644
index 2ef2e7d..0000000
--- a/trunk/pluto-site/src/site/xdoc/v11/deploying.xml
+++ /dev/null
@@ -1,308 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-Copyright 2004-2006 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-

-<document>

-  

-  <properties>

-    <title>Deploying Portlet to Pluto Portal</title>

-    <author email="zheng.at.apache.D0T.org">ZHENG Zhong</author>

-    <author email="ddewolf@apache.org">David DeWolf</author>

-    <author email="cdoremus@apache.org">Craig Doremus</author>

-  </properties>

-  

-  <body>

-    

-    <section name="Deploying Portlet to Pluto Portal">

-      

-      <p>

-        There are 3 steps to deploy a portlet to Pluto 1.1:

-        <ul>

-          <li>

-            <b>Assembly</b>: All portlet applications must be run through the

-            pluto assembler before being deployed. The assembly process injects

-            pluto specific information for deployment. Specifically, a servlet

-            and servlet mapping are added to the deployment descriptor (web.xml). 

-            This servlet (<code>org.apache.pluto.core.PortletServlet</code>) will be 

-            used to dispatch portlet requests to the portlet application.

-          </li>

-          <li>

-            <b>Deployment</b>: After portlet applications are assembled properly

-            they must be deployed to the servlet engine within which the portal

-            application is running. The current binary distribution uses

-            Tomcat 5.5 as the servlet engine.

-          </li>

-          <li>

-            <b>Publishing</b>: All portlet applications that are to be used

-            within the Pluto Portal must be published to the Portal. Publishing

-            notifies the Portal Application that a portlet application is bound

-            (deployed) to a certain context within the appserver. This is done

-            by adding records to <code>pluto-portal-driver-config.xml</code>.

-          </li>

-        </ul>

-      </p>

-      

-      <subsection name="Portlet Assembly and Deployment using Maven 2">

-        <p>

-        As of the second beta release of Pluto 1.1, the Maven 2 plugins for assembly and 

-        deployment are partially completed.

-          Right now the maven-pluto-plugin correctly assembles the war with

-          the proper <code>PortletServlet</code> records to web.xml, but the 

-          deployment plugin is not yet completed. We have created an example

-          <!-- TODO: Review use of the word deploys -->

-          Maven 2 pom.xml below that correctly assembles and deploys the portlet.

-        </p>

-        <p>          

-          The custom Maven 2 build shown below also deploys

-          a Tomcat context deployment descriptor that has the same name as your

-          artifactId with an xml extension (e.g. HelloWorldPortlet.xml).

-        </p>

-        <p>

-          To properly assemble and deploy your portlet using the Maven 2 script (pom.xml) below, 

-          your project's directory structure and artifact placement must conform to Maven's standard:

-        </p>

-        <p>

-          <source><![CDATA[

-	HelloWorldPortlet (top level directory)

-	|- pom.xml (the pom file)

-	|- src (Subdir containing main subdirectory)

-	    |- main (Subdir containing java, resources and webapp subdirs)

-	    	|- java (java source code goes under here)

-		    |       `- com

-		    |           `- mycompany

-		    |               `- portlet

-		    |                   `- HelloWorldPortlet.java (portlet source)

-		    |- resources

-		    |	`- HelloWorldPortlet.xml (Tomcat context deployment descriptor)

-		    |- webapp  (webapp resources (jsp, css, images) go under here)

-		    	`- jsp 

-		    		`- HelloWorldPortletView.jsp (for view mode)		    			    

-		    		`- HelloWorldPortletEdit.jsp (for edit mode)		    			    

-		    	`- WEB-INF

-			    	`- portlet.xml (JSR-168 deployment descriptor)

-			    	`- web.xml (This will be modified by maven-pluto-plugin)

-          ]]></source>

-        </p>

-

-        <p>

-        This is an example of what the Tomcat context deployment descriptor will contain:

-          <source><![CDATA[

-		<Context path="HelloWorldPortlet" 

-			docBase="../PlutoDomain/HelloWorldPortlet.war" 

-			crossContext="true"/>        

-          ]]></source>

-        </p>

-        <p>

-        The Maven 2 pom file (pom.xml) is what defines the build. Our example overrides

-        the integration-test lifecycle phase in addition to using the maven-pluto-plugin

-        to assemble the war. Use this as you pom file, changing the groupId, artifactId and version

-        to values appropriate to your custom portlet.

-          <source><![CDATA[

-<project xmlns="http://maven.apache.org/POM/4.0.0"

-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

-  

-  <!-- Change this to something akin to your java package structure -->

-  <groupId>com.mycompany.portlet</groupId>

-  <modelVersion>4.0.0</modelVersion>

-  <!-- Version of this app -->

-  <version>0.1-alpha1</version>

-  <!-- Base name of the war file without .war ext -->

-  <artifactId>HelloWorldPortlet</artifactId>

-  <packaging>war</packaging>

-  <name>${pom.artifactId}</name>

-  <!-- Dependency Version Properties ======================================= -->

-  <properties>

-  	<!-- Change this for a new Pluto version -->

-    <pluto.version>1.1.0-beta2</pluto.version>

-    <portlet-api.version>1.0</portlet-api.version>

-    <servlet-api.version>2.3</servlet-api.version>

-    <jsp-api.version>2.0</jsp-api.version>

-    <junit.version>3.8.1</junit.version>

-  </properties>  

-  <dependencies>

-    <dependency>

-      <groupId>javax.portlet</groupId>

-      <artifactId>portlet-api</artifactId>

-      <version>${portlet-api.version}</version>

-      <scope>provided</scope><!-- Prevents addition to war file -->

-    </dependency>

-    <dependency>

-      <groupId>javax.servlet</groupId>

-      <artifactId>servlet-api</artifactId>

-      <version>${servlet-api.version}</version>

-      <scope>provided</scope>

-    </dependency>

-    <dependency>

-      <groupId>junit</groupId>

-      <artifactId>junit</artifactId>

-      <version>${junit.version}</version>

-      <scope>test</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.pluto</groupId>

-      <artifactId>pluto-util</artifactId>

-      <version>${pluto.version}</version>

-      <scope>provided</scope>

-    </dependency>

-    <!-- Any other build or deployment dependancies go here -->

-  </dependencies>

-  <build>

-    <finalName>${pom.name}</finalName>

-    <plugins>

-      <!-- configure maven-war-plugin to use updated web.xml -->

-      <plugin>

-        <artifactId>maven-war-plugin</artifactId>

-        <configuration>

-          <webXml>${project.build.directory}/pluto-resources/web.xml</webXml>

-        </configuration>

-      </plugin>

-      <!-- bind 'pluto:assemble' goal to 'process-resources' lifecycle -->

-      <plugin>

-        <groupId>org.apache.pluto</groupId>

-        <artifactId>maven-pluto-plugin</artifactId>

-        <version>${pluto.version}</version>

-        <executions>

-          <execution>

-            <phase>generate-resources</phase>

-            <goals>

-              <goal>assemble</goal>

-            </goals>

-          </execution>

-        </executions>

-      </plugin>

-      <plugin>

-      	<!-- Override the 'integration-test' lifecycle phase

-      	with a custom one that runs a simple Ant script -->

-        <artifactId>maven-antrun-plugin</artifactId>

-        <executions>

-          <execution>

-            <phase>integration-test</phase>

-            <configuration>

-              <tasks>

-              	<!-- Set tomcat.home to CATALINA_HOME environmental variable 

-              	Use this to skip -Dpluto.home=/path/to/pluto on command line -->

-              	<property environment="env"/>

-              	<property name="pluto.home" value="${env.CATALINA_HOME}"/>

-              	<echo message="pluto.home=${pluto.home}"/>

-              	<!-- Remove former deployment because sometimes

-              	tomcat does not fully redeploy a war -->

-                <delete

-                  dir="${pluto.home}/webapps/${pom.name}"

-                  failonerror="true"

-                />

-              	<!-- Deploy war file -->

-                <copy

-                  file="${project.build.directory}/${pom.name}.war"		

-                  todir="${pluto.home}/PlutoDomain"

-                  overwrite="true"

-                />

-              	<!-- Deploy context deployment descriptor for Tomcat -->

-                <copy

-                  file="${basedir}/src/main/resources/${pom.name}.xml"		

-                  todir="${pluto.home}/conf/Catalina/localhost"

-                  overwrite="false"

-                />

-              </tasks>

-            </configuration>

-            <goals>

-              <goal>run</goal>

-            </goals>

-          </execution>

-        </executions>

-      </plugin>

-    </plugins>

-  </build>

-  

-</project>

-          ]]></source>

-        </p>        

-        <p>

-			Run the Maven 2 pom.xml script using 'mvn integration-test -Dpluto.home=/path/to/pluto1.1install' 

-			from the command line to create the war with web.xml modified for deployment to 

-			Pluto-1.1 and deploy it to a local install of Pluto-1.1. 

-			The embedded Ant script in the pom.xml was created to use the environmental variable 

-			CATALINA_HOME as the value of pluto.home.

-			If you have set CATALINA_HOME to your Pluto-1.1 install, then you can just run

-			the command 'mvn integration-test'.

-        </p>        

-        <p>

-			If you prefer to manually deploy the war to Tomcat, run 'mvn package' which will

-			create the war file in the <code>target/</code> directory.  Then manually deploy

-			the war file and Tomcat context deployment descriptor to your Pluto-1.1 install.        

-        </p>

-      </subsection>

-            

-      <subsection name="Portlet Publishing">

-        <p>

-          Currently, as of Pluto-1.1-beta2, the only way to publish an application to the portal

-          is to manually update the Portal's configuration file <code>pluto-portal-driver-config.xml</code>

-          located in the WEB-INF directory of the pluto webapp.

-          Here's how to do it: 

-        </p>

-        

-        <p><b>Step 1: Portlet App Config</b></p>

-        <p>

-          First, add a <code>portlet-app</code> config element to

-          notify the Portal which portlet application is deployed to the

-          appserver (Tomcat). In this element, you should specify the context path of

-          your portlet app, as well as the names of portlets deployed. Here is

-          an example:

-          <source><![CDATA[

-<portlet-app>

-  <context-path>/your_portlet_app_context_path</context-path>

-  <portlets>

-    <portlet name="your_portlet_1"/>

-    <portlet name="your_portlet_2"/>

-    ... ...

-  </portlets>

-</portlet-app>

-          ]]></source>

-        </p>

-        

-        <p><b>Step 2: Portal Page Config</b></p>

-        <p>

-          You should then configure a portal page to display your portlets.

-          Do this by adding a <code>page</code> element in the <code>render-config</code> 

-          element, like this:

-          <source><![CDATA[

-<render-config default="Test Page">

-  ... ...

-  <page name="Your Portal Page Name" uri="/WEB-INF/fragments/portlet.jsp">

-    <portlet context="/your_portlet_app_context_path"

-             name="your_portlet_1"/>

-    <portlet context="/your_portlet_app_context_path"

-             name="your_portlet_2"/>

-  </page>

-</render-config>

-          ]]></source>

-        </p>

-        <p>

-          The <code>uri</code> attribute defines the theme of your portal page.

-          If you use <code>/WEB-INF/fragments/portlet.jsp</code> (which is the

-          default theme of Pluto Testsuite portlet app), your portlets will be

-          displayed in two columns. You can clone this file to customize your layout.

-          If you do so, make sure the <code>uri</code> attribute points to the new file.

-        </p>

-      </subsection>

-      

-    </section>

-    

-  </body>

-  

-</document>

-

diff --git a/trunk/pluto-site/src/site/xdoc/v11/getting-started.xml b/trunk/pluto-site/src/site/xdoc/v11/getting-started.xml
deleted file mode 100644
index e92bfc3..0000000
--- a/trunk/pluto-site/src/site/xdoc/v11/getting-started.xml
+++ /dev/null
@@ -1,241 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-

-<document>

-  

-  <properties>

-    <title>Getting Started With Pluto</title>

-    <author email="ddewolf@apache.org">David DeWolf</author>

-    <author email="zheng.at.apache.D0T.org">ZHENG Zhong</author>

-    <author email="cdoremus@apache.org">Craig Doremus</author>

-  </properties>

-  

-  <body>

-

-    <section name="Installing the Pluto 1.1 Binary Build">

-      

-      <ol>

-        <li>Download a Pluto 1.1 binary distribution from 

-        a <a href="http://cvs.apache.org/dist/portals/pluto/v1.1.0-beta2/">distribution site</a>.</li>

-        <li>Unzip the binary distribution into a directory.</li>

-        	<ol>

-        		<li>&lt;PLUTO-1.1-HOME&gt; will be the top level directory.</li>

-        	</ol>	

-        <li>Execute startup.bat (Windows) or startup.sh (Unix)

-in &lt;PLUTO-1.1-HOME&gt;/bin.</li>

-			<ol>

-	        	<li>Use shutdown.bat/shutdown.sh to stop the portal</li>

-			</ol>

-        <li>Browse to <a href="http://localhost:8080/pluto/portal">http://localhost:8080/pluto/portal</a></li>

-        <li>Login as the user pluto (password=pluto).</li>

-      </ol>

-

-	</section>

-	    

-    <section name="Building Pluto from Source">

-      

-      <p>

-        Maven 2 is utilized as the project management and build system for

-        Pluto 1.1. Pluto currently provides Maven plugins which can be used to

-        install the Pluto Portal, assemble portlet applications, deploy

-        applications, and publish portlet applications to the Pluto Portal.

-      </p>

-

-      <subsection name="Obtaining Pluto 1.1 Source Code">

-		<p>The Pluto project uses the

-		<a href="http://subversion.tigris.org/">Subversion</a> version control

-		system.  If you're new to Subversion, you can check out the

-		<a href="http://svnbook.red-bean.com/">online book</a> about Subversion.

-		Note that we are currently using Subversion 1.3.x (there are separate

-		versions of the book covering the different versions of Subversion). 

-		</p>

-

-    	<p><b>Web Access to Subversion</b></p>

-    	

-		<p>

-		To browse the Pluto 1.1 source code, you can use the

-		<a href="http://svn.apache.org/viewcvs.cgi/portals/pluto/trunk?root=Apache-SVN">ViewCVS

-		web interface</a> to Subversion. This is current at all times.

-		</p>

-

-		<p><b>Normal Subversion Access</b></p>

-		<p>Anyone can check code out of Subversion anonymously.  However, you need to specify a

-		username and password in order to update the Subversion repository, and only

-		Pluto committers have the permissions to do that.  We run Subversion

-		over standard HTTPS, so hopefully you won't have problems with intervening

-		firewalls.</p>

-

-		<h3>Check out from Subversion</h3>

-		

-		<p>Again, anyone can do this.  To check out the latest distribution of Pluto 1.1 (trunk) to a directory 

-		called 'pluto' use this command:

-		<pre>svn checkout https://svn.apache.org/repos/asf/portals/pluto/trunk/ pluto</pre>

-		</p>

-

-		<p>To check out Pluto 1.1.0-beta2 source to the 'pluto' directory use this command:

-		<pre>svn checkout https://svn.apache.org/repos/asf/portals/pluto/tags/release-1.1.0-beta2/ pluto</pre>

-		</p>

-

-        <p>

-          Zipped up Pluto source distributions can also be downloaded from

-        a <a href="http://www.apache.org/dyn/closer.cgi/portals/pluto/">distribution mirror</a>.  

-        </p>          

-

-	  </subsection>	    

-	    

-      <subsection name="Building Pluto with Maven 2">

-        <p>

-          <code>&lt;PLUTO-1.1-SRCHOME&gt;</code> is the local directory where the

-          Pluto 1.1 source distribution has been checked out or unzipped into.

-        </p>

-        <p>

-          <source><![CDATA[

-$> cd <PLUTO-1.1-SRCHOME>

-$> mvn install

-$> mvn pluto:install -DinstallDir=path/to/appserver

-          ]]></source>

-        </p>

-        <p>

-          The <code>install</code> goal is a built in Maven 2 lifecycle

-          which builds the project artifacts and installs them into the Maven

-          repository.

-        </p>

-        <p>

-          The <code>pluto:install</code> goal will take the resulting artifacts

-          and properly deploy them within the configured Tomcat installation.

-          Currently, the Pluto 1.1 install has been tested on Tomcat 5.5.9 and Tomcat 5.5.17.

-          The Tomcat 5 archive can be found <a href="http://archive.apache.org/dist/tomcat/tomcat-5/archive">here</a>.

-        </p>

-        <p>

-          If installing to a directory that contains spaces, <code>installDir</code>

-          needs to be enclosed within quotes:

-        </p>

-        <p>

-          <source><![CDATA[

-C:\pluto> mvn pluto:install -DinstallDir="C:\Program Files\Apache Software Foundation\Tomcat 5.5"

-          ]]></source>

-        </p>

-        

-      </subsection>

-      

-      <subsection name="Installing Pluto Manually">

-        <p>

-        This section documents the manual installation of Pluto into Tomcat. It replaces 

-        the pluto:install goal, but requires that the built-in Maven 2 install goal 

-        (<code>mvn install</code>) be run from <code>&lt;PLUTO-1.1-SRCHOME&gt;</code>.

-        </p>

-        <p>

-          <b>Step 1:</b>

-          <source><![CDATA[

-$> cd <PLUTO-1.1-SRCHOME>

-$> mvn install

-          ]]></source>

-        </p>

-        <p>

-          <b>Step 2:</b> Copy the following to

-          <code>&lt;TOMCAT_HOME&gt;/shared/lib</code>:

-          <ul>

-            <li>castor-1.0.jar</li>

-            <li>portlet-api-1.0.jar</li>

-            <li>pluto-container-1.1-beta2.jar</li>

-            <li>pluto-descriptor-api-1.1-beta2.jar</li>

-            <li>pluto-descriptor-impl-1.1-beta2.jar</li>

-            <li>pluto-taglib-1.1.0-beta2.jar</li>

-          </ul>

-        </p>

-        <p>

-          <b>Step 3:</b> Copy the following to

-          <code>&lt;TOMCAT_HOME&gt;/common/endorsed</code>:

-          <ul>

-            <li>xercesImpl-2.6.2.jar</li>

-            <li>xmlParserAPIs-2.6.2.jar</li>

-          </ul>

-        </p>

-        <p>

-          <b>Step 4:</b> Copy the following to

-          <code>&lt;TOMCAT_HOME&gt;/conf/Catalina/localhost</code>:

-          <ul>

-            <li>&lt;PLUTO_SRCHOME&gt;/pluto-portal/src/main/resources/pluto.xml</li>

-            <li>&lt;PLUTO_SRCHOME&gt;/pluto-testsuite/src/main/resources/testsuite.xml</li>

-          </ul>

-        </p>

-        <p>

-          <b>Step 5:</b> Copy the following to

-          <code>&lt;TOMCAT_HOME&gt;/webapps</code>:

-          <ul>

-            <li>&lt;PLUTO_SRCHOME&gt;/pluto-portal/target/pluto-portal.war</li>

-            <li>&lt;PLUTO_SRCHOME&gt;/pluto-testsuite/target/pluto-testsuite.war</li>

-          </ul>

-        </p>

-      </subsection>

-      

-      <subsection name="Installing Pluto with a Windows EXE">

-        <p>

-          The NSIS Installer is not yet complete, but we hope to have a fully

-          functional one soon.  Anyone is more than welcome to assist us in

-          this process.

-        </p>

-      </subsection>

-          

-    <subsection name="Configuring Source-Built Pluto for Application Scope PortletSession Attributes">

-    <p>To be able to use application-scoped <code>PortletSession</code> attributes in Pluto, modify

-    the Connector element for port 8080 in <code>&lt;TOMCAT_HOME&gt;/conf/server.xml</code> by

-    adding the following attribute and value: emptySessionPath="true".

-    </p>

-    </subsection>    

-    <subsection name="Configuring User and Role in the Pluto Source Build">

-      <p>

-        The Pluto Testsuite portlet application needs the role '<code>pluto</code>'

-        to run the Security Mapping Test. So before starting tomcat, you should

-        edit <code>&lt;TOMCAT_HOME&gt;/conf/tomcat-users.xml</code>, add the

-        role '<code>pluto</code>', and add a user in that role. The simplest way

-        to do this is to edit add the '<code>pluto</code>' role to the

-        '<code>tomcat</code>' user's record. Here is a sample

-        <code>tomcat-users.xml</code> file:

-        <source><![CDATA[

-<?xml version="1.0" encoding="utf-8"?>

-<tomcat-users>

-  <role rolename="pluto"/>

-  <role rolename="tomcat"/>

-  <role rolename="role1"/>

-  <user username="tomcat" password="tomcat" roles="tomcat,pluto"/>

-  <user username="role1" password="tomcat" roles="role1"/>

-  <user username="both" password="tomcat" roles="tomcat,role1"/>

-</tomcat-users>

-        ]]></source>

-      </p>

-    </subsection>

-    

-    

-    <subsection name="Starting the Portal">

-      <p>

-        Now you are ready to use the Pluto Portal built from source. Start up tomcat by running

-        <code>startup.bat</code> (for windows) or <code>startup.sh</code> (for

-        *nix) in <code>&lt;TOMCAT_HOME&gt;/bin</code>, and browse to

-        <code>http://localhost:8080/pluto/portal</code>. Login to Pluto using

-        the user and password you just created in <code>tomcat-users.xml</code>.

-        If you added the 'pluto' role to the 'tomcat' user's record, you can

-        login as 'tomcat/tomcat'.

-      </p>

-    </subsection>

-    </section>

-    

-  </body>

-  

-</document>

-

diff --git a/trunk/pluto-site/src/site/xdoc/v11/resources.xml b/trunk/pluto-site/src/site/xdoc/v11/resources.xml
deleted file mode 100644
index e065bf5..0000000
--- a/trunk/pluto-site/src/site/xdoc/v11/resources.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-

-<document>

-  

-  <properties>

-    <title>Pluto and Portlet Resources</title>

-    <author email="ddewolf@apache.org">David DeWolf</author>

-  </properties>

-  

-  <body>

-    

-    <section name="The Java Portlet Specifications">

-      <p>

-        <ul>

-          <li><a href="http://jcp.org/en/jsr/detail?id=168">JSR-168: Portlet Specification 1.0</a></li>

-          <li><a href="http://jcp.org/en/jsr/detail?id=286">JSR-286: Portlet Specification 2.0</a></li>

-        </ul>

-      </p>

-	  </section>

-    

-    <section name="Additional Pluto Documentation">

-      <p>

-        <ul>

-          <li>

-            <a href="http://wiki.apache.org/portals/Pluto">Official Pluto Wiki</a>

-          </li>

-          <li>

-            <a href="http://people.apache.org/~zheng/pluto/chinese/">Pluto

-            Website, Chinese Translation</a> maintained by ZHENG Zhong

-          </li>

-        </ul>

-      </p>

-    </section>

-    

-    <section name="Articles, Whitepapers, and Presentations">

-      <p>

-        <ul>

-          <li>

-            <a href="http://www.developer.com/java/web/article.php/3547186">Introduction to the Portlet Specification</a>

-            by David H. DeWolf, September 2005

-          </li>

-          <li>

-            <a href="http://www.developer.com/java/web/article.php/3554396">Developing Portlets with Apache Pluto 1.1</a>

-            by David H. DeWolf, October 2005

-          </li>

-          <li>

-            <a href="http://www.developer.com/java/web/article.php/3563411">Embedding Apache Pluto 1.1</a>

-            by David H. DeWolf, September 2005

-          </li>

-        </ul>

-      </p>

-    </section>

-    

-  </body>

-  

-</document>

-

diff --git a/trunk/pluto-site/src/site/xdoc/v11/subprojects.xml b/trunk/pluto-site/src/site/xdoc/v11/subprojects.xml
deleted file mode 100644
index 05a7bcb..0000000
--- a/trunk/pluto-site/src/site/xdoc/v11/subprojects.xml
+++ /dev/null
@@ -1,136 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-

-<document>

-  

-  <properties>

-    <title>Pluto Subprojects</title>

-    <author email="ddewolf@apache.org">David DeWolf</author>

-  </properties>

-  

-  <body>

-    <section name="Pluto Subprojects">

-      

-      <p>

-        Pluto 1.1 utilizes Maven 2 as it's project management and build

-        automation tool.  Pluto follows maven's best practices and is organized

-        into modules or subprojects.

-      </p>

-      

-      <subsection name="Container Subprojects">

-        <p>

-          <ul>

-            <li>

-              <b>Pluto Container:</b>

-              The Pluto Container is the core compontent of the Apache Pluto

-              project. All other modules either support the development. The

-              Pluto Container is the reference implementation of the Portlet

-              Specification.

-            </li>

-            <li>

-              <b>Pluto Tags:</b>

-              The Java Portlet Tag Library implementation which is provided

-              with the container.

-            </li>

-          </ul>

-        </p>

-      </subsection>

-      

-      <subsection name="Portal/Testing Subprojects">

-        <p>

-          <ul>

-            <li>

-              <b>Pluto Portal Driver:</b>

-              A driver library for the Pluto Portlet Container. Provides service

-              implementations and utilities for implementing a portal which

-              utilizes the container.

-            </li>

-            <li>

-              <b>Pluto Portal:</b>

-              The user interface components (web application) of the Pluto

-              Portal. The pluto portal is a simple portal application which

-              embeds the portal. The portal is not meant to be a full enterprise

-              portal, but instead is meant to be an example of how to embed the

-              container and a lightweight environment for developing and testing

-              portlets.

-            </li>

-            <li>

-              <b>Pluto Testsuite:</b>

-              A test portlet which can be used to exercise and test any portlet

-              container.

-            </li>

-          </ul>

-        </p>

-      </subsection>

-      

-      <subsection name="Libraries and Supporting Subprojects">

-        <p>

-          <ul>

-            <li>

-              <b>Pluto Descriptor API:</b>

-              A domain model which represents the deployment descriptors read

-              by the portlet container.  Contains service interfaces for reading

-              and writing portlet.xml and web.xml.

-            </li>

-            <li>

-              <b>Pluto Descriptor Impl:</b>

-              The default implementation of the Pluto Descriptor API Subproject.

-              The default implementation utilzes castor for reading and writing

-              portlet and web application descriptors.

-            </li>

-            <li>

-              <b>Pluto Optional Services:</b>

-              Provides optional implementations of the Pluto Container Services.

-              Includes database implementations of the PortletPreferencesService

-              and the UserAttributeService.

-            </li>

-          </ul>

-        </p>

-      </subsection>

-      

-      <subsection name="Utilities and Tools (for working with the Pluto Portal)">

-        <p>

-          <ul>

-            <li>

-              <b>Pluto Util:</b>

-              Utilities for working with the Pluto Portal. Includes libraries

-              for installing pluto, assembling portlet applications for

-              deployment in pluto, deploying to pluto, and publishing portlets

-              to pluto.

-            </li>

-            <li>

-              <b>Maven Plugin:</b>

-              Provides Maven goals for utilizing the Pluto utilities. Install

-              the portal within a servlet container, assemble portlets, deploy

-              portlets, and publish portlets to th Pluto Portal.

-            </li>

-            <li>

-              <b>Ant Tasks:</b>

-              Ant tasks which allow developers to utilize the Pluto utilities

-              within ant. Currently supports assembling wars for deployment

-              within pluto.

-            </li>

-          </ul>

-        </p>

-      </subsection>

-      

-    </section>

-  </body>

-  

-</document>

-

diff --git a/trunk/pluto-taglib/pom.xml b/trunk/pluto-taglib/pom.xml
deleted file mode 100644
index 1bcc63c..0000000
--- a/trunk/pluto-taglib/pom.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 2005-2006 The Apache Software Foundation
-
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-    <parent>
-        <groupId>org.apache.pluto</groupId>
-        <artifactId>pluto</artifactId>
-        <version>1.1.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>pluto-taglib</artifactId>
-    <packaging>jar</packaging>
-    <name>Pluto Portlet Tag Library</name>
-    <description>Pluto's Java Portlet Specification Tag Library implementation</description>
-
-    <dependencies>
-        <dependency>
-            <groupId>javax.portlet</groupId>
-            <artifactId>portlet-api</artifactId>
-            <version>${portlet-api.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>servlet-api</artifactId>
-            <version>${servlet-api.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>jsp-api</artifactId>
-            <version>${jsp-api.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>${junit.version}</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-
-    <build>
-        <plugins>
-            <!-- Assembly Plugin - Create Distributions -->
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <descriptor>src/assemble/bin.xml</descriptor>
-                    <finalName>pluto-taglib-${pom.currentVersion}</finalName>
-                </configuration>
-            </plugin>
-            <plugin>
-                <artifactId>maven-site-plugin</artifactId>
-                <configuration>
-                    <resourcesDirectory>${basedir}/../pluto-site/src/site/resources</resourcesDirectory>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>
diff --git a/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/ActionURLTag.java b/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/ActionURLTag.java
deleted file mode 100644
index 02562a0..0000000
--- a/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/ActionURLTag.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-/* 

-

- */

-

-/*

- * Created on Feb 21, 2003

- *

- * To change this generated comment go to 

- * Window>Preferences>Java>Code Generation>Code Template

- */

-package org.apache.pluto.tags;

-

-import javax.portlet.PortletMode;

-import javax.portlet.PortletModeException;

-import javax.portlet.PortletSecurityException;

-import javax.portlet.RenderResponse;

-import javax.portlet.WindowState;

-import javax.portlet.WindowStateException;

-import javax.servlet.jsp.JspException;

-import javax.servlet.jsp.PageContext;

-

-/**

- * Supporting class for the <CODE>actionURL</CODE> tag. Creates a url that

- * points to the current Portlet and triggers an action request with the

- * supplied parameters.

- */

-public class ActionURLTag extends BasicURLTag {

-

-    /* (non-Javadoc)

-     * @see javax.servlet.jsp.tagext.Tag#doStartTag()

-     */

-    public int doStartTag() throws JspException {

-        if (var != null) {

-            pageContext.removeAttribute(var, PageContext.PAGE_SCOPE);

-        }

-        RenderResponse renderResponse = (RenderResponse) pageContext.getRequest()

-            .getAttribute("javax.portlet.response");

-

-        if (renderResponse != null) {

-            setUrl(renderResponse.createActionURL());

-            if (portletMode != null) {

-                try {

-                    url.setPortletMode(

-                        (PortletMode) TEI.portletModes.get(

-                            portletMode.toUpperCase()));

-                } catch (PortletModeException e) {

-                    throw new JspException(e);

-                }

-            }

-            if (windowState != null) {

-                try {

-                    url.setWindowState(

-                        (WindowState) TEI.definedWindowStates.get(

-                            windowState.toUpperCase()));

-                } catch (WindowStateException e) {

-                    throw new JspException(e);

-                }

-            }

-            if (secure != null) {

-                try {

-                    url.setSecure(getSecureBoolean());

-                } catch (PortletSecurityException e) {

-                    throw new JspException(e);

-                }

-            }

-        }

-        return EVAL_PAGE;

-    }

-}

-

diff --git a/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/BasicURLTag.java b/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/BasicURLTag.java
deleted file mode 100644
index 5169a43..0000000
--- a/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/BasicURLTag.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.tags;

-

-import java.io.IOException;

-import java.lang.reflect.Field;

-import java.util.Hashtable;

-

-import javax.portlet.PortletMode;

-import javax.portlet.PortletURL;

-import javax.portlet.WindowState;

-import javax.servlet.jsp.JspException;

-import javax.servlet.jsp.JspWriter;

-import javax.servlet.jsp.PageContext;

-import javax.servlet.jsp.tagext.TagData;

-import javax.servlet.jsp.tagext.TagExtraInfo;

-import javax.servlet.jsp.tagext.TagSupport;

-import javax.servlet.jsp.tagext.VariableInfo;

-

-/**

- * Supporting class for the <CODE>actionURL</CODE> and <CODE>renderURL</CODE>

- * tag. Creates a url that points to the current Portlet and triggers an action

- * request with the supplied parameters.

- */

-public abstract class BasicURLTag extends TagSupport {

-

-    public static class TEI extends TagExtraInfo {

-        public final static Hashtable definedWindowStates = getDefinedWindowStates();

-        public final static Hashtable portletModes = getDefinedPortletModes();

-

-        /**

-         * Provides a list of all static PortletMode available in the

-         * specifications by using introspection

-         * @return Hashtable

-         */

-        private static Hashtable getDefinedPortletModes() {

-            Hashtable portletModes = new Hashtable();

-            Field[] f = PortletMode.class.getDeclaredFields();

-

-            for (int i = 0; i < f.length; i++) {

-                if (f[i].getType().isAssignableFrom(

-                    javax.portlet.PortletMode.class)) {

-                    try {

-                        portletModes.put(

-                            f[i].get(f[i]).toString().toUpperCase(),

-                            f[i].get(f[i]));

-                    } catch (IllegalAccessException e) {

-                    }

-                }

-            }

-

-            return portletModes;

-        }

-

-        /**

-         * Provides a list of all static WindowsStates available in the

-         * specifications by using introspection

-         * @return Hashtable

-         */

-        private static Hashtable getDefinedWindowStates() {

-            Hashtable definedWindowStates = new Hashtable();

-            Field[] f = WindowState.class.getDeclaredFields();

-

-            for (int i = 0; i < f.length; i++) {

-                if (f[i].getType().isAssignableFrom(

-                    javax.portlet.WindowState.class)) {

-                    try {

-                        definedWindowStates.put(

-                            f[i].get(f[i]).toString().toUpperCase(),

-                            f[i].get(f[i]));

-                    } catch (IllegalAccessException e) {

-

-                    }

-                }

-            }

-            return definedWindowStates;

-        }

-

-        public VariableInfo[] getVariableInfo(TagData tagData) {

-            VariableInfo vi[] = null;

-            String var = tagData.getAttributeString("var");

-            if (var != null) {

-                vi = new VariableInfo[1];

-                vi[0] =

-                new VariableInfo(var, "java.lang.String", true,

-                                 VariableInfo.AT_BEGIN);

-            }

-            return vi;

-        }

-

-    }

-

-    protected String portletMode;

-    protected String secure;

-    protected Boolean secureBoolean;

-    protected String windowState;

-    protected PortletURL url;

-    protected String var;

-

-    /**

-     * Processes the <CODE>actionURL</CODE> or <CODE>renderURL</CODE> tag.

-     * @return int

-     */

-    public abstract int doStartTag() throws JspException;

-

-    /**

-     * @return int

-     */

-    public int doEndTag() throws JspException {

-        if (var == null) {

-            try {

-                JspWriter writer = pageContext.getOut();

-                writer.print(url);

-            } catch (IOException ioe) {

-                throw new JspException(

-                    "actionURL/renderURL Tag Exception: cannot write to the output writer.");

-            }

-        } else {

-            pageContext.setAttribute(var, url.toString(),

-                                     PageContext.PAGE_SCOPE);

-        }

-        return EVAL_PAGE;

-    }

-

-    /**

-     * Returns the portletMode.

-     * @return String

-     */

-    public String getPortletMode() {

-        return portletMode;

-    }

-

-    /**

-     * @return secure as String

-     */

-    public String getSecure() {

-        return secure;

-    }

-

-    /**

-     * @return secure as Boolean

-     */

-    public boolean getSecureBoolean() {

-        return this.secureBoolean.booleanValue();

-    }

-

-    /**

-     * Returns the windowState.

-     * @return String

-     */

-    public String getWindowState() {

-        return windowState;

-    }

-

-    /**

-     * @return PortletURL

-     */

-    public PortletURL getUrl() {

-        return url;

-    }

-

-    /**

-     * Returns the var.

-     * @return String

-     */

-    public String getVar() {

-        return var;

-    }

-

-    /**

-     * Sets the portletMode.

-     * @param portletMode The portletMode to set

-     */

-    public void setPortletMode(String portletMode) {

-        this.portletMode = portletMode;

-    }

-

-    /**

-     * Sets secure to boolean value of the string

-     * @param secure

-     */

-    public void setSecure(String secure) {

-        this.secure = secure;

-        this.secureBoolean = new Boolean(secure);

-    }

-

-    /**

-     * Sets the windowState.

-     * @param windowState The windowState to set

-     */

-    public void setWindowState(String windowState) {

-        this.windowState = windowState;

-    }

-

-    /**

-     * Sets the url.

-     * @param url The url to set

-     */

-    public void setUrl(PortletURL url) {

-        this.url = url;

-    }

-

-    /**

-     * Sets the var.

-     * @param var The var to set

-     */

-    public void setVar(String var) {

-        this.var = var;

-    }

-}

diff --git a/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/Constants.java b/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/Constants.java
deleted file mode 100644
index 7ffab21..0000000
--- a/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/Constants.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.tags;

-

-/**

- * Constant values as defined by the specification

- * typically to a request.

- * @version 1.0

- */

-public class Constants {

-

-    /**

-     * The key used to bind the <code>PortletRequest</code> to the underlying

-     * <code>HttpServletRequest</code>.

-     */

-    public final static String PORTLET_REQUEST = "javax.portlet.request";

-

-    /**

-     * The key used to bind the <code>PortletResponse</code> to the underlying

-     * <code>HttpServletRequest</code>.

-     */

-    public final static String PORTLET_RESPONSE = "javax.portlet.response";

-

-    /**

-     * The key used to bind the <code>PortletConfig</code> to the underlying

-     * PortletConfig.

-     */

-    public final static String PORTLET_CONFIG = "javax.portlet.config";

-

-}

diff --git a/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/DefineObjectsTag.java b/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/DefineObjectsTag.java
deleted file mode 100644
index 2b40be7..0000000
--- a/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/DefineObjectsTag.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.tags;

-

-import javax.portlet.PortletConfig;

-import javax.portlet.PortletRequest;

-import javax.portlet.RenderResponse;

-import javax.servlet.jsp.JspException;

-import javax.servlet.jsp.PageContext;

-import javax.servlet.jsp.tagext.TagData;

-import javax.servlet.jsp.tagext.TagExtraInfo;

-import javax.servlet.jsp.tagext.TagSupport;

-import javax.servlet.jsp.tagext.VariableInfo;

-

-/**

- * Supporting class for the <CODE>defineObjects</CODE> tag. Creates the

- * following variables to be used in the JSP: <UL> <LI><CODE>renderRequest</CODE>

- * <LI><CODE>renderResponse</CODE> <LI><CODE>portletConfig</CODE> </UL>

- * @see javax.portlet.PortletRequest

- * @see javax.portlet.RenderResponse

- * @see javax.portlet.PortletConfig

- */

-public class DefineObjectsTag extends TagSupport {

-

-    /**

-     * Processes the <CODE>defineObjects</CODE> tag.

-     * @return <CODE>SKIP_BODY</CODE>

-     */

-    public int doStartTag() throws JspException {

-        PortletRequest renderRequest = (PortletRequest) pageContext.getRequest()

-            .getAttribute(Constants.PORTLET_REQUEST);

-        RenderResponse renderResponse = (RenderResponse) pageContext.getRequest()

-            .getAttribute(Constants.PORTLET_RESPONSE);

-        PortletConfig portletConfig = (PortletConfig) pageContext.getRequest()

-            .getAttribute(Constants.PORTLET_CONFIG);

-

-        if (pageContext.getAttribute("renderRequest") == null)   //Set attributes only once

-        {

-            pageContext.setAttribute("renderRequest",

-                                     renderRequest,

-                                     PageContext.PAGE_SCOPE);

-        }

-

-        if (pageContext.getAttribute("renderResponse") == null) {

-            pageContext.setAttribute("renderResponse",

-                                     renderResponse,

-                                     PageContext.PAGE_SCOPE);

-        }

-

-        if (pageContext.getAttribute("portletConfig") == null) {

-            pageContext.setAttribute("portletConfig",

-                                     portletConfig,

-                                     PageContext.PAGE_SCOPE);

-        }

-

-        return SKIP_BODY;

-    }

-

-    public static class TEI extends TagExtraInfo {

-

-        public VariableInfo[] getVariableInfo(TagData tagData) {

-            VariableInfo[] info = new VariableInfo[]{

-                new VariableInfo("renderRequest",

-                                 "javax.portlet.PortletRequest",

-                                 true,

-                                 VariableInfo.AT_BEGIN),

-                new VariableInfo("renderResponse",

-                                 "javax.portlet.RenderResponse",

-                                 true,

-                                 VariableInfo.AT_BEGIN),

-                new VariableInfo("portletConfig",

-                                 "javax.portlet.PortletConfig",

-                                 true,

-                                 VariableInfo.AT_BEGIN)

-            };

-

-            return info;

-        }

-    }

-}

diff --git a/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/NamespaceTag.java b/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/NamespaceTag.java
deleted file mode 100644
index 68b0dff..0000000
--- a/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/NamespaceTag.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.tags;

-

-import javax.portlet.RenderResponse;

-import javax.servlet.jsp.JspException;

-import javax.servlet.jsp.JspWriter;

-import javax.servlet.jsp.tagext.TagSupport;

-import java.io.IOException;

-

-/**

- * This tag produces a unique value for the current portlet.

- * <p/>

- * <p/>

- * Supporting class for the <CODE>namespace</CODE> tag. writes a unique value

- * for the current portlet <BR>This tag has no attributes

- */

-public class NamespaceTag extends TagSupport {

-

-    /* (non-Javadoc)

-     * @see javax.servlet.jsp.tagext.Tag#doStartTag()

-     */

-    public int doStartTag() throws JspException {

-        RenderResponse renderResponse = (RenderResponse) pageContext.getRequest()

-            .getAttribute("javax.portlet.response");

-        String namespace = renderResponse.getNamespace();

-        JspWriter writer = pageContext.getOut();

-        try {

-            writer.print(namespace);

-        } catch (IOException ioe) {

-            throw new JspException(

-                "Unable to write namespace", ioe

-            );

-        }

-        return SKIP_BODY;

-    }

-}

diff --git a/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/ParamTag.java b/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/ParamTag.java
deleted file mode 100644
index ebab348..0000000
--- a/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/ParamTag.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.tags;

-

-import javax.portlet.PortletURL;

-import javax.servlet.jsp.JspException;

-import javax.servlet.jsp.tagext.TagSupport;

-

-

-/**

- * Supporting class for the <CODE>param</CODE> tag. Defines a parameter that

- * can be added to a <CODE>actionURL</CODE> or a <CODE>renderURL</CODE>

- * <BR>The following attributes are mandatory:

- *   <UL><LI><CODE>name</CODE>

- *       <LI><CODE>value</CODE></UL>

- */

-public class ParamTag extends TagSupport {

-

-    private String name;

-    private String value;

-

-    /**

-     * Processes the <CODE>param</CODE> tag.

-     * @return <CODE>SKIP_BODY</CODE>

-     */

-    public int doStartTag() throws JspException {

-        BasicURLTag urlTag = (BasicURLTag)

-                findAncestorWithClass(this, BasicURLTag.class);

-

-        if (urlTag == null) {

-            throw new JspException(

-                "the 'param' Tag must have actionURL or renderURL as a parent");

-        }

-

-        PortletURL url = urlTag.getUrl();

-

-        if (getName() != null) {

-            url.setParameter(getName(), getValue());

-        }

-

-        return SKIP_BODY;

-    }

-

-    /**

-     * Returns the name.

-     * @return String

-     */

-    public String getName() {

-        return name;

-    }

-

-    /**

-     * Returns the value.

-     * @return String

-     */

-    public String getValue() throws JspException {

-        if (value == null) {

-            value = "";

-        }

-        return value;

-    }

-

-    /**

-     * Sets the name.

-     * @param name The name to set

-     */

-    public void setName(String name) {

-        this.name = name;

-    }

-

-    /**

-     * Sets the value.

-     * @param value The value to set

-     */

-    public void setValue(String value) {

-        this.value = value;

-    }

-

-}

diff --git a/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/RenderURLTag.java b/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/RenderURLTag.java
deleted file mode 100644
index 66c3bff..0000000
--- a/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/RenderURLTag.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.tags;

-

-import javax.portlet.PortletMode;

-import javax.portlet.PortletModeException;

-import javax.portlet.PortletSecurityException;

-import javax.portlet.RenderResponse;

-import javax.portlet.WindowState;

-import javax.portlet.WindowStateException;

-import javax.servlet.jsp.JspException;

-import javax.servlet.jsp.PageContext;

-

-/**

- * Supporting class for the <CODE>renderURL</CODE> tag. Creates a url that

- * points to the current Portlet and triggers an render request * with the

- * supplied parameters. *

- */

-public class RenderURLTag extends BasicURLTag {

-

-

-    /* (non-Javadoc)

-         * @see javax.servlet.jsp.tagext.Tag#doStartTag()

-         */

-    public int doStartTag() throws JspException {

-        if (var != null) {

-            pageContext.removeAttribute(var, PageContext.PAGE_SCOPE);

-        }

-        RenderResponse renderResponse = (RenderResponse) pageContext.getRequest()

-            .getAttribute("javax.portlet.response");

-

-        if (renderResponse != null) {

-            setUrl(renderResponse.createRenderURL());

-            if (portletMode != null) {

-                try {

-                    url.setPortletMode(

-                        (PortletMode) TEI.portletModes.get(

-                            portletMode.toUpperCase()));

-                } catch (PortletModeException e) {

-                    throw new JspException(e);

-                }

-            }

-            if (windowState != null) {

-                try {

-                    url.setWindowState(

-                        (WindowState) TEI.definedWindowStates.get(

-                            windowState.toUpperCase()));

-                } catch (WindowStateException e) {

-                    throw new JspException(e);

-                }

-            }

-            if (secure != null) {

-                try {

-                    url.setSecure(getSecureBoolean());

-                } catch (PortletSecurityException e) {

-                    throw new JspException(e);

-                }

-            }

-        }

-        return EVAL_PAGE;

-    }

-}

-

diff --git a/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/el/ParamTag.java b/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/el/ParamTag.java
deleted file mode 100644
index 5b7ef78..0000000
--- a/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/el/ParamTag.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.tags.el;

-

-import javax.servlet.jsp.el.ExpressionEvaluator;

-import javax.servlet.jsp.el.ELException;

-import javax.servlet.jsp.JspException;

-

-

-public class ParamTag extends org.apache.pluto.tags.ParamTag {

-

-    public String getValue() throws JspException {

-        String string = super.getValue();

-

-        ExpressionEvaluator eval = pageContext.getExpressionEvaluator();

-

-        try {

-            Object evaluated = eval.evaluate(

-                    string,

-                    Object.class,

-                    pageContext.getVariableResolver(),

-                    null

-            );

-

-            if(evaluated != null) {

-                string = evaluated.toString();

-            }

-

-        }

-        catch(ELException el) {

-            throw new JspException(el);

-        }

-        return string;

-    }

-

-}

diff --git a/trunk/pluto-taglib/src/main/resources/META-INF/portlet-el.tld b/trunk/pluto-taglib/src/main/resources/META-INF/portlet-el.tld
deleted file mode 100644
index fd6218e..0000000
--- a/trunk/pluto-taglib/src/main/resources/META-INF/portlet-el.tld
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>

-<!DOCTYPE taglib PUBLIC

-  "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"

-  "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">

-<!-- 

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<taglib>

-    <tlibversion>1.0</tlibversion>

-    <jspversion>1.2</jspversion>

-    <shortname>portlet</shortname>

-    <uri>http://portals.apache.org/pluto/portlet-el</uri>

-    <tag>

-        <name>defineObjects</name>

-        <tagclass>org.apache.pluto.tags.DefineObjectsTag</tagclass>

-        <teiclass>org.apache.pluto.tags.DefineObjectsTag$TEI</teiclass>

-        <bodycontent>empty</bodycontent>

-    </tag>

-    <tag>

-        <name>param</name>

-        <tagclass>org.apache.pluto.tags.el.ParamTag</tagclass>

-        <bodycontent>empty</bodycontent>

-        <attribute>

-            <name>name</name>

-            <required>true</required>

-            <rtexprvalue>false</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>value</name>

-            <required>true</required>

-            <rtexprvalue>false</rtexprvalue>

-        </attribute>

-    </tag>

-    <tag>

-        <name>actionURL</name>

-        <tagclass>org.apache.pluto.tags.ActionURLTag</tagclass>

-        <teiclass>org.apache.pluto.tags.BasicURLTag$TEI</teiclass>

-        <bodycontent>JSP</bodycontent>

-        <attribute>

-            <name>windowState</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>portletMode</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>secure</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>var</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-    </tag>

-    <tag>

-        <name>renderURL</name>

-        <tagclass>org.apache.pluto.tags.RenderURLTag</tagclass>

-        <teiclass>org.apache.pluto.tags.BasicURLTag$TEI</teiclass>

-        <bodycontent>JSP</bodycontent>

-        <attribute>

-            <name>windowState</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>portletMode</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>secure</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>var</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-    </tag>

-    <tag>

-        <name>namespace</name>

-        <tagclass>org.apache.pluto.tags.NamespaceTag</tagclass>

-        <bodycontent>empty</bodycontent>

-    </tag>

-</taglib>
\ No newline at end of file
diff --git a/trunk/pluto-taglib/src/main/resources/META-INF/portlet.tld b/trunk/pluto-taglib/src/main/resources/META-INF/portlet.tld
deleted file mode 100644
index dcd6f0b..0000000
--- a/trunk/pluto-taglib/src/main/resources/META-INF/portlet.tld
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>

-<!DOCTYPE taglib PUBLIC

-  "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"

-  "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">

-<!-- 

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<taglib>

-    <tlibversion>1.0</tlibversion>

-    <jspversion>1.1</jspversion>

-    <shortname>portlet</shortname>

-    <uri>http://java.sun.com/portlet</uri>

-    <tag>

-        <name>defineObjects</name>

-        <tagclass>org.apache.pluto.tags.DefineObjectsTag</tagclass>

-        <teiclass>org.apache.pluto.tags.DefineObjectsTag$TEI</teiclass>

-        <bodycontent>empty</bodycontent>

-    </tag>

-    <tag>

-        <name>param</name>

-        <tagclass>org.apache.pluto.tags.ParamTag</tagclass>

-        <bodycontent>empty</bodycontent>

-        <attribute>

-            <name>name</name>

-            <required>true</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>value</name>

-            <required>true</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-    </tag>

-    <tag>

-        <name>actionURL</name>

-        <tagclass>org.apache.pluto.tags.ActionURLTag</tagclass>

-        <teiclass>org.apache.pluto.tags.BasicURLTag$TEI</teiclass>

-        <bodycontent>JSP</bodycontent>

-        <attribute>

-            <name>windowState</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>portletMode</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>secure</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>var</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-    </tag>

-    <tag>

-        <name>renderURL</name>

-        <tagclass>org.apache.pluto.tags.RenderURLTag</tagclass>

-        <teiclass>org.apache.pluto.tags.BasicURLTag$TEI</teiclass>

-        <bodycontent>JSP</bodycontent>

-        <attribute>

-            <name>windowState</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>portletMode</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>secure</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-        <attribute>

-            <name>var</name>

-            <required>false</required>

-            <rtexprvalue>true</rtexprvalue>

-        </attribute>

-    </tag>

-    <tag>

-        <name>namespace</name>

-        <tagclass>org.apache.pluto.tags.NamespaceTag</tagclass>

-        <bodycontent>empty</bodycontent>

-    </tag>

-</taglib>
\ No newline at end of file
diff --git a/trunk/pluto-taglib/src/site/site.xml b/trunk/pluto-taglib/src/site/site.xml
deleted file mode 100644
index 3fce4cc..0000000
--- a/trunk/pluto-taglib/src/site/site.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>

-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<project name="Pluto Taglib">

-  <bannerLeft>

-    <name>Pluto Taglib</name>

-    <src>http://portals.apache.org/pluto/images/pluto.png</src>

-    <href>http://portals.apache.org/pluto</href>

-  </bannerLeft>

-  <bannerRight>

-    <src>http://portals.apache.org/pluto/images/banner.png</src>

-  </bannerRight>

-  <body>

-    <links>

-      <item name="Pluto Home" href="http://portals.apache.org/pluto"/>

-      <item name="JSR 168" href="http://jcp.org/en/jsr/detail?id=168"/>

-	  <item name="Chinese Translation" href="http://heavyz.sourceforge.net/pluto_zh/pluto-container"/>

-    </links>

-

-	<menu name="Pluto Portal">

-      <item name="Getting Started" href="/getting-started.html"/>

-	</menu>

-

-    ${reports}

-  </body>

-</project>

diff --git a/trunk/pluto-testsuite/pom.xml b/trunk/pluto-testsuite/pom.xml
deleted file mode 100644
index bbb2e84..0000000
--- a/trunk/pluto-testsuite/pom.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 2005-2006 The Apache Software Foundation
-
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  
-  <parent>
-    <groupId>org.apache.pluto</groupId>
-    <artifactId>pluto</artifactId>
-    <version>1.1.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>pluto-testsuite</artifactId>
-  <packaging>war</packaging>
-  <name>Pluto Testsuite Portlet</name>
-  
-  <dependencies>
-    <dependency>
-      <groupId>javax.portlet</groupId>
-      <artifactId>portlet-api</artifactId>
-      <version>${portlet-api.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <version>${servlet-api.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>jstl</artifactId>
-      <version>${jstl.version}</version>
-      <scope>compile</scope>
-      <exclusions>
-          <exclusion>
-            <groupId>javax.servlet</groupId>
-            <artifactId>jsp-api</artifactId>
-          </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>commons-digester</groupId>
-      <artifactId>commons-digester</artifactId>
-      <version>${commons-digester.version}</version>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
-      <version>${commons-logging.version}</version>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <version>${log4j.version}</version>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>taglibs</groupId>
-      <artifactId>standard</artifactId>
-      <version>${taglibs.standard.version}</version>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>${junit.version}</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-  
-  
-  <!-- Build configuration -->
-  <build>
-    <finalName>pluto-testsuite</finalName>
-    <plugins>
-      <!-- configure maven-war-plugin to use updated web.xml -->
-      <plugin>
-        <artifactId>maven-war-plugin</artifactId>
-        <configuration>
-          <webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
-        </configuration>
-      </plugin>
-      <!-- bind 'pluto:assemble' goal to 'process-resources' lifecycle -->
-      <plugin>
-        <groupId>org.apache.pluto</groupId>
-        <artifactId>maven-pluto-plugin</artifactId>
-        <version>${pom.version}</version>
-        <executions>
-          <execution>
-            <phase>generate-resources</phase>
-            <goals>
-              <goal>assemble</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <artifactId>maven-site-plugin</artifactId>
-        <configuration>
-          <resourcesDirectory>${basedir}/../pluto-site/src/site/resources</resourcesDirectory>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-  
-</project>
-
-
diff --git a/trunk/pluto-testsuite/src/assemble/bin.xml b/trunk/pluto-testsuite/src/assemble/bin.xml
deleted file mode 100644
index ae17e12..0000000
--- a/trunk/pluto-testsuite/src/assemble/bin.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<assembly>

-  <id>bin</id>

-  <formats>

-    <format>tar.gz</format>

-    <format>tar.bz2</format>

-    <format>zip</format>

-  </formats>

-  <fileSets>

-    <fileSet>

-      <includes>

-        <include>README*</include>

-        <include>LICENSE*</include>

-        <include>NOTICE*</include>

-      </includes>

-    </fileSet>

-    <fileSet>

-      <directory>target</directory>

-      <outputDirectory></outputDirectory>

-      <includes>

-        <include>*.jar</include>

-      </includes>

-    </fileSet>

-  </fileSets>

-  <dependencySets>

-

-  </dependencySets>

-</assembly>

-

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/ActionTest.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/ActionTest.java
deleted file mode 100644
index 873dd54..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/ActionTest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite;

-

-import org.apache.pluto.testsuite.PortletTest;

-

-/**

- * Empty interface that marks a PortletTest class that has test code which

- * should be run in the <code>Portlet.processAction()</code> method.

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public interface ActionTest extends PortletTest {

-	

-	// Empty interface.

-	

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/InvalidConfigurationException.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/InvalidConfigurationException.java
deleted file mode 100644
index cf4b9c5..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/InvalidConfigurationException.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *     http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- * 

- */

-package org.apache.pluto.testsuite;

-

-/**

- * Indicates that a configuration error has been detected

- */

-public class InvalidConfigurationException extends RuntimeException {

-

-	public InvalidConfigurationException(String message) {

-		super(message);

-	}

-

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/NoOpTest.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/NoOpTest.java
deleted file mode 100644
index a0ece1e..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/NoOpTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite;

-

-import javax.portlet.PortletConfig;

-import javax.portlet.PortletContext;

-import javax.portlet.PortletRequest;

-import javax.portlet.PortletResponse;

-

-import java.util.HashMap;

-import java.util.Map;

-

-/**

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- * @since Mar 9, 2005

- */

-public class NoOpTest implements PortletTest {

-	

-	/** The test configuration. */

-    private TestConfig config = null;

-    

-    

-    // Constructor -------------------------------------------------------------

-    

-    /**

-     * Default no-arg constructor.

-     */

-    public NoOpTest() {

-    	// Do nothing.

-    }

-    

-    

-    // PortletTest Impl --------------------------------------------------------

-    

-    public String getTestSuiteName() {

-        return "NoOpTest";

-    }

-

-    public Map getRenderParameters(PortletRequest request) {

-        return new HashMap();

-    }

-    

-    public TestResults doTest(PortletConfig config,

-                              PortletContext context,

-                              PortletRequest request,

-                              PortletResponse response) {

-        return new TestResults("None");

-    }

-

-    public void init(TestConfig config) {

-        this.config = config;

-    }

-

-    public TestConfig getConfig() {

-        return config;

-    }

-    

-}

-

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/PortletTest.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/PortletTest.java
deleted file mode 100644
index 4ec4560..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/PortletTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite;

-

-import java.util.Map;

-

-import javax.portlet.PortletConfig;

-import javax.portlet.PortletContext;

-import javax.portlet.PortletRequest;

-import javax.portlet.PortletResponse;

-

-import org.apache.pluto.testsuite.TestConfig;

-

-/**

- * Interface for pluto portlet test classes.

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public interface PortletTest {

-	

-	/**

-	 * Returns the test suite name.

-	 * @return the test suite name.

-	 */

-    public String getTestSuiteName();

-    

-    /**

-     * Initializes the portlet test using test configuration.

-     * @param config  the test configuration.

-     */

-    public void init(TestConfig config);

-    

-    /**

-     * Returns the render parameters. This method will be invoked in

-     * <code>Portlet.processAction()</code> method. All parameters returned

-     * by this method will be set as render parameters.

-     * 

-     * @param request  the portlet request.

-     * @return a map of render parameters, key is the string name of the

-     *         parameter, value is a string array.

-     */

-    public Map getRenderParameters(PortletRequest request);

-    

-    /**

-     * Runs the test.

-     * @param config  the portlet config.

-     * @param context  the portlet context.

-     * @param request  the portlet request.

-     * @param response  the portlet response.

-     * @return the results of the test.

-     */

-    public TestResults doTest(PortletConfig config,

-                              PortletContext context,

-                              PortletRequest request,

-                              PortletResponse response);

-    

-    /**

-     * Returns the test configuration.

-     * @return the test configuration.

-     */

-    public TestConfig getConfig();

-    

-}

-

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfig.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfig.java
deleted file mode 100644
index 1ca529a..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfig.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite;

-

-import java.io.Serializable;

-import java.util.ArrayList;

-import java.util.Collections;

-import java.util.HashMap;

-import java.util.List;

-import java.util.Map;

-

-/**

- * Configuration for <code>PortletTest</code>.

- * 

- * @see TestConfigFactory

- * @see PortletTest

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- * @since Sep 15, 2004

- */

-public class TestConfig implements Serializable {

-	

-	// Private Member Variables ------------------------------------------------

-	

-	/** PortletTest class name. */

-    private String testClassName = null;

-    

-    /** Test name. */

-    private String name = null;

-    

-    private String displayURI = null;

-    

-    private Map initParameters = new HashMap();

-    

-    /**

-     * The action parameters list holding TestConfig.Parameter objects.

-     * We are not using Map to hold action parameters because parameters with

-     * the same name are allowed.

-     */

-    private List actionParameters = new ArrayList();

-    

-    /**

-     * The render parameters list holding TestConfig.Parameter objects.

-     * We are not using Map to hold render parameters because parameters with

-     * the same name are allowed.

-     * 

-     * FIXME: when is this field used?

-     */

-    private List renderParameters = new ArrayList();

-    

-    

-    // Constructor -------------------------------------------------------------

-    

-    /**

-     * Default constructor required by Digester.

-     */

-    public TestConfig() {

-    	// Do nothing.

-    }

-    

-    // Public Methods ----------------------------------------------------------

-    

-    public String getTestClassName() {

-        return testClassName;

-    }

-

-    public void setTestClassName(String testClassName) {

-        this.testClassName = testClassName;

-    }

-

-    public String getName() {

-        return name;

-    }

-

-    public void setName(String testName) {

-        this.name = testName;

-    }

-

-    public String getDisplayURI() {

-        return displayURI;

-    }

-

-    public void setDisplayURI(String displayURI) {

-        this.displayURI = displayURI;

-    }

-

-    public void addInitParameter(String parameter, String value) {

-        initParameters.put(parameter, value);

-    }

-

-    public Map getInitParameters() {

-        return Collections.unmodifiableMap(initParameters);

-    }

-

-    public void addActionParameter(String name, String value) {

-    	actionParameters.add(new Parameter(name, value));

-    }

-    

-    public List getActionParameters() {

-    	return actionParameters;

-    }

-    

-    /**

-     * FIXME: why is this method required?

-     */

-    public void addRenderParameter(String name, String value) {

-    	renderParameters.add(new Parameter(name, value));

-    }

-    

-    /**

-     * FIXME: when is this method used?

-     */

-    public List getRenderParameters() {

-    	return renderParameters;

-    }

-

-    public String toString() {

-    	StringBuffer buffer = new StringBuffer();

-    	buffer.append(getClass().getName());

-    	buffer.append("[").append(getName()).append("]");

-    	return buffer.toString();

-    }

-    

-    public static class Parameter {

-    	private String name = null;

-    	private String value = null;

-    	public Parameter(String name, String value) {

-    		this.name = name;

-    		this.value = value;

-    	}

-    	

-    	public String getName() {

-    		return name;

-    	}

-    	public String getValue() {

-    		return value;

-    	}

-    }

-    

-}

-

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfigFactory.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfigFactory.java
deleted file mode 100644
index 951497b..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestConfigFactory.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite;

-

-import java.io.IOException;

-import java.io.InputStream;

-import java.util.ArrayList;

-import java.util.List;

-

-import org.apache.commons.digester.Digester;

-import org.apache.pluto.testsuite.TestConfig;

-import org.xml.sax.SAXException;

-

-/**

- * Test configuration factory that reads and parses testsuite config file using

- * Digester and constructs <code>TestConfig</code> objects.

- * 

- * @see TestConfig

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class TestConfigFactory {

-	

-	/** Digester instance used to parse testsuite config file. */

-    private Digester digester = new Digester();

-    

-    

-    // Constructor -------------------------------------------------------------

-    

-    /**

-     * Creates a factory instance.

-     */

-    public TestConfigFactory() {

-        digester = new Digester();

-        digester.addObjectCreate("testportlet-config", ArrayList.class);

-

-

-        digester.addObjectCreate("testportlet-config/testsuite-config",

-                                 TestConfig.class);

-

-        digester.addBeanPropertySetter("testportlet-config/testsuite-config/name",

-                                       "name");

-        digester.addBeanPropertySetter("testportlet-config/testsuite-config/class",

-                                       "testClassName");

-        digester.addBeanPropertySetter("testportlet-config/testsuite-config/display-uri",

-                                       "displayURI");

-

-        digester.addCallMethod("testportlet-config/testsuite-config/init-param", "addInitParameter", 2);

-        digester.addCallParam("testportlet-config/testsuite-config/init-param/name", 0);

-        digester.addCallParam("testportlet-config/testsuite-config/init-param/value", 1);

-

-        digester.addCallMethod("testportlet-config/testsuite-config/action-param", "addActionParameter", 2);

-        digester.addCallParam("testportlet-config/testsuite-config/action-param/name", 0);

-        digester.addCallParam("testportlet-config/testsuite-config/action-param/value", 1);

-

-        digester.addCallMethod("testportlet-config/testsuite-config/render-param", "addRenderParameter", 2);

-        digester.addCallParam("testportlet-config/testsuite-config/render-param/name", 0);

-        digester.addCallParam("testportlet-config/testsuite-config/render-param/value", 1);

-

-        digester.addSetRoot("testportlet-config/testsuite-config", "add");

-

-    }

-    

-    

-    // Public Methods ----------------------------------------------------------

-    

-    /**

-     * Reads and parses testsuite config file, creates a list of

-     * <code>TestConfig</code> objects.

-     * 

-     * @param in  the input stream of the testsuite config file.

-     * @return a list of <code>TestConfig</code> objects.

-     * @throws SAXException  if a parsing error occurs.

-     * @throws IOException  if an IO error occurs.

-     * @see TestConfig

-     */

-    public List createTestConfigs(InputStream in)

-    throws SAXException, IOException {

-        return (List) digester.parse(in);

-    }

-    

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestPortlet.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestPortlet.java
deleted file mode 100644
index bb7159c..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestPortlet.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite;

-

-import javax.portlet.ActionRequest;

-import javax.portlet.ActionResponse;

-import javax.portlet.GenericPortlet;

-import javax.portlet.PortletException;

-import javax.portlet.PortletRequest;

-import javax.portlet.PortletRequestDispatcher;

-import javax.portlet.PortletSession;

-import javax.portlet.RenderRequest;

-import javax.portlet.RenderResponse;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-

-import java.io.IOException;

-import java.io.InputStream;

-import java.util.HashMap;

-import java.util.Iterator;

-import java.util.List;

-import java.util.Map;

-

-/**

- * Pluto testsuite's test portlet.

- * 

- * @see TestConfig

- * @see PortletTest

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- */

-public class TestPortlet extends GenericPortlet {

-

-	/** Internal logger. */

-	private static final Log LOG = LogFactory.getLog(TestPortlet.class);

-	

-	

-	// Private Member Variables ------------------------------------------------

-	

-	/** List of test configurations. */

-    private List testConfigs = null;

-    

-    /**

-     * Map of test instances: key is an integer ID (as a string), and value is

-     * the <code>PortletTest</code> instances.

-     */

-    private Map tests = null;

-    

-    

-    // GenericPortlet Impl -----------------------------------------------------

-    

-    /**

-     * Initialize the test portlet. This method reads the testsuite's config

-     * files, constructs and initializes all <code>PortletTest</code> instances.

-     * @throws PortletException if fail to read the configuration file.

-     */

-    public void init() throws PortletException {

-    	

-    	// Get configuration file name.

-        String configFile = getInitParameter("config");

-        if (configFile == null) {

-            configFile = "/WEB-INF/testsuite-config.xml";

-        }

-        

-        // Get configuration file as an input stream.

-        InputStream is = getPortletContext().getResourceAsStream(configFile);

-        if (is == null) {

-        	String message = "Testsuite configuration file not found.";

-        	LOG.error(message);

-        	throw new PortletException(message);

-        }

-        

-        // Load PortletTest instances: constructing and initializing.

-        TestConfigFactory factory = new TestConfigFactory();

-        try {

-        	testConfigs = factory.createTestConfigs(is);

-            tests = new HashMap();

-            int i = 0;

-            for (Iterator it = testConfigs.iterator(); it.hasNext(); ) {

-                TestConfig testConfig = (TestConfig) it.next();

-                String name = testConfig.getTestClassName();

-                PortletTest test = null;

-                if (name != null) {

-                	if (LOG.isDebugEnabled()) {

-                		LOG.debug("Loading test: " + name);

-                	}

-                    Class clazz = Class.forName(testConfig.getTestClassName());

-                    test = (PortletTest) clazz.newInstance();

-                } else {

-                	if (LOG.isDebugEnabled()) {

-                		LOG.debug("Loading NoOpTest (test with no name).");

-                	}

-                    test = new NoOpTest();

-                }

-                test.init(testConfig);

-                tests.put(String.valueOf(i++), test);

-            }

-        } catch (Throwable th) {

-        	String message = "Unable to read testsuite configuration.";

-        	LOG.error(message, th);

-            throw new PortletException(message, th);

-        }

-    }

-    

-    

-    public void processAction(ActionRequest request, ActionResponse response)

-    throws PortletException, IOException {

-    	

-        String testId = getTestId(request);

-        PortletTest test = (PortletTest) tests.get(testId);

-        

-        // For ActionTest, run test and save results in session.

-        if (test != null && test instanceof ActionTest) {

-            TestResults results = test.doTest(getPortletConfig(),

-                                              getPortletContext(),

-                                              request,

-                                              response);

-            PortletSession session = request.getPortletSession();

-            session.setAttribute(test.getClass().getName(), results);

-        }

-        

-        Map renderParameters = null;

-        if (test != null) {

-            renderParameters = test.getRenderParameters(request);

-        }

-        if (renderParameters == null) {

-            renderParameters = new HashMap();

-        }

-        renderParameters.put("testId", new String[] { testId });

-        response.setRenderParameters(renderParameters);

-    }

-    

-    /**

-     * Serves up the <code>view</code> mode.

-     * TODO: more javadoc.

-     * 

-     * @param request  the protlet request.

-     * @param response  the portlet response.

-     */

-    public void doView(RenderRequest request, RenderResponse response)

-    throws PortletException, IOException {

-    	

-    	// Get the current test ID, the test instance and its config.

-        String testId = getTestId(request);

-        TestConfig testConfig = null;

-        PortletTest test = null;

-        if (testId != null) {

-        	testConfig = (TestConfig) testConfigs.get(Integer.parseInt(testId));

-        	test = (PortletTest) tests.get(testId);

-        }

-        

-        // For non-ActionTest, run test and save results in request.

-        if (test != null && !(test instanceof ActionTest)) {

-            TestResults results = test.doTest(getPortletConfig(),

-                                              getPortletContext(),

-                                              request,

-                                              response);

-            request.setAttribute("results", results);

-        }

-        // For ActionTest, retrieve results from session and save in request.

-        else if (test != null) {

-            PortletSession session = request.getPortletSession();

-            TestResults results = (TestResults) session.getAttribute(

-            		test.getClass().getName());

-            request.setAttribute("results", results);

-        }

-        

-        

-        if (testId == null) {

-        	// FIXME: update attribute name from tests to testConfigs.

-            request.setAttribute("tests", testConfigs);

-        } else {

-            TestConfig nextTestConfig = null;

-            TestConfig prevTestConfig = null;

-            int index = testConfigs.indexOf(test.getConfig());

-            if (index == 0) {

-            	prevTestConfig = (TestConfig) testConfigs.get(testConfigs.size() - 1);

-                nextTestConfig = (TestConfig) testConfigs.get(index + 1);

-            } else if (index == testConfigs.size() - 1) {

-            	prevTestConfig = (TestConfig) testConfigs.get(index - 1);

-                nextTestConfig = (TestConfig) testConfigs.get(0);

-            } else {

-            	prevTestConfig = (TestConfig) testConfigs.get(index - 1);

-                nextTestConfig = (TestConfig) testConfigs.get(index + 1);

-            }

-            request.setAttribute("prevTest", prevTestConfig);

-            request.setAttribute("nextTest", nextTestConfig);

-        }

-        

-        // Set content type for render response, and dispatch to JSP.

-        response.setContentType("text/html");

-        String displayUri = null;

-        if (testConfig != null) {

-        	displayUri = testConfig.getDisplayURI();

-        } else {

-        	displayUri = "/jsp/introduction.jsp";

-        }

-        PortletRequestDispatcher dispatcher = getPortletContext()

-        		.getRequestDispatcher(displayUri);

-        dispatcher.include(request, response);

-    }

-

-    /**

-     * Serves up the <code>edit</code> mode. This method dispatches the request

-     * and response to the edit JSP page (<code>/jsp/edit.jsp</code>).

-     * @param request  the portlet request.

-     * @param response  the portlet response.

-     */

-    protected void doEdit(RenderRequest request, RenderResponse response)

-    throws PortletException, IOException {

-        PortletRequestDispatcher dispatcher = getPortletContext()

-        		.getRequestDispatcher("/jsp/edit.jsp");

-        dispatcher.include(request, response);

-    }

-    

-    /**

-     * Serves up the <code>help</code> mode. This method dispatches the request

-     * and response to the help JSP page (<code>/jsp/help.jsp</code>).

-     * @param request  the portlet request.

-     * @param response  the portlet response.

-     */

-    protected void doHelp(RenderRequest request, RenderResponse response)

-    throws PortletException, IOException {

-    	PortletRequestDispatcher dispatcher = getPortletContext()

-    			.getRequestDispatcher("/jsp/help.jsp");

-    	dispatcher.include(request, response);

-    }

-    

-    

-    // Private Methods ---------------------------------------------------------

-    

-    /**

-     * Returns the current test ID.

-     * @param request  the portlet request.

-     * @return the current test ID.

-     */

-    private String getTestId(PortletRequest request) {

-        

-    	String testId = request.getParameter("testId");

-        String prevTestId = request.getParameter("previousTestId");

-        String nextTestId = request.getParameter("nextTestId");

-        

-        // If none of the parameters are available, return null.

-        if ((testId == null || testId.trim().length() == 0)

-        		&& nextTestId == null && prevTestId == null

-        		&& tests.size() > 0) {

-            return null;

-        }

-        

-        // Retrieve the test which is next to the previous test.

-        else if (testId == null && prevTestId != null) {

-            int previousTestIdInt = Integer.parseInt(prevTestId);

-            if (previousTestIdInt >= testConfigs.size() - 1) {

-                testId = "0";

-            } else {

-                testId = String.valueOf(previousTestIdInt + 1);

-            }

-        }

-        

-        // Retrieve the test which is previous to the next test.

-        else if (testId == null && nextTestId != null) {

-            int nextTestIdInt = Integer.parseInt(nextTestId);

-            if (nextTestIdInt <= 0) {

-                testId = String.valueOf(testConfigs.size()-1);

-            } else {

-                testId = String.valueOf(nextTestIdInt - 1);

-            }

-        }

-        

-        // Return the current test ID.

-        return testId;

-    }

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestResult.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestResult.java
deleted file mode 100644
index 5ad3477..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestResult.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite;

-

-import java.io.Serializable;

-

-/**

- * The test result represents the result of one test method.

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class TestResult implements Serializable {

-	

-	/** The undefined return code. */

-	public static final int UNDEFINED = -1;

-	

-	/** The warning return code. */

-	public static final int WARNING = 0;

-	

-	/** The failed return code. */

-	public static final int FAILED = 1;

-	

-	/** The passed return code. */

-	public static final int PASSED = 2;

-	

-	

-    // Private Member Variables ------------------------------------------------

-    

-    /** The name of the test. */

-    private String name = null;

-    

-    /** The description of the test. */

-    private String description = "[unknown]";

-    

-    /** The PLT number in the spec that is tested. */

-    private String specPLT = "[unknown]";

-    

-    /** The return code of the test result: PASSED, WARNING, FAILED. */

-    private int returnCode = UNDEFINED;

-    

-    /** The message of the test result. */

-    private String resultMessage ="[unknown]";

-    

-    

-    // Public Methods ----------------------------------------------------------

-    

-    public String getName() {

-        return name;

-    }

-

-    public void setName(String name) {

-        this.name = name;

-    }

-    

-    public String getDescription() {

-    	return description;

-    }

-    

-    public void setDescription(String description) {

-    	this.description = description;

-    }

-    

-    public String getSpecPLT() {

-    	return specPLT;

-    }

-    

-    public void setSpecPLT(String specPLT) {

-    	this.specPLT = specPLT;

-    }

-    

-    public int getReturnCode() {

-        return returnCode;

-    }

-    

-    public String getReturnCodeAsString() {

-    	if (returnCode == WARNING) {

-    		return "WARNING";

-    	} else if (returnCode == FAILED) {

-    		return "FAILED";

-    	} else if (returnCode == PASSED) {

-    		return "PASSED";

-    	} else {

-    		return "UNKNOWN RETURN CODE";

-    	}

-    }

-

-    public void setReturnCode(int returnCode) {

-        this.returnCode = returnCode;

-    }

-    

-    public String getResultMessage() {

-    	return resultMessage;

-    }

-    

-    public void setResultMessage(String resultMessage) {

-    	this.resultMessage = resultMessage;

-    }

-    

-    

-    // Object Methods ----------------------------------------------------------

-    

-    /**

-     * Override of toString() that prints out name and results values.

-     * @see java.lang.Object#toString()

-     */

-    public String toString(){

-    	StringBuffer buffer = new StringBuffer();

-    	buffer.append(getClass().getName());

-    	buffer.append("[name=").append(name);

-    	buffer.append(";returnCode=").append(returnCode);

-    	buffer.append(";resultMessage=").append(resultMessage).append("]");    	

-    	return buffer.toString();

-    }

-    

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestResults.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestResults.java
deleted file mode 100644
index 2a79566..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestResults.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite;

-

-import org.apache.pluto.testsuite.TestResult;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.Collections;

-import java.io.Serializable;

-

-/**

- * This class contains one or more test results.

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class TestResults implements Serializable {

-	

-	

-    private String name = null;

-    

-    private ArrayList list = new ArrayList();

-    

-    private boolean failed = false;

-    private boolean inQuestion = false;

-

-    public TestResults(String name) {

-        this.name = name;

-    }

-

-    public String getName() {

-        return name;

-    }

-

-    public void setName(String name) {

-        this.name = name;

-    }

-

-    public void add(TestResult result) {

-        if (result.getReturnCode() == TestResult.FAILED) {

-            failed = true;

-        } else if (result.getReturnCode() == TestResult.WARNING) {

-            inQuestion = true;

-        }

-        list.add(result);

-    }

-

-    public boolean isFailed() {

-        return failed;

-    }

-

-    public boolean isInQuestion() {

-        return inQuestion;

-    }

-

-    public Collection getCollection() {

-        return Collections.unmodifiableCollection(list);

-    }

-

-    /**

-     * Override of toString() that prints out variable

-     * names and values.

-     * 

-     * @see java.lang.Object#toString()

-     */

-    public String toString(){

-    	StringBuffer buffer = new StringBuffer();

-    	buffer.append(getClass().getName());

-    	buffer.append("[name=").append(name);

-    	buffer.append(";failed=").append(failed);

-    	buffer.append(";inQuestion=").append(inQuestion);

-    	buffer.append(";results={").append(list).append("}]");    	

-    	return buffer.toString();

-    }

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestUtils.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestUtils.java
deleted file mode 100644
index 36c537f..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestUtils.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-

-/**

- * Static class that provides utility methods for Pluto testsuite.

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @since 2006-02-13

- */

-public class TestUtils {

-	

-	/** Logger. */

-	private static final Log LOG = LogFactory.getLog(TestUtils.class);

-	

-	

-	// Private Constructor -----------------------------------------------------

-	

-	/**

-	 * Private method that prevents external instantiation.

-	 */

-	private TestUtils() {

-		// Do nothing.

-	}

-	

-	

-	// Public Static Methods ---------------------------------------------------

-	

-	/**

-	 * Sets the test result return code to <code>FAILED</code>, and reports

-	 * assertion details by specifying values got and values expected.

-	 * @param valueName  the name of the values to assert.

-	 * @param valueGot  the values got.

-	 * @param valueExpected  the values expected.

-	 * @param result  the test result.

-	 */

-	public static void failOnAssertion(String valuesName,

-	                                   String[] valuesGot,

-	                                   String[] valuesExpected,

-	                                   TestResult result) {

-		failOnAssertion(valuesName,

-		                arrayToString(valuesGot),

-		                arrayToString(valuesExpected),

-		                result);

-	}

-	

-	/**

-	 * Sets the test result return code to <code>FAILED</code>, and reports

-	 * assertion details by specifying value got and value expected.

-	 * @param valueName  the name of the value to assert.

-	 * @param valueGot  the value object got.

-	 * @param valueExpected  the value object expected.

-	 * @param result  the test result.

-	 */

-	public static void failOnAssertion(String valueName,

-	                                   Object valueGot,

-	                                   Object valueExpected,

-	                                   TestResult result) {

-		StringBuffer buffer = new StringBuffer();

-		buffer.append("Assertion failed: ");

-		buffer.append("got ").append(valueName).append(": ").append(valueGot);

-		buffer.append(", expected: ").append(valueExpected);

-    	result.setReturnCode(TestResult.FAILED);

-    	result.setResultMessage(buffer.toString());

-	}

-	

-    /**

-     * Sets the test result return code to <code>FAILED</code>, and reports

-     * exception details.

-     * @param message  the error message.

-     * @param cause  the cause exception.

-     * @param result  the test result.

-     */

-    public static void failOnException(String message,

-                                       Throwable cause,

-                                       TestResult result) {

-    	// Construct error message.

-    	StringBuffer buffer = new StringBuffer();

-    	if (message != null) {

-    		buffer.append(message);

-    	} else {

-    		buffer.append("Exception occurred.");

-    	}

-    	buffer.append(" Cause (").append(cause.getClass().getName()).append("): ");

-    	buffer.append(cause.getMessage());

-    	

-    	// Log error message.

-    	if (LOG.isErrorEnabled()) {

-    		LOG.error(buffer.toString(), cause);

-    	}

-    	

-    	// Set error message to test result.

-    	result.setReturnCode(TestResult.FAILED);

-    	result.setResultMessage(buffer.toString());

-    }

-    

-    

-    // Private Static Methods --------------------------------------------------

-    

-    /**

-     * Converts a string array to a string.

-     * @param values  the string array to convert.

-     * @return a string representing the values in the string array.

-     */

-    private static String arrayToString(String[] values) {

-		StringBuffer buffer = new StringBuffer();

-		if (values == null) {

-			buffer.append("null");

-		} else {

-			buffer.append("{");

-			for (int i = 0; i < values.length; i++) {

-				buffer.append(values[i]);

-				if (i < values.length - 1) {

-					buffer.append(",");

-				}

-			}

-			buffer.append("}");

-		}

-    	return buffer.toString();

-    }

-    

-	

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/AbstractReflectivePortletTest.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/AbstractReflectivePortletTest.java
deleted file mode 100644
index f0f52eb..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/AbstractReflectivePortletTest.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite.test;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.testsuite.TestConfig;

-import org.apache.pluto.testsuite.PortletTest;

-import org.apache.pluto.testsuite.TestResult;

-import org.apache.pluto.testsuite.TestResults;

-

-import javax.portlet.PortletResponse;

-import javax.portlet.PortletRequest;

-import javax.portlet.PortletContext;

-import javax.portlet.PortletConfig;

-import javax.portlet.PortletSession;

-import java.lang.reflect.InvocationTargetException;

-import java.lang.reflect.Method;

-import java.lang.reflect.Modifier;

-import java.util.ArrayList;

-import java.util.Iterator;

-import java.util.List;

-import java.util.Map;

-import java.util.HashMap;

-

-/**

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public abstract class AbstractReflectivePortletTest implements PortletTest {

-	

-	/** Logger. */

-	private static final Log LOG = LogFactory.getLog(

-			AbstractReflectivePortletTest.class);

-	

-    private Map initParameters = null;

-    private TestConfig config = null;

-    

-    

-    // PortletTest Impl --------------------------------------------------------

-    

-    public void init(TestConfig config) {

-        this.config = config;

-        this.initParameters = config.getInitParameters();

-    }

-    

-    /**

-     * Returns the render parameters that will be set into the render request.

-     * The default implementation just returns an empty Map object. This method

-     * may be overwritten by some concrete test to provide test-specific render

-     * parameters.

-     * @param request  the portlet request.

-     * @return an empty Map object.

-     */

-    public Map getRenderParameters(PortletRequest request) {

-        return new HashMap();

-    }

-    

-    public TestConfig getConfig() {

-        return config;

-    }

-    

-    /**

-     * Returns the test suite name. The test suite name is the portlet test

-     * class name without package name prefix.

-     * @return the test suite name.

-     */

-    public String getTestSuiteName() {

-    	String className = getClass().getName();

-    	int index = className.lastIndexOf(".");

-    	if (index >= 0 && index < className.length() - 1) {

-    		return className.substring(index + 1);

-    	} else {

-    		return className;

-    	}

-    }

-    

-    /**

-     * Invoke test methods using java reflection. All 'check*' methods are

-     * invoked and test results are saved into <code>TestResults</code> object.

-     * @param config  the portlet config.

-     * @param context  the portlet context.

-     * @param request  the portlet request.

-     * @param response  the portlet response.

-     * @return the test results including several TestResult instances. 

-     */

-    public TestResults doTest(PortletConfig config,

-                              PortletContext context,

-                              PortletRequest request,

-                              PortletResponse response) {

-        TestResults results = new TestResults(getTestSuiteName());

-        

-        for (Iterator it = getCheckMethods().iterator(); it.hasNext(); ) {

-        	Method method = (Method) it.next();

-        	debugWithName("Invoking test method: " + method.getName());

-        	try {

-        		TestResult result = invoke(method, config, context, request, response);

-        		if (result.getName() == null) {

-        			result.setName(method.getName());

-        		}

-        		results.add(result);

-        		debugWithName("Result: " + result.getReturnCodeAsString());

-        	} catch (Throwable th) {

-        		String message = "Error invoking " + method.getName()

-        				+ " (" + th.getClass().getName() + "): "

-        				+ th.getMessage();

-        		errorWithName(message, th);

-        		TestResult result = new TestResult();

-        		result.setName(method.getName());

-        		result.setReturnCode(TestResult.FAILED);

-        		result.setResultMessage(message);

-        		results.add(result);

-            }

-        }

-        

-        return results;

-    }

-    

-    

-    // Protected Methods -------------------------------------------------------

-    

-    protected Map getInitParameters() {

-        return initParameters;

-    }

-    

-    

-    // Private Methods ---------------------------------------------------------

-    

-    private void debugWithName(String message) {

-    	if (LOG.isDebugEnabled()) {

-    		LOG.debug("Test [" + getTestSuiteName() + "]: " + message);

-    	}

-    }

-    

-    private void errorWithName(String message, Throwable cause) {

-    	if (LOG.isErrorEnabled()) {

-    		LOG.error("Test [" + getTestSuiteName() + "]: " + message, cause);

-    	}

-    }

-    

-    /**

-     * Returns check methods to run as tests using java reflection.

-     * The following rules are applied to select check methods:

-     * <ul>

-     *   <li>methods declared in this class or inherited from super class</li>

-     *   <li>methods with modifier 'public' or 'protected', but not 'abstract'</li>

-     *   <li>methods that starts with <code>check</code></li> 

-     * </ul>

-     * @return a list of check methods.

-     */

-    private List getCheckMethods() {

-    	List checkMethods = new ArrayList();

-    	for (Class clazz = getClass();

-    			clazz != null && AbstractReflectivePortletTest.class.isAssignableFrom(clazz);

-    			clazz = clazz.getSuperclass()) {

-    		// debugWithName("Checking class: " + clazz.getName());

-    		Method[] methods = clazz.getDeclaredMethods();

-    		for (int i = 0; i < methods.length; i++) {

-    			int mod = methods[i].getModifiers();

-    			if ((Modifier.isPublic(mod) || Modifier.isProtected(mod))

-    					&& !Modifier.isAbstract(mod)

-    					&& methods[i].getName().startsWith("check")) {

-    				// debugWithName(" - got check method: " + methods[i].getName());

-    				checkMethods.add(methods[i]);

-    			}

-    		}

-    	}

-        return checkMethods;

-    }

-    

-    /**

-     * Invokes the test method ('<code>check*</code>') by preparing method

-     * parameters. A test method may accept the following types of parameters:

-     * <ul>

-     *   <li><code>javax.portlet.PortletConfig</code></li>

-     *   <li><code>javax.portlet.PortletContext</code></li>

-     *   <li><code>javax.portlet.PortletRequest</code></li>

-     *   <li><code>javax.portlet.PortletResponse</code></li>

-     *   <li><code>javax.portlet.PortletSession</code></li>

-     * </ul>

-     */

-    private TestResult invoke(Method method,

-                              PortletConfig config,

-                              PortletContext context,

-                              PortletRequest request,

-                              PortletResponse response)

-    throws IllegalAccessException, InvocationTargetException {

-

-        Class[] paramTypes = method.getParameterTypes();

-        Object[] paramValues = new Object[paramTypes.length];

-

-        for (int i = 0; i < paramTypes.length; i++) {

-            if (paramTypes[i].equals(PortletConfig.class)) {

-                paramValues[i] = config;

-            } else if (paramTypes[i].equals(PortletContext.class)) {

-                paramValues[i] = context;

-            } else if (paramTypes[i].equals(PortletRequest.class)) {

-                paramValues[i] = request;

-            } else if (paramTypes[i].equals(PortletResponse.class)) {

-                paramValues[i] = response;

-            } else if (paramTypes[i].equals(PortletSession.class)) {

-                paramValues[i] = request.getPortletSession();

-            }

-        }

-        TestResult result = (TestResult) method.invoke(this, paramValues);

-        return result;

-    }

-    

-    

-    // Object Methods ----------------------------------------------------------

-    

-    /**

-     * Override of toString() that prints out names and values of variables.

-     * @see java.lang.Object#toString()

-     */

-    public String toString(){

-    	StringBuffer buffer = new StringBuffer();

-    	buffer.append(getClass().getName());

-    	buffer.append("[initParameters=").append(initParameters);

-    	buffer.append(";config=").append(config).append("]");    	

-    	return buffer.toString();

-    }

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/ActionParameterTest.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/ActionParameterTest.java
deleted file mode 100644
index 051d4b9..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/ActionParameterTest.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite.test;

-

-import org.apache.pluto.testsuite.ActionTest;

-import org.apache.pluto.testsuite.TestResult;

-import org.apache.pluto.testsuite.TestUtils;

-

-import java.util.Enumeration;

-import java.util.Map;

-

-import javax.portlet.PortletRequest;

-

-/**

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class ActionParameterTest extends AbstractReflectivePortletTest

-implements ActionTest {

-	

-	/** Parameter key encoded in the action URL. */

-    public static final String KEY = "org.apache.pluto.testsuite.PARAM_ACTION_KEY";

-    

-    /** Parameter value encoded in the action URL. */

-    public static final String VALUE = "org.apache.pluto.testsuite.ACTION_VALUE";

-    

-    

-    // Test Methods ------------------------------------------------------------

-    

-    protected TestResult checkGetActionParameter(PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure parameters encoded in action URL are "

-        		+ "available in the action request.");

-

-        String value = request.getParameter(KEY);

-        if (value != null && value.equals(VALUE)) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("parameter", value, VALUE, result);

-        }

-        return result;

-    }

-

-    protected TestResult checkGetActionParamerMap(PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure parameters encoded in action URL are "

-        		+ "available in the action request parameter map.");

-        

-        Map parameterMap = request.getParameterMap();

-        String[] values = (String[]) parameterMap.get(KEY);

-        if (values != null && values.length == 1 && VALUE.equals(values[0])) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("parameter values",

-        			values, new String[] { VALUE }, result);

-        }

-        return result;

-    }

-    

-    protected TestResult checkParameterNames(PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure parameters encoded in action URL "

-        		+ "exists in the parameter name enumeration.");

-        

-        boolean hasParameterName = false;

-        for (Enumeration en = request.getParameterNames();

-        		!hasParameterName && en.hasMoreElements(); ) {

-        	String name = (String) en.nextElement();

-        	if (KEY.equals(name)) {

-        		hasParameterName = true;

-        	}

-        }

-        

-        if (hasParameterName) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	result.setReturnCode(TestResult.FAILED);

-        	result.setResultMessage("Parameter name " + KEY

-        			+ " not found in parameter name enumeration.");

-        }

-        return result;

-    }

-    

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/AppScopedSessionAttributeTest.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/AppScopedSessionAttributeTest.java
deleted file mode 100644
index 7189694..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/AppScopedSessionAttributeTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-

-package org.apache.pluto.testsuite.test;

-

-import org.apache.pluto.testsuite.TestResult;

-import org.apache.pluto.testsuite.TestUtils;

-

-import javax.portlet.PortletSession;

-

-/**

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class AppScopedSessionAttributeTest

-extends AbstractReflectivePortletTest {

-

-    private static final String BOGUS_KEY = "org.apache.pluto.testsuite.BOGUS_KEY";

-    private static final String KEY = "org.apache.pluto.testsuite.KEY";

-    private static final String VALUE = "VALUE";

-    

-    

-    // Test Methods ------------------------------------------------------------

-    

-    protected TestResult checkGetEmptyAppScopedAttribute(PortletSession session) {

-        TestResult result = new TestResult();

-        result.setDescription("Retrieve an attribute that has not been set "

-        		+ "in the session's application scope "

-        		+ "and ensure it's value is null.");

-        result.setSpecPLT("15.3");

-        

-        Object value = session.getAttribute(BOGUS_KEY, PortletSession.APPLICATION_SCOPE);

-        if (value == null) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("session attribute", value, null, result);

-        }

-        return result;

-    }

-    

-    protected TestResult checkSetAppScopedAttribute(PortletSession session) {

-        TestResult result = new TestResult();

-        result.setDescription("Set an application scoped session attribute "

-        		+ "and ensure it's retrievable.");

-        result.setSpecPLT("15.3");

-        

-        session.setAttribute(KEY, VALUE, PortletSession.APPLICATION_SCOPE);

-        Object value = session.getAttribute(KEY, PortletSession.APPLICATION_SCOPE);

-        if (VALUE.equals(value)) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("session attribute", value, VALUE, result);

-        }

-        return result;

-    }

-

-    protected TestResult checkRemoveAppScopedAttribute(PortletSession session) {

-        TestResult result = new TestResult();

-        result.setDescription("Remove an application scoped session attribute "

-        		+ "and ensure it's null.");

-        result.setSpecPLT("15.3");

-        

-        session.setAttribute(KEY, VALUE, PortletSession.APPLICATION_SCOPE);

-        session.removeAttribute(KEY, PortletSession.APPLICATION_SCOPE);

-        Object value = session.getAttribute(KEY, PortletSession.APPLICATION_SCOPE);

-        if (value == null) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("session attribute", value, null, result);

-        }

-        return result;

-    }

-    

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/ContextInitParameterTest.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/ContextInitParameterTest.java
deleted file mode 100644
index bd6d61e..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/ContextInitParameterTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite.test;

-

-import org.apache.pluto.testsuite.TestResult;

-import org.apache.pluto.testsuite.TestUtils;

-

-import javax.portlet.PortletContext;

-import javax.portlet.PortletSession;

-import java.util.Enumeration;

-

-/**

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- * @since Sep 15, 2004

- */

-public class ContextInitParameterTest extends AbstractReflectivePortletTest  {

-	

-    private static final String TEST_PARAM_NAME = "test-parameter-name";

-    private static final String TEST_PARAM_VALUE = "test-parameter-val";

-    

-    

-    // Test Methods ------------------------------------------------------------

-    

-    protected TestResult checkEnumerationContainsNames(

-    		PortletContext context) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure that the expected init parameter name "

-        		+ "exists in the portlet context's init parameters.");

-        result.setSpecPLT("10.3.1");

-        

-        boolean found = false;

-        for (Enumeration en = context.getInitParameterNames();

-        		!found && en.hasMoreElements(); ) {

-            String name = (String) en.nextElement();

-            if (TEST_PARAM_NAME.equals(name)) {

-                found = true;

-            }

-        }

-

-        if (found) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	result.setReturnCode(TestResult.FAILED);

-        	result.setResultMessage("Expected init parameter '"

-        			+ TEST_PARAM_NAME + "' not found in portlet context.");

-        }

-        return result;

-    }

-    

-    protected TestResult checkGetInitParameter(PortletContext context) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure that init parameters are retrieveable.");

-        result.setSpecPLT("10.3.1");

-        

-        String value = context.getInitParameter(TEST_PARAM_NAME);

-        if (TEST_PARAM_VALUE.equals(value)) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("init parameter", value, TEST_PARAM_VALUE, result);

-        }

-        return result;

-    }

-    

-    /**

-     * FIXME: should this test reside in this class?  -- ZHENG Zhong

-     */

-    protected TestResult checkGetContextFromSession(PortletSession session) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure that the PortletContext can be retrieved "

-        		+ "from the portlet session.");

-        

-        PortletContext context = session.getPortletContext();

-        if (context != null) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	result.setReturnCode(TestResult.FAILED);

-        	result.setResultMessage("Fail to retrieve PortletContext from "

-        			+ "PortletSession: null returned.");

-        }

-        return result;

-    }

-}

-

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/DispatcherRenderParameterTest.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/DispatcherRenderParameterTest.java
deleted file mode 100644
index 986fd8e..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/DispatcherRenderParameterTest.java
+++ /dev/null
@@ -1,344 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite.test;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.testsuite.TestResult;

-import org.apache.pluto.testsuite.TestUtils;

-

-import java.io.IOException;

-import java.util.Arrays;

-import java.util.Map;

-

-import javax.portlet.PortletContext;

-import javax.portlet.PortletException;

-import javax.portlet.PortletRequest;

-import javax.portlet.PortletRequestDispatcher;

-import javax.portlet.PortletResponse;

-import javax.portlet.RenderRequest;

-import javax.portlet.RenderResponse;

-import javax.servlet.GenericServlet;

-import javax.servlet.ServletException;

-import javax.servlet.ServletRequest;

-import javax.servlet.ServletResponse;

-

-/**

- * 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- * @since Mar 9, 2005

- */

-public class DispatcherRenderParameterTest 

-extends AbstractReflectivePortletTest {

-	

-	/** Internal logger. */

-	private static final Log LOG = LogFactory.getLog(

-			DispatcherRenderParameterTest.class);

-	

-	// Static Final Constants --------------------------------------------------

-	

-	/** The path to the companion servlet. */

-	private static final String SERVLET_PATH = "/test/DispatcherRenderParameterTest_Servlet";

-	

-	private static final String KEY_TARGET = "target";

-	

-	private static final String TARGET_PARAMS = "testParams";

-	private static final String TARGET_SAME_NAME_PARAM = "testSameNameParam";

-	private static final String TARGET_ADDED_SAME_NAME_PARAM = "testAddedSameNameParam";

-	private static final String TARGET_INVALID_PARAMS = "testInvalidParams";

-	

-	private static final String KEY_RENDER = "renderParamKey";

-	private static final String VALUE_RENDER = "renderParamValue";

-	private static final String VALUE_ADDED1 = "addedParamValue1";

-	private static final String VALUE_ADDED2 = "addedParamValue2";

-	

-    private static final String KEY_A = "includedTestKeyA";

-    private static final String VALUE_A = "includedTestValueA";

-    

-    private static final String KEY_B = "includedTestKeyB";

-    private static final String VALUE_B = "includedTestValueB";

-    

-    private static final String KEY_C = "includedTestKeyC";

-    private static final String VALUE_C1 = "valueOneOfKeyC";

-    private static final String VALUE_C2 = "valueTwoOfKeyC";

-    private static final String VALUE_C3 = "valueThreeOfKeyC";

-    

-    public static final String RESULT_KEY =

-    		DispatcherRenderParameterTest.class.getName() + ".RESULT_KEY";

-    

-    

-    // AbstractReflectivePortletTest Impl --------------------------------------

-    

-    /**

-     * Overwrites <code>super.getRenderParameters(..)</code> to set the

-     * test-specific render parameter in the render URL.

-     */

-    public Map getRenderParameters(PortletRequest request) {

-    	Map parameterMap = super.getRenderParameters(request);

-    	parameterMap.put(KEY_RENDER, new String[] { VALUE_RENDER });

-    	return parameterMap;

-    }

-    

-

-    

-    // Test Methods ------------------------------------------------------------

-    

-    protected TestResult checkParameters(PortletContext context,

-                                         PortletRequest request,

-                                         PortletResponse response)

-    throws IOException, PortletException {

-    	

-    	// Dispatch to the companion servlet: call checkParameters().

-    	StringBuffer buffer = new StringBuffer();

-    	buffer.append(SERVLET_PATH).append("?")

-    			.append(KEY_TARGET).append("=").append(TARGET_PARAMS)

-    			.append("&").append(KEY_A).append("=").append(VALUE_A)

-    			.append("&").append(KEY_B).append("=").append(VALUE_B);

-    	

-    	if (LOG.isDebugEnabled()) {

-    		LOG.debug("Dispatching to: " + buffer.toString());

-    	}

-        PortletRequestDispatcher dispatcher = context.getRequestDispatcher(

-        		buffer.toString());

-        dispatcher.include((RenderRequest) request, (RenderResponse) response);

-        

-    	// Retrieve test result returned by the companion servlet.

-        TestResult result = (TestResult) request.getAttribute(RESULT_KEY);

-    	request.removeAttribute(RESULT_KEY);

-        return result;

-    }

-    

-    

-    protected TestResult checkSameNameParameter(PortletContext context,

-                                                PortletRequest request,

-                                                PortletResponse response)

-    throws IOException, PortletException {

-    	

-    	// Dispatch to the companion servlet: call checkSameNameParameter().

-    	StringBuffer buffer = new StringBuffer();

-    	buffer.append(SERVLET_PATH).append("?")

-    			.append(KEY_TARGET).append("=").append(TARGET_SAME_NAME_PARAM)

-    			.append("&").append(KEY_C).append("=").append(VALUE_C1)

-    			.append("&").append(KEY_C).append("=").append(VALUE_C2)

-    			.append("&").append(KEY_C).append("=").append(VALUE_C3);

-    	

-    	if (LOG.isDebugEnabled()) {

-    		LOG.debug("Dispatching to: " + buffer.toString());

-    	}

-    	PortletRequestDispatcher dispatcher = context.getRequestDispatcher(

-    			buffer.toString());

-    	dispatcher.include((RenderRequest) request, (RenderResponse) response);

-    	

-    	// Retrieve test result returned by the companion servlet.

-        TestResult result = (TestResult) request.getAttribute(RESULT_KEY);

-    	request.removeAttribute(RESULT_KEY);

-    	return result;

-    }

-    

-    protected TestResult checkAddedSameNameParameter(PortletContext context,

-                                                     PortletRequest request,

-                                                     PortletResponse response)

-    throws IOException, PortletException {

-    	// Dispatch to the companion servlet: call checkAddedSameNameParameter().

-    	StringBuffer buffer = new StringBuffer();

-    	buffer.append(SERVLET_PATH).append("?")

-    			.append(KEY_TARGET).append("=").append(TARGET_ADDED_SAME_NAME_PARAM)

-    			.append("&").append(KEY_RENDER).append("=").append(VALUE_ADDED1)

-    			.append("&").append(KEY_RENDER).append("=").append(VALUE_ADDED2);

-    	

-    	if (LOG.isDebugEnabled()) {

-    		LOG.debug("Dispatching to: " + buffer.toString());

-    	}

-    	PortletRequestDispatcher dispatcher = context.getRequestDispatcher(

-    			buffer.toString());

-    	dispatcher.include((RenderRequest) request, (RenderResponse) response);

-    	

-    	// Retrieve test result returned by the companion servlet.

-        TestResult result = (TestResult) request.getAttribute(RESULT_KEY);

-    	request.removeAttribute(RESULT_KEY);

-    	return result;

-    }

-    

-    protected TestResult checkInvalidParameters(PortletContext context,

-                                                PortletRequest request,

-                                                PortletResponse response)

-    throws IOException, PortletException {

-    	

-    	// Dispatch to the companion servlet: call checkInvalidParameters().

-    	StringBuffer buffer = new StringBuffer();

-    	buffer.append(SERVLET_PATH).append("?")

-    			.append(KEY_TARGET).append("=").append(TARGET_INVALID_PARAMS)

-    			.append("&").append(KEY_A)

-    			.append("&").append(KEY_B).append("=").append(VALUE_B)

-    			.append("&").append(KEY_C).append("=");

-    	if (LOG.isDebugEnabled()) {

-    		LOG.debug("Dispatching to: " + buffer.toString());

-    	}

-    	PortletRequestDispatcher dispatcher = context.getRequestDispatcher(

-    			buffer.toString());

-    	dispatcher.include((RenderRequest) request, (RenderResponse) response);

-    	

-    	// Retrieve test result returned by the companion servlet.

-        TestResult result = (TestResult) request.getAttribute(RESULT_KEY);

-    	request.removeAttribute(RESULT_KEY);

-    	return result;

-    }

-    

-    

-    // Nested Companion Servlet Class ------------------------------------------

-    

-    /**

-     * Nested static companion servlet class.

-     * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

-     * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

-     */

-    public static class CompanionServlet extends GenericServlet {

-

-        // GenericServlet Impl -------------------------------------------------

-        

-        public String getServletInfo() {

-        	return getClass().getName();

-        }

-        

-    	/**

-    	 * Services the servlet request dispatched from the test portlet.

-    	 * This method checks the 'target' parameter to determine which test

-    	 * to run, and saves the test result in the request scope, which will

-    	 * be retrieved by the test portlet.

-    	 * @param request  the incoming servlet request.

-    	 * @param response  the incoming servlet response.

-    	 */

-        public void service(ServletRequest request, ServletResponse response)

-        throws ServletException, IOException {

-        	TestResult result = null;

-        	String target = request.getParameter(KEY_TARGET);

-        	if (TARGET_PARAMS.equals(target)) {

-        		result = checkParameters(request);

-        	} else if (TARGET_SAME_NAME_PARAM.equals(target)) {

-        		result = checkSameNameParameter(request);

-        	} else if (TARGET_ADDED_SAME_NAME_PARAM.equals(target)) {

-        		result = checkAddedSameNameParameter(request);

-        	} else if (TARGET_INVALID_PARAMS.equals(target)) {

-        		result = checkInvalidParameters(request);

-        	} else {

-        		result = failOnUnknownTarget(request);

-        	}

-        	request.setAttribute(RESULT_KEY, result);

-        }

-        

-        

-        // Private Methods -----------------------------------------------------

-        

-        /**

-         * Check that parameters A and B are available in the dispatching

-         * request.

-         * @param request  the servlet request.

-         */

-        private TestResult checkParameters(ServletRequest request) {

-        	TestResult result = new TestResult();

-            result.setDescription("Ensure query parameters added during "

-            		+ "dispatching are attached to the request.");

-            String valueA = request.getParameter(KEY_A);

-            String valueB = request.getParameter(KEY_B);

-            if (VALUE_A.equals(valueA) && VALUE_B.equals(valueB)) {

-            	result.setReturnCode(TestResult.PASSED);

-            } else if (!VALUE_A.equals(valueA)){

-            	TestUtils.failOnAssertion("parameter", valueA, VALUE_A, result);

-            } else {

-            	TestUtils.failOnAssertion("parameter", valueB, VALUE_B, result);

-            }

-            return result;

-        }

-        

-        /**

-         * Check that parameter C has three values.

-         * @param request  the servlet reqeust.

-         */

-        private TestResult checkSameNameParameter(ServletRequest request) {

-        	TestResult result = new TestResult();

-        	result.setDescription("Ensure query parameters with the same name "

-        			+ "added during dispatching are attached to the request.");

-        	String[] values = request.getParameterValues(KEY_C);

-        	String[] expected = new String[] {

-        			VALUE_C1, VALUE_C2, VALUE_C3, };

-        	if (Arrays.equals(values, expected)) {

-        		result.setReturnCode(TestResult.PASSED);

-        	} else {

-        		TestUtils.failOnAssertion("parameter", values, expected, result);

-        	}

-            return result;

-        }

-        

-        /**

-         * Check that parameter RENDER has three values: one is the render

-         * parameter, while the other two are appended in the dispatch URI.

-         * @param request  the servlet reqeust.

-         */

-        private TestResult checkAddedSameNameParameter(ServletRequest request) {

-        	TestResult result = new TestResult();

-        	result.setDescription("Ensure query parameters with the same name "

-        			+ "added during dispatching are attached to the request "

-        			+ "as well as render parameters.");

-        	String[] values = request.getParameterValues(KEY_RENDER);

-        	String[] expected = new String[] {

-        			VALUE_ADDED1, VALUE_ADDED2, VALUE_RENDER, };

-        	if (Arrays.equals(values, expected)) {

-        		result.setReturnCode(TestResult.PASSED);

-        	} else {

-        		TestUtils.failOnAssertion("parameter", values, expected, result);

-        	}

-    		return result;

-        }

-        

-        /**

-         * Check that invalid parameter A is ignored, parameter B is attached

-         * to the dispatching request with the correct value, and parameter C

-         * is attached to the dispatching request with an empty string.

-         * @param request  the servlet request.

-         */

-        private TestResult checkInvalidParameters(ServletRequest request) {

-        	TestResult result = new TestResult();

-        	result.setDescription("Ensure invalid query parameters added "

-        			+ "during dispatching are ignored.");

-        	String valueA = request.getParameter(KEY_A);

-        	String valueB = request.getParameter(KEY_B);

-        	String valueC = request.getParameter(KEY_C);

-        	if (valueA == null && VALUE_B.equals(valueB) && "".equals(valueC)) {

-        		result.setReturnCode(TestResult.PASSED);

-        	} else if (valueA != null) {

-        		TestUtils.failOnAssertion("parameter", valueA, null, result);

-        	} else if (!VALUE_B.equals(valueB)) {

-        		TestUtils.failOnAssertion("parameter", valueB, VALUE_B, result);

-        	} else {

-        		TestUtils.failOnAssertion("parameter", valueC, "", result);

-        	}

-    		return result;

-        }

-        

-        private TestResult failOnUnknownTarget(ServletRequest request) {

-        	TestResult result = new TestResult();

-        	result.setReturnCode(TestResult.FAILED);

-            result.setResultMessage("Unable to perform test for parameter "

-            		+ KEY_TARGET + ": " + request.getParameter(KEY_TARGET));

-            return result;

-        }

-        

-    }

-    

-}

-

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/DispatcherRequestTest.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/DispatcherRequestTest.java
deleted file mode 100644
index 3b3031e..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/DispatcherRequestTest.java
+++ /dev/null
@@ -1,405 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite.test;

-

-import java.io.IOException;

-

-import javax.portlet.PortletContext;

-import javax.portlet.PortletException;

-import javax.portlet.PortletRequest;

-import javax.portlet.PortletRequestDispatcher;

-import javax.portlet.PortletResponse;

-import javax.portlet.RenderRequest;

-import javax.portlet.RenderResponse;

-import javax.servlet.ServletException;

-import javax.servlet.http.HttpServlet;

-import javax.servlet.http.HttpServletRequest;

-import javax.servlet.http.HttpServletResponse;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.testsuite.TestResult;

-import org.apache.pluto.testsuite.TestUtils;

-

-public class DispatcherRequestTest extends AbstractReflectivePortletTest {

-	

-	/** Logger. */

-	private static final Log LOG = LogFactory.getLog(DispatcherRequestTest.class);

-	

-	/** The path to the companion servlet. */

-    private static final String SERVLET_PATH = "/test/DispatcherRequestTest_Servlet";

-    

-    private static final String CHECK_PATH_INFO = "/checkPathInfo";

-    private static final String CHECK_REQUEST_URI = "/checkRequestURI";

-    private static final String CHECK_CONTEXT_PATH = "/checkContextPath";

-    private static final String CHECK_SERVLET_PATH = "/checkServletPath";

-    private static final String CHECK_QUERY_STRING = "/checkQueryString";

-    

-    private static final String GET_REQUEST_URI = "/getRequestURI";

-    private static final String GET_CONTEXT_PATH = "/getContextPath";

-    private static final String GET_SERVLET_PATH = "/getServletPath";

-    private static final String GET_QUERY_STRING = "/getQueryString";

-    

-    /** The query string appended to the dispatch URI. */

-    private static final String QUERY_STRING = "paramName=paramValue";

-    

-    /** The request attribute key which associates the test result. */

-    private static final String RESULT_KEY =

-            DispatcherRequestTest.class.getName() + ".RESULT_KEY";

-    

-    /** The key for the expected request URI. */

-    private static final String EXPECTED_REQUEST_URI =

-            DispatcherRequestTest.class.getName() + ".REQUEST_URI";

-    

-    /** The key for the expected context path. */

-    private static final String EXPECTED_CONTEXT_PATH =

-            DispatcherRequestTest.class.getName() + ".CONTEXT_PATH";

-    

-	

-    // Test Methods ------------------------------------------------------------

-    

-    protected TestResult checkPathInfo(PortletContext context,

-                                       PortletRequest request,

-                                       PortletResponse response)

-    throws IOException, PortletException {

-    	return doCheckIncludedAttribute(context, request, response, CHECK_PATH_INFO);

-    }

-    

-    protected TestResult checkRequestURI(PortletContext context,

-                                         PortletRequest request,

-                                         PortletResponse response)

-    throws IOException, PortletException {

-    	return doCheckIncludedAttribute(context, request, response, CHECK_REQUEST_URI);

-    }

-    	

-    protected TestResult checkGetRequestURI(PortletContext context,

-                                            PortletRequest request,

-                                            PortletResponse response)

-    throws IOException, PortletException {

-    	return doCheckIncludedAttribute(context, request, response, GET_REQUEST_URI);

-    }

-

-    protected TestResult checkContextPath(PortletContext context,

-                                          PortletRequest request,

-                                          PortletResponse response)

-    throws IOException, PortletException {

-    	return doCheckIncludedAttribute(context, request, response, CHECK_CONTEXT_PATH);

-    }

-    

-    protected TestResult checkGetContextPath(PortletContext context,

-                                             PortletRequest request,

-                                             PortletResponse response)

-    throws IOException, PortletException {

-    	return doCheckIncludedAttribute(context, request, response, GET_CONTEXT_PATH);

-    }

-

-    protected TestResult checkServletPath(PortletContext context,

-                                          PortletRequest request,

-                                          PortletResponse response)

-    throws IOException, PortletException {

-    	return doCheckIncludedAttribute(context, request, response, CHECK_SERVLET_PATH);

-    }

-    

-    protected TestResult checkGetServletPath(PortletContext context,

-                                             PortletRequest request,

-                                             PortletResponse response)

-    throws IOException, PortletException {

-    	return doCheckIncludedAttribute(context, request, response, GET_SERVLET_PATH);

-    }

-

-    protected TestResult checkQueryString(PortletContext context,

-                                          PortletRequest request,

-                                          PortletResponse response)

-    throws IOException, PortletException {

-    	return doCheckIncludedAttribute(context, request, response, CHECK_QUERY_STRING);

-    }

-    

-    protected TestResult checkGetQueryString(PortletContext context,

-                                             PortletRequest request,

-                                             PortletResponse response)

-    throws IOException, PortletException {

-    	return doCheckIncludedAttribute(context, request, response, GET_QUERY_STRING);

-    }

-

-    

-    // Private Methods ---------------------------------------------------------

-    

-    private TestResult doCheckIncludedAttribute(PortletContext context,

-                                                PortletRequest request,

-                                                PortletResponse response,

-                                                String pathInfo)

-    throws IOException, PortletException {

-    	

-    	// Save expected values as request attributes.

-    	String contextPath = request.getContextPath();

-    	String requestUri = contextPath + SERVLET_PATH + pathInfo;

-    	request.setAttribute(EXPECTED_REQUEST_URI, requestUri);

-    	request.setAttribute(EXPECTED_CONTEXT_PATH, contextPath);

-

-    	// Dispatch to the companion servlet: call checkParameters().

-    	StringBuffer buffer = new StringBuffer();

-    	buffer.append(SERVLET_PATH).append(pathInfo).append("?")

-    			.append(QUERY_STRING);

-    	if (LOG.isDebugEnabled()) {

-    		LOG.debug("Dispatching to: " + buffer.toString());

-    	}

-    	PortletRequestDispatcher dispatcher = context.getRequestDispatcher(

-    			buffer.toString());

-    	dispatcher.include((RenderRequest) request, (RenderResponse) response);

-    	

-    	// Retrieve test result returned by the companion servlet.

-    	TestResult result = (TestResult) request.getAttribute(RESULT_KEY);

-    	request.removeAttribute(RESULT_KEY);

-    	request.removeAttribute(EXPECTED_REQUEST_URI);

-    	request.removeAttribute(EXPECTED_CONTEXT_PATH);

-    	return result;

-    }

-    

-    

-    // Nested Companion Servlet Class ------------------------------------------

-    

-    public static class CompanionServlet extends HttpServlet {

-    	

-        private static final String KEY_REQUEST_URI = "javax.servlet.include.request_uri";

-        private static final String KEY_CONTEXT_PATH = "javax.servlet.include.context_path";

-        private static final String KEY_SERVLET_PATH = "javax.servlet.include.servlet_path";

-        private static final String KEY_PATH_INFO = "javax.servlet.include.path_info";

-        private static final String KEY_QUERY_STRING = "javax.servlet.include.query_string";

-        

-        

-        // GenericServlet Impl -------------------------------------------------

-        

-        public String getServletInfo() {

-        	return getClass().getName();

-        }

-        

-        /**

-         * This method uses <code>HttpServletRequest.getPathInfo</code> to

-         * retrieve the requested path info, and forwards to the corresponding

-         * check method to perform the test.

-         */

-        public void service(HttpServletRequest request,

-                            HttpServletResponse response)

-        throws ServletException, IOException {

-        	TestResult result = null;

-        	String pathInfo = getPathInfo(request);

-        	if (CHECK_PATH_INFO.equals(pathInfo)) {

-        		result = checkPathInfo(request, pathInfo);

-        	} else if (CHECK_REQUEST_URI.equals(pathInfo)) {

-        		result = checkRequestURI(request);

-        	} else if (CHECK_CONTEXT_PATH.equals(pathInfo)) {

-        		result = checkContextPath(request);

-        	} else if (CHECK_SERVLET_PATH.equals(pathInfo)) {

-        		result = checkServletPath(request);

-        	} else if (CHECK_QUERY_STRING.equals(pathInfo)) {

-        		result = checkQueryString(request);

-        	} else if (GET_REQUEST_URI.equals(pathInfo)) {

-        		result = checkGetRequestURI(request);

-        	} else if (GET_CONTEXT_PATH.equals(pathInfo)) {

-        		result = checkGetContextPath(request);

-        	} else if (GET_SERVLET_PATH.equals(pathInfo)) {

-        		result = checkGetServletPath(request);

-        	} else if (GET_QUERY_STRING.equals(pathInfo)) {

-        		result = checkGetQueryString(request);

-        	} else {

-        		result = failOnPathInfo(pathInfo);

-        	}

-            request.setAttribute(RESULT_KEY, result);

-        }

-        

-        

-        // Private Methods -----------------------------------------------------

-        

-        /**

-         * Retrieves the path info from servlet request by invoking method

-         * <code>HttpServletRequest.getPathInfo()</code>.

-         * @param request  the servlet request dispatched from test portlet.

-         * @return the path info retrieved from servlet request.

-         */

-        private String getPathInfo(HttpServletRequest request) {

-            return request.getPathInfo();

-        }

-        

-        private TestResult checkPathInfo(HttpServletRequest request,

-                                         String expected) {

-        	TestResult result = new TestResult();

-        	result.setDescription("Ensure that included attribute '"

-        			+ KEY_PATH_INFO + "' is available in servlet request.");

-        	result.setSpecPLT("16.3.1");

-        	

-            String pathInfo = (String) request.getAttribute(KEY_PATH_INFO);

-            if (pathInfo != null && pathInfo.equals(expected)) {

-            	result.setReturnCode(TestResult.PASSED);

-            } else {

-            	TestUtils.failOnAssertion(KEY_PATH_INFO,

-            			pathInfo, expected, result);

-            }

-            return result;

-        }

-        

-        private TestResult checkRequestURI(HttpServletRequest request) {

-        	TestResult result = new TestResult();

-        	result.setDescription("Ensure that included attribute '"

-        			+ KEY_REQUEST_URI + "' is available in servlet request.");

-        	result.setSpecPLT("16.3.1");

-        	

-            String expected = (String) request.getAttribute(EXPECTED_REQUEST_URI);

-            String requestURI = (String) request.getAttribute(KEY_REQUEST_URI);

-            if (requestURI != null && requestURI.equals(expected)) {

-            	result.setReturnCode(TestResult.PASSED);

-            } else {

-            	TestUtils.failOnAssertion(KEY_REQUEST_URI,

-            			requestURI, expected, result);

-            }

-            return result;

-        }

-        

-        private TestResult checkGetRequestURI(HttpServletRequest request) {

-        	TestResult result = new TestResult();

-        	result.setDescription("Ensure that method request.getRequestURI() "

-        			+ "returns correct value.");

-        	result.setSpecPLT("16.3.3");

-        	

-        	String expected = (String) request.getAttribute(EXPECTED_REQUEST_URI);

-        	String requestURI = request.getRequestURI();

-        	if (requestURI != null && requestURI.equals(expected)) {

-        		result.setReturnCode(TestResult.PASSED);

-        	} else {

-        		TestUtils.failOnAssertion("request.getRequestURI()",

-        				requestURI, expected, result);

-        	}

-        	return result;

-        }

-        

-        private TestResult checkContextPath(HttpServletRequest request) {

-        	TestResult result = new TestResult();

-        	result.setDescription("Ensure that included attribute '"

-        			+ KEY_CONTEXT_PATH + "' is available in servlet request.");

-        	result.setSpecPLT("16.3.1");

-        	

-            String expected = (String) request.getAttribute(EXPECTED_CONTEXT_PATH);

-            String contextPath = (String) request.getAttribute(KEY_CONTEXT_PATH);

-            if (contextPath != null && contextPath.equals(expected)) {

-            	result.setReturnCode(TestResult.PASSED);

-            } else {

-            	TestUtils.failOnAssertion(KEY_CONTEXT_PATH,

-            			contextPath, expected, result);

-            }

-            return result;

-        }

-        

-        private TestResult checkGetContextPath(HttpServletRequest request) {

-        	TestResult result = new TestResult();

-        	result.setDescription("Ensure that method request.getContextPath() "

-        			+ "returns the correct value.");

-        	result.setSpecPLT("16.3.3");

-        	

-            String expected = (String) request.getAttribute(EXPECTED_CONTEXT_PATH);

-            String contextPath = request.getContextPath();

-            if (contextPath != null && contextPath.equals(expected)) {

-            	result.setReturnCode(TestResult.PASSED);

-            } else {

-            	TestUtils.failOnAssertion("request.getContextPath()",

-            			contextPath, expected, result);

-            }

-            return result;

-        }

-

-        private TestResult checkServletPath(HttpServletRequest request) {

-        	TestResult result = new TestResult();

-        	result.setDescription("Ensure that included attribute '"

-        			+ KEY_SERVLET_PATH + "' is available in servlet request.");

-        	result.setSpecPLT("16.3.1");

-        	

-            String servletPath = (String) request.getAttribute(KEY_SERVLET_PATH);

-            if (SERVLET_PATH.equals(servletPath)) {

-            	result.setReturnCode(TestResult.PASSED);

-            } else {

-            	TestUtils.failOnAssertion(KEY_SERVLET_PATH,

-            			servletPath, SERVLET_PATH, result);

-            }

-            return result;

-        }

-        

-        private TestResult checkGetServletPath(HttpServletRequest request) {

-        	TestResult result = new TestResult();

-        	result.setDescription("Ensure that method request.getServletPath() "

-        			+ "returns the correct value.");

-        	result.setSpecPLT("16.3.3");

-        	

-            String servletPath = request.getServletPath();

-            if (SERVLET_PATH.equals(servletPath)) {

-            	result.setReturnCode(TestResult.PASSED);

-            } else {

-            	TestUtils.failOnAssertion("request.getServletPath()",

-            			servletPath, SERVLET_PATH, result);

-            }

-            return result;

-        }

-        

-        private TestResult checkQueryString(HttpServletRequest request) {

-        	TestResult result = new TestResult();

-        	result.setDescription("Ensure that included attribute '"

-        			+ KEY_QUERY_STRING + "' is available in servlet request.");

-        	result.setSpecPLT("16.3.1");

-        	

-            String queryString = (String) request.getAttribute(KEY_QUERY_STRING);

-            if (QUERY_STRING.equals(queryString)) {

-            	result.setReturnCode(TestResult.PASSED);

-            } else {

-            	TestUtils.failOnAssertion(KEY_QUERY_STRING,

-            			queryString, QUERY_STRING, result);

-            }

-            return result;

-        }

-        

-        private TestResult checkGetQueryString(HttpServletRequest request) {

-        	TestResult result = new TestResult();

-        	result.setDescription("Ensure that method request.getQueryString() "

-        			+ "returns the correct value.");

-        	result.setSpecPLT("16.3.3");

-        	

-            String queryString = request.getQueryString();

-            if (QUERY_STRING.equals(queryString)) {

-            	result.setReturnCode(TestResult.PASSED);

-            } else {

-            	TestUtils.failOnAssertion("request.getQueryString()",

-            			queryString, QUERY_STRING, result);

-            }

-            return result;

-        }

-        

-        private TestResult failOnPathInfo(String pathInfo) {

-        	TestResult result = new TestResult();

-        	result.setDescription("Ensure that included attribute '"

-        			+ KEY_PATH_INFO + "' is available in servlet request.");

-        	result.setSpecPLT("16.3.1");

-        	

-        	String[] expectedPathInfos = new String[] {

-        			CHECK_REQUEST_URI, CHECK_CONTEXT_PATH,

-        			CHECK_SERVLET_PATH, CHECK_QUERY_STRING, };

-        	TestUtils.failOnAssertion(KEY_PATH_INFO,

-        	                          new String[] { pathInfo },

-        	                          expectedPathInfos,

-        	                          result);

-        	return result;

-        }

-

-    }

-    

-}

-

-

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/ExpectedResults.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/ExpectedResults.java
deleted file mode 100644
index 549c65f..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/ExpectedResults.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *     http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- * 

- */

-

-package org.apache.pluto.testsuite.test;

-

-import java.io.IOException;

-import java.io.InputStream;

-import java.util.Properties;

-

-import org.apache.pluto.testsuite.InvalidConfigurationException;

-

-/**

- * A Singleton which loads a properties file containing data expected by the

- * tests in the testsuite.

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class ExpectedResults {

-	

-	/** The file name of properties holding expected results. */

-	public static final String PROPERTY_FILENAME = "expectedResults.properties";

-	

-	/** The static singleton instance. */

-	private static ExpectedResults instance = null;

-	

-	

-	// Private Member Variables ------------------------------------------------

-	

-	/** The nested properties. */

-	private Properties properties = null;

-	

-	

-	// Constructor -------------------------------------------------------------

-	

-	/**

-	 * Private constructor that prevents external instantiation.

-	 * @throws IOException  if fail to load properties from file.

-	 */

-	private ExpectedResults() throws IOException {

-		properties = new Properties();

-		InputStream in = Thread.currentThread().getContextClassLoader()

-				.getResourceAsStream(PROPERTY_FILENAME);

-		if (in != null) {

-			properties.load(in);

-		} else {

-			throw new IOException("Could not find " + PROPERTY_FILENAME);

-		}

-	}

-	

-	/**

-	 * Returns the singleton expected results instance.

-	 * @return the singleton expected results instance.

-	 * @throws InvalidConfigurationException  if fail to read properties file.

-	 */

-	public static ExpectedResults getInstance()

-	throws InvalidConfigurationException {

-		if (instance == null) {

-			try {

-				instance = new ExpectedResults(); 

-			} catch (IOException ex) {

-				throw new InvalidConfigurationException("Error reading file "

-						+ PROPERTY_FILENAME + ": " + ex.getMessage());

-			}

-		}

-		return instance;

-	}

-	

-	

-	// Public Methods ----------------------------------------------------------

-	

-	public String getMajorVersion() {

-		return properties.getProperty("expected.version.major");

-	}

-	

-	public String getMinorVersion() {

-		return properties.getProperty("expected.version.minor");

-	}

-	

-	public String getServerInfo() {

-		return properties.getProperty("expected.serverInfo");		

-	}

-	

-	public String getPortalInfo() {

-		return properties.getProperty("expected.portalInfo");

-	}

-	

-	public String getMappedSecurityRole() {

-		return properties.getProperty("expected.security.role.mapped");

-	}

-	

-	public String getUnmappedSecurityRole() {

-        return properties.getProperty("expected.security.role");

-	}

-	

-}

-

-

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/ExternalAppScopedAttributeTest.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/ExternalAppScopedAttributeTest.java
deleted file mode 100644
index 5383a96..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/ExternalAppScopedAttributeTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-

-package org.apache.pluto.testsuite.test;

-

-import java.io.IOException;

-

-import org.apache.pluto.testsuite.TestResult;

-

-import javax.portlet.PortletSession;

-import javax.servlet.RequestDispatcher;

-import javax.servlet.ServletException;

-import javax.servlet.http.HttpServlet;

-import javax.servlet.http.HttpServletRequest;

-import javax.servlet.http.HttpServletResponse;

-import javax.servlet.http.HttpSession;

-

-/**

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class ExternalAppScopedAttributeTest extends AbstractReflectivePortletTest {

-

-    public static final String INT_KEY = "org.apache.pluto.testsuite.INTERNALLY_SET_APP_SCOPED_SESSION_TEST_KEY";

-    public static final String EXT_KEY = "org.apache.pluto.testsuite.EXTERNALLY_SET_APP_SCOPED_SESSION_TEST_KEY";

-    public static final String VALUE = "Should be visible to all Portlets and Web Resources.";

-    

-    

-    // Test Methods ------------------------------------------------------------

-    

-    protected TestResult checkSetAppScopedAttributeHereSeenElsewhere(

-    		PortletSession session) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure application scoped attributes set here "

-        		+ "in portlet session can be seen elsewhere.");

-        

-        session.setAttribute(INT_KEY, VALUE, PortletSession.APPLICATION_SCOPE);

-        result.setReturnCode(TestResult.WARNING);

-        result.setResultMessage("Click the provided link to validate test.");

-        return result;

-    }

-

-    protected TestResult checkSetAppScopedAttributeElsewhereSeenHere(

-    		PortletSession session) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure application scoped attributes set "

-        		+ "elsewhere in portlet session can be seen here.");

-        

-        Object value = session.getAttribute(EXT_KEY,

-                                            PortletSession.APPLICATION_SCOPE);

-        if (VALUE.equals(value)) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	result.setReturnCode(TestResult.WARNING);

-        	result.setResultMessage("This test will not pass until you have "

-        			+ "opened the external resource using the link provided below.");

-        }

-        return result;

-    }

-    

-    

-    // Nested Servlet Class ----------------------------------------------------

-    

-    /**

-     * The companion servlet that cooperates with this portlet test.

-     */

-    public static class CompanionServlet extends HttpServlet {

-

-        public void doGet(HttpServletRequest request,

-                          HttpServletResponse response)

-        throws ServletException, IOException {

-            HttpSession session = request.getSession();

-            String value = (String) session.getAttribute(INT_KEY);

-            if (ExternalAppScopedAttributeTest.VALUE.equals(value)) {

-            	request.setAttribute("passed", new Boolean(true));

-                session.setAttribute(EXT_KEY, VALUE);

-            }

-            

-            RequestDispatcher dispatcher = request.getRequestDispatcher(

-            		"/jsp/ExternalAppScopedAttributeTest_companion.jsp");

-            dispatcher.forward(request, response);

-        }

-        

-    }

-    

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/MiscTest.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/MiscTest.java
deleted file mode 100644
index d7adfb4..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/MiscTest.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite.test;

-

-import java.util.ArrayList;

-import java.util.Enumeration;

-import java.util.Iterator;

-import java.util.List;

-

-import javax.portlet.PortletContext;

-import javax.portlet.PortletMode;

-import javax.portlet.PortletRequest;

-import javax.portlet.WindowState;

-

-import org.apache.pluto.testsuite.TestResult;

-import org.apache.pluto.testsuite.TestUtils;

-

-/**

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class MiscTest extends AbstractReflectivePortletTest {

-

-	// Test Methods ------------------------------------------------------------

-	

-    protected TestResult checkContextMajorVersion(PortletContext context) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure the expected major version number is returned.");

-        

-        String majorVersion = String.valueOf(context.getMajorVersion());

-        ExpectedResults expectedResults = ExpectedResults.getInstance();

-        String expected = expectedResults.getMajorVersion();

-        if (majorVersion != null && majorVersion.equals(expected)) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("major version", majorVersion, expected, result);

-        }

-        return result;

-    }

-

-    protected TestResult checkContextMinorVersion(PortletContext context) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure the expected minor version number is returned.");

-        

-        String minorVersion = String.valueOf(context.getMinorVersion());

-        ExpectedResults expectedResults = ExpectedResults.getInstance();

-        String expected = expectedResults.getMinorVersion();

-        if (minorVersion != null && minorVersion.equals(expected)) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("minor version", minorVersion, expected, result);

-        }

-        return result;

-    }

-    

-    protected TestResult checkContextServerInfo(PortletContext context) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure the expected server info is returned.");

-        

-        String serverInfo = context.getServerInfo();

-        ExpectedResults expectedResults = ExpectedResults.getInstance();

-        String expected = expectedResults.getServerInfo();

-        if (serverInfo != null && serverInfo.equals(expected)) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("server info", serverInfo, expected, result);

-        }

-        return result;

-    }

-

-    protected TestResult checkPortalInfo(PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure the expected portal info is returned.");

-        

-        String portalInfo = request.getPortalContext().getPortalInfo();

-        ExpectedResults expectedResults = ExpectedResults.getInstance();

-        String expected = expectedResults.getPortalInfo();

-        if (portalInfo != null && portalInfo.equals(expected)) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("portal info", portalInfo, expected, result);

-        }

-        return result;

-    }

-

-    /**

-     * Test to ensure that the basic modes are supported.

-     * @todo Enhance to check for custom modes.

-     * @param req

-     * @return

-     */

-    protected TestResult checkSupportedModes(PortletRequest request)  {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure the expected portlet modes are returned.");

-        

-        List requiredPortletModes = new ArrayList();

-        requiredPortletModes.add(PortletMode.VIEW);

-        requiredPortletModes.add(PortletMode.EDIT);

-        requiredPortletModes.add(PortletMode.HELP);

-

-        for (Enumeration en = request.getPortalContext().getSupportedPortletModes();

-        		en.hasMoreElements(); ) {

-            PortletMode portletMode = (PortletMode) en.nextElement();

-            requiredPortletModes.remove(portletMode);

-        }

-        

-        if (requiredPortletModes.isEmpty()) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	result.setReturnCode(TestResult.FAILED);

-        	StringBuffer buffer = new StringBuffer();

-        	for (Iterator it = requiredPortletModes.iterator();

-        			it.hasNext(); ) {

-        		buffer.append(it.next()).append(", ");

-        	}

-        	result.setResultMessage("Required portlet modes ["

-        			+ buffer.toString() + "] are not supported.");

-        }

-        return result;

-    }

-

-    protected TestResult checkSupportedWindowSates(PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure the expected window states are returned.");

-        

-        List requiredWindowStates = new ArrayList();

-        requiredWindowStates.add(WindowState.MINIMIZED);

-        requiredWindowStates.add(WindowState.MAXIMIZED);

-        requiredWindowStates.add(WindowState.NORMAL);

-        

-        for (Enumeration en = request.getPortalContext().getSupportedWindowStates();

-        		en.hasMoreElements(); ) {

-            WindowState windowState = (WindowState) en.nextElement();

-            requiredWindowStates.remove(windowState);

-        }

-        

-        if (requiredWindowStates.isEmpty()) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	result.setReturnCode(TestResult.FAILED);

-            StringBuffer buffer = new StringBuffer();

-            for (Iterator it = requiredWindowStates.iterator();

-            		it.hasNext(); ) {

-            	buffer.append(it.next()).append(", ");

-            }

-            result.setResultMessage("Required window states ["

-            		+ buffer.toString() + "] are not supported.");

-        }

-        return result;

-    }

-

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceCommonTest.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceCommonTest.java
deleted file mode 100644
index 6eb4bf2..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceCommonTest.java
+++ /dev/null
@@ -1,483 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite.test;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.testsuite.TestResult;

-import org.apache.pluto.testsuite.TestUtils;

-

-import java.util.Enumeration;

-import java.util.Iterator;

-import java.util.Map;

-

-import javax.portlet.PortletPreferences;

-import javax.portlet.PortletRequest;

-import javax.portlet.ReadOnlyException;

-

-/**

- * Common portlet preferences test.

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class PreferenceCommonTest extends AbstractReflectivePortletTest {

-	

-	/** Logger. */

-    private static final Log LOG = LogFactory.getLog(PreferenceCommonTest.class);

-    

-    protected static final String BOGUS_KEY = "org.apache.pluto.testsuite.BOGUS_KEY";

-    

-    protected static final String READ_ONLY_PREF_NAME = "readonly";

-    

-    protected static final String NO_VALUE_PREF_NAME = "nameWithNoValue";

-    

-    protected static final String PREF_NAME = "dummyName";

-    protected static final String PREF_VALUE = "dummyValue";

-    

-    protected static final String DEF_VALUE = "Default";

-    protected static final String NEW_VALUE = "notTheOriginal";

-    

-    

-    // Test Methods ------------------------------------------------------------

-    

-    protected TestResult checkGetEmptyPreference(PortletRequest request) {

-    	return doCheckDefaultPreference(request, "nonexistence!");

-    }

-    

-    protected TestResult checkGetNoValuePreference(PortletRequest request) {

-    	return doCheckDefaultPreference(request, NO_VALUE_PREF_NAME);

-    }

-    

-    /**

-     * Private method that checks if a preference is not defined or has no

-     * value in <code>portlet.xml</code>, the default values are returned.

-     * @param request  the portlet request.

-     * @param preferenceName  the preference name which is not defined or has no

-     *        value in <code>portlet.xml</code>.

-     * @return the test result.

-     */

-    private TestResult doCheckDefaultPreference(PortletRequest request,

-                                                String preferenceName) {

-    	TestResult result = new TestResult();

-    	result.setDescription("Ensure proper default is returned when "

-    			+ "a non-existing/value-undefined preference is requested.");

-    	result.setSpecPLT("14.1");

-    	

-    	PortletPreferences preferences = request.getPreferences();

-    	String value =  preferences.getValue(preferenceName, DEF_VALUE);

-    	String[] values = preferences.getValues(preferenceName,

-    	                                        new String[] { DEF_VALUE });

-    	if (DEF_VALUE.equals(value)

-    			&& values != null && values.length == 1

-    			&& DEF_VALUE.equals(values[0])) {

-    		result.setReturnCode(TestResult.PASSED);

-    	} else if (!DEF_VALUE.equals(value)) {

-    		TestUtils.failOnAssertion("preference value", value, DEF_VALUE, result);

-    	} else {

-    		TestUtils.failOnAssertion("preference values",

-    		                          values,

-    		                          new String[] { DEF_VALUE },

-    		                          result);

-    	}

-    	return result;

-    }

-

-

-    protected TestResult checkGetPreferences(PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure that preferences defined "

-        		+ "in the deployment descriptor may be retrieved.");

-        result.setSpecPLT("14.1");

-        

-        PortletPreferences preferences = request.getPreferences();

-        String value = preferences.getValue(PREF_NAME, DEF_VALUE);

-        if (value != null && value.equals(PREF_VALUE)) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("preference value", value, PREF_VALUE, result);

-        }

-        return result;

-    }

-    

-    protected TestResult checkSetPreferenceSingleValue(PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure a single preference value can be set.");

-        result.setSpecPLT("14.1");

-        

-        PortletPreferences preferences = request.getPreferences();

-        try {

-            preferences.setValue("TEST", "TEST_VALUE");

-        } catch (ReadOnlyException ex) {

-        	TestUtils.failOnException("Unable to set preference value.", ex, result);

-            return result;

-        }

-        

-        String value = preferences.getValue("TEST", DEF_VALUE);

-        if (value != null && value.equals("TEST_VALUE")) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("preference value", value, "TEST_VALUE", result);

-        }

-        return result;

-    }

-

-    protected TestResult checkSetPreferenceMultiValues(PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure multiple preference values can be set.");

-        result.setSpecPLT("14.1");

-        

-        PortletPreferences preferences = request.getPreferences();

-        try {

-            preferences.setValues("TEST", new String[] {"ONE", "ANOTHER"});

-        } catch (ReadOnlyException ex) {

-        	TestUtils.failOnException("Unable to set preference values.", ex, result);

-        	return result;

-        }

-

-        String[] values = preferences.getValues("TEST", new String[] { DEF_VALUE });

-        if (values != null && values.length == 2

-        		&& values[0].equals("ONE") && values[1].equals("ANOTHER")) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else if (values == null) {

-        	TestUtils.failOnAssertion("preference values",

-        	                          values,

-        	                          new String[] { "ONE", "ANOTHER" },

-        	                          result);

-        } else if (values.length != 2) {

-        	TestUtils.failOnAssertion("length of preference values",

-        	                          String.valueOf(values.length),

-        	                          String.valueOf(2),

-        	                          result);

-        } else {

-        	TestUtils.failOnAssertion("preference values",

-        	                          values,

-        	                          new String[] { "ONE", "ANOTHER" },

-        	                          result);

-        }

-        return result;

-    }

-    

-    protected TestResult checkSetPreferenceNull(PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure a preference value can be set to null.");

-        result.setSpecPLT("14.1");

-        

-        PortletPreferences preferences = request.getPreferences();

-        try {

-            preferences.setValue("TEST", null);

-        } catch (ReadOnlyException ex) {

-        	TestUtils.failOnException("Unable to set preference value.", ex, result);

-            return result;

-        }

-        

-        String value = preferences.getValue("TEST", DEF_VALUE);

-        if (DEF_VALUE.equals(value)) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("preference value", value, DEF_VALUE, result);

-        }

-        return result;

-    }

-    

-    protected TestResult checkSetPreferencesReturnsFirst(PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure the first value set to a given "

-        		+ "preference is returned first by PortletPreferences.getValue().");

-        result.setSpecPLT("14.1");

-        

-        PortletPreferences preferences = request.getPreferences();

-        try {

-            preferences.setValues("TEST", new String[] { "FIRST", "SECOND" });

-        } catch (ReadOnlyException ex) {

-        	TestUtils.failOnException("Unable to set preference values.", ex, result);

-        	return result;

-        }

-

-        String value = preferences.getValue("TEST", DEF_VALUE);

-        if (value != null && value.equals("FIRST")) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("preference value", value, "FIRST", result);

-        }

-        return result;

-    }

-    

-    protected TestResult checkResetPreferenceToDefault(PortletRequest request) {

-    	TestResult result = new TestResult();

-    	result.setDescription("Ensure preferences are properly reset.");

-    	result.setSpecPLT("14.1");

-        

-        PortletPreferences preferences = request.getPreferences();

-        boolean setOccured = false;

-        boolean resetOccured = false;

-        

-        try {

-        	// Set new value to overwrite the default value.

-            preferences.setValue(PREF_NAME, NEW_VALUE);

-            String value = preferences.getValue(PREF_NAME, DEF_VALUE);

-            if (NEW_VALUE.equals(value)) {

-                setOccured = true;

-            }

-            // Reset the preference so that default value is restored.

-            preferences.reset(PREF_NAME);

-            value =  preferences.getValue(PREF_NAME, DEF_VALUE);

-            if (PREF_VALUE.equals(value)) {

-                resetOccured = true;

-            }

-        } catch (ReadOnlyException ex) {

-        	TestUtils.failOnException("Unable to set preference value.", ex, result);

-        	return result;

-        }

-        

-        // Everything is OK.

-        if (setOccured && resetOccured) {

-        	result.setReturnCode(TestResult.PASSED);

-        }

-        // Error occurred when setting or storing preferences.

-        else if (!setOccured) {

-        	result.setReturnCode(TestResult.WARNING);

-        	result.setResultMessage("A function upon which the reset test "

-        			+ "depends failed to execute as expected. "

-        			+ "Check the other test results in this test suite.");

-        }

-        // Error occurred when resetting preference.

-        else {

-        	result.setReturnCode(TestResult.FAILED);

-        	result.setResultMessage("Preferences value was not successfully reset after store");

-        }

-        return result;

-    }

-    

-    protected TestResult checkResetPreferenceWithoutDefault(PortletRequest request) {

-    	TestResult result = new TestResult();

-        result.setDescription("Ensure preferences are properly reset (removed) "

-        		+ "when the default value is not defined.");

-        result.setSpecPLT("14.1");

-        

-        PortletPreferences preferences = request.getPreferences();

-        boolean setOccured = false;

-        boolean resetOccured = false;

-        

-        try {

-        	// Set preference value to overwrite the original (null).

-            preferences.setValue(BOGUS_KEY, NEW_VALUE);

-            String value = preferences.getValue(BOGUS_KEY, DEF_VALUE);

-            if (NEW_VALUE.equals(value)) {

-                setOccured = true;

-            }

-            // Reset preference value to null.

-            preferences.reset(BOGUS_KEY);

-            value =  preferences.getValue(BOGUS_KEY, DEF_VALUE);

-            if (DEF_VALUE.equals(value)) {

-                resetOccured = true;

-            }

-        } catch (ReadOnlyException ex) {

-        	TestUtils.failOnException("Unable to set preference value.", ex, result);

-        	return result;

-        }

-        

-        // Everything is OK.

-        if (setOccured && resetOccured) {

-        	result.setReturnCode(TestResult.PASSED);

-        }

-        // Error occurred when setting or storing preferences.

-        else if (!setOccured) {

-        	result.setReturnCode(TestResult.WARNING);

-        	result.setResultMessage("A function upon which the reset test "

-        			+ "depends failed to execute as expected. "

-        			+ "Check the other test results in this test suite.");

-        }

-        // Error occurred when resetting preference value.

-        else {

-        	result.setReturnCode(TestResult.FAILED);

-        	result.setResultMessage("Preferences value was not successfully "

-        			+ "reset after store.");

-        }

-        return result;

-    }

-    

-    protected TestResult checkModifyReadOnlyPreferences(PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure that setValue() / setValues() / reset() "

-        		+ "methods throw ReadOnlyException when invoked "

-        		+ "on read-only preferences.");

-        result.setSpecPLT("14.1");

-        

-        PortletPreferences preferences = request.getPreferences();

-        if (!preferences.isReadOnly(READ_ONLY_PREF_NAME)) {

-        	result.setReturnCode(TestResult.WARNING);

-        	result.setResultMessage("Preference " + READ_ONLY_PREF_NAME

-        			+ " is not a read-only preference. "

-        			+ "This may be due to misconfiuration.");

-        	return result;

-        }

-        

-        boolean setValueOK = false;

-        boolean setValuesOK = false;

-        boolean resetOK = false;

-        

-        // Check setValue() method.

-        try {

-            preferences.setValue(READ_ONLY_PREF_NAME, "written");

-        } catch (ReadOnlyException ex) {

-            setValueOK = true;

-        }

-        

-        // Check setValues() method.

-        try {

-        	preferences.setValues(READ_ONLY_PREF_NAME, new String[] { "written" });

-        } catch (ReadOnlyException ex) {

-        	setValuesOK = true;

-        }

-        

-        // Check reset() method.

-        try {

-        	preferences.reset(READ_ONLY_PREF_NAME);

-        } catch (ReadOnlyException ex) {

-        	resetOK = true;

-        }

-        

-        if (setValueOK && setValuesOK && resetOK) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	result.setReturnCode(TestResult.FAILED);

-        	StringBuffer buffer = new StringBuffer();

-        	if (!setValueOK) {

-        		buffer.append("setValue(..), ");

-        	}

-        	if (!setValuesOK) {

-        		buffer.append("setValues(..), ");

-        	}

-        	if (!resetOK) {

-        		buffer.append("reset(..), ");

-        	}

-        	result.setResultMessage("Method(s) [" + buffer.toString()

-        			+ "] invoked on read-only preference (" + READ_ONLY_PREF_NAME

-        			+ ") without ReadOnlyException.");

-        }

-        return result;

-    }

-    

-    protected TestResult checkGetPreferenceNames(PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure returned enumeration is valid.");

-        result.setSpecPLT("14.1");

-        

-        PortletPreferences preferences = request.getPreferences();

-        Map prefMap = preferences.getMap();

-        boolean hasAll = true;

-        for (Enumeration en = preferences.getNames(); en.hasMoreElements(); ) {

-            if (!prefMap.containsKey(en.nextElement())) {

-                hasAll = false;

-                break;

-            }

-        }

-        

-        if (hasAll) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	result.setReturnCode(TestResult.FAILED);

-        	result.setResultMessage("At least one name is not found "

-        			+ "in the preference map.");

-        }

-        return result;

-    }

-    

-    /**

-     * FIXME:

-     */

-    protected TestResult checkGetPreferenceMap(PortletRequest request) {

-        TestResult result = checkGetPreferenceNames(request);

-        result.setDescription("Ensure returned map is valid.");

-        result.setSpecPLT("14.1");

-        return result;

-    }

-

-    /**

-     * Check (xci) SPEC 91, PLT 14.1: Preferences values are not modified

-     * if the values in the Map are altered.

-     */

-    protected TestResult checkPreferenceValueNotModified(PortletRequest request) {

-    	TestResult result = new TestResult();

-    	result.setDescription("Preferences values are not modified if "

-    			+ "the values in the returned preference Map are altered.");

-    	result.setSpecPLT("14.1");

-    	

-    	PortletPreferences preferences = request.getPreferences();

-        if (LOG.isDebugEnabled()) {

-        	LOG.debug("Original Preferences:");

-        	logPreferences(preferences);

-        }

-        

-        // Modify the returned preference map.

-    	Map prefMap = preferences.getMap();

-    	String[] values = (String[]) prefMap.get(PREF_NAME);

-    	String originalValue = null;

-    	String modifiedValue = "Value modified in preferences map.";

-    	if (values != null && values.length == 1) {

-    		originalValue = values[0];

-    		values[0] = modifiedValue;

-    	}

-    	

-    	// Check if the value held by portlet preferences is modified.

-        if (LOG.isDebugEnabled()) {

-        	LOG.debug("Modified Preferences:");

-        	logPreferences(preferences);

-        }

-    	String newValue = preferences.getValue(PREF_NAME, DEF_VALUE);

-    	if (newValue != null && newValue.equals(originalValue)) {

-    		result.setReturnCode(TestResult.PASSED);

-    	} else {

-    		result.setReturnCode(TestResult.FAILED);

-    		result.setResultMessage("Preference value modified according to "

-    				+ "the preference map.");

-    	}

-    	return result;

-    }

-    

-    

-    // Debug Methods -----------------------------------------------------------

-    

-    

-    /**

-     * Logs out the portlet preferences.

-     * @param preferences  PortletPreferences to log.

-     */

-    protected void logPreferences(PortletPreferences preferences) {

-    	StringBuffer buffer = new StringBuffer();

-    	Map map = preferences.getMap();

-    	for (Iterator it = map.keySet().iterator(); it.hasNext(); ) {

-    		String key = (String) it.next();

-    		String[] values = (String[]) map.get(key);

-    		buffer.append(key).append("=");

-    		if (values != null) {

-    			buffer.append("{");

-    			for (int i = 0; i < values.length; i++) {

-    				buffer.append(values[i]);

-    				if (i < values.length - 1) {

-    					buffer.append(",");

-    				}

-    			}

-    			buffer.append("}");

-    		} else {

-    			// Spec allows null values.

-    			buffer.append("NULL");

-    		}

-    		buffer.append(";");    		

-    	}

-    	LOG.debug("PortletPreferences: " + buffer.toString());

-    }

-    

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceInActionTest.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceInActionTest.java
deleted file mode 100644
index d3fafd2..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceInActionTest.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite.test;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.testsuite.ActionTest;

-import org.apache.pluto.testsuite.TestResult;

-import org.apache.pluto.testsuite.TestUtils;

-import org.apache.pluto.testsuite.validator.PreferencesValidatorImpl;

-

-import java.io.IOException;

-

-import javax.portlet.PortletPreferences;

-import javax.portlet.PortletRequest;

-import javax.portlet.ReadOnlyException;

-import javax.portlet.ValidatorException;

-

-/**

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class PreferenceInActionTest extends PreferenceCommonTest

-implements ActionTest {

-	

-	/** Logger. */

-    private static final Log LOG = LogFactory.getLog(PreferenceInActionTest.class);

-    

-    

-    // Test Methods ------------------------------------------------------------

-    

-    protected TestResult checkPreferenceValidator(PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure the validator catches invalid preferences.");

-        result.setSpecPLT("14.4");

-        

-        PortletPreferences preferences = request.getPreferences();

-        if (LOG.isDebugEnabled()) {

-        	LOG.debug("Original preferences:");

-        	logPreferences(preferences);

-        }

-        boolean exceptionThrown = false;

-        try {

-            preferences.setValue("TEST", " Spaces removed by trim ");

-            if (LOG.isDebugEnabled()) {

-            	LOG.debug("Modified VALIDATION_TEST_KEY preference:");

-            	logPreferences(preferences);

-            }

-            // Call store() method to invoke the validator.

-            preferences.store();

-            

-        } catch (ReadOnlyException ex) {

-        	TestUtils.failOnException("Unable to set preference value.", ex, result);

-        	return result;

-        	

-        } catch (IOException ex) {

-        	TestUtils.failOnException("Unable to store preference value.", ex, result);

-        	return result;

-        	

-        } catch (ValidatorException ex) {

-        	// We are expecting this exception!

-            exceptionThrown = true;

-            // FIXME: what is going on below?

-            try {

-            	//get rid of spaces because it causes problems with reset() call.

-                preferences.setValue("TEST", "OK");

-            	preferences.reset("TEST");

-            } catch (Throwable th) {

-            	LOG.error(th);            	

-            }

-        }

-        

-        if (exceptionThrown) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	result.setReturnCode(TestResult.FAILED);

-        	result.setResultMessage("Illegal value not caught by validator.");

-        }

-        return result;

-    }

-    

-    protected TestResult checkOnePreferenceValidatorPerPortletDefinition(

-    		PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure only one validator instance is created "

-        		+ "per portlet definition.");

-        result.setSpecPLT("14.4");

-        

-        PortletPreferences preferences = request.getPreferences();

-        try {

-            preferences.setValue(

-            		PreferencesValidatorImpl.CHECK_VALIDATOR_COUNT,

-            		"true");

-            // Call store() method to invoke the validator.

-            preferences.store();

-            result.setReturnCode(TestResult.PASSED);

-        } catch (ReadOnlyException ex) {

-        	TestUtils.failOnException("Unable to set preference value.", ex, result);

-        } catch (IOException ex) {

-        	TestUtils.failOnException("Unable to store preference value.", ex, result);

-        } catch (ValidatorException ex) {

-        	TestUtils.failOnException("Unable to store preference value.", ex, result);

-        } finally {

-        	try {

-        		preferences.reset(PreferencesValidatorImpl.CHECK_VALIDATOR_COUNT);

-        		preferences.store();

-        	} catch (Exception ex) {

-        		TestUtils.failOnException("Unable to reset preference value for "

-        				+ PreferencesValidatorImpl.CHECK_VALIDATOR_COUNT,

-        				ex, result);

-        	}

-        }

-        return result;

-    }

-

-    protected TestResult checkStorePreferences(PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure storage works for portlet preferences.");

-        result.setSpecPLT("14.1");

-        

-        PortletPreferences preferences = request.getPreferences();

-        if (LOG.isDebugEnabled()) {

-        	LOG.debug("Preferences to store: " + preferences);

-        }

-        

-        boolean setOccured = false;

-        boolean storeOccured = false;

-        

-        try {

-        	// Set new value for preference "dummyName".

-            preferences.setValue(PREF_NAME, NEW_VALUE);

-            String value = preferences.getValue(PREF_NAME, DEF_VALUE);

-            if (NEW_VALUE.equals(value)) {

-                setOccured = true;

-            }

-            // Store the preference and get value.

-            preferences.store();

-            value = preferences.getValue(PREF_NAME, DEF_VALUE);

-            if (NEW_VALUE.equals(value)) {

-                storeOccured = true;

-            }

-        } catch (ReadOnlyException ex) {

-        	TestUtils.failOnException("Unable to set preference value.", ex, result);

-        	return result;

-        } catch (ValidatorException ex) {

-        	TestUtils.failOnException("Unable to store preference value.", ex, result);

-        	return result;

-        } catch(IOException ex) {

-        	TestUtils.failOnException("Unable to store preference value.", ex, result);

-        	return result;

-        } finally {

-            // Reset preference to default value, and store!

-        	try {

-        		preferences.reset(PREF_NAME);

-        		preferences.store();

-        	} catch (Exception ex) {

-            	TestUtils.failOnException("Unable to set preference value.", ex, result);

-            	return result;

-        	}

-        }

-        

-        // Everything is OK.

-        if (setOccured && storeOccured) {

-        	result.setReturnCode(TestResult.PASSED);

-        }

-        // Error occurred when setting preference value.

-        else if (!setOccured) {

-        	result.setReturnCode(TestResult.WARNING);

-        	result.setResultMessage("A function upon which the reset test "

-        			+ "depends failed to execute as expected. "

-        			+ "Check the other test results in this test suite.");

-        }

-        // Error occurred when storing preference value.

-        else {

-        	result.setReturnCode(TestResult.FAILED);

-        	result.setResultMessage("Preferences not successfully stored.");

-        }

-        return result;

-    }

-    

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceInRenderTest.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceInRenderTest.java
deleted file mode 100644
index c73e7fa..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceInRenderTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite.test;

-

-import java.io.IOException;

-

-import javax.portlet.PortletPreferences;

-import javax.portlet.PortletRequest;

-import javax.portlet.ValidatorException;

-

-import org.apache.pluto.testsuite.TestResult;

-import org.apache.pluto.testsuite.TestUtils;

-

-public class PreferenceInRenderTest extends PreferenceCommonTest {

-	

-	// Test Methods ------------------------------------------------------------

-	

-	protected TestResult checkStorePreferences(PortletRequest request) {

-		TestResult result = new TestResult();

-		result.setDescription("Ensure that if the store() method is invoked "

-				+ "within render() method, an IllegalStateException will be "

-				+ "thrown out.");

-		result.setSpecPLT("14.1");

-		

-		PortletPreferences preferences = request.getPreferences();

-        boolean exceptionThrown = false;

-        

-        // Store preferences and wait for IllegalStateException.

-        try {

-            preferences.store();

-        } catch (ValidatorException ex) {

-        	TestUtils.failOnException("Unable to store preferences.", ex, result);

-        	return result;

-        } catch (IOException ex) {

-        	TestUtils.failOnException("Unable to store preferences.", ex, result);

-        	return result;

-        } catch (IllegalStateException ex) {

-        	exceptionThrown = true;

-        }

-		

-        if (exceptionThrown) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	result.setReturnCode(TestResult.FAILED);

-        	result.setResultMessage("IllegalStateException is not thrown out "

-        			+ "when store() method is invoked within render() method.");

-        }

-		return result;

-	}

-	

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/RenderParameterTest.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/RenderParameterTest.java
deleted file mode 100644
index 19210ba..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/RenderParameterTest.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite.test;

-

-import org.apache.pluto.testsuite.TestResult;

-import org.apache.pluto.testsuite.TestUtils;

-

-import java.util.Enumeration;

-import java.util.HashMap;

-import java.util.Map;

-

-import javax.portlet.PortletRequest;

-

-/**

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class RenderParameterTest extends AbstractReflectivePortletTest {

-

-    private static final String ACTION_KEY = "org.apache.pluto.testsuite.PARAM_ACTION_KEY";

-

-    private static final String RENDER_KEY = "org.apache.pluto.testsuite.PARAM_RENDER_KEY";

-    private static final String RENDER_VALUE = "org.apache.pluto.testsuite.RENDER_VALUE";

-    

-    

-    public Map getRenderParameters(PortletRequest request) {

-        Map parameterMap = new HashMap();

-        parameterMap.put(RENDER_KEY, new String[] { RENDER_VALUE });

-        return parameterMap;

-    }

-    

-    

-    // Test Methods ------------------------------------------------------------

-    

-    protected TestResult checkActionParametersNotHere(PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure that action parameters are not available "

-        		+ "in the following render request.");

-        

-        String value = request.getParameter(ACTION_KEY);

-        if (value == null) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("parameter", value, null, result);

-        }

-        return result;

-    }

-

-

-    protected TestResult checkRenderParameterValue(PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure that render parameters set in action "

-        		+ "response are available in the following render request.");

-        

-        String value = request.getParameter(RENDER_KEY);

-        if (RENDER_VALUE.equals(value)) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("parameter", value, RENDER_VALUE, result);

-        }

-        return result;

-    }

-

-    protected TestResult checkRenderParameterValues(PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure that render parameters set in action "

-        		+ "response are available in the following render request.");

-

-        String[] values = request.getParameterValues(RENDER_KEY);

-        if (values != null && values.length == 1

-        		&& RENDER_VALUE.equals(values[0])) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("parameter values",

-        			values, new String[] { RENDER_VALUE }, result);

-        }

-        return result;

-    }

-

-    protected TestResult checkParameterMap(PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure that render request returns the correct "

-        		+ "parameter map.");

-        

-        Map parameterMap = request.getParameterMap();

-        String[] values = (String[]) parameterMap.get(RENDER_KEY);

-        if (values != null && values.length == 1

-        		&& RENDER_VALUE.equals(values[0])

-        		&& !parameterMap.containsKey(ACTION_KEY)) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	if (parameterMap.containsKey(ACTION_KEY)) {

-            	result.setReturnCode(TestResult.FAILED);

-        		result.setResultMessage("Action parameter " + ACTION_KEY

-        				+ " was found in render request with value(s): "

-        				+ parameterMap.get(ACTION_KEY));

-        	} else {

-        		TestUtils.failOnAssertion("parameter values",

-        				values, new String[] { RENDER_VALUE }, result);

-        	}

-        }

-        return result;

-    }

-

-    protected TestResult checkParameterNames(PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure that render request returns the correct "

-        		+ "parameter names enumeration.");

-

-        boolean hasActionParameter = false;

-        boolean hasRenderParameter = false;

-        for (Enumeration en = request.getParameterNames();

-        		en.hasMoreElements(); ) {

-            String name = (String) en.nextElement();

-            if (ACTION_KEY.equals(name)) {

-            	hasActionParameter = true;

-            }

-            if (RENDER_KEY.equals(name)) {

-            	hasRenderParameter = true;

-            }

-        }

-        

-        if (!hasActionParameter && hasRenderParameter) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	result.setReturnCode(TestResult.FAILED);

-            StringBuffer buffer = new StringBuffer();

-            if (!hasRenderParameter) {

-            	buffer.append("Render parameter not found. ");

-            }

-            if (!hasActionParameter) {

-            	buffer.append("Action parameter found. ");

-            }

-            result.setResultMessage(buffer.toString());

-        }

-        return result;

-    }

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/RenderResponseNoContentTypeTest.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/RenderResponseNoContentTypeTest.java
deleted file mode 100644
index 09455f5..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/RenderResponseNoContentTypeTest.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite.test;

-

-import java.io.IOException;

-

-import javax.portlet.PortletResponse;

-import javax.portlet.RenderResponse;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.testsuite.TestResult;

-import org.apache.pluto.testsuite.TestUtils;

-

-/**

- * FIXME: separate the two check methods to two classes.

- * 

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class RenderResponseNoContentTypeTest

-extends AbstractReflectivePortletTest {

-	

-	private static final Log LOG = LogFactory.getLog(RenderResponseNoContentTypeTest.class);

-	

-	/**

-	 * Overwrite super implementation to return null. This test requires that

-	 * content type of the render response is not set.

-	 * @return <code>null</code>.

-	 */

-	public String getRenderResponseContentType() {

-		return null;

-	}

-	

-	// Test Methods ------------------------------------------------------------

-	

-	protected TestResult checkGetPortletOutputStream(PortletResponse response) {

-		TestResult result = new TestResult();

-		result.setDescription("Ensure If the getPortletOutputStream() method "

-				+ "is called before the setContentType() method, it will throw "

-				+ "an IllegalStateException.");

-		result.setSpecPLT("12.3.1");

-		

-		RenderResponse renderResponse = (RenderResponse) response;

-		ensureContentTypeNotSet(renderResponse, result);

-		if (result.getReturnCode() == TestResult.WARNING) {

-			return result;

-		}

-		

-		try {

-			renderResponse.getPortletOutputStream();

-			result.setReturnCode(TestResult.FAILED);

-			result.setResultMessage("Method getPortletOutputStream() didn't "

-					+ "throw an IllegalStateException when content type is "

-					+ "not set before.");

-		} catch (IllegalStateException ex) {

-			// We are expecting this exception!

-			result.setReturnCode(TestResult.PASSED);

-		} catch (IOException ex) {

-			TestUtils.failOnException("Method getPortletOutputStream() throws "

-					+ "an unexpected IOException", ex, result);

-		}

-		return result;

-	}

-

-	protected TestResult checkGetWriter(PortletResponse response) {

-		TestResult result = new TestResult();

-		result.setDescription("Ensure If the getWriter() method "

-				+ "is called before the setContentType() method, it will throw "

-				+ "an IllegalStateException.");

-		result.setSpecPLT("12.3.1");

-		

-		RenderResponse renderResponse = (RenderResponse) response;

-		ensureContentTypeNotSet(renderResponse, result);

-		if (result.getReturnCode() == TestResult.WARNING) {

-			return result;

-		}

-		

-		try {

-			renderResponse.getWriter();

-			result.setReturnCode(TestResult.FAILED);

-			result.setResultMessage("Method getWriter() didn't "

-					+ "throw an IllegalStateException when content type is "

-					+ "not set before.");

-		} catch (IllegalStateException ex) {

-			// We are expecting this exception!

-			result.setReturnCode(TestResult.PASSED);

-		} catch (IOException ex) {

-			TestUtils.failOnException("Method getWriter() throws "

-					+ "an unexpected IOException", ex, result);

-		}

-		return result;

-	}

-	

-	

-	// Private Methods ---------------------------------------------------------

-	

-	/**

-	 * Ensures that the content type of the current render response is not set.

-	 * If the content type is already set, this method sets the test result to

-	 * WARNING with a warning message. Otherwise, this method does nothing.

-	 * @param response  the render response to check.

-	 * @param result  the test result.

-	 */

-	private void ensureContentTypeNotSet(RenderResponse response,

-	                                     TestResult result) {

-		String contentType = response.getContentType();

-		if (contentType != null) {

-			if (LOG.isWarnEnabled()) {

-				LOG.warn("Unable to run test: content type is already set ("

-						+ contentType + ").");

-			}

-        	result.setReturnCode(TestResult.WARNING);

-        	result.setResultMessage("The content type of the render response "

-        			+ "is not as expected (" + contentType + " != null).");

-		}

-	}

-

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/ResourceBundleTest.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/ResourceBundleTest.java
deleted file mode 100644
index df10803..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/ResourceBundleTest.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite.test;

-

-import org.apache.pluto.testsuite.TestResult;

-

-import javax.portlet.*;

-import java.util.*;

-

-/**

- * Tests basic attribute retrieval and storage functions within

- * the portlet request, session, and context objects.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class ResourceBundleTest extends AbstractReflectivePortletTest {

-	

-	// Static Constant Definitions ---------------------------------------------

-	

-	/** Key for portlet title defined in portlet.xml/init-param. */

-    private static final String TITLE_KEY = "javax.portlet.title";

-    

-	/** Key for portlet short title defined in portlet.xml/init-param. */

-    private static final String SHORT_TITLE_KEY = "javax.portlet.short-title";

-    

-	/** Key for portlet keywords defined in portlet.xml/init-param. */

-    private static final String KEYWORDS_KEY = "javax.portlet.keywords";

-    

-    /**

-     * Parameter name for if resource bundle is declared in

-     * <code>testsuite-config/init-param</code>.

-     */

-    private static final String BUNDLE_DECLARED_PARAM = "resource-bundle";

-    

-    /**

-     * Parameter name for portlet title in

-     * <code>testsuite-config/init-param</code>.

-     */

-    private static final String TITLE_PARAM = "title";

-    

-    /**

-     * Parameter name for portlet short title in

-     * <code>testsuite-config/init-param</code>.

-     */

-    private static final String SHORT_TITLE_PARAM = "short-title";

-    

-    /**

-     * Parameter name for portlet keywords in

-     * <code>testsuite-config/init-param</code>.

-     */

-    private static final String KEYWORDS_PARAM = "keywords";

-	

-	

-    // Test Methods ------------------------------------------------------------

-    

-    protected TestResult checkResourceBundleExists(PortletConfig config,

-                                                   PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure the resource bundle is not null.");

-        

-        ResourceBundle bundle = config.getResourceBundle(request.getLocale());

-        if (bundle != null) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	result.setReturnCode(TestResult.FAILED);

-            result.setResultMessage("Unable to retrieve resource bundle "

-            		+ "for locale: " + request.getLocale());

-        }

-        return result;

-    }

-    

-    protected TestResult checkGetNames(PortletConfig config,

-                                       PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Retrieve the property names and ensure that "

-        		+ "the required keys are present.");

-

-        List requiredKeys = new ArrayList();

-        requiredKeys.add(TITLE_KEY);

-        requiredKeys.add(SHORT_TITLE_KEY);

-        requiredKeys.add(KEYWORDS_KEY);

-        

-        ResourceBundle bundle = config.getResourceBundle(request.getLocale());

-        if (bundle == null) {

-        	result.setReturnCode(TestResult.WARNING);

-        	result.setResultMessage("A function upon which this test depends "

-        			+ "failed to execute as expected. "

-        			+ "Check the other test results in this test suite.");

-        	return result;

-        }

-        

-        for (Enumeration en = bundle.getKeys(); en.hasMoreElements(); ) {

-            String key = (String) en.nextElement();

-            requiredKeys.remove(key);

-        }

-        

-        if (requiredKeys.isEmpty()) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	result.setReturnCode(TestResult.FAILED);

-            StringBuffer buffer = new StringBuffer();

-            for (Iterator it = requiredKeys.iterator(); it.hasNext(); ) {

-            	buffer.append(it.next()).append(", ");

-            }

-            result.setResultMessage("Required keys [" + buffer.toString()

-            		+ "] are missing in the resource bundle.");

-        }

-        return result;

-    }

-

-    protected TestResult checkGetGermanBundle(PortletConfig config,

-                                              PortletRequest request) {

-        return doGenericLocaleRequiredFields(config,

-                                             request,

-                                             Locale.GERMAN);

-    }

-

-    protected TestResult checkGetEnglishBundle(PortletConfig config,

-                                               PortletRequest request) {

-        return doGenericLocaleRequiredFields(config,

-                                             request,

-                                             Locale.ENGLISH);

-    }

-

-    /*

-    protected TestResult checkGetDfltBundle(PortletConfig config,

-                                            PortletRequest req) {

-        return doGenericLocaleRequiredFields(config, req, new Locale("dflt"));

-    }

-    */

-    

-    

-    // Private Methods ---------------------------------------------------------

-    

-    private TestResult doGenericLocaleRequiredFields(PortletConfig config,

-                                                     PortletRequest request,

-                                                     Locale locale) {

-        TestResult result = new TestResult();

-        result.setDescription("Retrieve the title and ensure it's set properly "

-        		+ "under local " + locale);

-        

-        // Retrieve title, short title and keywords from portlet resource bundle.

-        ResourceBundle bundle = config.getResourceBundle(locale);

-        if (bundle == null) {

-        	result.setReturnCode(TestResult.WARNING);

-        	result.setResultMessage("A function upon which this test depends "

-        			+ "failed to execute as expected. "

-        			+ "Check the other test results in this test suite.");

-        	return result;

-        }

-        String title = bundle.getString(TITLE_KEY);

-        String shortTitle = bundle.getString(SHORT_TITLE_KEY);

-        String keywords = bundle.getString(KEYWORDS_KEY);

-        

-        // Retrieve expected title, short title and keywords from test config.

-        String suffix = isBundleDeclared() ? ("_" + locale.getLanguage()) : "";

-        Map initParams = getInitParameters();

-        String expectedTitle = (String) initParams.get(

-        		TITLE_PARAM + suffix);

-        String expectedShortTitle = (String) initParams.get(

-        		SHORT_TITLE_PARAM + suffix);

-        String expectedKeywords = (String) initParams.get(

-        		KEYWORDS_PARAM + suffix);

-        

-        // Assert that values retrieved from resource bundler are expected.

-        boolean inconsistent = false;

-        StringBuffer buffer = new StringBuffer();

-        buffer.append("The following information is not correct: ");

-        if (title == null || expectedTitle == null

-        		|| !title.trim().equals(expectedTitle.trim())) {

-        	inconsistent = true;

-            buffer.append("Inconsistent title: '")

-            		.append(title).append("' != '")

-            		.append(expectedTitle).append("'; ");

-        }

-        if (shortTitle == null || expectedShortTitle == null

-        		|| !shortTitle.trim().equals(expectedShortTitle.trim())) {

-        	inconsistent = true;

-            buffer.append("Inconsistent short title: '")

-            		.append(shortTitle).append("' != '")

-            		.append(expectedShortTitle).append("'; ");

-        }

-        if (keywords == null || expectedKeywords == null

-        		|| !keywords.trim().equals(expectedKeywords.trim())) {

-        	inconsistent = true;

-            buffer.append("Inconsistent keywords: '")

-            		.append(keywords).append("' != '")

-            		.append(expectedKeywords).append("'; ");

-        }

-        

-        if (!inconsistent) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	result.setReturnCode(TestResult.FAILED);

-            result.setResultMessage(buffer.toString());

-        }

-        return result;

-    }

-    

-    private boolean isBundleDeclared() {

-        String bundleDeclared = (String) getInitParameters().get(

-        		BUNDLE_DECLARED_PARAM);

-        if (Boolean.TRUE.toString().equalsIgnoreCase(bundleDeclared)) {

-            return true;

-        } else {

-        	return false;

-        }

-    }

-

-

-

-

-

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SecurityMappingTest.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SecurityMappingTest.java
deleted file mode 100644
index a356b0d..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SecurityMappingTest.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite.test;

-

-import javax.portlet.PortletRequest;

-

-import org.apache.pluto.testsuite.TestResult;

-

-/**

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class SecurityMappingTest extends AbstractReflectivePortletTest {

-	

-    // Test Methods ------------------------------------------------------------

-    

-    protected TestResult checkIsUserInMappedRole(PortletRequest request) {

-        TestResult result = isUserLoggedIn(request);

-        result.setDescription("Test if user is in mapped role.");

-        if (result.getReturnCode() == TestResult.WARNING) {

-            return result;

-        }

-        

-        ExpectedResults expectedResults = ExpectedResults.getInstance();

-        String role = expectedResults.getMappedSecurityRole();

-        if (request.isUserInRole(role)) {

-            result.setReturnCode(TestResult.PASSED);

-        } else {

-        	result.setReturnCode(TestResult.WARNING);

-        	result.setResultMessage("User is not in the expected role: " + role

-        			+ ". This may be due to misconfiuration.");

-        }

-        return result;

-    }

-    

-    protected TestResult checkIsUserInUnmappedRole(PortletRequest request) {

-        TestResult result = isUserLoggedIn(request);

-        result.setDescription("Test if user is in unmapped role");

-        if (result.getReturnCode() == TestResult.WARNING) {

-            return result;

-        }

-        

-        ExpectedResults expectedResults = ExpectedResults.getInstance();

-        String role = expectedResults.getUnmappedSecurityRole();

-        if (request.isUserInRole(role)) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	result.setReturnCode(TestResult.WARNING);

-        	result.setResultMessage("User is not in the expected role: " + role

-        			+ ". This may be due to misconfiuration.");

-        }

-        return result;

-    }

-    

-    protected TestResult checkIsUserIndUndeclaredRole(PortletRequest request) {

-        TestResult result = isUserLoggedIn(request);

-        result.setDescription("Test if user is in undeclared role");

-        if (result.getReturnCode() == TestResult.WARNING) {

-            return result;

-        }

-        

-        String fakeRole = "fakeTestRoleFooBar";

-        if (!request.isUserInRole(fakeRole)) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	result.setReturnCode(TestResult.FAILED);

-        	result.setResultMessage("User is in the fake role named " + fakeRole);

-        }

-        return result;

-    }

-    

-    

-    // Private Methods ---------------------------------------------------------

-    

-    private TestResult isUserLoggedIn(PortletRequest request) {

-    	TestResult result = new TestResult();

-        if (request.getRemoteUser() == null) {

-            result.setReturnCode(TestResult.WARNING);

-            result.setResultMessage("User is not logged in.");

-        }

-        return result;

-    }

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SessionTimeoutTest.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SessionTimeoutTest.java
deleted file mode 100644
index 1dfa7ff..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SessionTimeoutTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite.test;

-

-import javax.portlet.PortletRequest;

-import javax.portlet.PortletSession;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.testsuite.TestResult;

-

-public class SessionTimeoutTest extends AbstractReflectivePortletTest {

-	

-	/** Logger. */

-	private static final Log LOG = LogFactory.getLog(SessionTimeoutTest.class);

-	

-	/**

-	 * Render parameter name indicating if the max inactive interval is set to

-	 * the portlet session or not.

-	 */

-	private static final String MAX_INACTIVE_INTERVAL_SET = "maxInactiveIntervalSet";

-	

-	

-	// Test Methods ------------------------------------------------------------

-	

-	protected TestResult checkSessionInvalidated(PortletRequest request) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure portlet session is invalidated after "

-        		+ "the max inactive interval.");

-        result.setSpecPLT("15.6");

-        

-        // Check if max inactive interval is set to the portlet session.

-        String maxInactiveIntervalSet = request.getParameter(

-        		MAX_INACTIVE_INTERVAL_SET);

-        if (LOG.isDebugEnabled()) {

-        	LOG.debug("Retrieved render parameter: " + MAX_INACTIVE_INTERVAL_SET

-        			+ " = " + maxInactiveIntervalSet);

-        }

-        

-        // If the max inactive interval is set to portlet session, the portlet

-        //   session should have been invalidated by the container.

-        if (Boolean.TRUE.toString().equals(maxInactiveIntervalSet)) {

-        	if (LOG.isDebugEnabled()) {

-        		LOG.debug("Max inactive interval is set to portlet session: "

-        				+ "portlet session should have expired "

-        				+ "(current time millis: "

-        				+ System.currentTimeMillis() + ")...");

-        	}

-            PortletSession session = request.getPortletSession(false);

-            if (session == null) {

-            	result.setReturnCode(TestResult.PASSED);

-            } else {

-            	result.setReturnCode(TestResult.FAILED);

-            	result.setResultMessage("PortletSession should have expired "

-            			+ "and have been invalidated, but is still available. "

-            			+ "Make sure that other portlets did not create a new "

-            			+ "portlet session.");

-            }

-        }

-        

-        // If the max inactive interval is not set to portlet session, set its

-        //   value to 5 (seconds). In this way, next time the test portlet is

-        //   rendered, the portlet session should have been invalidated.

-        else {

-        	if (LOG.isDebugEnabled()) {

-        		LOG.debug("Max inactive interval is not set to portlet session: "

-        				+ "setting to 5 seconds (current time millis: "

-        				+ System.currentTimeMillis() + ")...");

-        	}

-            PortletSession session = request.getPortletSession(true);

-            session.setMaxInactiveInterval(5);

-            result.setReturnCode(TestResult.WARNING);

-            result.setResultMessage("Click the provided link to validate test.");

-        }

-        

-        // Return the test result:

-        //   PASSED - the test is passed.

-        //   FAILED - the test is failed.

-        //   WARNING - the test requires manual intervention.

-        return result;

-	}

-	

-}

-

-

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SimpleAttributeTest.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SimpleAttributeTest.java
deleted file mode 100644
index 0e76107..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SimpleAttributeTest.java
+++ /dev/null
@@ -1,290 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite.test;

-

-import org.apache.pluto.testsuite.TestResult;

-import org.apache.pluto.testsuite.TestUtils;

-

-import java.util.Enumeration;

-

-import javax.portlet.PortletContext;

-import javax.portlet.PortletRequest;

-import javax.portlet.PortletSession;

-

-/**

- * Tests basic attribute retrieval and storage functions within the portlet

- * request, session, and context objects.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class SimpleAttributeTest extends AbstractReflectivePortletTest {

-	

-    private static final String KEY = "org.apache.pluto.testsuite.BOGUS_KEY";

-    private static final String VAL = "! TEST VAL !";

-    

-    

-    // Test Methods ------------------------------------------------------------

-    

-    protected TestResult checkGetNullAttribute(PortletRequest req) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure that if an attribute bound to an invalid "

-        		+ "key is retrieved, null is returned.");

-

-        Object val = req.getAttribute(KEY);

-        if (val == null) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("unbound attribute", val, null, result);

-        }

-        return result;

-    }

-

-

-    protected TestResult checkSetAttribute(PortletRequest req) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure that attributes can be set to "

-        		+ "portlet request.");

-

-        req.setAttribute(KEY, VAL);

-        Object val = req.getAttribute(KEY);

-        if (VAL.equals(val)) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("attribute", val, VAL, result);

-        }

-

-        req.removeAttribute(KEY);

-        return result;

-    }

-

-    protected TestResult checkRemoveAttribute(PortletRequest req) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure that attributes can be removed from "

-        		+ "portlet request.");

-        

-        req.setAttribute(KEY, VAL);

-        req.removeAttribute(KEY);

-        Object val = req.getAttribute(KEY);

-        if (val == null) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("removed attribute", val, null, result);

-        }

-        return result;

-    }

-

-    protected TestResult checkEnumerateAttributes(PortletRequest req) {

-        TestResult result = new TestResult();

-        result.setDescription("Ensure that all attribute names appear in the "

-        		+ "attribute name enumeration returned by portlet request.");

-        

-        int count = 5;

-        for (int i = 0; i < count; i++) {

-            req.setAttribute(KEY + "." + i, VAL);

-        }

-        

-        int found = 0;

-        for (Enumeration en = req.getAttributeNames();

-        		en.hasMoreElements(); ) {

-            if (en.nextElement().toString().startsWith(KEY)) {

-                found++;

-            }

-        }

-

-        if (count == found) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	TestUtils.failOnAssertion("count of attribute names",

-        			String.valueOf(found), String.valueOf(count), result);

-        }

-        return result;

-    }

-    

-    

-    // Test Methods for Session Attributes -------------------------------------

-    

-    protected TestResult checkGetNullAttribute(PortletSession session) {

-        TestResult res = new TestResult();

-        res.setName("Retrieve Missing Session Attribute Test");

-        res.setDescription("Retrieves an attribute bound to an invalid key set are retrieved as null");

-

-        Object val = session.getAttribute(KEY);

-        if(val != null) {

-            res.setReturnCode(TestResult.FAILED);

-            res.setResultMessage("Retrieved value: '"+val+"' for attribute '"+KEY+"'");

-        }

-        else {

-            res.setReturnCode(TestResult.PASSED);

-        }

-        return res;

-    }

-

-    protected TestResult checkSetAttribute(PortletSession session) {

-        TestResult res = new TestResult();

-        res.setName("Set Attribute Test");

-        res.setDescription("Sets and retrieves portlet sessionuest attribute.");

-

-        session.setAttribute(KEY, VAL);

-        Object val = session.getAttribute(KEY);

-        if(!VAL.equals(val)) {

-            res.setReturnCode(TestResult.FAILED);

-            res.setResultMessage("Retrieved value: '"+val+"' - Expected '"+VAL+"'");

-        }

-        else {

-            res.setReturnCode(TestResult.PASSED);

-        }

-

-        session.removeAttribute(KEY);

-        return res;

-    }

-

-    protected TestResult checkRemoveAttribute(PortletSession session) {

-        TestResult res = new TestResult();

-        res.setName("Remove Session Attribute Test");

-        res.setDescription("Sets, removes and retrieves portlet request attribute.");

-

-        session.setAttribute(KEY, VAL);

-        session.removeAttribute(KEY);

-        Object val = session.getAttribute(KEY);

-        if(val!=null) {

-            res.setReturnCode(TestResult.FAILED);

-            res.setResultMessage("Retrieved value: '"+val+"' - Expected '"+VAL+"'");

-        }

-        else {

-            res.setReturnCode(TestResult.PASSED);

-        }

-

-        return res;

-    }

-

-    protected TestResult checkEnumerateAttributes(PortletSession session) {

-    	

-        TestResult result = new TestResult();

-        result.setDescription("Sets session attributes and enumerates over them.");

-        

-        int count = 5;

-        for (int i = 0; i < count; i++) {

-        	session.setAttribute(KEY + "." + i, VAL);

-        }

-

-        int found = 0;

-        for (Enumeration en = session.getAttributeNames();

-        		en.hasMoreElements(); ) {

-        	String name = (String) en.nextElement();

-            if (name.startsWith(KEY)) {

-                found++;

-            }

-        }

-        

-        if (count != found) {

-        	result.setReturnCode(TestResult.FAILED);

-        	result.setResultMessage("Expected " + count + " attributes. "

-        			+ "Found " + found);

-        } else {

-        	result.setReturnCode(TestResult.PASSED);

-        }

-        return result;

-    }

-

-//

-// Context Tests

-//

-

-    protected TestResult checkGetNullAttribute(PortletContext context) {

-        TestResult res = new TestResult();

-        res.setName("Retrieve Missing Context Attribute Test");

-        res.setDescription("Retrieves an attribute bound to an invalid key set are retrieved as null");

-

-        Object val = context.getAttribute(KEY);

-        if(val != null) {

-            res.setReturnCode(TestResult.FAILED);

-            res.setResultMessage("Retrieved value: '"+val+"' for attribute '"+KEY+"'");

-        }

-        else {

-            res.setReturnCode(TestResult.PASSED);

-        }

-        return res;

-    }

-

-    protected TestResult checkSetAttribute(PortletContext context) {

-        TestResult res = new TestResult();

-        res.setName("Set Attribute Test");

-        res.setDescription("Sets and retrieves portlet contextuest attribute.");

-

-        context.setAttribute(KEY, VAL);

-        Object val = context.getAttribute(KEY);

-        if(!VAL.equals(val)) {

-            res.setReturnCode(TestResult.FAILED);

-            res.setResultMessage("Retrieved value: '"+val+"' - Expected '"+VAL+"'");

-        }

-        else {

-            res.setReturnCode(TestResult.PASSED);

-        }

-

-        context.removeAttribute(KEY);

-        return res;

-    }

-

-    protected TestResult checkRemoveAttribute(PortletContext context) {

-        TestResult res = new TestResult();

-        res.setName("Remove Context Attribute Test");

-        res.setDescription("Sets, removes and retrieves portlet request attribute.");

-

-        context.setAttribute(KEY, VAL);

-        context.removeAttribute(KEY);

-        Object val = context.getAttribute(KEY);

-        if(val!=null) {

-            res.setReturnCode(TestResult.FAILED);

-            res.setResultMessage("Retrieved value: '"+val+"' - Expected '"+VAL+"'");

-        }

-        else {

-            res.setReturnCode(TestResult.PASSED);

-        }

-

-        return res;

-    }

-

-    protected TestResult checkEnumerateAttributesInContext(

-    		PortletContext context) {

-        TestResult result = new TestResult();

-        result.setDescription("Sets attributes in portlet context "

-        		+ "and enumerates over them.");

-        

-        int count = 5;

-        for (int i = 0; i < count; i++) {

-        	context.setAttribute(KEY + "." + i, VAL);

-        }

-        

-        int found = 0;

-        for (Enumeration en = context.getAttributeNames();

-        		en.hasMoreElements(); ) {

-            if (en.nextElement().toString().startsWith(KEY)) {

-                found++;

-            }

-        }

-        

-        if (count == found) {

-        	result.setReturnCode(TestResult.PASSED);

-        } else {

-        	result.setReturnCode(TestResult.FAILED);

-        	result.setResultMessage("Expected " + count + " attributes. "

-        			+ "Found " + found);

-        }

-        return result;

-    }

-

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/validator/PreferencesValidatorImpl.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/validator/PreferencesValidatorImpl.java
deleted file mode 100644
index 9f86815..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/validator/PreferencesValidatorImpl.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- * 

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- * 

- *      http://www.apache.org/licenses/LICENSE-2.0

- * 

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite.validator;

-

-import javax.portlet.PortletPreferences;

-import javax.portlet.PreferencesValidator;

-import javax.portlet.ValidatorException;

-

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-

-import java.util.ArrayList;

-import java.util.Collection;

-import java.util.Enumeration;

-import java.util.HashMap;

-import java.util.Map;

-

-/**

- * Implementation of the portlet preferences validator.

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- */

-public class PreferencesValidatorImpl implements PreferencesValidator {

-	

-	/** Logger. */

-    private static final Log LOG = LogFactory.getLog(PreferencesValidatorImpl.class);

-	

-    public static final String CHECK_VALIDATOR_COUNT = "checkValidatorCount";

-    

-    /** Count of instances created. */

-    private static final Map INSTANCE_COUNTER = new HashMap();

-    

-    /** Count of invocation number of method <code>validate()</code>. */

-    private int validateInvoked = 0;

-    

-    // Constructor -------------------------------------------------------------

-    

-    /**

-     * Default no-arg constructor.

-     */

-    public PreferencesValidatorImpl() {

-    	if (LOG.isDebugEnabled()) {

-    		LOG.debug("Creating validator instance: " + getClass().getName());

-    	}

-    	Integer count = (Integer) INSTANCE_COUNTER.get(getClass().getName());

-    	if (count == null) {

-    		count = new Integer(1);

-    	} else {

-    		count = new Integer(count.intValue() + 1);

-    	}

-    	INSTANCE_COUNTER.put(getClass().getName(), count);

-    }

-    

-    

-    // PreferencesValidator Impl -----------------------------------------------

-    

-    public void validate(PortletPreferences preferences)

-    throws ValidatorException {

-    	validateInvoked++;

-    	String value = preferences.getValue(CHECK_VALIDATOR_COUNT, null);

-    	if (value != null && value.equalsIgnoreCase("true")) {

-    		checkValidatorCount();

-    	}

-    	

-        //

-        // TODO: Determine why we use this - I seem to remember it's a

-        //   spec requirement, and fix it so that we don't have issues

-        //   anymore.  When enabled, all preferences fail in testsuite.

-        //

-        final String[] DEFAULT_VALUES = new String[] { "no values" };

-    	Collection failedNames = new ArrayList();

-        for (Enumeration en = preferences.getNames(); en.hasMoreElements(); ) {

-            String name = (String) en.nextElement();

-            String[] values = preferences.getValues(name, DEFAULT_VALUES);

-            if (values != null) { // null values are allowed

-                for (int i = 0; i < values.length; i++) {

-                    if (values[i] != null) { // null values are allowed

-                        // Validate that the preferences do not

-                    	//   start or end with white spaces.

-                        if (!values[i].equals(values[i].trim())) {

-                        	if (LOG.isDebugEnabled()) {

-                        		LOG.debug("Validation failed: "

-                        				+ "value has white spaces: "

-                        				+ "name=" + name

-                        				+ "; value=|" + values[i] + "|");

-                        	}

-                        	failedNames.add(name);

-                        }

-                    }

-                }

-            }

-        }

-        

-        if (!failedNames.isEmpty()) {

-            throw new ValidatorException(

-            		"One or more preferences do not pass the validation.",

-            		failedNames);

-        }

-    }

-    

-    private void checkValidatorCount() throws ValidatorException {

-    	if (LOG.isDebugEnabled()) {

-    		LOG.debug("Checking validator count...");

-    	}

-    	Integer instanceCreated = (Integer) INSTANCE_COUNTER.get(

-    			getClass().getName());

-    	if (LOG.isDebugEnabled()) {

-    		LOG.debug("Method validate() invoked " + validateInvoked + " times.");

-    		LOG.debug("Validator created " + instanceCreated.intValue() + " times.");

-    	}

-    	if (instanceCreated.intValue() != 1) {

-    		throw new ValidatorException(instanceCreated.toString()

-    				+ " validator instances were created, "

-    				+ "expected 1 validator instance per portlet definition.",

-    				null);

-    	}

-    }

-    

-}

diff --git a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/validator/PreferencesValidatorImpl2.java b/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/validator/PreferencesValidatorImpl2.java
deleted file mode 100644
index a1cf571..0000000
--- a/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/validator/PreferencesValidatorImpl2.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.testsuite.validator;

-

-public class PreferencesValidatorImpl2 extends PreferencesValidatorImpl {

-	

-}

diff --git a/trunk/pluto-testsuite/src/main/resources/testsuite.xml b/trunk/pluto-testsuite/src/main/resources/testsuite.xml
deleted file mode 100644
index b8398da..0000000
--- a/trunk/pluto-testsuite/src/main/resources/testsuite.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<!-- 

-Copyright 2004 The Apache Software Foundation.

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<Context path="/testsuite" docBase="pluto-testsuite.war" crossContext="true">

-</Context>

diff --git a/trunk/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet.properties b/trunk/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet.properties
deleted file mode 100644
index 7ac8662..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-# 

-# Copyright 2004 The Apache Software Foundation

-# Licensed  under the  Apache License,  Version 2.0  (the "License");

-# you may not use  this file  except in  compliance with the License.

-# You may obtain a copy of the License at 

-# 

-#   http://www.apache.org/licenses/LICENSE-2.0

-# 

-# Unless required by applicable law or agreed to in writing, software

-# distributed  under the  License is distributed on an "AS IS" BASIS,

-# WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-# implied.

-#  

-# See the License for the specific language governing permissions and

-# limitations under the License.

-#

-#

-

-javax.portlet.title=Test Portlet 2 (dflt)

-javax.portlet.short-title=Test 2 (dflt)

-javax.portlet.keywords=Test,Testing

-

-org.apache.pluto.testsuite.resource_bundle_test=true;

-

-

diff --git a/trunk/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet_de.properties b/trunk/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet_de.properties
deleted file mode 100644
index 48e1371..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet_de.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-# 

-# Copyright 2004 The Apache Software Foundation

-# Licensed  under the  Apache License,  Version 2.0  (the "License");

-# you may not use  this file  except in  compliance with the License.

-# You may obtain a copy of the License at 

-# 

-#   http://www.apache.org/licenses/LICENSE-2.0

-# 

-# Unless required by applicable law or agreed to in writing, software

-# distributed  under the  License is distributed on an "AS IS" BASIS,

-# WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-# implied.

-#  

-# See the License for the specific language governing permissions and

-# limitations under the License.

-#

-#

-javax.portlet.title = Test Portlet 2 (de)

-javax.portlet.short-title = Test 2 (de)

-javax.portlet.keywords = Test,Testen

diff --git a/trunk/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet_en.properties b/trunk/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet_en.properties
deleted file mode 100644
index d09d24e..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet_en.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-# 

-# Copyright 2004 The Apache Software Foundation

-# Licensed  under the  Apache License,  Version 2.0  (the "License");

-# you may not use  this file  except in  compliance with the License.

-# You may obtain a copy of the License at 

-# 

-#   http://www.apache.org/licenses/LICENSE-2.0

-# 

-# Unless required by applicable law or agreed to in writing, software

-# distributed  under the  License is distributed on an "AS IS" BASIS,

-# WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-# implied.

-#  

-# See the License for the specific language governing permissions and

-# limitations under the License.

-#

-#

-javax.portlet.title = Test Portlet 2 (en)

-javax.portlet.short-title = Test 2 (en)

-javax.portlet.keywords = Test,Testing

-

-org.apache.pluto.testsuite.expected-title=Test Portlet 2 (en)

-org.apache.pluto.testsuite.expected-short-title=Test 2 (en)

-org.apache.pluto.testsuite.keywords=Test, Testing

diff --git a/trunk/pluto-testsuite/src/main/webapp/WEB-INF/classes/expectedResults.properties b/trunk/pluto-testsuite/src/main/webapp/WEB-INF/classes/expectedResults.properties
deleted file mode 100644
index 22159c6..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/WEB-INF/classes/expectedResults.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#

-# Copyright 2004 The Apache Software Foundation

-# Licensed  under the  Apache License,  Version 2.0  (the "License");

-# you may not use  this file  except in  compliance with the License.

-# You may obtain a copy of the License at

-#

-#   http://www.apache.org/licenses/LICENSE-2.0

-#

-# Unless required by applicable law or agreed to in writing, software

-# distributed  under the  License is distributed on an "AS IS" BASIS,

-# WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-# implied.

-#

-# See the License for the specific language governing permissions and

-# limitations under the License.

-#

-#

-# File containing values expected by the test Portlet.

-# If you are embedding the Pluto Container in a non-Pluto

-# Portal, you may find it useful to modify these values.

-#

-# org.apache.pluto.testsuite.ExpectedResults is used to

-# load this file.

-

-# The value we expect to return from renderRequest.getPortalContext().getPortalInfo();

-

-expected.serverInfo = Pluto/1.1.0-SNAPSHOT

-expected.version.major=1

-expected.version.minor=0

-

-expected.portalInfo = pluto-portal-driver/1.1.0-SNAPSHOT

-

-expected.security.role=tomcat

-expected.security.role.mapped=plutoTestRole

diff --git a/trunk/pluto-testsuite/src/main/webapp/WEB-INF/portlet.xml b/trunk/pluto-testsuite/src/main/webapp/WEB-INF/portlet.xml
deleted file mode 100644
index c9f565b..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/WEB-INF/portlet.xml
+++ /dev/null
@@ -1,152 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!-- 

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<portlet-app

-    xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"

-    version="1.0"

-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-    xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd

-                        http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">

-  

-  <!-- Test Portlet #1 ===================================================== -->

-  

-  <portlet>

-    

-    <description>TestSuiteDescription</description>

-    <portlet-name>TestPortlet1</portlet-name>

-    <display-name>Test Portlet #1</display-name>

-    <portlet-class>org.apache.pluto.testsuite.TestPortlet</portlet-class>

-    

-    <init-param>

-      <name>config</name>

-      <value>/WEB-INF/testsuite-config.xml</value>

-    </init-param>

-    <init-param>

-      <name>dummyName</name>

-      <value>dummyValue</value>

-    </init-param>

-    

-    <expiration-cache>-1</expiration-cache>

-    

-    <supports>

-      <mime-type>text/html</mime-type>

-      <portlet-mode>VIEW</portlet-mode>

-      <portlet-mode>EDIT</portlet-mode>

-      <portlet-mode>HELP</portlet-mode>

-    </supports>

-    

-    <supported-locale>en</supported-locale>        

-    <supported-locale>de</supported-locale>

-    

-    <portlet-info>

-      <title>Test Portlet #1</title>

-      <short-title>Test #1</short-title>

-      <keywords>Test,Testing</keywords>

-    </portlet-info>

-    

-    <portlet-preferences>

-      <preference>

-        <name>dummyName</name>

-        <value>dummyValue</value>

-        <read-only>false</read-only>

-      </preference>

-      <preference>

-        <name>dummyName2</name>

-        <value>dummyValue2</value>

-      </preference>

-      <preference>

-        <name>readonly</name>

-        <value>readonly</value>

-        <read-only>true</read-only>

-      </preference>

-      <preference>

-        <name>nameWithNoValue</name>

-      </preference>

-      <preferences-validator>org.apache.pluto.testsuite.validator.PreferencesValidatorImpl</preferences-validator>

-    </portlet-preferences>

-    

-    <security-role-ref>

-      <role-name>plutoTestRole</role-name>

-      <role-link>tomcat</role-link>

-    </security-role-ref>

-  

-  </portlet>

-  

-  

-  

-  <!-- Test Portlet #2 ===================================================== -->

-  

-	<portlet>

-    

-    <description>TestSuiteDescription</description>

-    <portlet-name>TestPortlet2</portlet-name>

-    <display-name>Test Portlet #2</display-name>

-    <portlet-class>org.apache.pluto.testsuite.TestPortlet</portlet-class>

-    

-    <init-param>

-      <name>config</name>

-      <value>/WEB-INF/testsuite-2-config.xml</value>

-    </init-param>

-    <init-param>

-      <name>dummyName</name>

-      <value>dummyValue</value>

-    </init-param>

-    

-    <expiration-cache>-1</expiration-cache>

-    

-    <supports>

-      <mime-type>text/html</mime-type>

-      <portlet-mode>VIEW</portlet-mode>

-      <portlet-mode>EDIT</portlet-mode>

-      <portlet-mode>HELP</portlet-mode>

-    </supports>

-    

-    <supported-locale>en</supported-locale>

-    <supported-locale>de</supported-locale>

-    <resource-bundle>TestPortlet</resource-bundle>

-    

-    <portlet-preferences >

-      <preference>

-        <name>dummyName</name>

-        <value>dummyValue</value>

-        <read-only>false</read-only>

-      </preference>

-      <preference>

-        <name>dummyName2</name>

-        <value>dummyValue2</value>

-      </preference>

-      <preference>

-        <name>readonly</name>

-        <value>readonly</value>

-        <read-only>true</read-only>

-      </preference>

-      <preference>

-        <name>nameWithNoValue</name>

-      </preference>

-      <preferences-validator>org.apache.pluto.testsuite.validator.PreferencesValidatorImpl2</preferences-validator>

-    </portlet-preferences>

-    

-    <security-role-ref>

-      <role-name>plutoTestRole</role-name>

-      <role-link>tomcat</role-link>

-    </security-role-ref>

-    

-  </portlet>

-  

-</portlet-app>

-

-

diff --git a/trunk/pluto-testsuite/src/main/webapp/WEB-INF/testsuite-2-config.xml b/trunk/pluto-testsuite/src/main/webapp/WEB-INF/testsuite-2-config.xml
deleted file mode 100644
index d7e7290..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/WEB-INF/testsuite-2-config.xml
+++ /dev/null
@@ -1,166 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-  Copyright 2004 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-       http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<testportlet-config>

-  

-  <testsuite-config>

-    <name>Render Parameter Test</name>

-    <class>org.apache.pluto.testsuite.test.RenderParameterTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-    <action-param>

-      <name>org.apache.pluto.testsuite.PARAM_ACTION_KEY</name>

-      <value>org.apache.pluto.testsuite.ACTION_VALUE</value>

-    </action-param>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Action Parameter Test</name>

-    <class>org.apache.pluto.testsuite.test.ActionParameterTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-    <action-param>

-      <name>org.apache.pluto.testsuite.PARAM_ACTION_KEY</name>

-      <value>org.apache.pluto.testsuite.ACTION_VALUE</value>

-    </action-param>

-  </testsuite-config>

-    

-  <testsuite-config>

-    <name>Dispatcher Render Parameter Test</name>

-    <class>org.apache.pluto.testsuite.test.DispatcherRenderParameterTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-  </testsuite-config>

-  

-  <testsuite-config>

-    <name>Dispatcher Request Test</name>

-    <class>org.apache.pluto.testsuite.test.DispatcherRequestTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Simple Attribute Test</name>

-    <class>org.apache.pluto.testsuite.test.SimpleAttributeTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-  </testsuite-config>

-    

-  <testsuite-config>

-    <name>Application Scoped Session Attribute Test</name>

-    <class>org.apache.pluto.testsuite.test.AppScopedSessionAttributeTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-  </testsuite-config>

-    

-  <testsuite-config>

-    <name>External Application Scoped Attribute Test</name>

-    <class>org.apache.pluto.testsuite.test.ExternalAppScopedAttributeTest</class>

-    <display-uri>/jsp/ExternalAppScopedAttributeTest.jsp</display-uri>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Context Init Parameter Test</name>

-    <class>org.apache.pluto.testsuite.test.ContextInitParameterTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Preference In Action Test</name>

-    <class>org.apache.pluto.testsuite.test.PreferenceInActionTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Preference In Render Test</name>

-    <class>org.apache.pluto.testsuite.test.PreferenceInRenderTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Session Timeout Test</name>

-    <class>org.apache.pluto.testsuite.test.SessionTimeoutTest</class>

-    <display-uri>/jsp/SessionTimeoutTest.jsp</display-uri>

-  </testsuite-config>

-

-  <!--testsuite-config>

-    <name>Render Response No Content Type Test</name>

-    <class>org.apache.pluto.testsuite.test.RenderResponseNoContentTypeTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-  </testsuite-config-->

-

-  <testsuite-config>

-    <name>Portlet Mode Test</name>

-    <display-uri>/jsp/portlet_mode_test.jsp</display-uri>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Window State Test</name>

-    <display-uri>/jsp/window_state_test.jsp</display-uri>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Misc Test</name>

-    <class>org.apache.pluto.testsuite.test.MiscTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Security Mapping Test</name>

-    <class>org.apache.pluto.testsuite.test.SecurityMappingTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Resource Bundle Test</name>

-    <class>org.apache.pluto.testsuite.test.ResourceBundleTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-    <init-param>

-      <name>resource-bundle</name>

-      <value>true</value>

-    </init-param>

-    <init-param>

-      <name>title_en</name>

-      <value>Test Portlet 2 (en)</value>

-    </init-param>

-    <init-param>

-      <name>short-title_en</name>

-      <value>Test 2 (en)</value>

-    </init-param>

-    <init-param>

-      <name>keywords_en</name>

-      <value>Test,Testing</value>

-    </init-param>

-    <init-param>

-      <name>title_de</name>

-      <value>Test Portlet 2 (de)</value>

-    </init-param>

-    <init-param>

-      <name>short-title_de</name>

-      <value>Test 2 (de)</value>

-    </init-param>

-    <init-param>

-        <name>keywords_de</name>

-        <value>Test,Testen</value>

-    </init-param>

-    <init-param>

-      <name>title_dflt</name>

-      <value>Test Portlet 2 (dflt)</value>

-    </init-param>

-    <init-param>

-      <name>short-title_dflt</name>

-      <value>Test 2 (dflt)</value>

-    </init-param>

-    <init-param>

-      <name>keywords_dflt</name>

-      <value>Test,Testing</value>

-    </init-param>

-  </testsuite-config>

-</testportlet-config>

diff --git a/trunk/pluto-testsuite/src/main/webapp/WEB-INF/testsuite-config.xml b/trunk/pluto-testsuite/src/main/webapp/WEB-INF/testsuite-config.xml
deleted file mode 100644
index 88480b8..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/WEB-INF/testsuite-config.xml
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-  Copyright 2004 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-       http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<testportlet-config>

-  

-  <testsuite-config>

-    <name>Render Parameter Test</name>

-    <class>org.apache.pluto.testsuite.test.RenderParameterTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-    <action-param>

-      <name>org.apache.pluto.testsuite.PARAM_ACTION_KEY</name>

-      <value>org.apache.pluto.testsuite.ACTION_VALUE</value>

-    </action-param>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Action Parameter Test</name>

-    <class>org.apache.pluto.testsuite.test.ActionParameterTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-    <action-param>

-      <name>org.apache.pluto.testsuite.PARAM_ACTION_KEY</name>

-      <value>org.apache.pluto.testsuite.ACTION_VALUE</value>

-    </action-param>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Dispatcher Render Parameter Test</name>

-    <class>org.apache.pluto.testsuite.test.DispatcherRenderParameterTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Dispatcher Request Test</name>

-    <class>org.apache.pluto.testsuite.test.DispatcherRequestTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Simple Attribute Test</name>

-    <class>org.apache.pluto.testsuite.test.SimpleAttributeTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-  </testsuite-config>

-    

-  <testsuite-config>

-    <name>Application Scoped Session Attribute Test</name>

-    <class>org.apache.pluto.testsuite.test.AppScopedSessionAttributeTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-  </testsuite-config>

-    

-  <testsuite-config>

-    <name>External Application Scoped Attribute Test</name>

-    <class>org.apache.pluto.testsuite.test.ExternalAppScopedAttributeTest</class>

-    <display-uri>/jsp/ExternalAppScopedAttributeTest.jsp</display-uri>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Context Init Parameter Test</name>

-    <class>org.apache.pluto.testsuite.test.ContextInitParameterTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Preference In Action Test</name>

-    <class>org.apache.pluto.testsuite.test.PreferenceInActionTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Preference In Render Test</name>

-    <class>org.apache.pluto.testsuite.test.PreferenceInRenderTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Session Timeout Test</name>

-    <class>org.apache.pluto.testsuite.test.SessionTimeoutTest</class>

-    <display-uri>/jsp/SessionTimeoutTest.jsp</display-uri>

-  </testsuite-config>

-  

-  <!--testsuite-config>

-    <name>Render Response No Content Type Test</name>

-    <class>org.apache.pluto.testsuite.test.RenderResponseNoContentTypeTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-  </testsuite-config-->

-  

-  <testsuite-config>

-    <name>Portlet Mode Test</name>

-    <display-uri>/jsp/portlet_mode_test.jsp</display-uri>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Window State Test</name>

-    <display-uri>/jsp/window_state_test.jsp</display-uri>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Misc Test</name>

-    <class>org.apache.pluto.testsuite.test.MiscTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Security Mapping Test</name>

-    <class>org.apache.pluto.testsuite.test.SecurityMappingTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-  </testsuite-config>

-

-  <testsuite-config>

-    <name>Resource Bundle Test</name>

-    <class>org.apache.pluto.testsuite.test.ResourceBundleTest</class>

-    <display-uri>/jsp/test_results.jsp</display-uri>

-    <init-param>

-        <name>resource-bundle</name>

-        <value>false</value>

-    </init-param>

-    <init-param>

-      <name>title</name>

-      <value>Test Portlet #1</value>

-    </init-param>

-    <init-param>

-      <name>short-title</name>

-      <value>Test #1</value>

-    </init-param>

-    <init-param>

-      <name>keywords</name>

-      <value>Test,Testing</value>

-    </init-param>

-  </testsuite-config>

-

-</testportlet-config>

diff --git a/trunk/pluto-testsuite/src/main/webapp/WEB-INF/web.xml b/trunk/pluto-testsuite/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 6ecb09a..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>

-

-<!DOCTYPE web-app PUBLIC

-    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

-    "http://java.sun.com/dtd/web-app_2_3.dtd">

-<!--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<web-app>

-  

-  <display-name>Pluto Testsuite</display-name>

-  

-  <context-param>

-    <param-name>test-parameter-name</param-name>

-    <param-value>test-parameter-val</param-value>

-  </context-param>

-  

-  <context-param>

-    <param-name>parameter-name</param-name>

-    <param-value>parameter-value</param-value>

-  </context-param>

-  

-  <!-- Companion Servlet Definitions ======================================= -->

-  

-  <servlet>

-    <servlet-name>ExternalAppScopedAttributeTest_Servlet</servlet-name>

-    <servlet-class>org.apache.pluto.testsuite.test.ExternalAppScopedAttributeTest$CompanionServlet</servlet-class>

-  </servlet>

-  

-  <servlet>

-    <servlet-name>DispatcherRenderParameterTest_Servlet</servlet-name>

-    <servlet-class>org.apache.pluto.testsuite.test.DispatcherRenderParameterTest$CompanionServlet</servlet-class>

-  </servlet>

-  

-  <servlet>

-    <servlet-name>DispatcherRequestTest_Servlet</servlet-name>

-    <servlet-class>org.apache.pluto.testsuite.test.DispatcherRequestTest$CompanionServlet</servlet-class>

-  </servlet>

-  

-  

-  <!-- Companion Servlet Mappings ========================================== -->

-  

-  <servlet-mapping>

-    <servlet-name>ExternalAppScopedAttributeTest_Servlet</servlet-name>

-    <url-pattern>/test/ExternalAppScopedAttributeTest_Servlet</url-pattern>

-  </servlet-mapping>

-  

-  <servlet-mapping>

-    <servlet-name>DispatcherRenderParameterTest_Servlet</servlet-name>

-    <url-pattern>/test/DispatcherRenderParameterTest_Servlet</url-pattern>

-  </servlet-mapping>

-  

-  <servlet-mapping>

-    <servlet-name>DispatcherRequestTest_Servlet</servlet-name>

-    <url-pattern>/test/DispatcherRequestTest_Servlet/*</url-pattern>

-  </servlet-mapping>

-  

-  <security-role>

-    <role-name>tomcat</role-name>

-  </security-role>

-  

-</web-app>

-

diff --git a/trunk/pluto-testsuite/src/main/webapp/images/haring1.gif b/trunk/pluto-testsuite/src/main/webapp/images/haring1.gif
deleted file mode 100644
index a41cf88..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/images/haring1.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-testsuite/src/main/webapp/images/next.png b/trunk/pluto-testsuite/src/main/webapp/images/next.png
deleted file mode 100644
index 41fdc3d..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/images/next.png
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-testsuite/src/main/webapp/images/no.gif b/trunk/pluto-testsuite/src/main/webapp/images/no.gif
deleted file mode 100644
index fa18d2e..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/images/no.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-testsuite/src/main/webapp/images/previous.png b/trunk/pluto-testsuite/src/main/webapp/images/previous.png
deleted file mode 100644
index afb4cba..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/images/previous.png
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-testsuite/src/main/webapp/images/question.gif b/trunk/pluto-testsuite/src/main/webapp/images/question.gif
deleted file mode 100644
index a44e7e6..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/images/question.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-testsuite/src/main/webapp/images/return_index.png b/trunk/pluto-testsuite/src/main/webapp/images/return_index.png
deleted file mode 100644
index bc36ecf..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/images/return_index.png
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-testsuite/src/main/webapp/images/yes.gif b/trunk/pluto-testsuite/src/main/webapp/images/yes.gif
deleted file mode 100644
index 2403355..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/images/yes.gif
+++ /dev/null
Binary files differ
diff --git a/trunk/pluto-testsuite/src/main/webapp/index.jsp b/trunk/pluto-testsuite/src/main/webapp/index.jsp
deleted file mode 100644
index f901ec4..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/index.jsp
+++ /dev/null
@@ -1,21 +0,0 @@
-<%-- 

-Copyright 2004 The Apache Software Foundation.

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-<html>
-<body>
-<h2>Hello World!</h2>
-</body>
-</html>
diff --git a/trunk/pluto-testsuite/src/main/webapp/jsp/ExternalAppScopedAttributeTest.jsp b/trunk/pluto-testsuite/src/main/webapp/jsp/ExternalAppScopedAttributeTest.jsp
deleted file mode 100644
index f4ee0bb..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/jsp/ExternalAppScopedAttributeTest.jsp
+++ /dev/null
@@ -1,68 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-

-<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

-<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>

-

-<portlet:defineObjects/>

-

-<script name="JavaScript">

-function openCompanionWindow() {

-	w = 500;

-	h = 400;

-	x = (screen.width - w) / 2;

-	y = (screen.height - h) / 2;

-	window.open('<HTML><BODY><CENTER><FONT color=red>Testing Session Attributes</FONT></CENTER></BODY></HTML>', 'companionWindow', 'resizable=yes,scrollbars=yes,status=yes,width=' + w + ',height=' + h + ',screenX=' + x + ',screenY=' + y + ',left=' + x + ',top=' + y);

-}

-</script>

-

-<c:choose>

-  <c:when test="${results.inQuestion}">

-    <table>

-      <tr>

-        <th colspan="2" style="background-color:blue;color:white;">MANUAL TEST</th>

-      </tr>

-      <tr>

-        <th colspan="2">Application Scoped Session Attributes Test</th>

-      </tr>

-      <tr>

-        <td>

-          <p>

-            This test is to validate that application scoped attributes can be

-            viewed by resources outside of the portlet. Additionally, it tests

-            to make sure that session attributes set by other resources may be

-            viewed by the portlet as an application scoped session attribute.

-          </p>

-          <p>

-            This test requires manual intervention. Click

-            <a href="<%= renderResponse.encodeURL(renderRequest.getContextPath() + "/test/ExternalAppScopedAttributeTest_Servlet?sessionId=" + request.getSession().getId()) %>"

-               target="companionWindow" onclick="openCompanionWindow()">

-              here

-            </a>

-          </p>

-        </td>

-      </tr>

-    </table>

-  </c:when>

-  <c:otherwise>

-    <%@ include file="test_results.inc" %>

-  </c:otherwise>

-</c:choose>

-

-<%@ include file="navigation.inc" %>

-

-

diff --git a/trunk/pluto-testsuite/src/main/webapp/jsp/ExternalAppScopedAttributeTest_companion.jsp b/trunk/pluto-testsuite/src/main/webapp/jsp/ExternalAppScopedAttributeTest_companion.jsp
deleted file mode 100644
index 59d7e9c..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/jsp/ExternalAppScopedAttributeTest_companion.jsp
+++ /dev/null
@@ -1,89 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-

-<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

-

-

-<HTML>

-<HEAD>

-<STYLE>

-BODY, P, TH, TD {

-    font-family: arial, helvetica, sans-serif;

-    text-align: left;

-}

-

-.BODY, .P, .TD {

-    font-size: 12px;

-}

-

-TABLE {

-    width: 100%;

-    padding: 2px 3px;

-    border-collapse:collapse;

-    border-spacing: 3px 3px;

-}

-

-

-.banner, .banner TD, .banner A:link, .banner A:visited, .banner A:hover {

-    background-color: #DDDDDD;

-    color: #36a;

-}

-

-.nav, .nav TD, .nav A:link, .nav A:visited, .nav A:hover {

-    background-color: #DDDDDD;

-    color: #36a;

-}

-

-.small {

-    font-size: -1;

-}

-

-</STYLE>

-</HEAD>

-<TABLE style="font-size: -1" border="1">

-<c:choose>

-<c:when test="${passed}">

-<TR><TH colspan="2" style="background-color:green;color:white">PASSED</FONT>

-</c:when>

-<c:otherwise>

-<TR><TH colspan="2" style="background-color:red;color:white">FAILED</TH></TR>

-</c:otherwise>

-</c:choose>

-

-<TR><TD colspan="2">

-    <p>This resource has been requested outside of the portal framework.  It is

-    intended to test application scope attribute functions of the PortletSession.

-    If the PortletSession is functioning as designed the key set in the PortletSession

-    should be readable.  If it were, this test would have passed. This resource has

-    also added a key to it's HttpSession which should be viewable through the PortletSession

-    attribute.</p>

-

-    <p>Note that this test is not expected to pass on Tomcat 4.x or 5.0.x. On Tomcat 5.5.x

-    it requires <i>emptySessionPath="true"</i> to be added to the connector configuration

-    in server.xml. See

-    <a href="http://portals.apache.org/pluto/faq.html#tomcat5_5" target="_blank">the FAQ</a>

-    for details.</p>

-</TD></TR>

-<TR><TH colspan="2">Session Id Comparison</TH></TR>

-<TR><TD>This HttpSession Id</TD>

-    <TD><c:out value="${pageContext.request.session.id}"/></TD></TR>

-<TR><TD>Requesting Portlet's Session Id</TD>

-    <TD><%=request.getParameter("sessionId")%></TD></TR>

-    </TABLE>

-</BODY>

-</HTML>

-

diff --git a/trunk/pluto-testsuite/src/main/webapp/jsp/SessionTimeoutTest.jsp b/trunk/pluto-testsuite/src/main/webapp/jsp/SessionTimeoutTest.jsp
deleted file mode 100644
index 5b32bb2..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/jsp/SessionTimeoutTest.jsp
+++ /dev/null
@@ -1,65 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-

-<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

-<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>

-

-<portlet:defineObjects/>

-

-<c:choose>

-  <c:when test="${results.inQuestion}">

-    

-    <%-- Generate portlet render URL: Start =============================== --%>

-    <portlet:renderURL secure='<%= renderRequest.isSecure() ? "True" : "False" %>'

-                       var="url">

-      <portlet:param name="maxInactiveIntervalSet" value="<%= Boolean.TRUE.toString() %>"/>

-      <portlet:param name="testId" value="<%= renderRequest.getParameter("testId") %>"/>

-    </portlet:renderURL>

-    <%-- Generate portlet action URL: End ================================= --%>

-  

-  

-  

-    <table>

-      <tr>

-        <th colspan="2" style="background-color:blue;color:white;">MANUAL TEST</th>

-      </tr>

-      <tr>

-        <th colspan="2">Session Timeout Test</th>

-      </tr>

-      <tr>

-        <td>

-          <p>

-            This test is to validate that portlet session will expire and be

-            invalidated by the portlet container after its max inactive interval

-            is passed.

-          </p>

-          <p>

-            This test requires manual intervention. Please wait for at least

-            5 seconds and click <a href="<c:out value="${url}"/>">here</a>.

-          </p>

-        </td>

-      </tr>

-    </table>

-  </c:when>

-  <c:otherwise>

-    <%@ include file="test_results.inc" %>

-  </c:otherwise>

-</c:choose>

-

-<%@ include file="navigation.inc" %>

-

-

diff --git a/trunk/pluto-testsuite/src/main/webapp/jsp/edit.jsp b/trunk/pluto-testsuite/src/main/webapp/jsp/edit.jsp
deleted file mode 100644
index 758657f..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/jsp/edit.jsp
+++ /dev/null
@@ -1,17 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-THIS IS THE EDIT PAGE
\ No newline at end of file
diff --git a/trunk/pluto-testsuite/src/main/webapp/jsp/help.jsp b/trunk/pluto-testsuite/src/main/webapp/jsp/help.jsp
deleted file mode 100644
index 616b5b2..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/jsp/help.jsp
+++ /dev/null
@@ -1,28 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-<TABLE style="border-colapse: false;padding: 4px 4px;border-spacing: 3px 4px;">

-<TR><TH colspan="2">Test Portlet Help Page</TH></TR>

-<TR><TD colspan="2">Color Code Key</TH></TR>

-<TR><TD width="20" style="background-color:green;">&nbsp;</TD>

-    <TD style="font-size: 12px">Test has passed!</TH></TR>

-<TR><TD width="20" style="background-color:blue;">&nbsp;</TD>

-    <TD style="font-size: 12px">Manual Judgment Required!</TH></TR>

-<TR><TD width="20" style="background-color:yellow;">&nbsp;</TD>

-    <TD style="font-size: 12px">Warning! Could not determine pass or fail due to an fixable condition.</TH></TR>

-<TR><TD width="20" style="background-color:red;">&nbsp;</TD>

-    <TD style="font-size: 12px">Test has failed!</TH></TR>

-</TABLE>
\ No newline at end of file
diff --git a/trunk/pluto-testsuite/src/main/webapp/jsp/introduction.jsp b/trunk/pluto-testsuite/src/main/webapp/jsp/introduction.jsp
deleted file mode 100644
index 84d697f..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/jsp/introduction.jsp
+++ /dev/null
@@ -1,74 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-

-<%@ page import="java.util.Map" %>

-<%@ page import="javax.servlet.jsp.jstl.core.LoopTagStatus" %>

-<%@ page import="org.apache.pluto.testsuite.TestConfig" %>

-

-<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

-<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>

-

-<portlet:defineObjects/>

-

-<p>

-  This portlet is a portlet specification compatibility test portlet.

-  It provides several tests of verying complexities which will assist in

-  evaluating compliance with the portlet specification. It was originally

-  developed for testing Apache Pluto, however, it does not utilize any

-  proprietary APIs and should work with all compliant portlet containers.

-</p>

-

-<p>

-  Please select one of the following tests:

-  <table>

-    <c:forEach var="testConfig" items="${tests}" varStatus="status">

-      <tr>

-        <td>

-          # <c:out value="${status.index}"/>.

-        </td>

-        <td>

-          <c:out value="${testConfig.name}"/>

-        </td>

-        

-        <%-- Generate portlet action URL: Start =========================== --%>

-        <portlet:actionURL secure='<%= renderRequest.isSecure() ? "True" : "False" %>'

-                           var="url">

-          <portlet:param name="testId"

-                         value='<%= ((LoopTagStatus) pageContext.getAttribute("status")).getIndex() + "" %>'/>

-          <c:forEach var="param" items="${testConfig.actionParameters}">

-            <%

-                TestConfig.Parameter parameter = (TestConfig.Parameter)

-                        pageContext.findAttribute("param");

-                String paramName = parameter.getName();

-                String paramValue = parameter.getValue();

-            %>

-            <portlet:param name="<%= paramName %>"

-                           value="<%= paramValue %>"/>

-          </c:forEach>

-        </portlet:actionURL>

-        <%-- Generate portlet action URL: End ============================= --%>

-        

-        <td>

-          <a href="<c:out value="${url}"/>">Test</a>

-        </td>

-      </tr>

-    </c:forEach>

-  </table>

-</p>

-

-

-

diff --git a/trunk/pluto-testsuite/src/main/webapp/jsp/navigation.inc b/trunk/pluto-testsuite/src/main/webapp/jsp/navigation.inc
deleted file mode 100644
index 43c7edd..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/jsp/navigation.inc
+++ /dev/null
@@ -1,85 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-

-<%@ page import="java.util.Map"%>

-<%@ page import="org.apache.pluto.testsuite.TestConfig"%>

-

-<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

-<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>

-

-<portlet:defineObjects/>

-

-<center>

-  <table>

-    <tr>

-      <td align="center" nowrap="true">

-        

-        <%-- Run Previous Test ============================================ --%>

-        <portlet:actionURL secure="<%= renderRequest.isSecure() ? "True" : "False" %>"

-                           var="url">

-          <portlet:param name="nextTestId"

-                         value="<%= renderRequest.getParameter("testId") %>"/>

-          <c:forEach var="param" items="${prevTest.actionParameters}">

-            <%

-                TestConfig.Parameter parameter = (TestConfig.Parameter) pageContext.findAttribute("param");

-                String paramName = parameter.getName();

-                String paramValue = parameter.getValue();

-            %>

-            <portlet:param name="<%= paramName %>" value="<%= paramValue %>"/>

-          </c:forEach>

-        </portlet:actionURL>

-        <a href="<%= url %>">

-          <img src="<%= renderResponse.encodeURL(renderRequest.getContextPath() + "/images/previous.png") %>"

-               border="0">

-        </a>

-        

-        <%-- Return to Introduction ======================================= --%>

-        <portlet:actionURL secure="<%= renderRequest.isSecure() ? "True" : "False" %>"

-                           var="url">

-          <portlet:param name="testId" value="<%= null %>"/>

-        </portlet:actionURL>

-        <a href="<%= url %>">

-          <img src="<%= renderResponse.encodeURL(renderRequest.getContextPath() + "/images/return_index.png") %>"

-               border="0">

-        </a>

-        

-        <%-- Run Next Test ================================================ --%>

-        <portlet:actionURL secure="<%= renderRequest.isSecure() ? "True" : "False" %>"

-                           var="url">

-          <portlet:param name="previousTestId"

-                         value="<%= renderRequest.getParameter("testId") %>"/>

-          <c:forEach var="param" items="${nextTest.actionParameters}">

-            <%

-                TestConfig.Parameter parameter = (TestConfig.Parameter) pageContext.findAttribute("param");

-                String paramName = parameter.getName();

-                String paramValue = parameter.getValue();

-            %>

-            <portlet:param name="<%= paramName %>" value="<%= paramValue %>"/>

-          </c:forEach>

-        </portlet:actionURL>

-        <a href="<%= url %>">

-          <img src="<%= renderResponse.encodeURL(renderRequest.getContextPath() + "/images/next.png") %>"

-               border="0">

-        </a>

-        

-      </td>

-    </tr>

-  </table>

-</center>

-

-

-

diff --git a/trunk/pluto-testsuite/src/main/webapp/jsp/portlet_mode_test.jsp b/trunk/pluto-testsuite/src/main/webapp/jsp/portlet_mode_test.jsp
deleted file mode 100644
index 75b83d5..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/jsp/portlet_mode_test.jsp
+++ /dev/null
@@ -1,56 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-<%@ page import="javax.portlet.PortletMode"%>

-<%@ taglib uri='http://java.sun.com/portlet' prefix='portlet'%>

-

-<portlet:defineObjects/>

-

-<TABLE style="font-size: -1">

-<TR><TH colspan="2" style="background-color:blue;color:white;">MANUAL TEST</TH></TR>

-<TR><TH></TH>

-    <TH>Portlet Mode Test</TH></TR>

-<TR><TD colspan="2">This test requires manual intervention

-        to ensure that it passes.  Click on the links below

-        and make sure that the specified mode is displayed.</TD></TR>

-

-<portlet:actionURL portletMode="<%=PortletMode.HELP.toString()%>" secure="<%=renderRequest.isSecure()?"True":"False"%>" var="url">

-	<portlet:param name="testId" value="<%=renderRequest.getParameter("testId")%>"/>

-</portlet:actionURL>

-

-<TR><TD style="font-size: 12px" valign="top"><A href="<%=url%>">Help</A></TD>

-    <TD style="font-size: 10px;">The help mode provides help info.  Click to ensure that help info is

-        displayed.</TD></TR>

-

-<portlet:actionURL portletMode="<%=PortletMode.EDIT.toString()%>" secure="<%=renderRequest.isSecure()?"True":"False"%>" var="url">

-	<portlet:param name="testId" value="<%=renderRequest.getParameter("testId")%>"/>

-</portlet:actionURL>

-

-<TR><TD style="font-size: 12px" valign="top"><A href="<%=url%>">Edit</A></TD>

-    <TD style="font-size: 10px;">The edit mode allows you to edit preferences. Click to view all preferences

-    currently stored in this portlet.</TD></TR>

-

-<portlet:actionURL portletMode="<%=PortletMode.VIEW.toString()%>" secure="<%=renderRequest.isSecure()?"True":"False"%>" var="url">

-	<portlet:param name="testId" value="<%=renderRequest.getParameter("testId")%>"/>

-</portlet:actionURL>

-

-<TR><TD style="font-size: 12px"><A href="<%=url%>">View</A></TD>

-    <TD style="font-size: 10px;" valign="top">You are currently looking at the view.  Verify that clicking on this link

-    simply refreshes this page.</TD></TR>

-

-</TABLE>

-

-<%@ include file="navigation.inc" %>
\ No newline at end of file
diff --git a/trunk/pluto-testsuite/src/main/webapp/jsp/test4.jsp b/trunk/pluto-testsuite/src/main/webapp/jsp/test4.jsp
deleted file mode 100644
index 95ec6e4..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/jsp/test4.jsp
+++ /dev/null
@@ -1,82 +0,0 @@
-<!-- 

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at 

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

--->

-<%@ page session="false" %>

-<%@ taglib uri='http://java.sun.com/portlet' prefix='portlet'%>

-<%@ page import="javax.portlet.*"%>

-<%@ page import="java.util.*"%>

-<portlet:defineObjects/>

-<%

-String baseNS = renderResponse.getNamespace();

-PortletSession ps = renderRequest.getPortletSession();

-%>

-

-<I>This portlet is testing basic functions...</I>

-<P>

-<FONT SIZE="-1">

-<B>Testing Portlet Actions...</B><BR>

-<%

-PortletURL url = renderResponse.createActionURL();

-url.setParameter("checkAction","action1");

-url.setSecure(renderRequest.isSecure());

-%>

-click <A HREF="<%=url.toString()%>">here</A> to invoke the first portlet action.<BR>

-<%

-if ("action1".equals(ps.getAttribute("checkAction", PortletSession.PORTLET_SCOPE)))

-{

-    out.print("Result: ");

-    out.print("<b>passed</b>");

-}

-%>

-<P>

-<B>Testing RenderParameters with Portlet Actions...</B><BR>

-<%

-PortletURL url1 = renderResponse.createActionURL();

-url1.setParameter("checkActionRender","step1");

-url1.setParameter("jspNameTransfer","test4.jsp");

-url.setSecure(renderRequest.isSecure());

-%>

-click <A HREF="<%=url1.toString()%>">here</A> for step 1.<BR>

-<%

-if ("step2".equals(renderRequest.getParameter("checkActionRender2")))

-{

-    PortletURL url2 = renderResponse.createRenderURL();

-    url2.setParameter("checkActionRender2","step2");

-    url2.setParameter("checkActionRender3","step3");

-    url2.setParameter("jspName","test4.jsp");

-    url2.setSecure(renderRequest.isSecure());

-%>

-click <A HREF="<%=url2.toString()%>">here</A> for step 2.<BR>

-<%

-}

-if (("step3".equals(renderRequest.getParameter("checkActionRender3"))) &&

-    ("step2".equals(renderRequest.getParameter("checkActionRender2"))))

-{

-    out.print("Result: ");

-    out.print("<b>passed</b>");

-}

-%>

-

-<%

-url = renderResponse.createRenderURL();

-url.setParameter("jspName","test5.jsp");

-url.setSecure(renderRequest.isSecure());

-%>

-<FORM METHOD="POST" ACTION="<%=url.toString()%>">

-<INPUT value="Next >>" TYPE="submit">

-</FORM>

-</FONT>

-

diff --git a/trunk/pluto-testsuite/src/main/webapp/jsp/test_results.inc b/trunk/pluto-testsuite/src/main/webapp/jsp/test_results.inc
deleted file mode 100644
index bda9ba7..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/jsp/test_results.inc
+++ /dev/null
@@ -1,136 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-

-<%@ page import="org.apache.pluto.testsuite.TestResult" %>

-

-<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

-<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>

-

-<%

-    pageContext.setAttribute("PASSED_CODE", new Integer(TestResult.PASSED));

-    pageContext.setAttribute("FAILED_CODE", new Integer(TestResult.FAILED));

-    pageContext.setAttribute("WARNING_CODE", new Integer(TestResult.WARNING));

-%>

-

-<portlet:defineObjects/>

-

-<table>

-  <c:choose>

-    <c:when test="${results == null}">

-      <tr>

-        <th colspan="2" style="background-color:red; color:white;">

-          TEST RESULT NOT FOUND

-        </th>

-      </tr>

-      <tr>

-        <td valign="top">

-          <img src="<%= renderResponse.encodeURL(renderRequest.getContextPath() + "/images/question.gif") %>"

-               border="0" />

-        </td>

-        <td>

-          <p>

-            The test results could not be found in the request scope. If this

-            is an ActionTest (test logic resides in the processAction() method),

-            one possible reason may be that the original portlet session where

-            the test results reside was invalidated by another portlet.

-          </p>

-          <p>

-            Please return to the introduction page and retry.

-          </p>

-        </td>

-      </tr>

-    </c:when>

-    <c:when test="${results.failed}">

-      <tr>

-        <th colspan="2" style="background-color:red; color:white;">

-          TEST FAILED

-        </th>

-      </tr>

-    </c:when>

-    <c:when test="${results.inQuestion}">

-      <tr>

-        <th colspan="2" style="background-color:yellow;">

-          WARNING

-        </th>

-      </tr>

-    </c:when>

-    <c:otherwise>

-      <tr>

-        <th colspan="2" style="background-color:green; color:white;">

-          TEST PASSED

-        </th>

-      </tr>

-    </c:otherwise>

-  </c:choose>

-  

-  <tr>

-    <th />

-    <th><c:out value="${results.name}"/></th>

-  </tr>

-  

-  <c:forEach var="result" varStatus="status" items="${results.collection}">

-    <tr>

-      

-      <!-- Result Icon ===================================================== -->

-      <td valign="top">

-        <c:choose>

-          <c:when test="${result.returnCode == PASSED_CODE}">

-            <img src="<%= renderResponse.encodeURL(renderRequest.getContextPath() + "/images/yes.gif") %>"

-                 border="0" />

-          </c:when>

-          <c:when test="${result.returnCode == FAILED_CODE}">

-            <img src="<%= renderResponse.encodeURL(renderRequest.getContextPath() + "/images/no.gif") %>"

-                 border="0" />

-          </c:when>

-          <c:otherwise>

-            <img src="<%= renderResponse.encodeURL(renderRequest.getContextPath() + "/images/question.gif") %>"

-                 border="0" />

-          </c:otherwise>

-        </c:choose>

-      </td>

-      

-      <td style="white-space:nowrap;">

-        PLT <c:out value="${result.specPLT}"/> - <c:out value="${result.name}"/>

-      </td>

-    </tr>

-    

-    <c:choose>

-      <c:when test="${result.returnCode == PASSED_CODE}">

-        <tr>

-          <td />

-          <td style="font-size:smaller;">

-            <c:out value="${result.description}"/>

-          </td>

-        </tr>

-      </c:when>

-      <c:otherwise>

-        <tr>

-          <td />

-          <td style="font-size:smaller;">

-            <c:out value="${result.description}"/>

-            <br/>

-            <span style="color:#FF0000;">

-              <c:out value="${result.resultMessage}"/>

-            </span>

-          </td>

-        </tr>

-      </c:otherwise>

-    </c:choose>

-  </c:forEach>

-  

-</table>

-

diff --git a/trunk/pluto-testsuite/src/main/webapp/jsp/test_results.jsp b/trunk/pluto-testsuite/src/main/webapp/jsp/test_results.jsp
deleted file mode 100644
index 67a1416..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/jsp/test_results.jsp
+++ /dev/null
@@ -1,24 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-

-<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>

-

-<portlet:defineObjects/>

-

-<%@ include file="test_results.inc" %>

-<%@ include file="navigation.inc" %>

-

diff --git a/trunk/pluto-testsuite/src/main/webapp/jsp/window_state_test.jsp b/trunk/pluto-testsuite/src/main/webapp/jsp/window_state_test.jsp
deleted file mode 100644
index fc7d1d8..0000000
--- a/trunk/pluto-testsuite/src/main/webapp/jsp/window_state_test.jsp
+++ /dev/null
@@ -1,56 +0,0 @@
-<%--

-Copyright 2004 The Apache Software Foundation

-Licensed  under the  Apache License,  Version 2.0  (the "License");

-you may not use  this file  except in  compliance with the License.

-You may obtain a copy of the License at

-

-http://www.apache.org/licenses/LICENSE-2.0

-

-Unless required by applicable law or agreed to in writing, software

-distributed  under the  License is distributed on an "AS IS" BASIS,

-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or

-implied.

-

-See the License for the specific language governing permissions and

-limitations under the License.

---%>

-<%@ page import="javax.portlet.WindowState"%>

-<%@ taglib uri='http://java.sun.com/portlet' prefix='portlet'%>

-

-<portlet:defineObjects/>

-

-<TABLE style="font-size: -1">

-<TR><TH colspan="2" style="background-color:blue;color:white;">MANUAL TEST</TH></TR>

-<TR><TH></TH>

-    <TH>Window State Test</TH></TR>

-<TR><TD colspan="2">This test requires manual intervention

-        to ensure that it passes.  Click on the links below

-        and make sure that the specified state is displayed.</TD></TR>

-

-<portlet:actionURL windowState="<%=WindowState.MAXIMIZED.toString()%>" secure="<%=renderRequest.isSecure()?"True":"False"%>" var="url">

-	<portlet:param name="testId" value="<%=renderRequest.getParameter("testId")%>"/>

-</portlet:actionURL>

-

-<TR><TD style="font-size: 12px" valign="top"><A href="<%=url%>">Max</A></TD>

-    <TD style="font-size: 10px;">The help mode provides help info.  Click to ensure that help info is

-        displayed.</TD></TR>

-

-<portlet:actionURL windowState="<%=WindowState.MINIMIZED.toString()%>" secure="<%=renderRequest.isSecure()?"True":"False"%>" var="url">

-	<portlet:param name="testId" value="<%=renderRequest.getParameter("testId")%>"/>

-</portlet:actionURL>

-

-<TR><TD style="font-size: 12px" valign="top"><A href="<%=url%>">Min</A></TD>

-    <TD style="font-size: 10px;">The edit mode allows you to edit preferences. Click to view all preferences

-    currently stored in this portlet.</TD></TR>

-

-<portlet:actionURL windowState="<%=WindowState.NORMAL.toString()%>" secure="<%=renderRequest.isSecure()?"True":"False"%>" var="url">

-	<portlet:param name="testId" value="<%=renderRequest.getParameter("testId")%>"/>

-</portlet:actionURL>

-

-<TR><TD style="font-size: 12px" valign="top"><A href="<%=url%>">Nor</A></TD>

-    <TD style="font-size: 10px;">You are currently looking at the view.  Verify that clicking on this link

-    simply refreshes this page.</TD></TR>

-

-</TABLE>

-

-<%@ include file="navigation.inc" %>

diff --git a/trunk/pluto-util/pom.xml b/trunk/pluto-util/pom.xml
deleted file mode 100644
index 0a4ba00..0000000
--- a/trunk/pluto-util/pom.xml
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<project xmlns="http://maven.apache.org/POM/4.0.0"

-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

-  

-  <parent>

-    <artifactId>pluto</artifactId>

-    <groupId>org.apache.pluto</groupId>

-    <version>1.1.0-SNAPSHOT</version>

-  </parent>

-  <modelVersion>4.0.0</modelVersion>

-  <artifactId>pluto-util</artifactId>

-  <name>Pluto Utilities</name>

-

-  <!-- The dependencies for the ApplicationServerHook project

-       are those which need to be installed!

-  -->

-  <dependencies>

-    

-    <dependency>

-      <groupId>org.apache.pluto</groupId>

-      <artifactId>pluto-descriptor-api</artifactId>

-      <version>${pom.version}</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.apache.pluto</groupId>

-      <artifactId>pluto-descriptor-impl</artifactId>

-      <version>${pom.version}</version>

-      <scope>compile</scope>

-    </dependency>

-    

-    <dependency>

-      <groupId>commons-cli</groupId>

-      <artifactId>commons-cli</artifactId>

-      <version>${commons-cli.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>commons-httpclient</groupId>

-      <artifactId>commons-httpclient</artifactId>

-      <version>${commons-httpclient.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>commons-digester</groupId>

-      <artifactId>commons-digester</artifactId>

-      <version>${commons-digester.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>commons-beanutils</groupId>

-      <artifactId>commons-beanutils</artifactId>

-      <version>${commons-beanutils.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>commons-logging</groupId>

-      <artifactId>commons-logging</artifactId>

-      <version>${commons-logging.version}</version>

-    </dependency>

-    <dependency>

-      <groupId>commons-io</groupId>

-      <artifactId>commons-io</artifactId>

-      <version>${commons-io.version}</version>

-    </dependency>

-         <dependency>

-            <groupId>commons-fileupload</groupId>

-            <artifactId>commons-fileupload</artifactId>

-            <version>${commons-fileupload.version}</version>

-      		<scope>compile</scope>

-        </dependency>

-    <dependency>

-      <groupId>javax.portlet</groupId>

-      <artifactId>portlet-api</artifactId>

-      <version>${portlet-api.version}</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>javax.servlet</groupId>

-      <artifactId>servlet-api</artifactId>

-      <version>${servlet-api.version}</version>

-      <scope>compile</scope>

-    </dependency>

-

-    

-  </dependencies>

-

-  <distributionManagement>

-    <site>

-      <id>website</id>

-      <url>scp://minotaur.apache.org/www/portals.apache.org/pluto/pluto-1.1</url>

-    </site>

-  </distributionManagement>

-  

-  <reporting>

-    <plugins>

-      <plugin>

-        <groupId>org.apache.maven.plugins</groupId>

-        <artifactId>maven-project-info-reports-plugin</artifactId>

-      </plugin>

-      <plugin>

-        <artifactId>maven-site-plugin</artifactId>

-        <configuration>

-          <resourcesDirectory>${basedir}/../pluto-site/src/site/resources</resourcesDirectory>

-        </configuration>

-      </plugin>

-    </plugins>

-  </reporting>

-  

-</project>

-

-

-

-

-

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/UtilityException.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/UtilityException.java
deleted file mode 100644
index 24b97dc..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/UtilityException.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util;

-

-import java.io.File;

-

-

-/**

- * Exception thrown if an error occurs while managing

- * a portal instance.

- */

-public class UtilityException extends Exception {

-

-    private File installDir;

-

-    public UtilityException() {

-    }

-

-    public UtilityException(String message) {

-        super(message);

-    }

-

-    public UtilityException(String message, Throwable cause) {

-        super(message, cause);

-    }

-

-    public UtilityException(Throwable cause) {

-        super(cause);

-    }

-

-    public UtilityException(String message, Throwable cause, File installDir) {

-        super(message, cause);

-        this.installDir = installDir;

-    }

-

-    public File getInstallDir() {

-        return installDir;

-    }

-

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/Assembler.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/Assembler.java
deleted file mode 100644
index 1b197dc..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/Assembler.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.assemble;

-

-import org.apache.pluto.util.UtilityException;

-

-/**

- * The pluto assembler is used to assemble a portlet application which is

- * deployable to pluto.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since Oct 15, 2004

- */

-public interface Assembler {

-

-    public static final String PORTLET_XML = "WEB-INF/portlet.xml";

-

-    public static final String SERVLET_XML = "WEB-INF/web.xml";

-    

-    public static final String DISPATCH_SERVLET_CLASS =

-        	"org.apache.pluto.core.PortletServlet";

-

-    /**

-     * Assemble a web applicaiton into a portlet web application which is

-     * deployable into the pluto-1.1 portlet container. The specified web

-     * application will be overwritten with the new application.

-     */

-    public void assemble(AssemblerConfig config) throws UtilityException;

-

-}

-

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/AssemblerConfig.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/AssemblerConfig.java
deleted file mode 100644
index cacfb4c..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/AssemblerConfig.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.assemble;

-

-import java.io.File;

-

-/**

- * The pluto assembler configuration.

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- */

-public class AssemblerConfig {

-	

-	// Private Member Variables ------------------------------------------------

-	

-	/** The portlet app descriptor, which is usually WEB-INF/portlet.xml. */

-    private File portletDescriptor = null;

-    

-    /** The webapp descriptor, which is usually WEB-INF/web.xml. */

-    private File webappDescriptor = null;

-    

-    /** The assemble destination, which points to the assembled WAR file. */

-    private File destination = null;

-    

-    

-    // Public Methods ----------------------------------------------------------

-    

-    public File getPortletDescriptor() {

-        return portletDescriptor;

-    }

-    

-    public void setPortletDescriptor(File portletDescriptor) {

-        this.portletDescriptor = portletDescriptor;

-    }

-    

-    public File getWebappDescriptor() {

-        return webappDescriptor;

-    }

-    

-    public void setWebappDescriptor(File webappDescriptor) {

-        this.webappDescriptor = webappDescriptor;

-    }

-    

-    public File getDestination() {

-        return destination;

-    }

-    

-    public void setDestination(File destination) {

-        this.destination = destination;

-        this.destination.getParentFile().mkdirs();

-    }

-    

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/AssemblerFactory.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/AssemblerFactory.java
deleted file mode 100644
index a5af990..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/AssemblerFactory.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.assemble;

-

-import org.apache.pluto.util.assemble.file.FileAssembler;

-

-/**

- * The pluto assembler factory that creates an assembler. 

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- * @since Nov 8, 2004

- */

-public class AssemblerFactory {

-	

-	/** The singleton factory instance. */

-    private static final AssemblerFactory FACTORY = new AssemblerFactory();

-    

-    /**

-     * Private constructor that prevents external instantiation.

-     */

-    private AssemblerFactory() {

-    	// Do nothing.

-    }

-    

-    /**

-     * Returns the singleton factory instance.

-     * @return the singleton factory instance.

-     */

-    public static AssemblerFactory getFactory() {

-        return FACTORY;

-    }

-    

-    

-    // Public Methods ----------------------------------------------------------

-    

-    /**

-     * Creates an assembler to assemble a portlet app WAR file to a web app WAR

-     * file deployable to pluto.

-     * @param config  the assembler configuration.

-     * @return an assembler instance.

-     */

-    public Assembler createAssembler(AssemblerConfig config) {

-    	return new FileAssembler();

-    }

-    

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/ReassemblerConfig.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/ReassemblerConfig.java
deleted file mode 100644
index 245540e..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/ReassemblerConfig.java
+++ /dev/null
@@ -1,133 +0,0 @@
-package org.apache.pluto.util.assemble;

-

-import java.io.File;

-

-/**

- * Holds configuration for a <code>Reassembler</code>.

- *

- * @author <a href="cdoremus@apache.org">Craig Doremus</a>

- *

- */

-public class ReassemblerConfig {

-	

-	/**

-	 * Full path to the war file before unassembly.

-	 */

-	private File warFilePath = null;

-

-	/**

-	 * War file name

-	 */

-	private String strWarFileName = null;

-

-	/**

-	 * Root of the war file name without the .war

-	 */

-	private String strRootWarFileName = null;

-	

-	/**

-	 * Root directory where file will unassemble war file.

-	 */

-	private File rootUnassemblyDir = null;

-	

-	/**

-	 * Directory to unassemble war file.

-	 */

-	private File unassemblyDir = null;

-	

-	/**

-	 * The destination of the reassembled war.

-	 */

-	private File warDestination = null;

-	

-	/**

-	 * List of files in the archive

-	 */

-	private String[] fileList = null;

-	

-	/**

-	 * @return the warFilePath

-	 */

-	public File getWarFilePath() {

-		return warFilePath;

-	}

-

-	/**

-	 * @param warFilePath the warFilePath to set

-	 */

-	public void setWarFilePath(File warFilePath) {

-		this.warFilePath = warFilePath;

-	   String strWarFilePath = warFilePath.getAbsolutePath();

-	   //parse out the war file name

-       int index = strWarFilePath.lastIndexOf(File.separator);

-       //get file name

-       if (strWarFilePath == null) {

-    	   throw new IllegalArgumentException("War file path has not been set.");

-       }

-       if (strWarFileName == null) {

-		   strWarFileName = strWarFilePath.substring(index + 1);

-		     System.out.println("FileName: " + strWarFileName);

-	       //Get root of file name (minus extension)

-	       strRootWarFileName = strWarFileName.substring(0, strWarFileName.lastIndexOf("."));

-       }

-     System.out.println("rootFileName: " + strRootWarFileName);

-	}

-

-//	public void setUnassemblyDir(File dir){

-//		unassemblyDir = dir;

-//	}

-	

-	public File getUnassemblyDir(){

-		if (rootUnassemblyDir == null) {

-	    	   throw new IllegalArgumentException("Parent directory to unassemble the war files so their web.xml file can be updated has not been set.");			

-		}

-		if (unassemblyDir == null) {

-			unassemblyDir = new File(rootUnassemblyDir, strRootWarFileName); 

-		}

-		return unassemblyDir;

-	}

-

-	/**

-	 * @return the fileList

-	 */

-	public String[] getFileList() {

-		return fileList;

-	}

-

-	/**

-	 * @param fileList the fileList to set

-	 */

-	public void setFileList(String[] fileList) {

-		this.fileList = fileList;

-	}

-

-	/**

-	 * @return the warDestination

-	 */

-	public File getWarDestination() {

-		return warDestination;

-	}

-

-	/**

-	 * @param warDestination the warDestination to set

-	 */

-	public void setWarDestination(File warDestination) {

-		this.warDestination = warDestination;

-	}

-

-	/**

-	 * @return the rootUnassemblyDir

-	 */

-	public File getRootUnassemblyDir() {

-		return rootUnassemblyDir;

-	}

-

-	/**

-	 * @param rootUnassemblyDir the rootUnassemblyDir to set

-	 */

-	public void setRootUnassemblyDir(File rootUnassemblyDir) {

-		this.rootUnassemblyDir = rootUnassemblyDir;

-	}

-	

-

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/WarReassembler.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/WarReassembler.java
deleted file mode 100644
index b382317..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/WarReassembler.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.apache.pluto.util.assemble;

-

-import java.io.File;

-

-import org.apache.pluto.util.UtilityException;

-

-/**

- * <code>Assembler</code> that reassembles an existing

- * war file by, decompressing it, updating the web.xml file via

- * the <code>Assembler</code> and rebuilding the war. 

- *

- * @author <a href="cdoremus@apache.org">Craig Doremus</a>

- *

- */

-public interface WarReassembler extends Assembler {

-	

-	public File reassemble(ReassemblerConfig config) throws UtilityException;

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/file/FileAssembler.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/file/FileAssembler.java
deleted file mode 100644
index c3a97cf..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/file/FileAssembler.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.assemble.file;

-

-import org.apache.pluto.util.assemble.Assembler;

-import org.apache.pluto.util.assemble.AssemblerConfig;

-import org.apache.pluto.util.UtilityException;

-import org.apache.pluto.descriptors.portlet.PortletAppDD;

-import org.apache.pluto.descriptors.portlet.PortletDD;

-import org.apache.pluto.descriptors.services.PortletAppDescriptorService;

-import org.apache.pluto.descriptors.services.castor.EntityResolverImpl;

-import org.apache.pluto.descriptors.services.castor.PortletAppDescriptorServiceImpl;

-import org.w3c.dom.Document;

-import org.w3c.dom.Element;

-import org.w3c.dom.Node;

-import org.w3c.dom.NodeList;

-import org.xml.sax.SAXException;

-

-import javax.xml.parsers.DocumentBuilder;

-import javax.xml.parsers.DocumentBuilderFactory;

-import javax.xml.parsers.ParserConfigurationException;

-import javax.xml.transform.*;

-import javax.xml.transform.dom.DOMSource;

-import javax.xml.transform.stream.StreamResult;

-import java.io.IOException;

-import java.io.InputStream;

-import java.io.OutputStream;

-import java.io.FileInputStream;

-import java.io.FileOutputStream;

-import java.util.*;

-

-/**

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since Nov 8, 2004

- */

-public class FileAssembler implements Assembler {

-	

-	/** The XML output properties. */

-    private static final Properties PROPERTIES = new Properties();

-    

-    /** Element tagnames that may appear before servlet elements. */

-    private static final Collection BEFORE_SERVLET_DEF = new ArrayList();

-    

-    /** Element tagnames that may appear before servlet-mapping elements. */

-    private static final Collection BEFORE_MAPPING_DEF = new ArrayList();

-

-    static {

-    	// Initialize xml output properties.

-        PROPERTIES.setProperty(OutputKeys.INDENT, "yes");

-        

-        // Initialize BEFORE_SERVLET_DEF collection.

-        BEFORE_SERVLET_DEF.add("icon");

-        BEFORE_SERVLET_DEF.add("display-name");

-        BEFORE_SERVLET_DEF.add("description");

-        BEFORE_SERVLET_DEF.add("distributable");

-        BEFORE_SERVLET_DEF.add("context-param");

-        BEFORE_SERVLET_DEF.add("filter");

-        BEFORE_SERVLET_DEF.add("filter-mapping");

-        BEFORE_SERVLET_DEF.add("listener");

-        

-        // initialize BEFORE_MAPPING_DEF collection.

-        BEFORE_MAPPING_DEF.addAll(BEFORE_SERVLET_DEF);

-        BEFORE_MAPPING_DEF.add("servlet");

-    }

-    

-    // Constructor -------------------------------------------------------------

-    

-    /**

-     * Default no-arg constructor.

-     */

-    public FileAssembler() {

-    	// Do nothing.

-    }

-    

-    

-    // Assembler Impl ----------------------------------------------------------

-    

-    public void assemble(AssemblerConfig config) throws UtilityException {

-        try {

-            InputStream webXmlIn = new FileInputStream(

-            		config.getWebappDescriptor());

-            InputStream portletXmlIn = new FileInputStream(

-            		config.getPortletDescriptor());

-            Document xmlDoc = updateWebappDescriptor(webXmlIn, portletXmlIn);

-            webXmlIn.close();

-            FileOutputStream webXmlOut = new FileOutputStream(

-            		config.getDestination());

-            save(xmlDoc, webXmlOut);

-        } catch (IOException ex) {

-            throw new UtilityException(ex.getMessage(), ex, null);

-        }

-    }

-    

-    

-    // Protected Methods -------------------------------------------------------

-    

-    /**

-     * Saves the XML document to the specified output stream.

-     * @param xmlDoc  the XML document.

-     * @param out  the output stream.

-     * @throws IOException  if an error occurs.

-     */

-    protected void save(Document xmlDoc, OutputStream out)

-    throws IOException {

-        try {

-            TransformerFactory factory = TransformerFactory.newInstance();

-            Transformer transformer = factory.newTransformer();

-            transformer.setOutputProperties(PROPERTIES);

-            transformer.transform(new DOMSource(xmlDoc),

-                                  new StreamResult(out));

-        } catch (TransformerConfigurationException ex) {

-            ex.printStackTrace();

-            throw new IOException(ex.getMessage());

-        } catch (TransformerException ex) {

-            ex.printStackTrace();

-            throw new IOException(ex.getMessage());

-        } finally {

-            out.flush();

-            out.close();

-        }

-    }

-

-

-    /**

-     * Updates the webapp descriptor by injecting portlet wrapper servlet

-     * definitions and mappings.

-     * 

-     * TODO: currently we rely specifically on the castor implementation.

-     * 

-     * @param webXmlIn  input stream to the webapp descriptor.

-     * @param portletXmlIn  input stream to the portlet app descriptor.

-     * @return the updated webapp descriptor XML document.

-     * @throws IOException

-     */

-    protected Document updateWebappDescriptor(InputStream webXmlIn,

-                                              InputStream portletXmlIn)

-    throws IOException {

-    	

-        Document webXmlDoc = parse(webXmlIn);

-        Collection servletElements = new ArrayList();

-        Collection mappingElements = new ArrayList();

-

-        PortletAppDescriptorService portletAppDescriptorService =

-            	new PortletAppDescriptorServiceImpl();

-        PortletAppDD portletAppDD = portletAppDescriptorService.read(portletXmlIn);

-        

-        for (Iterator it = portletAppDD.getPortlets().iterator();

-        		it.hasNext(); ) {

-            

-        	// Read portlet definition.

-        	PortletDD portlet = (PortletDD) it.next();

-            String name = portlet.getPortletName();

-            

-            // Create servlet definition element.

-            Element servlet = webXmlDoc.createElement("servlet");

-            Element servletName = webXmlDoc.createElement("servlet-name");

-            servletName.appendChild(webXmlDoc.createTextNode(name));

-            servlet.appendChild(servletName);

-            

-            Element servletClass = webXmlDoc.createElement("servlet-class");

-            servletClass.appendChild(webXmlDoc.createTextNode(DISPATCH_SERVLET_CLASS));

-            servlet.appendChild(servletClass);

-            

-            Element initParam = webXmlDoc.createElement("init-param");

-            Element paramName = webXmlDoc.createElement("param-name");

-            paramName.appendChild(webXmlDoc.createTextNode("portlet-name"));

-            

-            Element paramValue = webXmlDoc.createElement("param-value");

-            paramValue.appendChild(webXmlDoc.createTextNode(name));

-            

-            initParam.appendChild(paramName);

-            initParam.appendChild(paramValue);

-            servlet.appendChild(initParam);

-            

-            Element load = webXmlDoc.createElement("load-on-startup");

-            load.appendChild(webXmlDoc.createTextNode("1"));

-            servlet.appendChild(load);

-            

-            // Create servlet mapping element.

-            Element mapping = webXmlDoc.createElement("servlet-mapping");

-            servletName = webXmlDoc.createElement("servlet-name");

-            servletName.appendChild(webXmlDoc.createTextNode(name));

-            Element uri = webXmlDoc.createElement("url-pattern");

-            uri.appendChild(webXmlDoc.createTextNode("/PlutoInvoker/"+name));

-            mapping.appendChild(servletName);

-            mapping.appendChild(uri);

-            

-            // Save servlet definition and servlet mapping.

-            servletElements.add(servlet);

-            mappingElements.add(mapping);

-        }

-

-        Element webAppNode = webXmlDoc.getDocumentElement();

-        NodeList nodes = webAppNode.getChildNodes();

-        

-        // Find the first node that shouldn't be before the servlet and start

-        // appending. This is kind of ugly, but the hack works for now!

-        for (int i = 0; i < nodes.getLength(); i++) {

-            Node node = nodes.item(i);

-            if (node.getNodeType() == Node.ELEMENT_NODE) {

-                

-            	if (!BEFORE_SERVLET_DEF.contains(node.getNodeName())) {

-                	for (Iterator it = servletElements.iterator();

-                			it.hasNext(); ) {

-                        Node servlet = (Node) it.next();

-                        webAppNode.insertBefore(servlet, node);

-                        it.remove();

-                    }

-                }

-                

-                if(!BEFORE_MAPPING_DEF.contains(node.getNodeName())) {

-                	for (Iterator it = mappingElements.iterator();

-                			it.hasNext(); ) {

-                        Node mapping = (Node) it.next();

-                        webAppNode.insertBefore(mapping, node);

-                        it.remove();

-                    }

-                }

-            }

-        }

-

-        // Now, in case there are not any nodes after the servlet def!

-        for (Iterator it = servletElements.iterator(); it.hasNext(); ) {

-            webAppNode.appendChild((Node)it.next());

-        }

-        for (Iterator it = mappingElements.iterator(); it.hasNext(); ) {

-            webAppNode.appendChild((Node)it.next());

-        }

-        

-        // Return the updated web.xml document.

-        return webXmlDoc;

-    }

-    

-    /**

-     * Parses an input stream of an XML file to an XML document.

-     * @param xmlIn  the input stream of an XML file.

-     * @return the XML document.

-     * @throws IOException  if an error occurs.

-     */

-    private Document parse(InputStream xmlIn) throws IOException {

-        Document xmlDoc = null;

-        try {

-            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();

-            DocumentBuilder builder = factory.newDocumentBuilder();

-            builder.setEntityResolver(new EntityResolverImpl());

-            xmlDoc = builder.parse(xmlIn);

-        } catch (ParserConfigurationException ex) {

-            throw new IOException(ex.getMessage());

-        } catch (SAXException ex) {

-            throw new IOException(ex.getMessage());

-        }

-        return xmlDoc;

-    }

-    

-}

-

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/file/WarFileReassembler.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/file/WarFileReassembler.java
deleted file mode 100644
index 0786a5e..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/file/WarFileReassembler.java
+++ /dev/null
@@ -1,349 +0,0 @@
-package org.apache.pluto.util.assemble.file;

-

-import java.io.BufferedInputStream;

-import java.io.File;

-import java.io.FileInputStream;

-import java.io.FileNotFoundException;

-import java.io.FileOutputStream;

-import java.io.IOException;

-import java.io.InputStream;

-import java.util.ArrayList;

-import java.util.Enumeration;

-import java.util.List;

-import java.util.zip.Deflater;

-import java.util.zip.ZipEntry;

-import java.util.zip.ZipFile;

-import java.util.zip.ZipOutputStream;

-

-import org.apache.commons.io.FileUtils;

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.descriptors.portlet.PortletAppDD;

-import org.apache.pluto.descriptors.services.castor.PortletAppDescriptorServiceImpl;

-import org.apache.pluto.util.UtilityException;

-import org.apache.pluto.util.assemble.AssemblerConfig;

-import org.apache.pluto.util.assemble.ReassemblerConfig;

-import org.apache.pluto.util.assemble.WarReassembler;

-

-/**

- * This implementation of <code>WarReassemler</code> rebuilds an existing war 

- * file with an updated web.xml file so it can be deployed to Pluto.

- * 

- * This file would be called after an <code>FileUploader</code> has uploaded

- * a file to a directory that is the argument for the reassemble() method.

- *

- * @author <a href="cdoremus@apache.org">Craig Doremus</a>

- *

- */

-public class WarFileReassembler extends FileAssembler implements WarReassembler {

-	private static final Log LOG = LogFactory.getLog(WarFileReassembler.class);

-	private static final int BUFFER = 256;

-	

-	/**

-	 *  Does the reassembly by decompressing the war, assembling the new web.xml file, 

-	 *  and rebuilding the war.

-	 *   

-	 * @see org.apache.pluto.driver.services.portal.admin.services.ReassembleWarAdminService#reassemble(java.lang.String)

-	 */

-	public File reassemble(ReassemblerConfig config) throws UtilityException {

-		List portlets = null;

-		ReassemblerConfig config2 = null;

-		File newWar = null;

-		try {

-			//first, unzip war, returning a new config with file list and unassembly dir added

-			config2 = decompressWar(config);

-			//second, update web.xml using Assembler, checking for portlet.xml and web.xml before it does so

-			// returning a list of portlets from portlet.xml

-			portlets = updateWebXml(config2);

-			//third, create new war

-			newWar = createNewWar(config2);

-		} finally {

-			//cleanup

-//			File dir = config2.getUnassemblyDir();

-//			if (dir != null && dir.exists()) {

-//				LOG.debug("Deleting dir: " + dir);

-//				try {

-//					FileUtils.forceDelete(dir);

-//				} catch (IOException e) {

-//					String msg = "Problem deleting unzipped directory structure";

-//					UtilityException ue = new UtilityException(msg);

-//			    	ue.initCause(e);

-//			    	throw ue;

-//				}							

-//			}

-		}

-		return newWar;

-	}

-	

-	/**

-	 * Unzips a war file into the file system into a directory that

-	 * the parent directory plus a subdirectory that is the same

-	 * name as the file name (without its extension).

-	 *  

-	 * @param config Holds the path to the file to decompress.

-	 * @return

-	 */

-	ReassemblerConfig decompressWar(ReassemblerConfig config) throws UtilityException {

-//		ReassemblerConfig retConfig = config;

-		ArrayList fileList = new ArrayList();

-        BufferedInputStream is = null;

-        FileOutputStream fos = null;

-        ZipFile zipFile = null;

-		try

-	     {

-	       // Specify file to decompress

-		   File warFile = config.getWarFilePath();

-

-	       //get the unzipping directory

-	       File fUnzipDirectory = config.getUnassemblyDir();

-	       //create the directory if necessary

-	       if (!fUnzipDirectory.exists()) {

-	    	   fUnzipDirectory.mkdir();

-	       }

-

-	       if (LOG.isDebugEnabled()) {

-		       LOG.debug("Directory to unzip war for manipulating the web.xml : " + fUnzipDirectory.getAbsolutePath());	    	   

-	       }

-	       

-	       // Open Zip file for reading

-	       zipFile = new ZipFile(warFile, ZipFile.OPEN_READ);

-

-	       // Create an enumeration of the entries in the zip file

-	       Enumeration zipFileEntries = zipFile.entries();

-

-	       // Process each entry

-	       while (zipFileEntries.hasMoreElements())

-	       {

-	         //grab a war file entry

-	         ZipEntry entry = (ZipEntry) zipFileEntries.nextElement();

-

-	         String currentEntry = entry.getName();

-	         fileList.add(currentEntry);	        	 

-//	         System.out.println("Extracting: " + entry);

-

-	         //Create a file representing the destination of the unwared file

-	         File destDir =

-	           new File(fUnzipDirectory, currentEntry);

-

-	         //grab file's parent directory structure

-	         File destinationParent = destDir.getParentFile();

-

-	         //create the parent directory structure if needed

-	         destinationParent.mkdirs();

-

-	         //extract file from war if not a directory

-	         if (!entry.isDirectory())

-	         {

-//	        	 LOG.debug("Zip entry: " + entry.getName());

-	           is = new BufferedInputStream(zipFile.getInputStream(entry));

-	           // establish buffer for writing file into new location

-	           byte data[] = new byte[BUFFER];

-

-	           // read and write the current file to disk

-	           fos = new FileOutputStream(destDir);

-	           //read and write the file to disk until last byte is encountered

-	           synchronized (is) {

-		           synchronized (fos) {

-			           while (true){

-			        	 int bytesRead =  is.read(data);

-			        	 if (bytesRead == -1) {

-			        		 break;

-			        	 }

-			             fos.write(data, 0, bytesRead);

-			           }

-		           }

-	           }

-	         }

-	       }

-	     }

-	     catch (IOException e) {

-	    	 String msg = "Problem decompressing war";

-	    	 LOG.error(msg, e);

-	    	 UtilityException ue = new UtilityException(msg);

-	    	 ue.initCause(e);

-	 		throw ue;

-	     } finally {

-	    	 if (zipFile != null) {

-	    		 try {

-					zipFile.close();

-				} catch (IOException e) {

-					LOG.warn("Problem closing zip file output stream in decompressWar()", e);

-				}

-	    	 }

-	    	 if (fos != null) {

-	    		 try {

-					fos.flush();

-					fos.close();

-				} catch (IOException e) {

-					LOG.warn("Problem flushing/closing file output stream in decompressWar()", e);

-				}

-	    	 }

-	    	 if (is != null) {

-		           try {

-					is.close();

-				} catch (IOException e) {

-					LOG.warn("Problem closing input stream in decompressWar()", e);

-				}	    		 

-	    	 }

-	     }

-	     config.setFileList((String[])fileList.toArray(new String[fileList.size()]));

-	     return config;

-	   }		

-

-		/**

-		 * Uses the <code>assemble()</code> method to update the web.xml file.

-		 *

-		 */

-		List updateWebXml(ReassemblerConfig rconfig) throws UtilityException {

-			File fUnassembleDir = rconfig.getUnassemblyDir();

-			if (!fUnassembleDir.exists()) {

-				throw new UtilityException("The unzippling directory does not exist. Please check your configuration.");

-			}

-			String unassembledDir = fUnassembleDir.getAbsolutePath();

-			LOG.debug("Unassemble Dir in updateWebXml:" + unassembledDir);

-			File portletXmlFile = new File(unassembledDir + "/WEB-INF/portlet.xml");

-			//Check that portlet.xml and web.xml exists

-			if (!portletXmlFile.exists()) {

-				throw new UtilityException("The portlet.xml file does not exist in the archive.");

-			}

-			//get portlet list from portlet.xml

-			List portlets = getPortletList(portletXmlFile);

-			File webXmlFile = new File(unassembledDir + "/WEB-INF/web.xml");

-			if (!webXmlFile.exists()) {

-				throw new UtilityException("The web.xml file does not exist in the archive.");

-			}

-			//new file will replace the old one

-			File newWebXmlFile = new File(unassembledDir + "/WEB-INF/web.xml");

-			//Use assemble method to modify web.xml

-			//	and replace it in unzipped war

-            AssemblerConfig config = new AssemblerConfig();

-            config.setPortletDescriptor(portletXmlFile);

-            config.setWebappDescriptor(webXmlFile);

-            config.setDestination(newWebXmlFile);

-

-       	   assemble(config);

-       	   

-			return portlets;

-		}

-

-		/**

-		 * Creates the fully assembled new war file.

-		 * @param fileList

-		 * @param warFilePath

-		 */

-		File createNewWar(ReassemblerConfig config) throws UtilityException {

-

-		     byte[] buffer = new byte[BUFFER];

-		     //list of files in the war

-		     String[] fileList = config.getFileList();

-		     File file = config.getWarFilePath();

-		     String warName = file.getName();

-		     //there needs to be at least a web.xml, portlet.xml and portlet class file in the archive

-		     if (fileList.length < 3) {

-		    	 throw new UtilityException("There needs to be at least a web.xml, portlet.xml and portlet class file in the war file.");

-		     }

-		     File warFilePath = config.getWarDestination();

-		     File newWar = new File(warFilePath + File.separator + warName);

-		     if (LOG.isDebugEnabled()) {

-		    	 LOG.debug("Creating new war:" + newWar);

-		     }

-		     ZipOutputStream out = null;

-		     try {

-//		       out = new ZipOutputStream(new FileOutputStream(warFilePath));

-		       out = new ZipOutputStream(new FileOutputStream(newWar));

-		       // Set the compression ratio

-		       out.setLevel(Deflater.DEFAULT_COMPRESSION);

-

-		       // iterate through the array of files, adding each to the zip file

-		       for (int i = 0; i < fileList.length; i++) {

-		         System.out.println("File to add to new zip: " + fileList[i]);

-		         // Associate a file input stream for the current file

-		         String entryFilePath = config.getUnassemblyDir() + File.separator + fileList[i];

-		         // Create a file object for the entry

-		         File entryFile = new File(entryFilePath);

-		         LOG.debug("Path of file to add to new zip: " + entryFile.getAbsolutePath());

-//		         System.out.println("Does this file exist?: " + entryFile.exists());

-//		         System.out.println("Is this a file?: " + entryFile.isFile());

-		         if (entryFile.isFile()) {

-			         FileInputStream in = new FileInputStream(entryFile);

-	

-			         // Add ZIP entry to output stream.

-			         out.putNextEntry(new ZipEntry(fileList[i]));

-	

-			        int len;

-			        while ((len = in.read(buffer)) > 0) {

-			        	out.write(buffer, 0, len);

-			        }

-	

-			         // Close the current entry

-			         out.closeEntry();

-	

-			         // Close the current file input stream

-			         in.close();

-		         }

-		       }

-		     } catch (IllegalArgumentException e) {

-		    	 String msg = "Problem creating new war";

-		    	 LOG.error(msg, e);

-		    	 UtilityException ue = new UtilityException(msg);

-		    	 ue.initCause(e);

-		 		throw ue;

-		     } catch (FileNotFoundException e) {

-		    	 String msg = "Problem creating new war";

-		    	 LOG.error(msg, e);

-		    	 UtilityException ue = new UtilityException(msg);

-		    	 ue.initCause(e);

-		 		throw ue;

-		     } catch (IOException e) {

-		    	 String msg = "Problem creating new war";

-		    	 LOG.error(msg, e);

-		    	 UtilityException ue = new UtilityException(msg);

-		    	 ue.initCause(e);

-		 		throw ue;

-		     } finally {

-		       // Close the ZipOutPutStream

-		    	 if (out != null) {

-				       try {

-						out.close();

-					} catch (IOException e) {

-						LOG.warn("Problem closing output stream to write a new war", e);

-					}		    		 

-		    	 }

-		     }

-		     

-			return newWar;

-		}

-	

-		/**

-		 * File list of portlet names in portlet.xml.

-		 * 

-		 * @param portletXml The portlet.xml

-		 * @return A <code>List</code> of portlet names.

-		 */

-		List getPortletList(File portletXml) throws UtilityException {

-			List portlets = null;

-			//find portlets in portlet.xml

-			PortletAppDD dd = null;

-			try {

-				InputStream is = new FileInputStream(portletXml);

-				PortletAppDescriptorServiceImpl pappdesc = new PortletAppDescriptorServiceImpl();

-				dd = pappdesc.read(is);

-			} catch (FileNotFoundException e) {

-		    	 String msg = "File cannot be found creating portlet list";

-		    	 LOG.error(msg, e);

-		    	 UtilityException ue = new UtilityException(msg);

-		    	 ue.initCause(e);

-		    	 throw ue;

-			} catch (IOException e) {

-		    	 String msg = "I/O problem creating portlet list";

-		    	 LOG.error(msg, e);

-		    	 UtilityException ue = new UtilityException(msg);

-		    	 ue.initCause(e);

-		    	 throw ue;

-			}

-			if (dd != null) {

-				portlets = dd.getPortlets();

-			}

-			return portlets;

-		}

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/cli/AssemblerCLI.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/cli/AssemblerCLI.java
deleted file mode 100644
index f60a70a..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/cli/AssemblerCLI.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.cli;

-

-import java.io.File;

-import java.io.IOException;

-

-import org.apache.commons.cli.Options;

-import org.apache.commons.cli.Option;

-import org.apache.commons.cli.CommandLine;

-import org.apache.commons.cli.CommandLineParser;

-import org.apache.commons.cli.PosixParser;

-import org.apache.commons.cli.ParseException;

-import org.apache.commons.cli.HelpFormatter;

-import org.apache.pluto.util.assemble.Assembler;

-import org.apache.pluto.util.assemble.AssemblerFactory;

-import org.apache.pluto.util.assemble.AssemblerConfig;

-import org.apache.pluto.util.UtilityException;

-

-/**

- * Command Line Interface to the Pluto Assembler.

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since Oct 15, 2004

- */

-public class AssemblerCLI {

-

-    private Options options;

-    private String[] args;

-

-    public AssemblerCLI(String[] args) {

-        this.args = args;

-        options = new Options();

-        Option destination =

-            new Option("d" , "destination", true,

-                       "specify where the resulting webapp should be written ");

-        destination.setArgName("file");

-

-        Option debug =

-            new Option("debug", false, "print debug information.");

-        options.addOption(destination);

-        options.addOption(debug);

-    }

-

-    public void run() throws ParseException, IOException, UtilityException {

-        CommandLineParser parser = new PosixParser();

-        CommandLine line = parser.parse(options, args);

-

-        String[] args = line.getArgs();

-        if(args.length != 1) {

-            abort();

-            return;

-        }

-

-        String dest = line.getOptionValue("file");

-        if(dest == null) {

-            dest = args[0];

-        }

-

-        File source = new File(args[0]);

-        File result   = new File(dest);

-        result.getParentFile().mkdirs();

-

-        if(!source.exists()) {

-            System.out.println("File does not exist: "+source.getCanonicalPath());

-        }

-

-

-        System.out.println("-----------------------------------------------");

-        System.out.println("Assembling: "+source.getCanonicalPath());

-        System.out.println("        to: "+result.getCanonicalPath());

-

-        File webXml = new File(args[0], Assembler.SERVLET_XML);

-        File portletXml = new File(args[0], Assembler.PORTLET_XML);

-

-        AssemblerConfig config = new AssemblerConfig();

-        config.setWebappDescriptor(webXml);

-        config.setPortletDescriptor(portletXml);

-        config.setDestination(webXml);

-        

-        Assembler assembler = AssemblerFactory.getFactory()

-            .createAssembler(config);

-

-        config.setPortletDescriptor(portletXml);

-        config.setWebappDescriptor(webXml);

-

-        assembler.assemble(config);

-

-        System.out.println("Complete!");

-    }

-

-    public void abort() {

-        HelpFormatter help = new HelpFormatter();

-        help.defaultArgName = "webapp";

-        help.defaultWidth = 60;

-        help.printHelp("assemble", options);

-    }

-

-    public static void main(String[] args)

-    throws ParseException, IOException, UtilityException {

-        new AssemblerCLI(args).run();

-    }

-}

-

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/Deployer.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/Deployer.java
deleted file mode 100644
index fde3811..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/Deployer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.deploy;

-

-import java.io.File;

-import java.io.IOException;

-import java.io.InputStream;

-

-/**

- * Interface defining the methods necessary to deploy a portlet application to

- * a servlet container.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since Oct 15, 2004

- */

-public interface Deployer {

-

-    /**

-     * Deploy the specified portlet application to pluto.

-     * @param config  the deployment configuration of the portlet app.

-     * @param webappInputStream  the input stream to the WAR file.

-     * @throws IOException  if an IO error occurs.

-     * @throws DeploymentException  if a deployment error occurs.

-     */

-//    public void deploy(DeploymentConfig config, InputStream webappInputStream)

-    public void deploy(DeploymentConfig config, File webappFile)

-    	throws IOException, DeploymentException;

-

-}

-

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/DeployerFactory.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/DeployerFactory.java
deleted file mode 100644
index b0a693a..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/DeployerFactory.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.deploy;

-

-/**

- * The pluto deployer factory that creates a deployer instance to deploy portlet

- * applications to pluto.

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>

- * @version 1.0

- * @since Oct 28, 2004

- */

-public class DeployerFactory {

-	

-    /** The property key to the deployer class name. */

-    private static final String DEPLOYER_KEY = Deployer.class.getName();

-    

-    /** FIXME: abstract class! The default deployer class name. */

-    private static final String DEFAULT_DEPLOYER_CLASS =

-    		"org.apache.pluto.util.deploy.impl.FileSystemDeployer";

-    

-	/** The singleton factory instance. */

-    private static final DeployerFactory FACTORY = new DeployerFactory();

-    

-    

-    // Constructor -------------------------------------------------------------

-    

-    /**

-     * Private constructor that prevents external instantiation.

-     */

-    private DeployerFactory() {

-    	// Do nothing.

-    }

-    

-    /**

-     * Returns the singleton factory instance.

-     * @return the singleton factory instance.

-     */

-    public static DeployerFactory getFactory() {

-        return FACTORY;

-    }

-    

-    

-    // Public Methods ----------------------------------------------------------

-    

-    /**

-     * Creates a pluto deployer to deploy portlet applications to pluto.

-     * @return a pluto deployer.

-     */

-    public Deployer createFactory() {

-        String className = System.getProperty(DEPLOYER_KEY);

-        if (className == null || className.trim().length() == 0) {

-        	className = DEFAULT_DEPLOYER_CLASS;

-        }

-        try {

-            Class clazz = Class.forName(className);

-            return (Deployer) clazz.newInstance();

-        } catch (Throwable th) {

-        	System.err.println("Unable to create deployer from: " + className);

-            th.printStackTrace();

-            return null;

-        }

-    }

-

-}

-

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/DeploymentConfig.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/DeploymentConfig.java
deleted file mode 100644
index 1d098ad..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/DeploymentConfig.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.deploy;

-

-/**

- * Encapsulation of deployment configuration info. Implementations must provide

- * a way to retrieved context specific deployment properties.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since Oct 15, 2004

- */

-public abstract class DeploymentConfig {

-

-    /** The deployment name. */

-    private String deploymentName = null;

-    /**

-     * Is the war already configured?

-     */

-    private boolean isConfigured = false;

-    

-    /**

-     * Default Constructor.

-     * @param deploymentName the name of the deployment.

-     */

-    public DeploymentConfig(String deploymentName) {

-        this.deploymentName = deploymentName;

-    }

-

-    /**

-     * Standard Getter.

-     * @return the name of the deployment.

-     */

-    public String getDeploymentName() {

-        return deploymentName;

-    }

-

-    /**

-     * Standard Setter

-     * @param deploymentName the name of the deployment.

-     */

-    public void setDeploymentName(String deploymentName) {

-        this.deploymentName = deploymentName;

-    }

-

-    /**

-     * Retrieve the named deployment property.

-     * @param key

-     * @return

-     */

-    public abstract String getDeploymentProperty(String key);

-

-    /**

-     * Is the war already configured?

-     * @return

-     */

-    public boolean isConfigured() {

-    	return isConfigured;

-    }

-

-	public void setConfigured(boolean isConfigured) {

-		this.isConfigured = isConfigured;

-	}

-

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/DeploymentException.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/DeploymentException.java
deleted file mode 100644
index 0b2f22d..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/DeploymentException.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.deploy;

-

-/**

- * Exception thrown if deployment fails due to a configuration

- * or internal error.

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since Oct 28, 2004

- */

-public class DeploymentException extends Exception {

-

-    public DeploymentException(String message) {

-        super(message);

-    }

-

-}

-

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/HttpDeploymentConfig.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/HttpDeploymentConfig.java
deleted file mode 100644
index 124f387..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/HttpDeploymentConfig.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.apache.pluto.util.deploy;

-

-import java.util.Properties;

-

-/**

- * Holds configuration data for http deployments. 

- *

- * @author <a href="cdoremus@apache.org">Craig Doremus</a>

- *

- */

-public class HttpDeploymentConfig {

-

-    private String protocol = "http";

-

-    private String host = "localhost";

-

-    private int port = 8080;

-

-	public HttpDeploymentConfig() {

-		super();

-	}

-	

-	public void setHost(String host) {

-		this.host = host;

-	}

-

-	public void setPort(int port) {

-		this.port = port;

-	}

-

-	public void setProtocol(String protocol) {

-		this.protocol = protocol;

-	}

-

-	public String getHost() {

-		return host;

-	}

-

-	public int getPort() {

-		return port;

-	}

-

-	public String getProtocol() {

-		return protocol;

-	}

-

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/Undeployer.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/Undeployer.java
deleted file mode 100644
index 86877a4..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/Undeployer.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.deploy;

-

-import java.io.File;

-import java.io.IOException;

-import java.io.InputStream;

-

-/**

- * Interface defining the methods necessary to deploy a portlet application to

- * a servlet container.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since Oct 15, 2004

- */

-public interface Undeployer {

-

-    /**

-     * Undeploy the specified portlet application to pluto.

-     * @param config  the deployment configuration of the portlet app.

-     * @param webappInputStream  the input stream to the WAR file.

-     * @throws IOException  if an IO error occurs.

-     * @throws DeploymentException  if a deployment error occurs.

-     */

-    public void undeploy(DeploymentConfig config, File webappFile)

-    throws IOException, DeploymentException;

-

-}

-

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/file/FileSystemDeployer.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/file/FileSystemDeployer.java
deleted file mode 100644
index 92bd218..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/file/FileSystemDeployer.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.deploy.file;

-

-import org.apache.pluto.util.deploy.Deployer;

-import org.apache.pluto.util.deploy.DeploymentConfig;

-import org.apache.pluto.util.deploy.DeploymentException;

-

-import java.io.File;

-import java.io.FileInputStream;

-import java.io.FileOutputStream;

-import java.io.IOException;

-import java.io.InputStream;

-

-/**

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since Oct 15, 2004

- */

-public abstract class FileSystemDeployer implements Deployer {

-	

-	// Constructor -------------------------------------------------------------

-	

-	/**

-	 * Protected no-arg constructor.

-	 */

-    protected FileSystemDeployer() {

-    	// Do nothing.

-    }

-    

-    

-    // Deployer Impl -----------------------------------------------------------

-    

-    public void deploy(DeploymentConfig config, File webappFile)

-    throws IOException, DeploymentException {

-

-        File dir = getWebApplicationDirectory(config);

-        File file = new File(dir, config.getDeploymentName() + ".war");

-        FileOutputStream out = null;

-        FileInputStream webappInputStream = null;

-        try {

-            out = new FileOutputStream(file);

-            webappInputStream = new FileInputStream(webappFile);

-            

-            int read = -1;

-            byte[] bits = new byte[256];

-            while ((read = webappInputStream.read(bits)) != -1) {

-                out.write(bits, 0, read);

-            }        	

-        } finally {

-            if (out != null) {

-            	out.flush();

-                out.close();            	

-            }

-            

-            if (webappInputStream != null) {

-                webappInputStream.close();            	

-            }

-        }

-        

-        if (!config.isConfigured()) {

-            configure(config);        	

-        }

-    }

-    

-    

-    // Protected Abstract Methods ----------------------------------------------

-    

-    /**

-     * Retrieves the directory to which the portlet app should be deployed.

-     * @return

-     */

-    protected abstract File getWebApplicationDirectory(DeploymentConfig config)

-    throws DeploymentException;

-    

-    /**

-     * Configures the deployment.

-     * @param config

-     */

-    protected abstract void configure(DeploymentConfig config)

-    throws DeploymentException, IOException;

-

-}

-

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/file/Tomcat4FileSystemDeployer.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/file/Tomcat4FileSystemDeployer.java
deleted file mode 100644
index 90d36b3..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/file/Tomcat4FileSystemDeployer.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.deploy.file;

-

-import org.apache.pluto.util.deploy.DeploymentConfig;

-import org.apache.pluto.util.deploy.DeploymentException;

-

-import java.io.File;

-import java.io.FileWriter;

-import java.io.IOException;

-import java.io.PrintWriter;

-

-/**

- *

- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since Oct 28, 2004

- */

-public class Tomcat4FileSystemDeployer extends FileSystemDeployer {

-

-    private File tomcatHome = null;

-

-    public Tomcat4FileSystemDeployer() {

-

-    }

-

-    protected File getWebApplicationDirectory(DeploymentConfig config)

-    throws DeploymentException {

-        File dir = new File(getTomcatHome(config), "webapps");

-        dir.mkdirs();

-        return dir;

-    }

-

-    protected void configure(DeploymentConfig config)

-    throws DeploymentException, IOException {

-        File conf = new File(getConfigDir(config), config.getDeploymentName()+".xml");

-        PrintWriter out  = new PrintWriter(new FileWriter(conf));

-        out.print("<Context path=\"/");

-        out.print(config.getDeploymentName());

-        out.print("\" docBase=\"");

-        out.print(config.getDeploymentName()+".war");

-        out.println("\" crossContext=\"true\">");

-        out.println("</Context>");

-

-        out.flush();

-        out.close();

-    }

-

-    protected File getTomcatHome(DeploymentConfig config) throws DeploymentException {

-        if(tomcatHome == null) {

-            String file = config.getDeploymentProperty("tomcat.home");

-            if(file == null) {

-                throw new DeploymentException("tomcat.home not defined");

-            }

-            tomcatHome =  new File(file);

-            tomcatHome.mkdirs();

-        }

-        return tomcatHome;

-    }

-

-    protected File getConfigDir(DeploymentConfig config)

-    throws DeploymentException {

-        File dir = new File(getTomcatHome(config), "conf");

-        return dir;

-    }

-

-}

-

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/file/Tomcat5FileSystemDeployer.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/file/Tomcat5FileSystemDeployer.java
deleted file mode 100644
index f94ae17..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/file/Tomcat5FileSystemDeployer.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.deploy.file;

-

-import org.apache.pluto.util.deploy.DeploymentConfig;

-import org.apache.pluto.util.deploy.DeploymentException;

-

-import java.io.File;

-

-/**

- * Deployer used to deploy portlet applications to a Tomcat 5

- * installation via the file system.  This deployer performs

- * a simple copy of the assembled application into the webapps

- * directory and creates a context configuration file under

- * the ${tomcat.home}/conf/${tomcat.service}/${tomcat.host}

- * directory.

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>

- * @version 1.0

- * @since Oct 28, 2004

- */

-public class Tomcat5FileSystemDeployer extends Tomcat4FileSystemDeployer {

-

-    /**

-     * Retrieve the configuration directory for the deployment.

-     *

-     * @param config

-     * @return

-     * @throws DeploymentException

-     */

-    protected File getConfigDir(DeploymentConfig config) throws DeploymentException {

-        File dir = super.getConfigDir(config);

-        String serv = config.getDeploymentProperty("tomcat.service");

-        if(serv == null) {

-            throw new DeploymentException("tomcat.service is not defined");

-        }

-        dir = new File(dir, serv);

-        String host = config.getDeploymentProperty("tomcat.host");

-        if(host == null) {

-            throw new DeploymentException("tomcat.host is not defined");

-        }

-        dir = new File(dir, host);

-        dir.mkdirs();

-        return dir;

-    }

-}

-

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/file/TomcatDeploymentConfig.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/file/TomcatDeploymentConfig.java
deleted file mode 100644
index 5a1a69e..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/file/TomcatDeploymentConfig.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*

- * Copyright 2006 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-

-package org.apache.pluto.util.deploy.file;

-

-import java.util.Properties;

-

-import org.apache.pluto.util.deploy.DeploymentConfig;

-

-/**

- *

- * @author <a href="cdoremus@apache.org">Craig Doremus</a>

- *

- */

-public class TomcatDeploymentConfig extends DeploymentConfig {

-

-	Properties props = new Properties();

-	/**

-	 * Constructor from base class

-	 * @param deploymentName

-	 */

-	public TomcatDeploymentConfig(String deploymentName) {

-		super(deploymentName);

-	}

-

-	/**

-	 * Retrieves properties from internal store added using addDeploymentProperty().

-	 * 

-	 * @see org.apache.pluto.util.deploy.DeploymentConfig#getDeploymentProperty(java.lang.String)

-	 */

-	public String getDeploymentProperty(String key) {

-		return props.getProperty(key);

-	}

-	

-	public void addDeploymentProperty(String key, String value) {

-		props.put(key, value);

-	}

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/http/HttpTomcatDeployer.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/http/HttpTomcatDeployer.java
deleted file mode 100644
index 0b653dc..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/http/HttpTomcatDeployer.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package org.apache.pluto.util.deploy.http;

-

-import java.io.File;

-import java.io.IOException;

-import java.net.URLEncoder;

-

-import org.apache.commons.httpclient.HostConfiguration;

-import org.apache.commons.httpclient.HttpClient;

-import org.apache.commons.httpclient.HttpException;

-import org.apache.commons.httpclient.cookie.CookiePolicy;

-import org.apache.commons.httpclient.methods.GetMethod;

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.pluto.util.deploy.Deployer;

-import org.apache.pluto.util.deploy.DeploymentConfig;

-import org.apache.pluto.util.deploy.DeploymentException;

-import org.apache.pluto.util.deploy.HttpDeploymentConfig;

-import org.apache.pluto.util.deploy.Undeployer;

-

-/**

- * Handles deployment of war files using the Tomcat manger

- * application URL interface via commons-httpclient.

- *

- * @author <a href="cdoremus@apache.org">Craig Doremus</a>

- *

- */

-public class HttpTomcatDeployer implements Deployer, Undeployer {

-	private static final Log LOG = LogFactory.getLog(HttpDeploymentConfig.class);

-	

-	public void deploy(DeploymentConfig config, File webappFile)

-			throws IOException, DeploymentException {

-

-		GetMethod get = doDeployment(config, webappFile, "deploy");

-        if(LOG.isDebugEnabled()) {

-            LOG.debug("Deployment Response Status: "+get.getStatusLine().toString());

-        }

-        String response = get.getResponseBodyAsString();

-

-        if(LOG.isDebugEnabled()) {

-            LOG.debug("Deployment Details: \n"+response);

-        }

-	}

-

-	

-	public void undeploy(DeploymentConfig config, File webappFile) throws IOException, DeploymentException {

-		GetMethod get = doDeployment(config, webappFile, "undeploy");

-        if(LOG.isDebugEnabled()) {

-            LOG.debug("Undeployment Response Status: "+get.getStatusLine().toString());

-        }

-        String response = get.getResponseBodyAsString();

-

-        if(LOG.isDebugEnabled()) {

-            LOG.debug("Undeployment Details: \n"+response);

-        }

-	}

-

-	public GetMethod doDeployment(DeploymentConfig config, File webappFile, String deploymentType) throws DeploymentException {

-        HttpClient hclient = new HttpClient();

-        hclient.setHostConfiguration(getHostConfiguration(config));

-        hclient.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);

-

-        StringBuffer sb = new StringBuffer();

-        sb.append("/manager/")

-          .append(deploymentType)

-          .append("?path=")

-          .append(URLEncoder.encode(webappFile.getAbsolutePath()));

-        

-

-        if(LOG.isDebugEnabled()) {

-            LOG.debug("Request url: "+sb.toString());

-        }

-

-        GetMethod get = new GetMethod(sb.toString());

-

-        try {

-            hclient.executeMethod(get);

-

-        }

-        catch(HttpException e) {

-            DeploymentException de = new DeploymentException("Unable to undeploy");

-            de.initCause(e);

-            throw de;

-        }

-        catch(IOException e) {

-            DeploymentException de = new DeploymentException("Unable to undeploy");

-            de.initCause(e);

-            throw de;

-        }

-		

-        return get;

-	}

-	

-    private HostConfiguration getHostConfiguration(DeploymentConfig config) {

-        HostConfiguration host = new HostConfiguration();

-        if(LOG.isDebugEnabled()) {

-        		LOG.debug("Host configuration: ");

-        		LOG.debug("Host: " + config.getDeploymentProperty("tomcat.host"));

-        		LOG.debug("Port: " + config.getDeploymentProperty("tomcat.port"));

-        		LOG.debug("Protocol: " + config.getDeploymentProperty("tomcat.protocol"));

-        }        

-        host.setHost(config.getDeploymentProperty("tomcat.host"), 

-        		Integer.parseInt(config.getDeploymentProperty("tomcat.port")), 

-        		config.getDeploymentProperty("tomcat.protocol"));

-        return host;

-    }

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/fileupload/FileUploader.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/fileupload/FileUploader.java
deleted file mode 100644
index d0b2d40..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/fileupload/FileUploader.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*

- * Copyright 2006 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.fileupload;

-

-import java.io.File;

-

-import javax.portlet.ActionRequest;

-

-/**

- * 

- *

- * @author <a href="cdoremus@apache.org">Craig Doremus</a>

- *

- */

-public interface FileUploader {

-

-	public File upload(ActionRequest request, FileUploaderConfig config) throws FileUploaderException;

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/fileupload/FileUploaderConfig.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/fileupload/FileUploaderConfig.java
deleted file mode 100644
index ca9bb57..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/fileupload/FileUploaderConfig.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*

- * Copyright 2006 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.fileupload;

-

-import java.io.File;

-

-/**

- * 

- *

- * @author <a href="cdoremus@apache.org">Craig Doremus</a>

- *

- */

-public class FileUploaderConfig {

-

-	private File uploadPath = null;

-	private int maxUploadSize = 10;

-	

-	public FileUploaderConfig() {

-		super();

-	}

-	

-	/**

-	 * @return the uploadDirectory

-	 */

-	public File getUploadPath() {

-		return uploadPath;

-	}

-

-	/**

-	 * @param uploadDirectory the uploadDirectory to set

-	 */

-	public void setUploadPath(File uploadPath) {

-		this.uploadPath = uploadPath;

-	}

-

-	/**

-	 * @return the maxUploadSize

-	 */

-	public int getMaxUploadSize() {

-		return maxUploadSize;

-	}

-

-	/**

-	 * @param maxUploadSize the maxUploadSize to set

-	 */

-	public void setMaxUploadSize(int maxUploadSize) {

-		this.maxUploadSize = maxUploadSize;

-	}

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/fileupload/FileUploaderException.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/fileupload/FileUploaderException.java
deleted file mode 100644
index 777b2da..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/fileupload/FileUploaderException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*

- * Copyright 2006 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.fileupload;

-

-/**

- * Indicates problem with portpet file upload.

- *

- * @author <a href="cdoremus@apache.org">Craig Doremus</a>

- *

- */

-public class FileUploaderException extends Exception {

-

-	public FileUploaderException(String message){

-		super(message);

-	}

-	public FileUploaderException(String message, Throwable cause){

-		super(message, cause);

-	}

-	

-	

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/fileupload/http/PortletFileUploader.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/fileupload/http/PortletFileUploader.java
deleted file mode 100644
index 6bae7a1..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/fileupload/http/PortletFileUploader.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*

- * Copyright 2006 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.fileupload.http;

-

-import java.io.File;

-import java.io.IOException;

-import java.io.InputStream;

-import java.util.Iterator;

-import java.util.List;

-

-import javax.portlet.ActionRequest;

-

-import org.apache.commons.fileupload.FileItem;

-import org.apache.commons.fileupload.FileItemFactory;

-import org.apache.commons.fileupload.disk.DiskFileItemFactory;

-import org.apache.commons.fileupload.portlet.PortletFileUpload;

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-

-import org.apache.pluto.util.fileupload.FileUploaderConfig;

-import org.apache.pluto.util.fileupload.FileUploader;

-import org.apache.pluto.util.fileupload.FileUploaderException;

-

-public class PortletFileUploader implements FileUploader {

-

-	public static final Log LOG = LogFactory.getLog(PortletFileUploader.class); 

-	

-	public File upload(ActionRequest request, FileUploaderConfig config) throws FileUploaderException {

-		// Check that we have a file upload request

-		if (!PortletFileUpload.isMultipartContent(request)) {

-			//TODO: Return an error message or and exception

-			//	that results in an error message

-			String msg = "No file upload content";

-			throw new FileUploaderException(msg);

-		}

-		//Create a factory for disk-based file items

-		FileItemFactory factory = new DiskFileItemFactory();

-	

-		//Create a new file upload handler

-		PortletFileUpload upload = new PortletFileUpload(factory);

-	

-		//Set overall request size constraint

-		upload.setSizeMax(config.getMaxUploadSize());

-	    String fileName = null;

-	    File tmpUploadDir = config.getUploadPath();

-	    //create the uploading directory if it does not exist

-	    if (!tmpUploadDir.exists()){

-	    	tmpUploadDir.mkdirs();

-	    }

-	    

-	    InputStream uploadedStream = null;

-		File uploadedFile = null;

-	    

-		try {

-			//Parse the request

-			List /* FileItem */ items = upload.parseRequest(request);

-			Iterator iter = items.iterator();

-			while (iter.hasNext()) {

-				FileItem item = (FileItem) iter.next();

-				//Process the file upload, not a form field

-				if (!item.isFormField()) {

-				    fileName = item.getName();

-				    LOG.debug("File name: " + fileName);	

-				    String contentType = item.getContentType();

-				    boolean isInMemory = item.isInMemory();

-				    long sizeInBytes = item.getSize();

-				    uploadedFile = new File(tmpUploadDir, fileName);

-				    LOG.debug("Uploaded file: " + uploadedFile);

-				    //The write() method should only be used for small files

-				    item.write(uploadedFile);

-				    //TODO: Use streams to handle large files

-	//			    uploadedStream = item.getInputStream();

-	//			    FileOutputStream os = new FileOutputStream(uploadedFile);

-				    

-				}	

-				

-			}

-		} catch (org.apache.commons.fileupload.FileUploadException e) {

-			String msg = "File upload problem: " + e.getMessage(); 

-			LOG.error(msg, e);

-			throw new FileUploaderException(msg, e);

-		} catch (Exception e) {

-			String msg = "File upload problem: " + e.getMessage(); 

-			LOG.error(msg, e);

-			throw new FileUploaderException(msg, e);

-		} finally {

-			if (uploadedStream != null) {

-				try {

-					uploadedStream.close();

-				} catch (IOException e) {

-					String msg = "File upload problem: " + e.getMessage();

-					LOG.warn(msg, e);

-					throw new FileUploaderException(msg, e);

-				}

-			}

-		}

-		

-		if (LOG.isDebugEnabled()) {

-			StringBuffer sb = new StringBuffer("File uploaded ");

-			if (fileName != null) {

-				sb.append(fileName);			

-			}

-			sb.append(" to directory " + config.getUploadPath());

-			String msg = sb.toString();		

-			LOG.debug("Message: " + msg);				

-		}

-

-		return uploadedFile;		

-	}

-

-	/**

-	 * Gets the file name minus the extension from a file.

-	 * @param pathName

-	 * @return

-	 */

-	  private String getRootFilename(String pathName) {

-		    int endFilenameIndex = pathName.lastIndexOf('.');

-		    String filename =  pathName.substring(0, endFilenameIndex);

-		    return filename;

-	  }

-	

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/InstallationConfig.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/InstallationConfig.java
deleted file mode 100644
index a08117e..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/InstallationConfig.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.install;

-

-import org.apache.pluto.util.install.ServerConfig;

-

-import java.util.List;

-import java.util.Map;

-import java.io.File;

-

-/**

- * The installation configuration used to install Pluto to servlet container.

- */

-public class InstallationConfig {

-

-    /**

-     * A list of depdencies that are shared amoungst web applications.

-     */

-    private List sharedDependencies;

-

-    /**

-     * A list of dependencies are are shared amoungst web applications.

-     */

-    private List endorsedDependencies;

-

-    /**

-     * A list of war files which are to be considered portal dependencies.

-     */

-    private Map portletApplications;

-

-    /**

-     * The location of the portal application being installed.

-     */

-    private File portalApplication;

-

-    /**

-     * The installation directory.

-     */

-    private File installationDirectory;

-

-    private String portalContextPath;

-

-    private ServerConfig serverConfig;

-

-

-    public List getSharedDependencies() {

-        return sharedDependencies;

-    }

-

-    public void setSharedDependencies(List sharedDependencies) {

-        this.sharedDependencies = sharedDependencies;

-    }

-

-    public List getEndorsedDependencies() {

-        return endorsedDependencies;

-    }

-

-    public void setEndorsedDependencies(List endorsedDependencies) {

-        this.endorsedDependencies = endorsedDependencies;

-    }

-

-    public Map getPortletApplications() {

-        return portletApplications;

-    }

-

-    public void setPortletApplications(Map portletApplications) {

-        this.portletApplications = portletApplications;

-    }

-

-    public File getPortalApplication() {

-        return portalApplication;

-    }

-

-    public void setPortalApplication(File portalApplication) {

-        this.portalApplication = portalApplication;

-    }

-

-    public File getInstallationDirectory() {

-        return installationDirectory;

-    }

-

-    public void setInstallationDirectory(File installationDirectory) {

-        this.installationDirectory = installationDirectory;

-    }

-

-    public String getPortalContextPath() {

-        return portalContextPath;

-    }

-

-    public void setPortalContextPath(String portalContextPath) {

-        this.portalContextPath = portalContextPath;

-    }

-

-    public ServerConfig getServerConfig() {

-        return serverConfig;

-    }

-

-    public void setServerConfig(ServerConfig serverConfig) {

-        this.serverConfig = serverConfig;

-    }

-

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/PortalInstaller.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/PortalInstaller.java
deleted file mode 100644
index 8e3410e..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/PortalInstaller.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.install;

-

-import org.apache.pluto.util.UtilityException;

-

-import java.io.File;

-

-public interface PortalInstaller {

-

-    void install(InstallationConfig config) throws UtilityException, UtilityException;

-

-    void uninstall(InstallationConfig config) throws UtilityException;

-

-    boolean isValidInstallationDirectory(File installDir);

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/PortalInstallerFactory.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/PortalInstallerFactory.java
deleted file mode 100644
index fd56a58..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/PortalInstallerFactory.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.install;

-

-import org.apache.pluto.util.install.file.tomcat5.Tomcat5FileSystemInstaller;

-import org.apache.pluto.util.install.file.jetty.Jetty5FileSystemInstaller;

-

-import java.io.File;

-import java.util.ArrayList;

-import java.util.Iterator;

-

-/**

- *

- *

- */

-public abstract class PortalInstallerFactory {

-

-    private static final ArrayList HANDLERS = new ArrayList();

-

-    static {

-        HANDLERS.add(new Tomcat5FileSystemInstaller());

-        HANDLERS.add(new Jetty5FileSystemInstaller());

-    }

-

-    public static PortalInstaller getAppServerHandler(File installDir) {

-        String className = System.getProperty(PortalInstallerFactory.class.getName());

-        PortalInstaller installer = null;

-        if (className != null) {

-            installer = getHandler(className, installDir);

-        } else {

-            installer = findHandler(installDir);

-        }

-        return installer;

-    }

-

-    private static PortalInstaller getHandler(String className, File installDir) {

-        PortalInstaller ash;

-        try {

-            Class cl = Class.forName(className);

-            ash = (PortalInstaller)cl.newInstance();

-            if(ash.isValidInstallationDirectory(installDir)) {

-                return ash;

-            }

-            else {

-                throw new Exception("Invalid installation directory for handler: "+className);

-            }

-       }

-        catch(Exception e) {

-            throw new RuntimeException("Unable to instantiate class: "+className, e);

-        }

-    }

-

-    private static PortalInstaller findHandler(File installDir) {

-        Iterator it = HANDLERS.iterator();

-        while(it.hasNext()) {

-            PortalInstaller ash = (PortalInstaller)it.next();

-            if(ash.isValidInstallationDirectory(installDir)) {

-                return ash;

-            }

-        }

-        throw new RuntimeException("Unable to locate appropriate app server handler for: "+installDir.getAbsolutePath());

-    }

-

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/ServerConfig.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/ServerConfig.java
deleted file mode 100644
index 0cbfbd5..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/ServerConfig.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.install;

-

-/**

- *

- */

-public class ServerConfig {

-

-    private String domain = "MyDomain";

-    private String server = "MyServer";

-    private String host = "localhost";

-    private int port = 8080;

-

-    public String getDomain() {

-        return domain;

-    }

-

-    public void setDomain(String domain) {

-        this.domain = domain;

-    }

-

-    public String getServer() {

-        return server;

-    }

-

-    public void setServer(String server) {

-        this.server = server;

-    }

-

-    public String getHost() {

-        return host;

-    }

-

-    public void setHost(String host) {

-        this.host = host;

-    }

-

-    public int getPort() {

-        return port;

-    }

-

-    public void setPort(int port) {

-        this.port = port;

-    }

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/FileSystemInstaller.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/FileSystemInstaller.java
deleted file mode 100644
index 918b3d9..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/FileSystemInstaller.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.install.file;

-

-import org.apache.pluto.util.install.InstallationConfig;

-import org.apache.pluto.util.install.PortalInstaller;

-import org.apache.pluto.util.UtilityException;

-import org.apache.commons.io.FileUtils;

-

-import java.io.File;

-import java.io.IOException;

-import java.util.Iterator;

-import java.util.Collection;

-

-/**

- * File System based installer.  Copies files to the appropriate

- * locations.

- *

- */

-public abstract class FileSystemInstaller implements PortalInstaller {

-

-    protected void copyFilesToDirectory(Collection dependencies, File destination)

-    throws IOException {

-        Iterator it = dependencies.iterator();

-        while(it.hasNext()) {

-            File from = (File)it.next();

-            FileUtils.copyFileToDirectory(from, destination);

-        }

-    }

-

-    protected void removeFilesFromDirectory(Collection dependencies, File destination)

-            throws IOException {

-        Iterator it = dependencies.iterator();

-        while(it.hasNext()) {

-            File from = (File)it.next();

-            File delete = new File(destination, from.getName());

-            delete.delete();

-        }

-    }

-

-    protected void copyFileToDirectory(File file, File destination)

-    throws IOException {

-        FileUtils.copyFileToDirectory(file, destination);

-    }

-

-    /**

-     * NOTE: Order is important.  If the server is running, we want to

-     *       make sure that the correct order is preserved

-     *

-     * 1) Install endorsed dependencies

-     * 2) Install shared dependencies

-     * 4) Prep Time

-     *    -- Create a domain directory for the portal

-     *    -- Init the configs holder

-     * 5) Install the Portlet Applications

-     * 6) Install the Portal Application

-     * 7) Finally, install the configs

-     * @param config

-     * @throws org.apache.pluto.util.UtilityException

-     */

-    public void install(InstallationConfig config) throws UtilityException {

-        File endorsedDir = getEndorsedDir(config);

-        File sharedDir = getSharedDir(config);

-        File domainDir = getWebAppDir(config);

-

-        endorsedDir.mkdirs();

-        sharedDir.mkdirs();

-        domainDir.mkdirs();

-

-        try {

-            copyFilesToDirectory(config.getEndorsedDependencies(), endorsedDir);

-            copyFilesToDirectory(config.getSharedDependencies(), sharedDir);

-

-            copyFilesToDirectory(config.getPortletApplications().values(),  domainDir);

-            copyFileToDirectory(config.getPortalApplication(), domainDir);

-

-            writeConfiguration(config);

-        }

-        catch(IOException io) {

-            throw new UtilityException(

-                "Unable to install portal to Tomcat",

-                io,

-                config.getInstallationDirectory()

-            );

-        }

-    }

-

-    public abstract void writeConfiguration(InstallationConfig config)

-    throws IOException;

-

-    protected abstract File getEndorsedDir(InstallationConfig config );

-

-    protected abstract File getSharedDir(InstallationConfig config);

-

-    protected abstract File getWebAppDir(InstallationConfig config);

-

-    public void uninstall(InstallationConfig config)

-    throws UtilityException {

-        File endorsedDir = getEndorsedDir(config);

-        File sharedDir = getSharedDir(config);

-        File domainDir = getWebAppDir(config);

-

-        endorsedDir.mkdirs();

-        sharedDir.mkdirs();

-        domainDir.mkdirs();

-

-        try {

-            removeFilesFromDirectory(config.getEndorsedDependencies(), endorsedDir);

-            removeFilesFromDirectory(config.getSharedDependencies(), sharedDir);

-            removeFilesFromDirectory(config.getPortletApplications().values(),  domainDir);

-

-            File delete = new File(domainDir, config.getPortalApplication().getName());

-            delete.delete();

-        }

-        catch(IOException io) {

-            throw new UtilityException("Unable to remove files. ", io, config.getInstallationDirectory());

-        }

-

-   }

-

-    public abstract boolean isValidInstallationDirectory(File installDir);

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/TomcatCrossContextGenerator.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/TomcatCrossContextGenerator.java
deleted file mode 100644
index 04e8b00..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/TomcatCrossContextGenerator.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.install.file;

-

-import java.io.*;

-

-import org.apache.commons.logging.LogFactory;

-import org.apache.commons.logging.Log;

-

-/**

- * TODO JavaDoc

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:

- * @version 1.0

- * @since Dec 11, 2005

- */

-public class TomcatCrossContextGenerator {

-	private static final String PLUTO_TEMP_DIR = "PlutoDomain";

-	private static Log LOG = LogFactory.getLog(TomcatCrossContextGenerator.class);

-	

-    public static void main(String[] args) throws IOException {

-

-        File tomcatHome = new File(args[0]);

-        File webapps = new File(tomcatHome, "webapps");

-        File conf = new File(tomcatHome, "conf/Catalina/localhost");

-

-        File[] files = webapps.listFiles(new PortletFileNameFilter());

-        for(int i=0; i < files.length; i++) {

-            String fileName = files[i].getName();

-            String contextName = fileName.substring(0, fileName.indexOf(".war"));

-

-            createContextFile(conf, fileName, contextName);

-        }

-    }

-

-    /**

-     * Creates a tomcat-specific context deployment descriptor 

-     * and deploys it.

-     * 

-     * @param confDir Tomcat conf directory

-     * @param fileName File name of the war

-     * @param contextName The root name of the context file

-     * @throws IOException If there is a problem 

-     */

-	public static void createContextFile(File confDir, String fileName, String contextName) throws IOException {

-		PrintWriter out = null;

-		try {

-			StringBuffer contents = new StringBuffer();

-			contents.append("<Context ")

-			        .append("path=\"").append(contextName).append("\" ")

-			        .append("docBase=\"../").append(PLUTO_TEMP_DIR).append("/").append(fileName).append("\" ")

-			        .append("crossContext=\"true\">").append("</Context>");

-			File confFile = new File(confDir, contextName+".xml");

-			if (LOG.isInfoEnabled()) {

-				LOG.info("Writing file: "+ confFile.getAbsolutePath());			

-			}

-			out = new PrintWriter(new FileWriter(confFile));

-			out.println(contents.toString());

-		} finally {

-			if (out != null) {

-				out.flush();

-				out.close();							

-			}

-		}

-	}

-

-    public static class PortletFileNameFilter implements FilenameFilter {

-        public boolean accept(File dir, String name) {

-            if(name.startsWith("portlet") && name.endsWith(".war")) {

-                return true;

-            }

-            return false;

-        }

-    }

-

-

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/jetty/Call.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/jetty/Call.java
deleted file mode 100644
index 6ffafab..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/jetty/Call.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.install.file.jetty;

-

-/**

- * Created by IntelliJ IDEA.

- * User: dxd0

- * Date: Nov 11, 2005

- * Time: 9:33:36 PM

- * To change this template use File | Settings | File Templates.

- */

-public class Call {

-

-    private String name;

-

-    public String getName() {

-        return name;

-    }

-

-    public void setName(String name) {

-        this.name = name;

-    }

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/jetty/Configure.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/jetty/Configure.java
deleted file mode 100644
index 40943b2..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/jetty/Configure.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.install.file.jetty;

-

-/**

- * Created by IntelliJ IDEA.

- * User: dxd0

- * Date: Nov 11, 2005

- * Time: 9:32:49 PM

- * To change this template use File | Settings | File Templates.

- */

-public class Configure {

-

-    private String klass;

-

-    public String getKlass() {

-        return klass;

-    }

-

-    public void setKlass(String klass) {

-        this.klass = klass;

-    }

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/jetty/Jetty5FileSystemInstaller.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/jetty/Jetty5FileSystemInstaller.java
deleted file mode 100644
index 77b0858..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/jetty/Jetty5FileSystemInstaller.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.install.file.jetty;

-

-import org.apache.commons.io.FileUtils;

-

-import org.apache.pluto.util.install.InstallationConfig;

-import org.apache.pluto.util.install.file.FileSystemInstaller;

-import org.apache.pluto.util.UtilityException;

-

-import java.io.File;

-import java.io.IOException;

-import java.util.Iterator;

-

-public class Jetty5FileSystemInstaller extends FileSystemInstaller {

-

-    protected File getEndorsedDir(InstallationConfig config) {

-        File installationDirectory = config.getInstallationDirectory();

-        return new File(installationDirectory, "ext");

-    }

-

-    protected File getSharedDir(InstallationConfig config) {

-        File installationDirectory = config.getInstallationDirectory();

-        return new File(installationDirectory, "ext");

-    }

-

-    protected File getWebAppDir(InstallationConfig config) {

-        File installationDirectory = config.getInstallationDirectory();

-        return new File(

-                installationDirectory, "webapps"

-        );

-    }

-

-    protected File getConfigurationDir(InstallationConfig config) {

-        File installationDirectory = config.getInstallationDirectory();

-        String engine = "Catalina";

-        String host = config.getServerConfig().getHost();

-        return new File(installationDirectory, "conf/" + engine + "/" + host);

-    }

-

-    public void uninstall(InstallationConfig config) {

-    }

-

-    public void deploy() {

-

-    }

-

-    public boolean isValidInstallationDirectory(File installDir) {

-        File serverConfig = new File(installDir, "etc/jetty.xml");

-        return serverConfig.exists();

-    }

-

-    /**

-     * NOTE: Order is important.  If the server is running, we want to

-     * make sure that the correct order is preserved

-     * <p/>

-     * 1) Install endorsed dependencies

-     * 2) Install shared dependencies

-     * 4) Prep Time

-     * -- Create a domain directory for the portal

-     * -- Init the configs holder

-     * 5) Install the Portlet Applications

-     * 6) Install the Portal Application

-     * 7) Finally, install the configs

-     *

-     * @param config

-     * @throws org.apache.pluto.util.UtilityException

-     *

-     */

-    public void install(InstallationConfig config) throws UtilityException {

-        File endorsedDir = getEndorsedDir(config);

-        File sharedDir = getSharedDir(config);

-        File domainDir = getWebAppDir(config);

-        domainDir.mkdirs();

-        File contextConfigurationDirectory = getConfigurationDir(config);

-

-        try {

-

-            // Jetty Doesn't need 'em

-            //copyFilesToDirectory(config.getEndorsedDependencies(), endorsedDir);

-            

-            copyFilesToDirectory(config.getSharedDependencies(), sharedDir);

-

-            Iterator it = config.getPortletApplications().values().iterator();

-            while (it.hasNext()) {

-                File portletApp = (File) it.next();

-                FileUtils.copyFileToDirectory(portletApp, domainDir);

-            }

-

-            FileUtils.copyFileToDirectory(config.getPortalApplication(), domainDir);

-

-

-//            it = config.getPortletApplications().entrySet().iterator();

-//            while (it.hasNext()) {

-//                Map.Entry entry = (Map.Entry) it.next();

-//                String context = entry.getKey().toString();

-//                File portletApp = (File) entry.getValue();

-//

-//                File deployed = new File(domainDir, portletApp.getName());

-//                String contents = getPortletApplicationConfig(context, deployed);

-//                //FileWriter out = new FileWriter(

-//                //        new File(contextConfigurationDirectory, context + ".xml"));

-//                out.write(contents);

-//                out.flush();

-//                out.close();

-//            }

-

-//            File xmlFile = new File(contextConfigurationDirectory, config.getPortalContextPath() + ".xml");

-//            FileWriter out = new FileWriter(xmlFile);

-//            out.write(getPortalApplicationConfig(config));

-//            out.flush();

-//            out.close();

-        }

-        catch (IOException io) {

-            throw new UtilityException(io);

-        }

-    }

-

-    private String getPortalApplicationConfig(InstallationConfig config) {

-        File domainDir = this.getWebAppDir(config);

-        String war = domainDir.getAbsolutePath() + File.separatorChar +

-                config.getPortalApplication().getName();

-        String contextPath = config.getPortalContextPath();

-        return getConfigContents(war, contextPath);

-    }

-

-    private String getPortletApplicationConfig(String contextPath, File file) {

-        String war = file.getAbsolutePath();

-        return getConfigContents(war, contextPath);

-    }

-

-    public void writeConfiguration(InstallationConfig config) {

-

-    }

-

-    private String getConfigContents(String war, String contextPath) {

-        return "JettyConfigContents: war=" + war + "contextPath=" + contextPath;

-    }

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/tomcat5/Tomcat5FileSystemInstaller.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/tomcat5/Tomcat5FileSystemInstaller.java
deleted file mode 100644
index 6ed684d..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/tomcat5/Tomcat5FileSystemInstaller.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*

- * Copyright 2004 The Apache Software Foundation

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.install.file.tomcat5;

-

-import org.apache.pluto.util.install.InstallationConfig;

-import org.apache.pluto.util.install.file.FileSystemInstaller;

-

-import java.io.File;

-import java.io.FileWriter;

-import java.io.IOException;

-import java.util.Iterator;

-import java.util.Map;

-

-public class Tomcat5FileSystemInstaller extends FileSystemInstaller {

-

-//

-// PortalInstaller Interface

-//

-

-    /**

-     * Determine whether or not this is a valid Tomcat 5.x installation.

-     * @param installDir the proposed TOMCAT BASE directory

-     * @return true if and only if <code>conf/server.xml</code> and

-     *         <code>conf/catalina.properties exist.</code>

-     */

-    public boolean isValidInstallationDirectory(File installDir) {

-        File serverConfig = new File(installDir, "conf/server.xml");

-        File catalinaProps = new File(installDir, "conf/catalina.properties");

-        return serverConfig.exists() && catalinaProps.exists();

-    }

-

-//

-// FileSystemInstaller Implementation

-//

-

-    public void writeConfiguration(InstallationConfig config)

-    throws IOException {

-

-        File contextConfigurationDirectory = getConfigurationDir(config);

-

-        Iterator it = config.getPortletApplications().entrySet().iterator();

-        while(it.hasNext()) {

-            Map.Entry entry = (Map.Entry)it.next();

-            String context = entry.getKey().toString();

-            File portletApp = (File)entry.getValue();

-

-            String deployed = "../"+config.getServerConfig().getDomain() +

-                    "/" +  portletApp.getName();

-            String contents = getPortletApplicationConfig(context, deployed);

-            FileWriter out = new FileWriter(

-                    new File(contextConfigurationDirectory, context+".xml"));

-            out.write(contents);

-            out.flush();

-            out.close();

-        }

-

-        File xmlFile =  new File(

-                contextConfigurationDirectory,

-                config.getPortalContextPath()+".xml"

-        );

-

-        FileWriter out = new FileWriter(xmlFile);

-        out.write(getPortalApplicationConfig(config));

-        out.flush();

-        out.close();

-    }

-

-    protected File getEndorsedDir(InstallationConfig config ) {

-        File installationDirectory = config.getInstallationDirectory();

-        return new File(installationDirectory, "common/endorsed");

-    }

-

-    protected File getSharedDir(InstallationConfig config) {

-        File installationDirectory = config.getInstallationDirectory();

-        return new File(installationDirectory, "shared/lib");

-    }

-

-    protected File getWebAppDir(InstallationConfig config) {

-        File installationDirectory = config.getInstallationDirectory();

-        return new File(

-            installationDirectory, config.getServerConfig().getDomain()

-        );

-    }

-

-//

-// Helpers

-//

-

-    protected File getConfigurationDir(InstallationConfig config) {

-        File installationDirectory = config.getInstallationDirectory();

-        String engine = "Catalina";

-        String host   = config.getServerConfig().getHost();

-        return new File(installationDirectory, "conf/"+engine+"/"+host);

-    }

-

-    private String getPortalApplicationConfig(InstallationConfig config) {

-        String war = "../"+config.getServerConfig().getDomain() +

-                "/" +  config.getPortalApplication().getName();

-        String contextPath = config.getPortalContextPath();

-        return getConfigContents(war, contextPath);

-    }

-

-    private String getPortletApplicationConfig(String contextPath, String file) {

-        return getConfigContents(file, contextPath);

-    }

-

-    private String getConfigContents(String war, String contextPath) {

-        StringBuffer contents = new StringBuffer();

-        contents.append("<Context ")

-                .append("path=\"").append(contextPath).append("\" ")

-                .append("docBase=\"").append(war).append("\" ")

-                .append("crossContext=\"true\">").append("</Context>");

-       return contents.toString();

-    }

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/publish/PortletPublishConfig.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/publish/PortletPublishConfig.java
deleted file mode 100644
index a5be160..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/publish/PortletPublishConfig.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.publish;

-

-/**

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:

- * @version 1.0

- * @since Dec 5, 2005

- */

-public class PortletPublishConfig {

-

-    private String protocol;

-

-    private String host;

-

-    private int port;

-

-    private String context;

-

-    private String username;

-

-    private String password;

-

-    private String portletApplicationContext;

-

-    public String getHost() {

-        return host;

-    }

-

-    public void setHost(String host) {

-        this.host = host;

-    }

-

-    public int getPort() {

-        return port;

-    }

-

-    public void setPort(int port) {

-        this.port = port;

-    }

-

-    public String getContext() {

-        return context;

-    }

-

-    public void setContext(String context) {

-        this.context = context;

-    }

-

-    public String getUsername() {

-        return username;

-    }

-

-    public void setUsername(String username) {

-        this.username = username;

-    }

-

-    public String getPassword() {

-        return password;

-    }

-

-    public void setPassword(String password) {

-        this.password = password;

-    }

-

-    public String getProtocol() {

-        return protocol;

-    }

-

-    public void setProtocol(String protocol) {

-        this.protocol = protocol;

-    }

-

-    public String getPortletApplicationContext() {

-        return portletApplicationContext;

-    }

-

-    public void setPortletApplicationContext(String portletApplicationContext) {

-        this.portletApplicationContext = portletApplicationContext;

-    }

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/publish/PortletPublishService.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/publish/PortletPublishService.java
deleted file mode 100644
index 6ca35a2..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/publish/PortletPublishService.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.publish;

-

-/**

- * TODO JavaDoc

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:

- * @version 1.0

- * @since Dec 5, 2005

- */

-public interface PortletPublishService {

-

-    void publish(PortletPublishConfig config) throws PublishException;

-

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/publish/PortletPublishServiceFactory.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/publish/PortletPublishServiceFactory.java
deleted file mode 100644
index 3853205..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/publish/PortletPublishServiceFactory.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.publish;

-

-import org.apache.pluto.util.publish.http.HttpPortletPublishService;

-

-/**

- * TODO JavaDoc

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:

- * @version 1.0

- * @since Dec 5, 2005

- */

-public class PortletPublishServiceFactory {

-

-    private static PortletPublishServiceFactory factory;

-

-    public static PortletPublishServiceFactory getFactory() {

-        if(factory == null) {

-            factory = new PortletPublishServiceFactory();

-        }

-        return factory;

-    }

-

-    public PortletPublishService createPortletPublishService(PortletPublishConfig config) {

-        return new HttpPortletPublishService();

-    }

-

-

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/publish/PublishException.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/publish/PublishException.java
deleted file mode 100644
index 0eb9546..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/publish/PublishException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.publish;

-

-import org.apache.pluto.util.UtilityException;

-

-/**

- * TODO JavaDoc

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:

- * @version 1.0

- * @since Dec 5, 2005

- */

-public class PublishException extends UtilityException {

-

-    public PublishException() {

-    }

-

-    public PublishException(String message) {

-        super(message);

-    }

-

-    public PublishException(String message, Throwable cause) {

-        super(message, cause);

-    }

-

-    public PublishException(Throwable cause) {

-        super(cause);

-    }

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/publish/http/HttpPortletPublishService.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/publish/http/HttpPortletPublishService.java
deleted file mode 100644
index faa1949..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/publish/http/HttpPortletPublishService.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*

- * Copyright 2003,2004 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.publish.http;

-

-import org.apache.pluto.util.publish.PortletPublishConfig;

-import org.apache.pluto.util.publish.PortletPublishService;

-import org.apache.pluto.util.publish.PublishException;

-import org.apache.commons.httpclient.HttpClient;

-import org.apache.commons.httpclient.HostConfiguration;

-import org.apache.commons.httpclient.HttpException;

-import org.apache.commons.httpclient.methods.GetMethod;

-import org.apache.commons.httpclient.cookie.CookiePolicy;

-import org.apache.commons.logging.LogFactory;

-import org.apache.commons.logging.Log;

-

-import java.io.IOException;

-

-/**

- *

- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>:

- * @version 1.0

- * @since Dec 5, 2005

- */

-public class HttpPortletPublishService implements PortletPublishService {

-

-    private static final Log LOG = LogFactory

-        .getLog(HttpPortletPublishService.class);

-

-    public void publish(PortletPublishConfig config) throws PublishException {

-

-        HttpClient client = new HttpClient();

-        client.setHostConfiguration(getHostConfiguration(config));

-        client.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);

-

-        StringBuffer sb = new StringBuffer();

-        sb.append("/").append(config.getContext())

-          .append("/admin/Publish?context=")

-          .append(config.getPortletApplicationContext());

-

-        System.out.println(sb.toString());

-

-        if(LOG.isDebugEnabled()) {

-            LOG.debug("Request url: "+sb.toString());

-        }

-

-        GetMethod get = new GetMethod(sb.toString());

-

-        try {

-            client.executeMethod(get);

-            System.out.println(get.getStatusLine().toString());

-            if(LOG.isDebugEnabled()) {

-                LOG.debug("Publish Response: "+get.getStatusLine().toString());

-            }

-            String response = get.getResponseBodyAsString();

-            System.out.println(response);

-            if(LOG.isDebugEnabled()) {

-                LOG.debug("Response Details: \n"+response);

-            }

-        }

-        catch(HttpException he) {

-            throw new PublishException("Unable to publish. "+he.getMessage(), he);

-        }

-        catch(IOException io) {

-            throw new PublishException("Unable to publish. "+io.getMessage(), io);

-        }

-    }

-

-    private HostConfiguration getHostConfiguration(PortletPublishConfig config) {

-        HostConfiguration host = new HostConfiguration();

-        host.setHost(config.getHost(), config.getPort(), config.getProtocol());

-        return host;

-    }

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/ui/PortletUiMessage.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/ui/PortletUiMessage.java
deleted file mode 100644
index 3b5e5e6..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/ui/PortletUiMessage.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*

- * Copyright 2006 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.ui;

-

-/**

- * Immutable value object carrying a message and a message type to the user interface.

- *  

- * @author <a href="cdoremus@apache.org">Craig Doremus</a>

- * @see PortletUiMessageType

- */

-public class PortletUiMessage {

-

-	private String message = "";

-	private Throwable exception = null;

-	private PortletUiMessageType messageType = PortletUiMessageType.INFO;

-

-	private PortletUiMessage() {

-		//don't use

-	}

-	

-	public PortletUiMessage(String message, PortletUiMessageType messageType) {

-		this.message = message;

-		this.messageType = messageType;

-	}

-

-	public PortletUiMessage(Throwable e, PortletUiMessageType messageType) {

-		this.message = e.getMessage();

-		this.messageType = messageType;

-		this.exception = e;

-	}

-

-	public PortletUiMessage(Throwable e) {

-		this.message = e.getMessage();

-		this.messageType = PortletUiMessageType.ERROR;

-		this.exception = e;

-	}

-

-	public PortletUiMessage(String message, Throwable e) {

-		this.message = message;

-		this.messageType = PortletUiMessageType.ERROR;

-		this.exception = e;

-	}

-	

-	public String getMessage() {

-		return message;

-	}

-	

-	public PortletUiMessageType getMessageType() {

-		return messageType;

-	}

-	

-	public String getCssClass(){

-		return messageType.cssClass;

-	}

-	

-	public String toString() {

-		return message;

-	}

-

-	public Throwable getException() {

-		return exception;

-	}

-	

-}

diff --git a/trunk/pluto-util/src/main/java/org/apache/pluto/util/ui/PortletUiMessageType.java b/trunk/pluto-util/src/main/java/org/apache/pluto/util/ui/PortletUiMessageType.java
deleted file mode 100644
index fe4e55d..0000000
--- a/trunk/pluto-util/src/main/java/org/apache/pluto/util/ui/PortletUiMessageType.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*

- * Copyright 2006 The Apache Software Foundation.

- *

- * Licensed under the Apache License, Version 2.0 (the "License");

- * you may not use this file except in compliance with the License.

- * You may obtain a copy of the License at

- *

- *      http://www.apache.org/licenses/LICENSE-2.0

- *

- * Unless required by applicable law or agreed to in writing, software

- * distributed under the License is distributed on an "AS IS" BASIS,

- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * See the License for the specific language governing permissions and

- * limitations under the License.

- */

-package org.apache.pluto.util.ui;

-

-/**

- * Typesafe enum (pre-JDK-1.4) representing different message

- * types and the Cascading Style Sheet class that should be

- * used to render the message (see PLT.C.3 in JSR-168 spec).

- *

- * TODO: Convert to JDK 1.5+ enum

- *

- * @author <a href="cdoremus@apache.org">Craig Doremus</a>

- * @see PortletUiMessage

- */

-public final class PortletUiMessageType {

-//TODO: Add methods to allow implemention of Serializable

-	

-	public static final PortletUiMessageType INFO = new PortletUiMessageType("info", "portlet-msg-info");

-	public static final PortletUiMessageType ERROR = new PortletUiMessageType("error", "portlet-msg-error");

-	public static final PortletUiMessageType STATUS = new PortletUiMessageType("status", "portlet-msg-status");

-	public static final PortletUiMessageType ALERT = new PortletUiMessageType("alert", "portlet-msg-alert");

-	public static final PortletUiMessageType SUCCESS = new PortletUiMessageType("success", "portlet-msg-success");

-

-	public final String name;

-	public final String cssClass;

-	

-	private PortletUiMessageType(String name, String cssClass){

-		this.name = name;

-		this.cssClass = cssClass;

-	}

-	

-	public static final PortletUiMessageType[] values() {

-		PortletUiMessageType[] vals = {INFO, ERROR, STATUS, ALERT, SUCCESS}; 

-		return vals;

-	}

-

-	public String toString(){

-		return name;

-	}

-	

-	public boolean equals(Object obj) {

-		return name.equals(obj);

-	}

-

-	public int hashCode() {

-		return name.hashCode();

-	}

-	

-

-	

-	

-}

diff --git a/trunk/pluto-util/src/resources/configure_1_3.dtd b/trunk/pluto-util/src/resources/configure_1_3.dtd
deleted file mode 100644
index ad3dc26..0000000
--- a/trunk/pluto-util/src/resources/configure_1_3.dtd
+++ /dev/null
@@ -1,238 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->
-<!--
-This is the document type descriptor for the
-org.mortbay.util.XmlConfiguration class.  It allows a java object to be
-configured by with a sequence of Set, Put and Call elements.  These tags are 
-mapped to methods on the object to be configured as follows:
-
-  <Set  name="Test">value</Set>              ==  obj.setTest("value");
-  <Put  name="Test">value</Put>              ==  obj.put("Test","value");
-  <Call name="test"><Arg>value</Arg></Call>  ==  obj.test("value");
-
-Values themselves may be configured objects that are created with the
-<New> tag or returned from a <Call> tag.
-
-Values are matched to arguments on a best effort approach, but types
-my be specified if a match is not achieved.
-
-$Id: configure_1_3.dtd,v 1.6 2005/03/29 12:02:50 gregwilkins Exp $
--->
-
-<!ENTITY % CONFIG "Get|Set|Put|Call|New|Ref">
-<!ENTITY % VALUE "#PCDATA|Call|New|Get|SystemProperty|Array|Ref">
-
-<!ENTITY % TYPEATTR "type CDATA #IMPLIED " > <!-- String|Character|Short|Byte|Integer|Long|Boolean|Float|Double|char|short|byte|int|long|boolean|float|double|URL|InetAddress|InetAddrPort| #classname -->
-<!ENTITY % IMPLIEDCLASSATTR "class NMTOKEN #IMPLIED" >
-<!ENTITY % CLASSATTR "class NMTOKEN #REQUIRED" >
-<!ENTITY % NAMEATTR "name NMTOKEN #REQUIRED" >
-<!ENTITY % DEFAULTATTR "default CDATA #IMPLIED" >
-<!ENTITY % IDATTR "id NMTOKEN #IMPLIED" >
-<!ENTITY % REQUIREDIDATTR "id NMTOKEN #REQUIRED" >
-<!--
-Configure Element.
-This is the root element that specifies the class of object that
-can be configured:
-
-    <Configure class="com.acme.MyClass"> ... </Configure>
-
-A Configure element can contain Set, Put or Call elements.
--->
-<!ELEMENT Configure (%CONFIG;)* >
-<!ATTLIST Configure %IMPLIEDCLASSATTR; %IDATTR; >
-
-
-<!--
-Set Element.
-This element maps to a call to a set method on the current object.
-The name and optional type attributes are used to select the set 
-method. If the name given is xxx, then a setXxx method is used, or
-the xxx field is used of setXxx cannot be found. 
-A Set element can contain value text and/or the value elements Call,
-New and SystemProperty. If no value type is specified, then white
-space is trimmed out of the value. If it contains multiple value
-elements they are added as strings before being converted to any
-specified type.
-
-A Set with a class attribute is treated as a static set method invocation.
--->
-<!ELEMENT Set ( %VALUE; )* >
-<!ATTLIST Set %NAMEATTR; %TYPEATTR; %IMPLIEDCLASSATTR; >
-
-
-<!--
-Get Element.
-This element maps to a call to a get method or field on the current object.
-The name attribute is used to select the get method.
-If the name given is xxx, then a getXxx method is used, or
-the xxx field is used of setXxx cannot be found. 
-A Get element can contain Set, Put and/or Call elements which act on the object
-returned by the get call.
-
-A Get with a class attribute is treated as a static get method or field.
--->
-<!ELEMENT Get (%CONFIG;)*>
-<!ATTLIST Get %NAMEATTR; %IMPLIEDCLASSATTR; %IDATTR; >
-
-<!--
-Put Element.
-This element maps to a call to a put method on the current object,
-which must implement the Map interface. The name attribute is used 
-as the put key and the optional type attribute can force the type 
-of the value.
-
-A Put element can contain value text and/or the value elements Call,
-New and SystemProperty. If no value type is specified, then white
-space is trimmed out of the value. If it contains multiple value
-elements they are added as strings before being converted to any
-specified type.
--->
-<!ELEMENT Put ( %VALUE; )* >
-<!ATTLIST Put %NAMEATTR; %TYPEATTR; >
-
-
-<!--
-Call Element.
-This element maps to an arbitrary call to a method on the current object,
-The name attribute and Arg elements are used to select the method.
-
-A Call element can contain a sequence of Arg elements followed by
-a sequence of Set, Put and/or Call elements which act on any object
-returned by the original call:
-
- <Call name="test"><Arg>value1</Arg><Set name="Test">Value2</Set></Call>
-
-This is equivalent to:
-
- Object o2 = o1.test("value1");
- o2.setTest("value2");
-
-A Call with a class attribute is treated as a static call.
-
--->
-<!ELEMENT Call (Arg*,(%CONFIG;)*)>
-<!ATTLIST Call %NAMEATTR; %IMPLIEDCLASSATTR; %IDATTR;>
-
-
-<!--
-Arg Element.
-This element defines a positional argument for the Call element.
-The optional type attribute can force the type of the value.
-
-An Arg element can contain value text and/or the value elements Call,
-New and SystemProperty. If no value type is specified, then white
-space is trimmed out of the value. If it contains multiple value
-elements they are added as strings before being converted to any
-specified type.
--->
-<!ELEMENT Arg ( %VALUE; )* >
-<!ATTLIST Arg %TYPEATTR; >
-
-
-
-<!--
-New Element.
-This element allows the creation of a new object as part of a 
-value of a Set, Put or Arg element. The class attribute determines
-the type of the new object and the contained Arg elements 
-are used to select the constructor for the new object.
-
-A New element can contain a sequence of Arg elements followed by
-a sequence of Set, Put and/or Call elements which act on the new object:
-
- <New class="com.acme.MyClass">
-   <Arg>value1</Arg><Set name="Test">Value2</Set>
- </New>
-
-This is equivalent to:
-
- Object o = new com.acme.MyClass("value1");
- o.setTest("value2");
-
--->
-<!ELEMENT New (Arg*,(%CONFIG;)*)>
-<!ATTLIST New %CLASSATTR; %IDATTR;>
-
-<!--
-Ref Element.
-This element allows a previously created object to be reference by id.
-
-A Ref element can contain a sequence of Set, Put and/or Call elements 
-which act on the referenced object:
-
- <Ref id="myobject">
-   <Set name="Test">Value2</Set>
- </New>
-
--->
-<!ELEMENT Ref ((%CONFIG;)*)>
-<!ATTLIST Ref %REQUIREDIDATTR;>
-
-<!--
-Array Element.
-This element allows the creation of a new array as part of a 
-value of a Set, Put or Arg element. The type attribute determines
-the type of the new array and the contained Item elements 
-are used for each element of the array
-
- <Array type="java.lang.String">
-   <Item>value0</Arg>
-   <Item><New class="java.lang.String"><Arg>value1</Arg></New></Item>
- </Array>
-
-This is equivalent to:
- String[] a = new String[] { "value0", new String("value1") };
-
--->
-<!ELEMENT Array (Item*)>
-<!ATTLIST Array %TYPEATTR; %IDATTR; >
-
-
-<!--
-Item Element.
-This element defines a positional argument for the Array element.
-The optional type attribute can force the type of the value.
-
-An Item element can contain value text and/or the value elements Call,
-New and SystemProperty. If no value type is specified, then white
-space is trimmed out of the value. If it contains multiple value
-elements they are added as strings before being converted to any
-specified type.
--->
-<!ELEMENT Item ( %VALUE; )* >
-<!ATTLIST Item %TYPEATTR; %IDATTR; >
-
-
-<!--
-System Property Element.
-This element allows JVM System properties to be retrieved as
-part of the value of a Set, Put or Arg element.
-The name attribute specifies the property name and the optional
-default argument provides a default value.
-
- <SystemProperty name="Test" default="value"/>
-
-This is equivalent to:
-
- System.getProperty("Test","value");
-
--->
-<!ELEMENT SystemProperty EMPTY>
-<!ATTLIST SystemProperty %NAMEATTR; %DEFAULTATTR; %IDATTR;>
-
-
-
diff --git a/trunk/pluto.nsi b/trunk/pluto.nsi
deleted file mode 100644
index e5797aa..0000000
--- a/trunk/pluto.nsi
+++ /dev/null
@@ -1,107 +0,0 @@
-; Pluto script for Nullsoft Installer

-; $Id: pluto.nsi,v 1 2005/07/28 14:17:51 ddewolf Exp $

-

-  ;Compression options

-  CRCCheck on

-  SetCompress force

-  SetCompressor lzma

-  SetDatablockOptimize on

-

-  Name "Apache Pluto"

-  OutFile "portals-pluto.exe"   ; The name of the unistaller file to write

-

-  ;Product information

-  VIAddVersionKey ProductName "Apache Pluto"

-  VIAddVersionKey CompanyName "Apache Software Foundation"

-  VIAddVersionKey LegalCopyright "Copyright (c) 1999-2005 The Apache Software Foundation"

-  VIAddVersionKey FileDescription "Apache Pluto Installer"

-  VIAddVersionKey FileVersion "2.0"

-  VIAddVersionKey ProductVersion "1.1.0"

-  VIAddVersionKey Comments "portals.apache.org/pluto"

-  VIAddVersionKey InternalName "portals-pluto-1.1.0.exe"

-  VIProductVersion 1.1.0.0

-

-!include "MUI.nsh"

-

-;---------------------------------

-;Installer Look and Feel Config

-;  !define MUI_HEADERIMAGE

-;  !define MUI_HEADERIMAGE_RIGHT

-;  !define MUI_HEADERIMAGE_BITMAP header.bmp

-;  !define MUI_WELCOMEFINISHPAGE_BITMAP side_left.bmp 

-;  !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README"

-;  !define MUI_FINISHPAGE_RUN $INSTDIR\bin\startup.bat

-;

-;  !define MUI_ABORTWARNING

-;

-;  ;Install Page order

-;  !insertmacro MUI_PAGE_WELCOME

-;  !insertmacro MUI_PAGE_LICENSE README

-;  !insertmacro MUI_PAGE_COMPONENTS

-;  !insertmacro MUI_PAGE_DIRECTORY

-;  !insertmacro MUI_PAGE_INSTFILES

-;  !insertmacro MUI_PAGE_FINISH

-;

-;  LicenseData README

- 

-; Set prompt text for select components window and select directory window

-ComponentText "Select Pluto components to install."

-DirText       "Select the Tomcat installation directory."

- 

-; --------- Install the Portlet Container

-Section "Pluto Portlet Container (required)"

- 

-  SetOutPath $INSTDIR\shared\lib ; Tomcat Shared Libaries

-  File pluto-descriptor-api\target\pluto-descriptor-api-1.1-SNAPSHOT.jar

-  File pluto-descriptor-impl\target\pluto-descriptor-impl-1.1-SNAPSHOT.jar

-  File pluto-container\target\pluto-container-1.1-SNAPSHOT.jar

-  ;File castor-0.9.6.jar

-  ;File portlet-api-1.0.jar

-

-  SetOutPath $INSTDIR\common\endorsed 

-  ;File xercesImpl-2.6.2.jar

-  ;File xml-apis-1.0.b2.jar

-  ;File xmlParserAPIs-2.6.2.jar

- 

-SectionEnd

-

-; --------- Install the Portal ----------

-Section "Pluto Portal Driver"

- 

-  SetOutPath $INSTDIR\webapps 

-  File "pluto-portal\target\pluto-portal.war" 

-  ;File "\oname=pluto-portal.war" "pluto-portal\target\pluto-portal.war" 

-

-  SetOutPath $INSTDIR\conf\Catalina\localhost 

-  File "pluto-portal\src\main\resources\pluto.xml"

- 

-SectionEnd

-

-; --------- Install the Deployer ----------

-Section "Pluto Portal Driver"

- 

-    ; Execute the Deployer Installer!

- 

-SectionEnd

-

-; --------- Install the TestSuite ----------

-Section "Pluto TestSuite"

- 

-  SetOutPath $INSTDIR\webapps 

-  File "pluto-testsuite\target\pluto-testsuite.war" 

-

-  SetOutPath $INSTDIR\conf\Catalina\localhost 

-  File "pluto-testsuite\src\main\resources\testsuite.xml"

-

-SectionEnd

-

-; ---------- Functions ---------

-  Function .onVerifyInstDir

-    IfFileExists $INSTDIR\bin\tomcat5.exe PathGood

-      Abort ; if $INSTDIR is not a winamp directory, don't let us install there

-    PathGood:

-  FunctionEnd

- 

-; eof 

- 

-

diff --git a/trunk/pom.xml b/trunk/pom.xml
deleted file mode 100644
index d9d9ac6..0000000
--- a/trunk/pom.xml
+++ /dev/null
@@ -1,348 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 2005-2006 The Apache Software Foundation
-
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.apache.pluto</groupId>
-  <artifactId>pluto</artifactId>
-  <packaging>pom</packaging>
-  <name>Apache Pluto</name>
-  <!--
-  Version numbers also need to be changed in
-   * All project pom.xml files, 
-   * dist-build.xml in this directory, 
-   * The pluto-portal-driver-config.xml in the pluto-portal module (src/main/webapp/WEB-INF), 
-   * expectedResults.properties in the portal-testsuite module (src/main/webapp/WEB-INF/classes), 
-   * environment.properties in pluto-container module (src/main/resources/org/apache/pluto) and 
-   * InstallationDependancy.java in the maven-pluto-plugin module (src/main/java/org/apache/pluto/maven).
-  -->
-  <version>1.1.0-SNAPSHOT</version>
-  <!-- Due to a bug in maven 2.0, the description must not contain any line breaks or tabs. -->
-  <description>Pluto is the Reference Implementation of the Java Portlet Specfication.</description>
-  <url>http://portals.apache.org/pluto</url>
-
-  <issueManagement>
-    <system>jira</system>
-    <url>http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10560</url>
-  </issueManagement>
-  <ciManagement>
-    <system>continuum</system>
-    <notifiers>
-      <notifier>
-        <type>mail</type>
-        <address>pluto-dev@portals.apache.org</address>
-      </notifier>
-    </notifiers>
-  </ciManagement>
-  <inceptionYear>2003</inceptionYear>
-  
-  
-  <!-- Mailing Lists ======================================================= -->
-  
-  <mailingLists>
-    <mailingList>
-      <name>Pluto User List</name>
-      <subscribe>pluto-user-subscribe@portals.apache.org</subscribe>
-      <unsubscribe>pluto-users-unsubscribe@portals.apache.org</unsubscribe>
-      <post>pluto-users@portals.apache.org</post>
-      <archive>http://mail-archives.apache.org/mod_mbox/portals-pluto-user</archive>
-    </mailingList>
-    <mailingList>
-      <name>Pluto Developer List</name>
-      <subscribe>pluto-dev-subscribe@portals.apache.org</subscribe>
-      <unsubscribe>pluto-dev-unsubscribe@portals.apache.org</unsubscribe>
-      <post>pluto-dev@portals.apache.org</post>
-      <archive>http://mail-archives.apache.org/mod_mbox/portals-pluto-dev</archive>
-    </mailingList>
-    <mailingList>
-      <name>Pluto SCM List</name>
-      <subscribe>pluto-scm-subscribe@portals.apache.org</subscribe>
-      <unsubscribe>pluto-scm-unsubscribe@portals.apache.org</unsubscribe>
-      <post>pluto-scm@portals.apache.org</post>
-      <archive>http://mail-archives.apache.org/mod_mbox/portals-pluto-scm</archive>
-    </mailingList>
-  </mailingLists>
-  
-  
-  <!-- Pluto Committers ==================================================== -->
-  
-  <!-- Email format: [name]#a@T#[domain].d0t.[extension]
-       '@' and '.' characters are added because m2 seems to need them to
-       generate mailto links. -->
-  
-  <developers>
-    
-    <developer>
-      <name>Michael Blum</name>
-      <id>blumm</id>
-      <email>blumm#a@T#apache.d0t.org</email>
-    </developer>
-
-    <developer>
-      <name>Carsten Ziegeler</name>
-      <id>cziegeler</id>
-      <email>cziegeler#a@T#apache.d0t.org</email>
-    </developer>
-
-    <developer>
-      <name>David DeWolf</name>
-      <id>ddewolf</id>
-      <email>ddewolf@apache.org</email>
-      <timezone>-4</timezone>
-      <url>http://www.daviddewolf.com</url>
-      <organization>Three Pillar Software, Inc.</organization>
-      <organizationUrl>http://www.threepillarsoftware.com</organizationUrl>
-      <roles><role>Java Developer</role></roles>
-    </developer>
-
-    <developer>
-      <name>Nick Lothian</name>
-      <id>nlothian</id>
-      <email>nlothian#a@T#apache.d0t.org</email>
-    </developer>
-
-    <developer>
-      <name>Craig Doremus</name>
-      <id>cdoremus</id>
-      <email>cdoremus#a@T#apache.d0t.org</email>
-    </developer>
-    
-    <developer>
-      <name>Zhong Zheng</name>
-      <id>zheng</id>
-      <email>zheng#a@T#apache.d0t.org</email>
-      <timezone>+1</timezone>
-      <organization/>
-      <roles><role>Java Developer</role></roles>
-    </developer>
-    
-    <developer>
-      <name>Santiago Gala</name>
-      <id>sgala</id>
-      <email>sgala#a@T#hisitech.d0t.com</email>
-      <organization/>
-    </developer>
-    
-    <developer>
-      <name>Raphael Luta</name>
-      <id>raphael</id>
-      <email>raphael#a@T#apache.d0t.org</email>
-      <organization/>
-    </developer>
-    
-    <developer>
-      <name>David S. Taylor</name>
-      <id>taylor</id>
-      <email>david#a@T#bluesunrise.d0t.com</email>
-      <organization/>
-    </developer>
-    
-    <developer>
-      <name>Scott T. Weaver</name>
-      <id>weaver</id>
-      <email>weaver#a@T#apache.d0t.org</email>
-    </developer>
-    
-    <developer>
-      <name>Stefan Hepper</name>
-      <id>sthepper</id>
-      <email>sthepper#a@T#apache.d0t.org</email>
-    </developer>
-
-    <developer>
-      <name>Elliot Metsger</name>
-      <id>esm</id>
-      <email>esm#a@T#apache.d0t.org</email>
-      <timezone>-4</timezone>
-      <url>http://uppertank.net/blog</url>
-      <organization>Johns Hopkins University, Sheridan Libraries</organization>
-      <organizationUrl>http://www.library.jhu.edu</organizationUrl>
-    </developer>
-    
-  </developers>
-  
-  
-  <!-- Pluto Contributors ================================================== -->
-
-  <contributors>
-    <contributor>
-      <name>Michael Westbay</name>
-      <email>westbay#a@T#users.d0t.sourceforge.d0t.net</email>
-    </contributor>
-    <contributor>
-      <name>Ken Weiner</name>
-      <email>kweiner#a@T#unicon.d0t.net</email>
-    </contributor>
-    <contributor>
-      <name>Ken Atherton</name>
-      <email>katherto#a@T#visa.d0t.com</email>
-    </contributor>
-  </contributors>
-  
-  <licenses>
-    <license>
-      <name>The Apache Software License, Version 2.0</name>
-      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-      <distribution>repo</distribution>
-    </license>
-  </licenses>
-  
-  <scm>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/portals/pluto/trunk</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/portals/pluto/trunk</developerConnection>
-    <url>http://svn.apache.org/viewcvs.cgi/portals/pluto/trunk</url>
-  </scm>
-
-  <organization>
-    <name>Apache Software Foundation</name>
-    <url>http://www.apache.org/</url>
-  </organization>
-  
-  
-  <!-- Dependency Version Properties ======================================= -->
- 
-  <!--
-    NOTE:
-    
-    Modification of these properties affects:
-    1) Dependent project poms
-    2)  maven-pluto-plugin/src/main/resources/versions.properties as well!
-
-    -->
-  <properties>
-    <portlet-api.version>1.0</portlet-api.version>
-    <servlet-api.version>2.3</servlet-api.version>
-    <jsp-api.version>2.0</jsp-api.version>
-    <jstl.version>1.1.2</jstl.version>
-    <taglibs.standard.version>1.0.4</taglibs.standard.version>
-    <xerces.version>2.6.2</xerces.version>
-    <castor.version>1.0</castor.version>
-    <commons-digester.version>1.7</commons-digester.version>
-    <commons-collections.version>3.2</commons-collections.version>
-    <commons-cli.version>1.0</commons-cli.version>
-    <commons-fileupload.version>1.1</commons-fileupload.version>

-    <commons-httpclient.version>3.0</commons-httpclient.version>
-    <commons-io.version>1.1</commons-io.version>

-    <commons-beanutils.version>1.7.0</commons-beanutils.version>
-    <commons-logging.version>1.0.4</commons-logging.version>
-    <log4j.version>1.2.9</log4j.version>
-    <springframework.version>2.0-m2</springframework.version>
-    <plexus.version>1.0.4</plexus.version>
-    <maven.version>2.0</maven.version>
-    <ant.version>1.6.5</ant.version>
-    <junit.version>4.0</junit.version>
-    <jmock.version>1.0.1</jmock.version>    
-  </properties>
-
-  
-  <!-- Pluto Modules ======================================================= -->
-  
-  <modules>
-    <!-- Pluto Core Modules -->
-    <module>pluto-descriptor-api</module>
-    <module>pluto-descriptor-impl</module>
-    <module>pluto-container</module>
-    <module>pluto-taglib</module>
-
-    <!-- Pluto Portal and Testsuite Modules -->
-    <module>pluto-portal-driver</module>
-    <module>pluto-portal-driver-impl</module>
-    <module>pluto-portal</module>
-    <module>pluto-testsuite</module>
-
-    <!-- Pluto Utilities, Maven Plugins and Ant Tasks -->
-    <module>pluto-util</module>
-    <module>maven-pluto-plugin</module>
-    <module>pluto-ant-tasks</module>
-
-    <!-- Pluto Documentations -->
-    <module>pluto-site</module>
-  </modules>
-  
-  <distributionManagement>
-    <site>
-      <id>website</id>
-      <url>scp://minotaur.apache.org/www/portals.apache.org/pluto</url>
-    </site>
-    
-    <repository>
-      <id>apache.releases</id>
-      <name>Apache Release Distribution Repository</name>
-      <url>scp://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository</url>
-    </repository>
-    
-    <snapshotRepository>
-       <id>apache.snapshots</id>
-       <name>Apache Maven Repository (Snapshots and Test Builds)</name>
-       <url>scp://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository</url>
-    </snapshotRepository>
-
-  </distributionManagement>
-
-
-  <reporting>
-    <plugins>
-      
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-project-info-reports-plugin</artifactId>
-      </plugin>
-      
-      <!-- Commented checkstyle plugin: too many logs! -->
-      <!--plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin-->
-      
-      <!--plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-clover-plugin</artifactId>
-      </plugin-->
-      
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-javadoc-plugin</artifactId>
-      </plugin>
-      
-      <plugin>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <configuration>
-          <descriptors>
-            <descriptor>src/main/assembly/src.xml</descriptor>
-            <descriptor>src/main/assembly/bin.xml</descriptor>
-            <!--descriptor>src/main/assembly/bin-with-tomcat.xml</descriptor-->
-            <!--descriptor>src/main/assembly/bin-container.xml</descriptor-->
-          </descriptors>
-          <outputDirectory>target/dist</outputDirectory>
-        </configuration>
-      </plugin>      
-      
-      <plugin>
-        <artifactId>maven-release-plugin</artifactId>
-        <configuration>
-          <tagBase>scm:svn:https://svn.apache.org/repos/asf/portals/pluto/tags</tagBase>
-        </configuration>
-      </plugin>
-      
-    </plugins>
-  </reporting>
-
-</project>
-
-
diff --git a/trunk/src/main/assembly/bin.xml b/trunk/src/main/assembly/bin.xml
deleted file mode 100644
index 64d0ff6..0000000
--- a/trunk/src/main/assembly/bin.xml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<assembly>

-  

-  <id>bin</id>

-  

-  <formats>

-    <format>tar.gz</format>

-    <format>tar.bz2</format>

-    <format>zip</format>

-  </formats>

-  

-  <fileSets>

-    <!-- Pluto root files -->

-    <fileSet>

-      <includes>

-        <include>README*</include>

-        <include>LICENSE*</include>

-        <include>NOTICE*</include>

-      </includes>

-    </fileSet>

-    <!-- Pluto library files -->

-    <fileSet>

-      <directory>pluto-descriptor-api/target</directory>

-      <outputDirectory>lib</outputDirectory>

-      <includes><include>*.jar</include></includes>

-    </fileSet>

-    <fileSet>

-      <directory>pluto-descriptor-impl/target</directory>

-      <outputDirectory>lib</outputDirectory>

-      <includes><include>*.jar</include></includes>

-    </fileSet>

-    <fileSet>

-      <directory>pluto-container/target</directory>

-      <outputDirectory>lib</outputDirectory>

-      <includes><include>*.jar</include></includes>

-    </fileSet>

-    <fileSet>

-      <directory>pluto-taglib/target</directory>

-      <outputDirectory>lib</outputDirectory>

-      <includes><include>*.jar</include></includes>

-    </fileSet>

-    <!-- Pluto webapp files (pluto-portal and pluto-testsuite) -->

-    <fileSet>

-      <directory>pluto-portal/target</directory>

-      <outputDirectory>webapps</outputDirectory>

-      <includes><include>*.war</include></includes>

-    </fileSet>

-    <fileSet>

-      <directory>pluto-testsuite/target</directory>

-      <outputDirectory>webapps</outputDirectory>

-      <includes><include>*.war</include></includes>

-    </fileSet>

-    <!-- Pluto utility files (util, maven/ant plugins) -->

-    <fileSet>

-      <directory>pluto-util/target</directory>

-      <outputDirectory>util</outputDirectory>

-      <includes><include>*.jar</include></includes>

-    </fileSet>

-    <fileSet>

-      <directory>pluto-ant-tasks/target</directory>

-      <outputDirectory>util</outputDirectory>

-      <includes><include>*.jar</include></includes>

-    </fileSet>

-    <fileSet>

-      <directory>maven-pluto-plugin/target</directory>

-      <outputDirectory>util</outputDirectory>

-      <includes><include>*.jar</include></includes>

-    </fileSet>

-  </fileSets>

-  

-  <dependencySets>

-    <!-- Should we include dependencies in pluto distribution? -->

-  </dependencySets>

-  

-</assembly>

-

diff --git a/trunk/src/main/assembly/src.xml b/trunk/src/main/assembly/src.xml
deleted file mode 100644
index 808e150..0000000
--- a/trunk/src/main/assembly/src.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-  Copyright 2005-2006 The Apache Software Foundation

-

-  Licensed under the Apache License, Version 2.0 (the "License");

-  you may not use this file except in compliance with the License.

-  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<assembly>

-  <id>src</id>

-  <formats>

-    <format>tar.gz</format>

-    <format>tar.bz2</format>

-    <format>zip</format>

-  </formats>

-  <fileSets>

-    <fileSet>

-      <excludes>

-        <exclude>portlet-api-1.0/**</exclude>

-        <exclude>**/target/**</exclude>

-        <exclude>**/.svn/**</exclude>

-        <exclude>bin/**</exclude>

-        <exclude>.project</exclude>

-        <exclude>.classpath</exclude>

-        <exclude>.svnignore</exclude>

-      </excludes>

-    </fileSet>

-  </fileSets>

-</assembly>

-