From dde12bdf2e682b340e53f4dec9b0f260411bf320 Mon Sep 17 00:00:00 2001 From: "Eric J. Bowersox" Date: Wed, 7 Nov 2001 08:43:09 +0000 Subject: [PATCH] THE GREAT RENAMING! All that was "SIG" should now be "community," except for the database and the URLs (for backward compatibility). Do a full rebuild after browsing this one! --- FAQS | 17 +- README | 18 +- TODO | 4 +- doc/categorization.txt | 2 +- doc/design-goals.html | 4 +- doc/identifiers.html | 2 +- doc/security-levels.html | 55 +- etc/render-config.xml | 4 +- etc/sidebox-config.xml | 8 +- etc/venice-config.xml | 48 +- etc/web.xml | 34 +- .../silverwrist/venice/core/AccessError.java | 2 +- .../silverwrist/venice/core/AuditData.java | 4 +- .../venice/core/CategoryDescriptor.java | 2 +- ...{SIGContext.java => CommunityContext.java} | 14 +- ...{SIGFeature.java => CommunityFeature.java} | 4 +- .../venice/core/ConferenceContext.java | 6 +- .../venice/core/ConfigException.java | 2 +- .../silverwrist/venice/core/ContactInfo.java | 4 +- src/com/silverwrist/venice/core/Country.java | 2 +- .../venice/core/DataException.java | 2 +- .../venice/core/EmailException.java | 2 +- .../venice/core/InternalStateError.java | 2 +- src/com/silverwrist/venice/core/Language.java | 2 +- .../silverwrist/venice/core/SearchMode.java | 6 +- src/com/silverwrist/venice/core/Startup.java | 2 +- .../silverwrist/venice/core/TopicContext.java | 2 +- .../silverwrist/venice/core/UserContext.java | 25 +- .../silverwrist/venice/core/VeniceEngine.java | 4 +- .../core/impl/AdminUserContextImpl.java | 4 +- ...rge.java => BackgroundCommunityPurge.java} | 46 +- .../core/impl/CategoryDescriptorImpl.java | 8 +- ...{SIGBackend.java => CommunityBackend.java} | 16 +- ...IGCoreData.java => CommunityCoreData.java} | 477 ++++----- .../impl/{SIGData.java => CommunityData.java} | 27 +- ...Backend.java => CommunityDataBackend.java} | 6 +- ...mpl.java => CommunityUserContextImpl.java} | 962 +++++++++--------- .../venice/core/impl/ConferenceBackend.java | 4 +- ...t.java => ConferenceCommunityContext.java} | 24 +- ...va => ConferenceCommunityContextImpl.java} | 112 +- .../venice/core/impl/ConferenceCoreData.java | 67 +- .../venice/core/impl/ConferenceData.java | 16 +- .../core/impl/ConferenceUserContextImpl.java | 345 ++++--- .../venice/core/impl/ContactInfoImpl.java | 34 +- .../venice/core/impl/EngineBackend.java | 12 +- .../venice/core/impl/ImageStore.java | 2 +- .../venice/core/impl/ReturnConfSeq.java | 2 +- .../venice/core/impl/ReturnTopicInfo.java | 2 +- .../venice/core/impl/Stashable.java | 2 +- .../impl/TopicMessageUserContextImpl.java | 12 +- .../core/impl/TopicUserContextImpl.java | 10 +- .../venice/core/impl/UserContextImpl.java | 137 +-- .../venice/core/impl/UserFoundImpl.java | 2 +- .../venice/core/impl/VeniceEngineImpl.java | 92 +- .../venice/db/PostLinkDecoder.java | 58 +- .../venice/db/PostLinkDecoderContext.java | 14 +- .../venice/db/PostLinkRewriter.java | 10 +- .../silverwrist/venice/security/Audit.java | 24 +- .../venice/security/AuditRecord.java | 84 +- .../venice/security/Capability.java | 24 +- .../venice/security/DefaultLevels.java | 50 +- src/com/silverwrist/venice/security/Role.java | 146 +-- .../venice/security/SecLevels.java | 28 +- .../venice/servlets/Attachment.java | 18 +- .../{SIGAdmin.java => CommunityAdmin.java} | 221 ++-- ...IGFrontEnd.java => CommunityFrontEnd.java} | 22 +- ...erations.java => CommunityOperations.java} | 173 ++-- ...{SIGProfile.java => CommunityProfile.java} | 18 +- .../venice/servlets/ConfDisplay.java | 24 +- .../venice/servlets/ConfOperations.java | 186 ++-- src/com/silverwrist/venice/servlets/Find.java | 2 +- .../venice/servlets/PostMessage.java | 20 +- .../venice/servlets/PostOperations.java | 10 +- .../venice/servlets/PostShortcut.java | 22 +- .../silverwrist/venice/servlets/Settings.java | 37 +- .../venice/servlets/SystemAdmin.java | 2 +- .../venice/servlets/TopicOperations.java | 12 +- .../venice/servlets/Variables.java | 18 +- .../venice/servlets/VeniceServlet.java | 91 +- .../servlets/format/AttachmentForm.java | 12 +- .../servlets/format/AuditDataViewer.java | 4 +- ...IGAdminTop.java => CommunityAdminTop.java} | 30 +- ....java => CommunityCategoryBrowseData.java} | 25 +- ...mbership.java => CommunityMembership.java} | 68 +- ...ileData.java => CommunityProfileData.java} | 43 +- ...{SIGWelcome.java => CommunityWelcome.java} | 24 +- .../servlets/format/ConferenceActivity.java | 8 +- .../servlets/format/ConferenceListing.java | 28 +- .../servlets/format/ConferenceMembership.java | 24 +- .../servlets/format/ConferenceSequence.java | 14 +- ...Dialog.java => CreateCommunityDialog.java} | 46 +- .../format/CreateConferenceDialog.java | 12 +- ...g.java => EditCommunityProfileDialog.java} | 138 +-- .../servlets/format/EditConferenceDialog.java | 11 +- .../venice/servlets/format/FindData.java | 40 +- .../venice/servlets/format/Invitation.java | 20 +- .../venice/servlets/format/JoinKeyDialog.java | 12 +- .../servlets/format/ManageConference.java | 14 +- .../format/ManageConferenceAliases.java | 19 +- .../{MenuSIG.java => MenuCommunity.java} | 22 +- ...GWelcome.java => NewCommunityWelcome.java} | 34 +- .../venice/servlets/format/NewTopicForm.java | 12 +- .../servlets/format/PasswordChanged.java | 2 +- .../venice/servlets/format/PostPreview.java | 12 +- .../venice/servlets/format/PostSlippage.java | 12 +- .../servlets/format/ReportConferenceMenu.java | 8 +- .../venice/servlets/format/TopicListing.java | 18 +- .../venice/servlets/format/TopicPosts.java | 26 +- ...serSIGList.java => UserCommunityList.java} | 32 +- .../{SIGBox.java => CommunityBox.java} | 42 +- .../format/sideboxes/ConferenceBox.java | 7 +- web/format/attach_form.jsp | 2 +- .../{sig_member.jsp => comm_member.jsp} | 18 +- .../{sigcatbrowser.jsp => commcatbrowser.jsp} | 10 +- .../{sigprofile.jsp => commprofile.jsp} | 36 +- web/format/{siglist.jsp => communitylist.jsp} | 24 +- .../{sigwelcome.jsp => commwelcome.jsp} | 10 +- web/format/conf_member.jsp | 12 +- web/format/conf_sequence.jsp | 16 +- web/format/conferences.jsp | 12 +- web/format/find.jsp | 52 +- web/format/hotlist.jsp | 5 +- web/format/invitation.jsp | 6 +- web/format/manage_aliases.jsp | 2 +- web/format/manage_conf.jsp | 2 +- .../{newsigwelcome.jsp => newcommwelcome.jsp} | 20 +- web/format/newtopic.jsp | 2 +- web/format/posts.jsp | 4 +- web/format/preview.jsp | 2 +- web/format/slippage.jsp | 2 +- web/format/topics.jsp | 2 +- 131 files changed, 2573 insertions(+), 2503 deletions(-) rename src/com/silverwrist/venice/core/{SIGContext.java => CommunityContext.java} (94%) rename src/com/silverwrist/venice/core/{SIGFeature.java => CommunityFeature.java} (93%) rename src/com/silverwrist/venice/core/impl/{BackgroundSIGPurge.java => BackgroundCommunityPurge.java} (77%) rename src/com/silverwrist/venice/core/impl/{SIGBackend.java => CommunityBackend.java} (73%) rename src/com/silverwrist/venice/core/impl/{SIGCoreData.java => CommunityCoreData.java} (76%) rename src/com/silverwrist/venice/core/impl/{SIGData.java => CommunityData.java} (84%) rename src/com/silverwrist/venice/core/impl/{SIGDataBackend.java => CommunityDataBackend.java} (88%) rename src/com/silverwrist/venice/core/impl/{SIGUserContextImpl.java => CommunityUserContextImpl.java} (59%) rename src/com/silverwrist/venice/core/impl/{ConferenceSIGContext.java => ConferenceCommunityContext.java} (74%) rename src/com/silverwrist/venice/core/impl/{ConferenceSIGContextImpl.java => ConferenceCommunityContextImpl.java} (84%) rename src/com/silverwrist/venice/servlets/{SIGAdmin.java => CommunityAdmin.java} (69%) rename src/com/silverwrist/venice/servlets/{SIGFrontEnd.java => CommunityFrontEnd.java} (76%) rename src/com/silverwrist/venice/servlets/{SIGOperations.java => CommunityOperations.java} (62%) rename src/com/silverwrist/venice/servlets/{SIGProfile.java => CommunityProfile.java} (81%) rename src/com/silverwrist/venice/servlets/format/{SIGAdminTop.java => CommunityAdminTop.java} (69%) rename src/com/silverwrist/venice/servlets/format/{SIGCategoryBrowseData.java => CommunityCategoryBrowseData.java} (86%) rename src/com/silverwrist/venice/servlets/format/{SIGMembership.java => CommunityMembership.java} (82%) rename src/com/silverwrist/venice/servlets/format/{SIGProfileData.java => CommunityProfileData.java} (80%) rename src/com/silverwrist/venice/servlets/format/{SIGWelcome.java => CommunityWelcome.java} (85%) rename src/com/silverwrist/venice/servlets/format/{CreateSIGDialog.java => CreateCommunityDialog.java} (73%) rename src/com/silverwrist/venice/servlets/format/{EditSIGProfileDialog.java => EditCommunityProfileDialog.java} (65%) rename src/com/silverwrist/venice/servlets/format/{MenuSIG.java => MenuCommunity.java} (87%) rename src/com/silverwrist/venice/servlets/format/{NewSIGWelcome.java => NewCommunityWelcome.java} (80%) rename src/com/silverwrist/venice/servlets/format/{UserSIGList.java => UserCommunityList.java} (81%) rename src/com/silverwrist/venice/servlets/format/sideboxes/{SIGBox.java => CommunityBox.java} (86%) rename web/format/{sig_member.jsp => comm_member.jsp} (92%) rename web/format/{sigcatbrowser.jsp => commcatbrowser.jsp} (88%) rename web/format/{sigprofile.jsp => commprofile.jsp} (78%) rename web/format/{siglist.jsp => communitylist.jsp} (74%) rename web/format/{sigwelcome.jsp => commwelcome.jsp} (79%) rename web/format/{newsigwelcome.jsp => newcommwelcome.jsp} (65%) diff --git a/FAQS b/FAQS index 02e1807..92c0aef 100644 --- a/FAQS +++ b/FAQS @@ -6,9 +6,10 @@ Frequently-Asked Questions about Venice (*) Q: What is Venice? A: The Venice Web Community System is a system for supporting online communities and special interest groups. A single Venice server will - support multiple SIGs, and all users authenticating themselves with the - Venice server will be able to join any SIG based on that server. SIGs - will support features like Web conferencing, chat, and instant messaging. + support multiple communities, and all users authenticating themselves with + the Venice server will be able to join any community based on that server. + Communities will support features like Web conferencing, chat, and instant + messaging. Q: Aren't there already conferencing packages out there? A: Yes, and some of them are very good. However, Venice is being designed @@ -83,6 +84,16 @@ A: Not at all. Some of the design structures are similar to CommunityWare, with a more self-consistent one. As time goes on, Venice will continue to incorporate features that distinguish it from the original WebbMe. +Q: What was up with the whole "SIGs" nomenclature? +A: That was one of the ways I was trying to differentiate myself from + CommunityWare and WebbMe. However, the terminology ("Special Interest + Group") turned out to be too cumbersome. Besides, as of November 2001, + Webb Interactive is out of that business, and indeed out of all business but + Jabber.com Inc. Therefore, I reversed myself on November 7, 2001 ("The Day + of The Great Renaming") and they're now called "Communities" everywhere. + (With two exceptions; the database and the URL generation, both for backward + compatibility.) + Q: Did WebbMe have instant messaging, too? A: Yes, it did. The original CommunityWare instant messaging and chat was based on code derived from Durand's earlier MindWire product. It was later diff --git a/README b/README index e34175d..7148b00 100644 --- a/README +++ b/README @@ -8,16 +8,16 @@ SourceForge Home: Description: The Venice Web Communities System is a system for supporting online communities and special interest groups. A single Venice server will - support multiple SIGs, and all users authenticating themselves with the - Venice server will be able to join any SIG based on that server. + support multiple communities, and all users authenticating themselves with + the Venice server will be able to join any community based on that server. - SIGs support multiple features, the first of which will be Web-based linear - conferencing (along the lines of WellEngaged, UBB, and other conferencing - systems). Features to be added thereafter include instant messaging and - chat (which will be based on the Jabber open-source instant-messaging - system), calendars, link directories, e-mail newsletters, and possibly - advanced features such as collaborative databases and content creation/ - publishing. + Communities support multiple features, the first of which will be Web-based + linear conferencing (along the lines of WellEngaged, UBB, and other + conferencing systems). Features to be added thereafter include instant + messaging and chat (which will be based on the Jabber open-source + instant-messaging system), calendars, link directories, e-mail newsletters, + and possibly advanced features such as collaborative databases and content + creation/publishing. Implementation: Venice is written in Java using Java Servlet and JSP technologies, and diff --git a/TODO b/TODO index d93f3a8..9d83a8e 100644 --- a/TODO +++ b/TODO @@ -36,8 +36,8 @@ Lots! - : move topics from one conf to another? -- Unimplemented functions on the SIG Administration page: - Set SIG Features (sigadmin, command=F) +- Unimplemented functions on the Community Administration page: + Set Community Features (sigadmin, command=F) - Unimplemented functions in the system admin menu: Set Global Parameters diff --git a/doc/categorization.txt b/doc/categorization.txt index 76e5f29..812273c 100644 --- a/doc/categorization.txt +++ b/doc/categorization.txt @@ -1,4 +1,4 @@ -CATEGORY SYSTEM FOR VENICE SIGS +CATEGORY SYSTEM FOR VENICE COMMUNITIES (Based on the Mozilla Open Directory Project category system) Arts diff --git a/doc/design-goals.html b/doc/design-goals.html index a8645ae..3dd24a2 100644 --- a/doc/design-goals.html +++ b/doc/design-goals.html @@ -12,8 +12,8 @@
  1. A replacement for the CommunityWare/WebbMe conferencing system
  2. Java/JSP/servlets implementation running under Apache Tomcat, MySQL backend
  3. -
  4. Multiple SIGs (communities) hosted per server, each with multiple conferences - (and other features); users logged into one server can join multiple SIGs
  5. +
  6. Multiple communities hosted per server, each with multiple conferences + (and other features); users logged into one server can join multiple communities
  7. Conferencing functionality similar to CW/WebbMe:
    • Linear topics composed of HTML messages
    • diff --git a/doc/identifiers.html b/doc/identifiers.html index 7b3ea9e..b3b7892 100644 --- a/doc/identifiers.html +++ b/doc/identifiers.html @@ -9,7 +9,7 @@ Eric J. Bowersox <erbo@silcom.com> - January 26, 2001

      - Venice identifiers are used for user IDs, SIG aliases, and conference aliases (and maybe other unique + Venice identifiers are used for user IDs, community aliases, and conference aliases (and maybe other unique identifiers in the future). A valid Venice ID consists of characters from the following character set only:

        diff --git a/doc/security-levels.html b/doc/security-levels.html index ba782d5..4a7d842 100644 --- a/doc/security-levels.html +++ b/doc/security-levels.html @@ -109,7 +109,7 @@ "high band" security level refers to someone who exercises administrative control over that scope (and therefore all scopes greater than or "inside" it). Objects which are logically "enclosed" by other objects have a higher scope value; for instance, a conference would have a higher scope value - than a SIG, which in turn would have a higher scope value than 0 (the "global" scope).

        + than a community, which in turn would have a higher scope value than 0 (the "global" scope).

        The values 65000-65535 are not used, except that the value 65500 is defined as "no access" (something not even the global system administrator can touch). Neither are the values 32000-32999, except that the value 32500 is defined as "unrestricted user" (lying above the low bands of all scopes but below @@ -122,34 +122,34 @@

      • 64000 - Assistant administrator accounts ("PFY" level)
      • 64999 - Global system administrator ("BOFH" level)

      - SIGs use the scope level 3; the following values are defined within that scope: + Communities use the scope level 3; the following values are defined within that scope:

        -
      • 6500 - SIG member
      • -
      • 58000 - SIG co-host
      • -
      • 58500 - SIG host
      • +
      • 6500 - Community member
      • +
      • 58000 - Community co-host
      • +
      • 58500 - Community host

      - Within SIGs, conferences use scope 6; the following values are defined within that scope: + Within communities, conferences use scope 6; the following values are defined within that scope:

      • 12500 - Conference member (for private conferences)
      • 52500 - Conference host

      - Each user has a "base access" level, within scope 0, that is stored in the "users" table. Each SIG + Each user has a "base access" level, within scope 0, that is stored in the "users" table. Each community has four defined access levels associated with it:

        -
      • Read level - minimum access level required to read the SIG's data. This is commonly 6500 - (must be a member) but may be lower for special cases.
      • -
      • Write level - minimum access level required to write the SIG's data. Since this refers to - the SIG itself, this is commonly 58000 (hosts/co-hosts only)
      • -
      • Create level - minimum access level required to create new objects in the SIG. Typically - 58000 (hosts/co-hosts only).
      • -
      • Delete level - minimum access level required to delete the SIG. Typically 58500 (host +
      • Read level - minimum access level required to read the community's data. This is commonly + 6500 (must be a member) but may be lower for special cases.
      • +
      • Write level - minimum access level required to write the community's data. Since this + refers to the community itself, this is commonly 58000 (hosts/co-hosts only)
      • +
      • Create level - minimum access level required to create new objects in the community. + Typically 58000 (hosts/co-hosts only).
      • +
      • Delete level - minimum access level required to delete the community. Typically 58500 (host only).

      - The "sigmember" table maps UIDs to SIGIDs, adding a "granted level" field that specifies a given user's - access level within the SIG itself. (If a user already has a higher access level than the "granted" - access level, as in the case of the global sysadmin, the higher level takes precedence.) Note that - this level grant is within the context of that SIG only, and does not affect access privileges - to any other SIG.

      + The "sigmember" table maps UIDs to community IDs, adding a "granted level" field that specifies a given + user's access level within the community itself. (If a user already has a higher access level than the + "granted" access level, as in the case of the global sysadmin, the higher level takes precedence.) Note + that this level grant is within the context of that community only, and does not affect access + privileges to any other community.

      Each conference has seven defined access levels associated with it:

      • Read level - minimum access level required to read the posts. Commonly 6500 (member of @@ -165,15 +165,16 @@
      • Change level - minimum access level required to change the conference's profile or membership list. Commonly 52500 (conference hosts only).
      • Delete level - minimum access level required to delete the conference. Commonly 58000 - (hosts/cohosts of the enclosing SIG only).
      • + (hosts/cohosts of the enclosing community only).

      - As with SIGs, there is a "confmember" table that maps UIDs to CONFIDs, adding a "granted level" field - that grants additional access privileges. (There is also a field in the table that maps conferences - into SIGs that allows a SIG to grant its users additional privileges within a conference. Normally, - this field is 0, and so it "drops out" of the calculation of access levels.) Note that, if a user has - no membership entry for a conference, the entry for the conference's enclosing SIG takes precedence, - or the base level if there is no entry in any enclosing SIG. Also note that a grant of level for a - conference or SIG only applies with respect to that conference or SIG, not any other.

      + As with communities, there is a "confmember" table that maps UIDs to CONFIDs, adding a "granted level" + field that grants additional access privileges. (There is also a field in the table that maps + conferences into communities that allows a community to grant its users additional privileges within a + conference. Normally, this field is 0, and so it "drops out" of the calculation of access levels.) Note + that, if a user has no membership entry for a conference, the entry for the conference's enclosing + community takes precedence, or the base level if there is no entry in any enclosing community. Also + note that a grant of level for a conference or community only applies with respect to that + conference or community, not any other.

      Additional scopes and levels will be defined for additional objects as they are added to Venice.

      diff --git a/etc/render-config.xml b/etc/render-config.xml index b62ae8d..e60f6af 100644 --- a/etc/render-config.xml +++ b/etc/render-config.xml @@ -136,7 +136,7 @@ Text of this agreement is TBD. - +

      Front Page
      @@ -151,7 +151,7 @@ Text of this agreement is TBD. - +
      About This Site
      diff --git a/etc/sidebox-config.xml b/etc/sidebox-config.xml index 41e8477..73be1a0 100644 --- a/etc/sidebox-config.xml +++ b/etc/sidebox-config.xml @@ -20,10 +20,10 @@ - Your SIGs - Featured SIGs - com.silverwrist.venice.servlets.format.sideboxes.SIGBox - You are not a member of any SIGs. + Your Communities + Featured Communities + com.silverwrist.venice.servlets.format.sideboxes.CommunityBox + You are not a member of any communities. Manage Create New purple-ball.gif diff --git a/etc/venice-config.xml b/etc/venice-config.xml index 0019335..63d52bf 100644 --- a/etc/venice-config.xml +++ b/etc/venice-config.xml @@ -157,51 +157,51 @@ IMMEDIATELY. Venice Password Changed - - + + and click the "Create Account" link -at the top of the page, or click the "Log In" link if you already have a Venice account. Once you have -completed the process, click the "Join Now" button. You will then be able to take part in the conferences -that are going on in the SIG. +Hi! I would like to invite you to join the "${community.name}" community on the Venice conferencing system. +To do so, you must register as a user, which is absolutely free! Just point your Web browser at + and click the "Create Account" link at the top of the page, +or click the "Log In" link if you already have a Venice account. Once you have completed the process, +click the "Join Now" button. You will then be able to take part in the conferences that are going on in +the community. ${personal} -Hope to see you in "${signame}" soon! +Hope to see you in "${community.name}" soon! -- ${fullname} (Venice user ID: ${username}) ]]> - - + + and click the "Create Account" link -at the top of the page, or click the "Log In" link if you already have a Venice account. Once you have -completed the process, click the "Join Now" button. You will be prompted for the "password" for this -SIG, which is "${joinkey}". You will then be able to take part in the conferences that are going on in the -SIG. +Hi! I would like to invite you to join the "${community.name}" community on the Venice conferencing system. +To do so, you must register as a user, which is absolutely free! Just point your Web browser at + and click the "Create Account" link at the top of the page, +or click the "Log In" link if you already have a Venice account. Once you have completed the process, +click the "Join Now" button. You will be prompted for the "password" for this community, which is +"${joinkey}". You will then be able to take part in the conferences that are going on in the community. ${personal} -Hope to see you in "${signame}" soon! +Hope to see you in "${community.name}" soon! -- ${fullname} (Venice user ID: ${username}) ]]> - - Invitation to "${signame}" SIG + + Invitation to "${community.name}" Community diff --git a/etc/web.xml b/etc/web.xml index 2d190fe..d8dd44a 100644 --- a/etc/web.xml +++ b/etc/web.xml @@ -110,36 +110,36 @@ - sigfrontend + communityfrontend - The "front end" for SIG display; it redirects the user to whatever page has - been defined as the "default" for that SIG. + The "front end" for community display; it redirects the user to whatever page has + been defined as the "default" for that community. - com.silverwrist.venice.servlets.SIGFrontEnd + com.silverwrist.venice.servlets.CommunityFrontEnd - sigprofile + communityprofile - Displays the profile for a given SIG. + Displays the profile for a given community. - com.silverwrist.venice.servlets.SIGProfile + com.silverwrist.venice.servlets.CommunityProfile - sigadmin + communityadmin - SIG administration functions. + Community administration functions. - com.silverwrist.venice.servlets.SIGAdmin + com.silverwrist.venice.servlets.CommunityAdmin - sigoperations + communityoperations - General SIG operations. + General community operations. - com.silverwrist.venice.servlets.SIGOperations + com.silverwrist.venice.servlets.CommunityOperations @@ -282,22 +282,22 @@ - sigfrontend + communityfrontend /sig/* - sigprofile + communityprofile /sigprofile - sigadmin + communityadmin /sigadmin - sigoperations + communityoperations /sigops diff --git a/src/com/silverwrist/venice/core/AccessError.java b/src/com/silverwrist/venice/core/AccessError.java index fad5230..2360fae 100644 --- a/src/com/silverwrist/venice/core/AccessError.java +++ b/src/com/silverwrist/venice/core/AccessError.java @@ -7,7 +7,7 @@ * WARRANTY OF ANY KIND, either express or implied. See the License for the specific * language governing rights and limitations under the License. * - * The Original Code is the Venice Web Community System. + * The Original Code is the Venice Web Communities System. * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are diff --git a/src/com/silverwrist/venice/core/AuditData.java b/src/com/silverwrist/venice/core/AuditData.java index e983fb9..23cb1bf 100644 --- a/src/com/silverwrist/venice/core/AuditData.java +++ b/src/com/silverwrist/venice/core/AuditData.java @@ -32,7 +32,7 @@ public interface AuditData extends Audit public abstract int getUID(); - public abstract int getSIGID(); + public abstract int getCommunityID(); public abstract String getIPAddress(); @@ -42,6 +42,6 @@ public interface AuditData extends Audit public abstract String getUserName(); - public abstract String getSIGName(); + public abstract String getCommunityName(); } // end interface AuditData diff --git a/src/com/silverwrist/venice/core/CategoryDescriptor.java b/src/com/silverwrist/venice/core/CategoryDescriptor.java index 259dd4a..c21c1ec 100644 --- a/src/com/silverwrist/venice/core/CategoryDescriptor.java +++ b/src/com/silverwrist/venice/core/CategoryDescriptor.java @@ -7,7 +7,7 @@ * WARRANTY OF ANY KIND, either express or implied. See the License for the specific * language governing rights and limitations under the License. * - * The Original Code is the Venice Web Community System. + * The Original Code is the Venice Web Communities System. * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are diff --git a/src/com/silverwrist/venice/core/SIGContext.java b/src/com/silverwrist/venice/core/CommunityContext.java similarity index 94% rename from src/com/silverwrist/venice/core/SIGContext.java rename to src/com/silverwrist/venice/core/CommunityContext.java index 92b468d..3351250 100644 --- a/src/com/silverwrist/venice/core/SIGContext.java +++ b/src/com/silverwrist/venice/core/CommunityContext.java @@ -21,13 +21,13 @@ import java.util.BitSet; import java.util.Date; import java.util.List; -public interface SIGContext extends SearchMode +public interface CommunityContext extends SearchMode { public static final int HIDE_NONE = 0; public static final int HIDE_DIRECTORY = 1; public static final int HIDE_BOTH = 2; - public abstract int getSIGID(); + public abstract int getCommunityID(); public abstract String getName(); @@ -37,7 +37,7 @@ public interface SIGContext extends SearchMode public abstract boolean isAdmin(); - public abstract boolean isPublicSIG(); + public abstract boolean isPublicCommunity(); public abstract int getCategoryID(); @@ -69,7 +69,7 @@ public interface SIGContext extends SearchMode public abstract void setFeatures(BitSet feature_set, BitSet mask) throws DataException, AccessError; - public abstract List getSIGFeaturesList(); + public abstract List getCommunityFeaturesList(); public abstract String getDefaultApplet(); @@ -116,11 +116,11 @@ public interface SIGContext extends SearchMode public abstract void setSecurityLevels(int read, int write, int create, int delete, int join) throws DataException, AccessError; - public abstract boolean canAdministerSIG(); + public abstract boolean canAdministerCommunity(); public abstract boolean canModifyProfile(); - public abstract boolean isAdminSIG(); + public abstract boolean isAdminCommunity(); public abstract void join(String joinkey) throws DataException, AccessError; @@ -171,4 +171,4 @@ public interface SIGContext extends SearchMode public abstract int getAuditRecordCount() throws AccessError, DataException; -} // end interface SIGContext +} // end interface CommunityContext diff --git a/src/com/silverwrist/venice/core/SIGFeature.java b/src/com/silverwrist/venice/core/CommunityFeature.java similarity index 93% rename from src/com/silverwrist/venice/core/SIGFeature.java rename to src/com/silverwrist/venice/core/CommunityFeature.java index 3d5be66..392a8f7 100644 --- a/src/com/silverwrist/venice/core/SIGFeature.java +++ b/src/com/silverwrist/venice/core/CommunityFeature.java @@ -17,7 +17,7 @@ */ package com.silverwrist.venice.core; -public interface SIGFeature +public interface CommunityFeature { public abstract int getFeatureCode(); @@ -29,4 +29,4 @@ public interface SIGFeature public abstract int getSequence(); -} // end interface SIGFeature +} // end interface CommunityFeature diff --git a/src/com/silverwrist/venice/core/ConferenceContext.java b/src/com/silverwrist/venice/core/ConferenceContext.java index fcf14a4..f49550e 100644 --- a/src/com/silverwrist/venice/core/ConferenceContext.java +++ b/src/com/silverwrist/venice/core/ConferenceContext.java @@ -90,9 +90,9 @@ public interface ConferenceContext public abstract void removeMember(int uid) throws DataException, AccessError; - public abstract int getSIGGrantedLevel() throws DataException, AccessError; + public abstract int getCommunityGrantedLevel() throws DataException, AccessError; - public abstract void setSIGGrantedLevel(int new_level) throws DataException, AccessError; + public abstract void setCommunityGrantedLevel(int new_level) throws DataException, AccessError; public abstract short getSequence() throws DataException, AccessError; @@ -147,7 +147,7 @@ public interface ConferenceContext public abstract boolean canAddToHotlist(); - public abstract SIGContext getEnclosingSIG(); + public abstract CommunityContext getEnclosingCommunity(); public abstract void removeFromHotlist() throws DataException; diff --git a/src/com/silverwrist/venice/core/ConfigException.java b/src/com/silverwrist/venice/core/ConfigException.java index 0a4c3da..379f9b9 100644 --- a/src/com/silverwrist/venice/core/ConfigException.java +++ b/src/com/silverwrist/venice/core/ConfigException.java @@ -7,7 +7,7 @@ * WARRANTY OF ANY KIND, either express or implied. See the License for the specific * language governing rights and limitations under the License. * - * The Original Code is the Venice Web Community System. + * The Original Code is the Venice Web Communities System. * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are diff --git a/src/com/silverwrist/venice/core/ContactInfo.java b/src/com/silverwrist/venice/core/ContactInfo.java index 0520917..e2e4d88 100644 --- a/src/com/silverwrist/venice/core/ContactInfo.java +++ b/src/com/silverwrist/venice/core/ContactInfo.java @@ -7,7 +7,7 @@ * WARRANTY OF ANY KIND, either express or implied. See the License for the specific * language governing rights and limitations under the License. * - * The Original Code is the Venice Web Community System. + * The Original Code is the Venice Web Communities System. * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are @@ -117,7 +117,7 @@ public interface ContactInfo public abstract int getOwnerUID(); - public abstract int getOwnerSIGID(); + public abstract int getOwnerCommunityID(); public abstract Date getLastUpdate(); diff --git a/src/com/silverwrist/venice/core/Country.java b/src/com/silverwrist/venice/core/Country.java index 52ab5a1..a31ef50 100644 --- a/src/com/silverwrist/venice/core/Country.java +++ b/src/com/silverwrist/venice/core/Country.java @@ -7,7 +7,7 @@ * WARRANTY OF ANY KIND, either express or implied. See the License for the specific * language governing rights and limitations under the License. * - * The Original Code is the Venice Web Community System. + * The Original Code is the Venice Web Communities System. * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are diff --git a/src/com/silverwrist/venice/core/DataException.java b/src/com/silverwrist/venice/core/DataException.java index 129b7f0..49fe104 100644 --- a/src/com/silverwrist/venice/core/DataException.java +++ b/src/com/silverwrist/venice/core/DataException.java @@ -7,7 +7,7 @@ * WARRANTY OF ANY KIND, either express or implied. See the License for the specific * language governing rights and limitations under the License. * - * The Original Code is the Venice Web Community System. + * The Original Code is the Venice Web Communities System. * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are diff --git a/src/com/silverwrist/venice/core/EmailException.java b/src/com/silverwrist/venice/core/EmailException.java index 85ab617..4778ace 100644 --- a/src/com/silverwrist/venice/core/EmailException.java +++ b/src/com/silverwrist/venice/core/EmailException.java @@ -7,7 +7,7 @@ * WARRANTY OF ANY KIND, either express or implied. See the License for the specific * language governing rights and limitations under the License. * - * The Original Code is the Venice Web Community System. + * The Original Code is the Venice Web Communities System. * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are diff --git a/src/com/silverwrist/venice/core/InternalStateError.java b/src/com/silverwrist/venice/core/InternalStateError.java index cf98ce1..63ea1f2 100644 --- a/src/com/silverwrist/venice/core/InternalStateError.java +++ b/src/com/silverwrist/venice/core/InternalStateError.java @@ -7,7 +7,7 @@ * WARRANTY OF ANY KIND, either express or implied. See the License for the specific * language governing rights and limitations under the License. * - * The Original Code is the Venice Web Community System. + * The Original Code is the Venice Web Communities System. * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are diff --git a/src/com/silverwrist/venice/core/Language.java b/src/com/silverwrist/venice/core/Language.java index 892a724..833584a 100644 --- a/src/com/silverwrist/venice/core/Language.java +++ b/src/com/silverwrist/venice/core/Language.java @@ -7,7 +7,7 @@ * WARRANTY OF ANY KIND, either express or implied. See the License for the specific * language governing rights and limitations under the License. * - * The Original Code is the Venice Web Community System. + * The Original Code is the Venice Web Communities System. * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are diff --git a/src/com/silverwrist/venice/core/SearchMode.java b/src/com/silverwrist/venice/core/SearchMode.java index ce7e158..1fe0568 100644 --- a/src/com/silverwrist/venice/core/SearchMode.java +++ b/src/com/silverwrist/venice/core/SearchMode.java @@ -7,7 +7,7 @@ * WARRANTY OF ANY KIND, either express or implied. See the License for the specific * language governing rights and limitations under the License. * - * The Original Code is the Venice Web Community System. + * The Original Code is the Venice Web Communities System. * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are @@ -19,9 +19,9 @@ package com.silverwrist.venice.core; public interface SearchMode { - public static final int FIELD_SIG_NAME = 0; + public static final int FIELD_COMMUNITY_NAME = 0; - public static final int FIELD_SIG_SYNOPSIS = 1; + public static final int FIELD_COMMUNITY_SYNOPSIS = 1; public static final int FIELD_USER_NAME = 2; diff --git a/src/com/silverwrist/venice/core/Startup.java b/src/com/silverwrist/venice/core/Startup.java index 1f029de..f6cacb5 100644 --- a/src/com/silverwrist/venice/core/Startup.java +++ b/src/com/silverwrist/venice/core/Startup.java @@ -7,7 +7,7 @@ * WARRANTY OF ANY KIND, either express or implied. See the License for the specific * language governing rights and limitations under the License. * - * The Original Code is the Venice Web Community System. + * The Original Code is the Venice Web Communities System. * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are diff --git a/src/com/silverwrist/venice/core/TopicContext.java b/src/com/silverwrist/venice/core/TopicContext.java index 3a15113..559c260 100644 --- a/src/com/silverwrist/venice/core/TopicContext.java +++ b/src/com/silverwrist/venice/core/TopicContext.java @@ -7,7 +7,7 @@ * WARRANTY OF ANY KIND, either express or implied. See the License for the specific * language governing rights and limitations under the License. * - * The Original Code is the Venice Web Community System. + * The Original Code is the Venice Web Communities System. * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are diff --git a/src/com/silverwrist/venice/core/UserContext.java b/src/com/silverwrist/venice/core/UserContext.java index 05961f5..250dc2a 100644 --- a/src/com/silverwrist/venice/core/UserContext.java +++ b/src/com/silverwrist/venice/core/UserContext.java @@ -54,38 +54,39 @@ public interface UserContext extends SearchMode public abstract void setDescription(String new_descr) throws DataException; - public abstract List getMemberSIGs() throws DataException; + public abstract List getMemberCommunities() throws DataException; - public abstract SIGContext getSIGContext(int sigid) throws DataException; + public abstract CommunityContext getCommunityContext(int cid) throws DataException; - public abstract SIGContext getSIGContext(String alias) throws DataException; + public abstract CommunityContext getCommunityContext(String alias) throws DataException; public abstract List getRootCategoryList() throws DataException; public abstract CategoryDescriptor getCategoryDescriptor(int catid) throws DataException; - public abstract List searchForSIGs(int field, int mode, String term, int offset, int count) + public abstract List searchForCommunities(int field, int mode, String term, int offset, int count) throws DataException; - public abstract int getSearchSIGCount(int field, int mode, String term) throws DataException; + public abstract int getSearchCommunityCount(int field, int mode, String term) throws DataException; - public abstract List getSIGsInCategory(int catid, int offset, int count) throws DataException; + public abstract List getCommunitiesInCategory(int catid, int offset, int count) throws DataException; - public abstract List getSIGsInCategory(CategoryDescriptor cat, int offset, int count) throws DataException; + public abstract List getCommunitiesInCategory(CategoryDescriptor cat, int offset, int count) + throws DataException; - public abstract int getNumSIGsInCategory(int catid) throws DataException; + public abstract int getNumCommunitiesInCategory(int catid) throws DataException; - public abstract int getNumSIGsInCategory(CategoryDescriptor cat) throws DataException; + public abstract int getNumCommunitiesInCategory(CategoryDescriptor cat) throws DataException; public abstract List searchForCategories(int mode, String term, int offset, int count) throws DataException; public abstract int getSearchCategoryCount(int mode, String term) throws DataException; - public abstract SIGContext createSIG(String name, String alias, String language, String synopsis, - String rules, String joinkey, int hide_mode) + public abstract CommunityContext createCommunity(String name, String alias, String language, String synopsis, + String rules, String joinkey, int hide_mode) throws DataException, AccessError; - public abstract boolean canCreateSIG(); + public abstract boolean canCreateCommunity(); public abstract List getSideBoxList() throws DataException; diff --git a/src/com/silverwrist/venice/core/VeniceEngine.java b/src/com/silverwrist/venice/core/VeniceEngine.java index 47d49a9..e390be0 100644 --- a/src/com/silverwrist/venice/core/VeniceEngine.java +++ b/src/com/silverwrist/venice/core/VeniceEngine.java @@ -50,7 +50,7 @@ public interface VeniceEngine extends SearchMode public abstract UserContext createNewAccount(String remote_addr, String username, String password, String reminder) throws DataException, AccessError; - public abstract boolean aliasExists(String alias, int exist_sigid); + public abstract boolean aliasExists(String alias, int exist_cid); public abstract boolean isValidCategoryID(int catid); @@ -73,7 +73,7 @@ public interface VeniceEngine extends SearchMode public abstract int getMaxNumConferenceMembersDisplay(); - public abstract int getMaxNumSIGMembersDisplay(); + public abstract int getMaxNumCommunityMembersDisplay(); public abstract List getMasterSideBoxList(); diff --git a/src/com/silverwrist/venice/core/impl/AdminUserContextImpl.java b/src/com/silverwrist/venice/core/impl/AdminUserContextImpl.java index 9b66b66..998e721 100644 --- a/src/com/silverwrist/venice/core/impl/AdminUserContextImpl.java +++ b/src/com/silverwrist/venice/core/impl/AdminUserContextImpl.java @@ -338,9 +338,9 @@ class AdminUserContextImpl implements AdminUserContext if (logger.isDebugEnabled()) logger.debug("putContactInfo() for UID " + uid); - if ((ci.getOwnerUID()!=uid) || (ci.getOwnerSIGID()>=0)) + if ((ci.getOwnerUID()!=uid) || (ci.getOwnerCommunityID()>=0)) { // the contact information is not owned correctly - logger.error("ContactInfo ownership wrong (it's " + ci.getOwnerUID() + ", " + ci.getOwnerSIGID() + logger.error("ContactInfo ownership wrong (it's " + ci.getOwnerUID() + ", " + ci.getOwnerCommunityID() + "), should be (" + uid + ", -1)"); throw new DataException("invalid contact information record"); diff --git a/src/com/silverwrist/venice/core/impl/BackgroundSIGPurge.java b/src/com/silverwrist/venice/core/impl/BackgroundCommunityPurge.java similarity index 77% rename from src/com/silverwrist/venice/core/impl/BackgroundSIGPurge.java rename to src/com/silverwrist/venice/core/impl/BackgroundCommunityPurge.java index d5c57c1..4bc7c4c 100644 --- a/src/com/silverwrist/venice/core/impl/BackgroundSIGPurge.java +++ b/src/com/silverwrist/venice/core/impl/BackgroundCommunityPurge.java @@ -26,14 +26,14 @@ import com.silverwrist.venice.db.*; import com.silverwrist.venice.core.DataException; import com.silverwrist.venice.core.InternalStateError; -class BackgroundSIGPurge implements Runnable +class BackgroundCommunityPurge implements Runnable { /*-------------------------------------------------------------------------------- * Static data members *-------------------------------------------------------------------------------- */ - private static Category logger = Category.getInstance(BackgroundSIGPurge.class.getName()); + private static Category logger = Category.getInstance(BackgroundCommunityPurge.class); /*-------------------------------------------------------------------------------- * Attributes @@ -43,7 +43,7 @@ class BackgroundSIGPurge implements Runnable private EngineBackend engine; private DataPool datapool; private UserBackend user; - private int sigid; + private int cid; private int num_confs; private int max_confid; private ReferenceCache conf_refcache; @@ -53,13 +53,13 @@ class BackgroundSIGPurge implements Runnable *-------------------------------------------------------------------------------- */ - BackgroundSIGPurge(EngineBackend engine, DataPool datapool, UserBackend user, int sigid, int num_confs, - int max_confid, ReferenceCache conf_refcache) + BackgroundCommunityPurge(EngineBackend engine, DataPool datapool, UserBackend user, int cid, int num_confs, + int max_confid, ReferenceCache conf_refcache) { this.engine = engine; this.datapool = datapool; this.user = user; - this.sigid = sigid; + this.cid = cid; this.num_confs = num_confs; this.max_confid = max_confid; this.conf_refcache = conf_refcache; @@ -74,7 +74,7 @@ class BackgroundSIGPurge implements Runnable public void run() { if (logger.isDebugEnabled()) - logger.debug("BackgroundSIGPurge running on SIG #" + sigid); + logger.debug("BackgroundCommunityPurge running on community #" + cid); Connection conn = null; // pooled database connection ParallelRunQueue rq = new ParallelRunQueue(2); @@ -85,23 +85,23 @@ class BackgroundSIGPurge implements Runnable Statement stmt = conn.createStatement(); // run some "lower priority" deletes - stmt.executeUpdate("DELETE FROM contacts WHERE owner_sigid = " + sigid + ";"); - stmt.executeUpdate("DELETE FROM sigftrs WHERE sigid = " + sigid + ";"); - stmt.executeUpdate("DELETE FROM sigban WHERE sigid = " + sigid + ";"); + stmt.executeUpdate("DELETE FROM contacts WHERE owner_sigid = " + cid + ";"); + stmt.executeUpdate("DELETE FROM sigftrs WHERE sigid = " + cid + ";"); + stmt.executeUpdate("DELETE FROM sigban WHERE sigid = " + cid + ";"); - // look up all conference IDs in this SIG + // look up all conference IDs in this community int[] conf_ids = new int[num_confs]; StringBuffer sql = new StringBuffer("SELECT confid FROM sigtoconf WHERE sigid = "); - sql.append(sigid).append(" AND confid <= ").append(max_confid).append(" ORDER BY confid;"); + sql.append(cid).append(" AND confid <= ").append(max_confid).append(" ORDER BY confid;"); ResultSet rs = stmt.executeQuery(sql.toString()); int conferences = 0; while (rs.next()) conf_ids[conferences++] = rs.getInt(1); for (int i=0; i "); - sql.append(sigid).append(" LIMIT 1;"); + sql.append(cid).append(" LIMIT 1;"); rs = stmt.executeQuery(sql.toString()); if (rs.next()) delete_core = false; // delete the sigtoconf record sql.setLength(0); - sql.append("DELETE FROM sigtoconf WHERE sigid = ").append(sigid).append(" AND confid = "); + sql.append("DELETE FROM sigtoconf WHERE sigid = ").append(cid).append(" AND confid = "); sql.append(key).append(';'); if (delete_core) @@ -139,7 +139,7 @@ class BackgroundSIGPurge implements Runnable sql.append("SELECT COUNT(*), MAX(topicid) FROM topics WHERE confid = ").append(key).append(';'); rs = stmt.executeQuery(sql.toString()); if (!(rs.next())) - throw new InternalStateError("BackgroundSIGPurge.run screwup on conference SELECT"); + throw new InternalStateError("BackgroundCommunityPurge.run screwup on conference SELECT"); rq.queue(new BackgroundConferencePurge(engine,datapool,key.intValue(),rs.getInt(1),rs.getInt(2))); } // end if (have to delete conference data) @@ -149,18 +149,18 @@ class BackgroundSIGPurge implements Runnable } // end for if (logger.isDebugEnabled()) - logger.debug("BackgroundSIGPurge basic delete complete for sig #" + sigid); + logger.debug("BackgroundCommunityPurge basic delete complete for community #" + cid); } // end try catch (SQLException e) { // on an error, just die - logger.error("BackgroundSIGPurge FATAL EXCEPTION purging #" + sigid + ": " + e.getMessage(),e); + logger.error("BackgroundCommunityPurge FATAL EXCEPTION purging #" + cid + ": " + e.getMessage(),e); return; } // end catch catch (DataException de) { // on an error, just die - logger.error("BackgroundSIGPurge FATAL EXCEPTION purging #" + sigid + ": " + de.getMessage(),de); + logger.error("BackgroundCommunityPurge FATAL EXCEPTION purging #" + cid + ": " + de.getMessage(),de); return; } // end catch @@ -174,8 +174,8 @@ class BackgroundSIGPurge implements Runnable rq.run(); // now run the parallel queue to finish processing if (logger.isDebugEnabled()) - logger.debug("BackgroundSIGPurge COMPLETE for sig #" + sigid); + logger.debug("BackgroundCommunityPurge COMPLETE for community #" + cid); } // end run -} // end class BackgroundSIGPurge +} // end class BackgroundCommunityPurge diff --git a/src/com/silverwrist/venice/core/impl/CategoryDescriptorImpl.java b/src/com/silverwrist/venice/core/impl/CategoryDescriptorImpl.java index 452caee..403df88 100644 --- a/src/com/silverwrist/venice/core/impl/CategoryDescriptorImpl.java +++ b/src/com/silverwrist/venice/core/impl/CategoryDescriptorImpl.java @@ -486,8 +486,8 @@ class CategoryDescriptorImpl implements CategoryDescriptor, Cloneable } // end try catch (SQLException e) { // turn SQLException into data exception - logger.error("DB error reading SIG entries: " + e.getMessage(),e); - throw new DataException("unable to retrieve user SIG information: " + e.getMessage(),e); + logger.error("DB error reading category entries: " + e.getMessage(),e); + throw new DataException("unable to retrieve category information: " + e.getMessage(),e); } // end catch finally @@ -554,8 +554,8 @@ class CategoryDescriptorImpl implements CategoryDescriptor, Cloneable } // end try catch (SQLException e) { // turn SQLException into data exception - logger.error("DB error reading SIG entries: " + e.getMessage(),e); - throw new DataException("unable to retrieve user SIG information: " + e.getMessage(),e); + logger.error("DB error reading category entries: " + e.getMessage(),e); + throw new DataException("unable to retrieve category information: " + e.getMessage(),e); } // end catch finally diff --git a/src/com/silverwrist/venice/core/impl/SIGBackend.java b/src/com/silverwrist/venice/core/impl/CommunityBackend.java similarity index 73% rename from src/com/silverwrist/venice/core/impl/SIGBackend.java rename to src/com/silverwrist/venice/core/impl/CommunityBackend.java index 96f5f02..da45b8d 100644 --- a/src/com/silverwrist/venice/core/impl/SIGBackend.java +++ b/src/com/silverwrist/venice/core/impl/CommunityBackend.java @@ -18,26 +18,26 @@ package com.silverwrist.venice.core.impl; import com.silverwrist.venice.core.DataException; -import com.silverwrist.venice.core.SIGContext; +import com.silverwrist.venice.core.CommunityContext; -public interface SIGBackend extends UserBackend +public interface CommunityBackend extends UserBackend { - public abstract SIGContext selfSIG(); + public abstract CommunityContext selfCommunity(); - public abstract int realSIGID(); + public abstract int realCommunityID(); public abstract boolean userHideHiddenConferences(); - public abstract int realSIGLevel(); + public abstract int realCommunityLevel(); - public abstract ConferenceSIGContext getConferenceDataObject(int confid) throws DataException; + public abstract ConferenceCommunityContext getConferenceDataObject(int confid) throws DataException; public abstract boolean userCanCreateSubobjects(); - public abstract String realSIGAlias(); + public abstract String realCommunityAlias(); public abstract void detachConferenceDataObject(int confid) throws DataException; public abstract boolean userCanDeleteSubobjects(); -} // end interface SIGBackend +} // end interface CommunityBackend diff --git a/src/com/silverwrist/venice/core/impl/SIGCoreData.java b/src/com/silverwrist/venice/core/impl/CommunityCoreData.java similarity index 76% rename from src/com/silverwrist/venice/core/impl/SIGCoreData.java rename to src/com/silverwrist/venice/core/impl/CommunityCoreData.java index bd0fcc5..a13c6e8 100644 --- a/src/com/silverwrist/venice/core/impl/SIGCoreData.java +++ b/src/com/silverwrist/venice/core/impl/CommunityCoreData.java @@ -28,16 +28,16 @@ import com.silverwrist.venice.security.AuditRecord; import com.silverwrist.venice.security.Capability; import com.silverwrist.venice.security.DefaultLevels; -class SIGCoreData implements SIGData, SIGDataBackend +class CommunityCoreData implements CommunityData, CommunityDataBackend { /*-------------------------------------------------------------------------------- - * Internal class that creates new ConferenceSIGContextImpl objects + * Internal class that creates new ConferenceCommunityContextImpl objects *-------------------------------------------------------------------------------- */ - protected class ConferenceSIGContextImplCreator implements ReferencedDataBuilder + protected class ConferenceCommunityContextImplCreator implements ReferencedDataBuilder { - protected ConferenceSIGContextImplCreator() + protected ConferenceCommunityContextImplCreator() { // do nothing } // end constructor @@ -46,7 +46,7 @@ class SIGCoreData implements SIGData, SIGDataBackend Integer xconf = (Integer)key; try { // create the desired object - return new ConferenceSIGContextImpl(engine,SIGCoreData.this,datapool,xconf.intValue()); + return new ConferenceCommunityContextImpl(engine,CommunityCoreData.this,datapool,xconf.intValue()); } // end try catch (DataException e) @@ -64,7 +64,7 @@ class SIGCoreData implements SIGData, SIGDataBackend *-------------------------------------------------------------------------------- */ - private static Category logger = Category.getInstance(SIGCoreData.class.getName()); + private static Category logger = Category.getInstance(CommunityCoreData.class); /*-------------------------------------------------------------------------------- * Attributes @@ -74,46 +74,46 @@ class SIGCoreData implements SIGData, SIGDataBackend private int refcount = 1; // object reference count private EngineBackend engine; // pointer to engine back end private DataPool datapool; // pointer to data pool - private int sigid; // ID of this SIG + private int cid; // ID of this community private java.util.Date created; // date/time of database creation private java.util.Date last_access; // date/time of last access private java.util.Date last_update; // date/time of last update private int read_level; // access level required to read contained data private int write_level; // access level required to write summary data private int create_level; // access level required to create subobjects - private int delete_level; // access level required to delete SIG - private int join_level; // access level required to become a SIG member + private int delete_level; // access level required to delete community + private int join_level; // access level required to become a community member private int contactid; // this community's contact ID (geographic info) private int host_uid; // UID of the community host private int category_id; // category ID for this community private boolean hidden_directory; // hidden from directory listings? private boolean hidden_search; // hidden from keyword searches? - private boolean members_only; // only members allowed in this SIG? - private boolean is_admin; // is this the administrative SIG? - private short initial_feature; // the "initial" feature to display for this SIG - private String name; // the name of this SIG + private boolean members_only; // only members allowed in this community? + private boolean is_admin; // is this the administrative community? + private short initial_feature; // the "initial" feature to display for this community + private String name; // the name of this community private String language; // the default language code private String synopsis; // the synopsis of the community private String rules; // the community "rules" private String alias; // the community alias value - private boolean public_sig; // is this a public SIG? + private boolean public_comm; // is this a public community? private BitSet features; // set of available features private ReferenceCache conf_refcache = new ReferenceCache(); - private ConferenceSIGContextImplCreator conf_creator = new ConferenceSIGContextImplCreator(); - private boolean deleted = false; // has this SIG been deleted? + private ConferenceCommunityContextImplCreator conf_creator = new ConferenceCommunityContextImplCreator(); + private boolean deleted = false; // has this community been deleted? /*-------------------------------------------------------------------------------- * Constructor *-------------------------------------------------------------------------------- */ - SIGCoreData(EngineBackend engine, DataPool datapool, int sigid) throws DataException + CommunityCoreData(EngineBackend engine, DataPool datapool, int cid) throws DataException { if (logger.isDebugEnabled()) - logger.debug("new SIGCoreData for SIG " + sigid); + logger.debug("new CommunityCoreData for community " + cid); this.engine = engine; this.datapool = datapool; - this.sigid = sigid; + this.cid = cid; Connection conn = null; @@ -121,19 +121,19 @@ class SIGCoreData implements SIGData, SIGDataBackend { // get a database connection from this object conn = datapool.getConnection(); - // get the SIG basic data from the database + // get the community basic data from the database Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer("SELECT * FROM sigs WHERE sigid = "); - sql.append(sigid).append(';'); + sql.append(cid).append(';'); ResultSet rs = stmt.executeQuery(sql.toString()); if (!(rs.next())) - throw new DataException("SIG #" + sigid + " does not exist in the database."); + throw new DataException("community #" + cid + " does not exist in the database."); - loadData(rs); // load the SIG data + loadData(rs); // load the community data - // get the SIG feature set + // get the community feature set sql.setLength(0); - sql.append("SELECT ftr_code FROM sigftrs WHERE sigid = ").append(sigid).append(';'); + sql.append("SELECT ftr_code FROM sigftrs WHERE sigid = ").append(cid).append(';'); rs = stmt.executeQuery(sql.toString()); features = new BitSet(); while (rs.next()) @@ -142,8 +142,8 @@ class SIGCoreData implements SIGData, SIGDataBackend } // end try catch (SQLException e) { // translate into a nicer DataException - logger.error("DB error reading SIG data: " + e.getMessage(),e); - throw new DataException("unable to load SIG data: " + e.getMessage(),e); + logger.error("DB error reading community data: " + e.getMessage(),e); + throw new DataException("unable to load community data: " + e.getMessage(),e); } // end catch finally @@ -155,24 +155,24 @@ class SIGCoreData implements SIGData, SIGDataBackend } // end constructor - protected SIGCoreData(EngineBackend engine, DataPool datapool, int sigid, java.util.Date creation, - String name, String alias, int host_uid, String language, String synopsis, - String rules, String joinkey, boolean hide_dir, boolean hide_search, - BitSet features) + protected CommunityCoreData(EngineBackend engine, DataPool datapool, int cid, java.util.Date creation, + String name, String alias, int host_uid, String language, String synopsis, + String rules, String joinkey, boolean hide_dir, boolean hide_search, + BitSet features) { if (logger.isDebugEnabled()) - logger.debug("new SIGCoreData for BRAND NEW SIG " + sigid); + logger.debug("new CommunityCoreData for BRAND NEW COMMUNITY " + cid); this.engine = engine; this.datapool = datapool; - this.sigid = sigid; + this.cid = cid; this.created = creation; this.last_access = creation; this.last_update = creation; - this.read_level = DefaultLevels.newSIGRead(); - this.write_level = DefaultLevels.newSIGWrite(); - this.create_level = DefaultLevels.newSIGCreate(); - this.delete_level = DefaultLevels.newSIGDelete(); - this.join_level = DefaultLevels.newSIGJoin(); + this.read_level = DefaultLevels.newCommunityRead(); + this.write_level = DefaultLevels.newCommunityWrite(); + this.create_level = DefaultLevels.newCommunityCreate(); + this.delete_level = DefaultLevels.newCommunityDelete(); + this.join_level = DefaultLevels.newCommunityJoin(); this.contactid = -1; this.host_uid = host_uid; this.category_id = 0; @@ -186,7 +186,7 @@ class SIGCoreData implements SIGData, SIGDataBackend this.synopsis = synopsis; this.rules = rules; this.alias = alias; - this.public_sig = StringUtil.isStringEmpty(joinkey); + this.public_comm = StringUtil.isStringEmpty(joinkey); this.features = (BitSet)(features.clone()); } // end constructor @@ -218,7 +218,7 @@ class SIGCoreData implements SIGData, SIGDataBackend private synchronized void loadData(ResultSet rs) throws SQLException { - // "sigid" field is skipped + // "cid" field is skipped created = SQLUtil.getFullDateTime(rs,"createdate"); last_access = SQLUtil.getFullDateTime(rs,"lastaccess"); last_update = SQLUtil.getFullDateTime(rs,"lastupdate"); @@ -242,15 +242,15 @@ class SIGCoreData implements SIGData, SIGDataBackend if (!is_admin) { // figure out whether we need a "join key" (password) String foo = rs.getString("joinkey"); - public_sig = StringUtil.isStringEmpty(foo); + public_comm = StringUtil.isStringEmpty(foo); } // end if - else // Admin is NEVER a public SIG! - public_sig = false; + else // Admin is NEVER a public community! + public_comm = false; alias = rs.getString("alias"); if (logger.isDebugEnabled()) - logger.debug("Loaded data for SIG \"" + name + "\" (ID " + sigid + ", alias '" + alias + logger.debug("Loaded data for community \"" + name + "\" (ID " + cid + ", alias '" + alias + "') successfully"); } // end loadData @@ -260,7 +260,7 @@ class SIGCoreData implements SIGData, SIGDataBackend Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer("UPDATE sigs SET lastupdate = '"); java.util.Date now = new java.util.Date(); - sql.append(SQLUtil.encodeDate(now)).append("' WHERE sigid = ").append(sigid).append(';'); + sql.append(SQLUtil.encodeDate(now)).append("' WHERE sigid = ").append(cid).append(';'); stmt.executeUpdate(sql.toString()); last_update = now; @@ -291,18 +291,18 @@ class SIGCoreData implements SIGData, SIGDataBackend public Object rd_getKey() { - return new Integer(sigid); + return new Integer(cid); } // end rd_getKey /*-------------------------------------------------------------------------------- - * Implementations from interface SIGData + * Implementations from interface CommunityData *-------------------------------------------------------------------------------- */ public int getID() { - return sigid; + return cid; } // end getID @@ -318,11 +318,11 @@ class SIGCoreData implements SIGData, SIGDataBackend } // end getAlias - public boolean isPublicSIG() + public boolean isPublicCommunity() { - return public_sig; + return public_comm; - } // end isPublicSIG + } // end isPublicCommunity public int getCategoryID() { @@ -381,13 +381,13 @@ class SIGCoreData implements SIGData, SIGDataBackend public void testMembership(int level, boolean is_member) throws DataException, AccessError { if (deleted) - throw new DataException("This SIG has been deleted."); + throw new DataException("This community has been deleted."); if (Capability.exemptFromMembershipRequirement(level)) return; if (members_only && !is_member) { // the membership test failed - logger.error("not a SIG member"); - throw new AccessError("You are not a member of this SIG."); + logger.error("not a community member"); + throw new AccessError("You are not a member of this community."); } // end if @@ -403,39 +403,39 @@ class SIGCoreData implements SIGData, SIGDataBackend } // end checkMembership - public boolean canReadSIGSubObjects(int level) + public boolean canReadCommunitySubObjects(int level) { if (deleted) return false; return (level>=read_level); - } // end canReadSIGSubObjects + } // end canReadCommunitySubObjects - public boolean canModifySIGProfile(int level) + public boolean canModifyCommunityProfile(int level) { if (deleted) return false; return (level>=write_level); - } // end canModifySIGProfile + } // end canModifyCommunityProfile - public boolean canCreateSIGSubObjects(int level) + public boolean canCreateCommunitySubObjects(int level) { if (deleted) return false; return (level>=create_level); - } // end canCreateSIGSubObjects + } // end canCreateCommunitySubObjects - public boolean canDeleteSIG(int level) + public boolean canDeleteCommunity(int level) { if (deleted) return false; return (level>=delete_level); - } // end canDeleteSIG + } // end canDeleteCommunity - public boolean canJoinSIG(int uid, int level) + public boolean canJoinCommunity(int uid, int level) { if (deleted || (level=0) { // start by seeing if the user already has a record... - sql.append("SELECT sigid FROM sigmember WHERE sigid = ").append(sigid).append(" AND uid = "); + sql.append("SELECT sigid FROM sigmember WHERE sigid = ").append(cid).append(" AND uid = "); sql.append(uid).append(';'); ResultSet rs = stmt.executeQuery(sql.toString()); @@ -1304,13 +1305,13 @@ class SIGCoreData implements SIGData, SIGDataBackend { // build an UPDATE statement sql.append("UPDATE sigmember SET granted_lvl = ").append(grant_level).append(", locked = "); sql.append(locked ? '1' : '0').append(", hidden = ").append(hidden ? '1' : '0'); - sql.append(" WHERE sigid = ").append(sigid).append(" AND uid = ").append(uid).append(';'); + sql.append(" WHERE sigid = ").append(cid).append(" AND uid = ").append(uid).append(';'); } // end if else { // build an INSERT statement sql.append("INSERT INTO sigmember (sigid, uid, granted_lvl, locked, hidden) VALUES ("); - sql.append(sigid).append(", ").append(uid).append(", ").append(grant_level).append(", "); + sql.append(cid).append(", ").append(uid).append(", ").append(grant_level).append(", "); sql.append(locked ? '1' : '0').append(", ").append(hidden ? '1' : '0').append(");"); } // end else @@ -1321,7 +1322,7 @@ class SIGCoreData implements SIGData, SIGDataBackend } // end if else { // delete the membership reference (which may not exist, but oh well) - sql.append("DELETE FROM sigmember WHERE sigid = ").append(sigid).append(" AND uid = "); + sql.append("DELETE FROM sigmember WHERE sigid = ").append(cid).append(" AND uid = "); sql.append(uid).append(';'); did_it = (stmt.executeUpdate(sql.toString())>0); @@ -1336,17 +1337,17 @@ class SIGCoreData implements SIGData, SIGDataBackend } // end finally if (did_it) - { // update the SIG data and generate an audit record + { // update the community data and generate an audit record touchUpdate(conn); - ar = new AuditRecord(AuditRecord.SET_MEMBERSHIP,user.realUID(),user.userRemoteAddress(),sigid, + ar = new AuditRecord(AuditRecord.SET_MEMBERSHIP,user.realUID(),user.userRemoteAddress(),cid, "uid=" + uid,"level=" + grant_level); } // end if } // end try catch (SQLException e) { // database error - this is a DataException - logger.error("DB error storing SIG data: " + e.getMessage(),e); - throw new DataException("unable to save SIG data: " + e.getMessage(),e); + logger.error("DB error storing community data: " + e.getMessage(),e); + throw new DataException("unable to save community data: " + e.getMessage(),e); } // end catch finally @@ -1373,7 +1374,7 @@ class SIGCoreData implements SIGData, SIGDataBackend public int getMemberCount(boolean include_hidden) throws DataException { if (deleted) - throw new DataException("This SIG has been deleted."); + throw new DataException("This community has been deleted."); Connection conn = null; // database connection @@ -1382,7 +1383,7 @@ class SIGCoreData implements SIGData, SIGDataBackend conn = datapool.getConnection(); Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer("SELECT COUNT(*) FROM sigmember WHERE sigid = "); - sql.append(sigid); + sql.append(cid); if (!include_hidden) sql.append(" AND hidden = 0"); sql.append(';'); @@ -1397,8 +1398,8 @@ class SIGCoreData implements SIGData, SIGDataBackend } // end try catch (SQLException e) { // database error - this is a DataException - logger.error("DB error getting SIG data: " + e.getMessage(),e); - throw new DataException("unable to retrieve SIG data: " + e.getMessage(),e); + logger.error("DB error getting community data: " + e.getMessage(),e); + throw new DataException("unable to retrieve community data: " + e.getMessage(),e); } // end catch finally @@ -1422,17 +1423,17 @@ class SIGCoreData implements SIGData, SIGDataBackend } // end isFeaturePresent - public synchronized ConferenceSIGContext getConferenceDataObject(int confid) throws DataException + public synchronized ConferenceCommunityContext getConferenceDataObject(int confid) throws DataException { if (deleted) - throw new DataException("This SIG has been deleted."); + throw new DataException("This community has been deleted."); if (logger.isDebugEnabled()) logger.debug("getConferenceDataObject(" + confid + ")..."); try { // delegate to the conf_refcache and conf_creator objects - return (ConferenceSIGContext)(conf_refcache.getOrCreate(new Integer(confid),conf_creator)); + return (ConferenceCommunityContext)(conf_refcache.getOrCreate(new Integer(confid),conf_creator)); } // end try catch (ReferencedDataBuilderException e) @@ -1457,22 +1458,23 @@ class SIGCoreData implements SIGData, SIGDataBackend } // end detachConferenceDataObject - public ConferenceSIGContext createConference(SIGBackend sig, String name, String alias, String description, - boolean pvt, boolean hide_list) throws DataException + public ConferenceCommunityContext createConference(CommunityBackend comm, String name, String alias, + String description, boolean pvt, boolean hide_list) + throws DataException { if (deleted) - throw new DataException("This SIG has been deleted."); + throw new DataException("This community has been deleted."); - ReturnConfSeq rcs = ConferenceCoreData.createConference(engine,sig,datapool,name,alias,description, + ReturnConfSeq rcs = ConferenceCoreData.createConference(engine,comm,datapool,name,alias,description, pvt,hide_list,host_uid); ConferenceData cdata = rcs.getConference(); - if (sig.realUID()!=host_uid) // make the creating user a conference host too - cdata.setMembership(sig,sig.realUID(),DefaultLevels.hostConference()); + if (comm.realUID()!=host_uid) // make the creating user a conference host too + cdata.setMembership(comm,comm.realUID(),DefaultLevels.hostConference()); - // Wrap the returned ConferenceData object in a ConferenceSIGContextImpl object and release the + // Wrap the returned ConferenceData object in a ConferenceCommunityContextImpl object and release the // extra reference on it. - ConferenceSIGContextImpl conf = new ConferenceSIGContextImpl(engine,this,datapool,rcs.getSequence(), - hide_list,cdata); + ConferenceCommunityContextImpl conf = + new ConferenceCommunityContextImpl(engine,this,datapool,rcs.getSequence(),hide_list,cdata); cdata.rd_release(); rcs = null; @@ -1486,11 +1488,11 @@ class SIGCoreData implements SIGData, SIGDataBackend boolean include_hidden) throws DataException { if (deleted) - throw new DataException("This SIG has been deleted."); + throw new DataException("This community has been deleted."); if (logger.isDebugEnabled()) - logger.debug("Member search: SIG = " + sigid + ", field = " + field + ", mode = " + mode + ", term '" - + term + "', offset = " + offset + ", count = " + count); + logger.debug("Member search: community = " + cid + ", field = " + field + ", mode = " + mode + + ", term '" + term + "', offset = " + offset + ", count = " + count); ArrayList rc = new ArrayList(); // return from this function Connection conn = null; // pooled database connection @@ -1505,7 +1507,7 @@ class SIGCoreData implements SIGData, SIGDataBackend + "c.family_name, c.locality, c.region, c.country, m.granted_lvl " + "FROM users u, contacts c, sigmember m WHERE " + "u.contactid = c.contactid AND u.uid = m.uid AND m.sigid = "); - sql.append(sigid).append(" AND "); + sql.append(cid).append(" AND "); switch (field) { // determine which field to search on case SearchMode.FIELD_USER_NAME: @@ -1591,10 +1593,10 @@ class SIGCoreData implements SIGData, SIGDataBackend throws DataException { if (deleted) - throw new DataException("This SIG has been deleted."); + throw new DataException("This community has been deleted."); if (logger.isDebugEnabled()) - logger.debug("User search: SIG = " + sigid + ", field = " + field + ", mode = " + mode + ", term '" + logger.debug("User search: community = " + cid + ", field = " + field + ", mode = " + mode + ", term '" + term + "'"); Connection conn = null; // pooled database connection @@ -1605,7 +1607,7 @@ class SIGCoreData implements SIGData, SIGDataBackend Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer("SELECT COUNT(*) FROM users u, contacts c, sigmember m WHERE " + "u.contactid = c.contactid AND u.uid = m.uid AND m.sigid = "); - sql.append(sigid).append(" AND "); + sql.append(cid).append(" AND "); switch (field) { // determine which field to search on @@ -1683,10 +1685,10 @@ class SIGCoreData implements SIGData, SIGDataBackend public List getMemberList(boolean include_hidden) throws DataException { if (deleted) - throw new DataException("This SIG has been deleted."); + throw new DataException("This community has been deleted."); if (logger.isDebugEnabled()) - logger.debug("Member list: SIG = " + sigid); + logger.debug("Member list: community = " + cid); ArrayList rc = new ArrayList(); // return from this function Connection conn = null; // pooled database connection @@ -1701,7 +1703,7 @@ class SIGCoreData implements SIGData, SIGDataBackend + "c.family_name, c.locality, c.region, c.country, m.granted_lvl " + "FROM users u, contacts c, sigmember m WHERE " + "u.contactid = c.contactid AND u.uid = m.uid AND m.sigid = "); - sql.append(sigid); + sql.append(cid); if (!include_hidden) sql.append(" AND m.hidden = 0"); sql.append(" AND u.is_anon = 0 ORDER BY u.username;"); @@ -1743,10 +1745,10 @@ class SIGCoreData implements SIGData, SIGDataBackend public int getMemberLevel(int uid) throws DataException { if (deleted) - throw new DataException("This SIG has been deleted."); + throw new DataException("This community has been deleted."); if (logger.isDebugEnabled()) - logger.debug("Member level: SIG = " + sigid + ", user = " + uid); + logger.debug("Member level: community = " + cid + ", user = " + uid); Connection conn = null; // pooled database connection @@ -1757,7 +1759,7 @@ class SIGCoreData implements SIGData, SIGDataBackend // a relatively simple search StringBuffer sql = new StringBuffer("SELECT granted_lvl FROM sigmember WHERE sigid = "); - sql.append(sigid).append(" AND uid = ").append(uid).append(';'); + sql.append(cid).append(" AND uid = ").append(uid).append(';'); if (logger.isDebugEnabled()) logger.debug("SQL: " + sql.toString()); ResultSet rs = stmt.executeQuery(sql.toString()); @@ -1785,10 +1787,10 @@ class SIGCoreData implements SIGData, SIGDataBackend public void delete(UserBackend user) throws DataException { if (deleted) - throw new DataException("This SIG has been deleted."); + throw new DataException("This community has been deleted."); if (logger.isDebugEnabled()) - logger.debug("Delete SIG: SIG = " + sigid); + logger.debug("Delete community: community = " + cid); Connection conn = null; // database connection AuditRecord ar = null; // audit record @@ -1802,21 +1804,21 @@ class SIGCoreData implements SIGData, SIGDataBackend // lock the tables we need to reference immediately stmt.executeUpdate("LOCK TABLES sigs WRITE, sigmember WRITE, confhotlist WRITE, sigtoconf READ;"); try - { // first delete the SIG record itself - stmt.executeUpdate("DELETE FROM sigs WHERE sigid = " + sigid + ";"); + { // first delete the community record itself + stmt.executeUpdate("DELETE FROM sigs WHERE sigid = " + cid + ";"); // now delete the members list - stmt.executeUpdate("DELETE FROM sigmember WHERE sigid = " + sigid + ";"); + stmt.executeUpdate("DELETE FROM sigmember WHERE sigid = " + cid + ";"); - // We need to make sure this SIG's conferences are removed from everyone's hotlist, + // We need to make sure this community's conferences are removed from everyone's hotlist, // if they're present. (Bug #415474) - stmt.executeUpdate("DELETE FROM confhotlist WHERE sigid = " + sigid + ";"); + stmt.executeUpdate("DELETE FROM confhotlist WHERE sigid = " + cid + ";"); - // determine the number of conferences in this SIG, and the maximum conference ID + // determine the number of conferences in this community, and the maximum conference ID ResultSet rs = stmt.executeQuery("SELECT COUNT(*), MAX(confid) FROM sigtoconf WHERE sigid = " - + sigid + ";"); + + cid + ";"); if (!(rs.next())) - throw new InternalStateError("SIGCoreData.delete screwup on conference SELECT"); + throw new InternalStateError("CommunityCoreData.delete screwup on conference SELECT"); conf_count = rs.getInt(1); conf_max = rs.getInt(2); @@ -1841,13 +1843,13 @@ class SIGCoreData implements SIGData, SIGDataBackend } // end finally // create an audit record indicating what happened - ar = new AuditRecord(AuditRecord.DELETE_SIG,user.realUID(),user.userRemoteAddress(),sigid); + ar = new AuditRecord(AuditRecord.DELETE_COMMUNITY,user.realUID(),user.userRemoteAddress(),cid); } // end try catch (SQLException e) { // database error - this is a DataException - logger.error("DB error deleting SIG: " + e.getMessage(),e); - throw new DataException("unable to delete SIG: " + e.getMessage(),e); + logger.error("DB error deleting community: " + e.getMessage(),e); + throw new DataException("unable to delete community: " + e.getMessage(),e); } // end catch finally @@ -1870,8 +1872,8 @@ class SIGCoreData implements SIGData, SIGDataBackend } // end finally // Delete the rest of the gunk in the background; use another thread to do it. - BackgroundSIGPurge purger = new BackgroundSIGPurge(engine,datapool,user,sigid,conf_count,conf_max, - conf_refcache); + BackgroundCommunityPurge purger = new BackgroundCommunityPurge(engine,datapool,user,cid,conf_count, + conf_max,conf_refcache); Thread thrd = new Thread(purger); thrd.setPriority(Thread.NORM_PRIORITY-1); thrd.start(); @@ -1885,29 +1887,29 @@ class SIGCoreData implements SIGData, SIGDataBackend } // end sweepCache /*-------------------------------------------------------------------------------- - * Implementations from interface SIGDataBackend + * Implementations from interface CommunityDataBackend *-------------------------------------------------------------------------------- */ - public int realSIGID() + public int realCommunityID() { - return sigid; + return cid; - } // end realSIGID + } // end realCommunityID /*-------------------------------------------------------------------------------- * External static operations (usable only from within package) *-------------------------------------------------------------------------------- */ - static SIGData createSIG(EngineBackend engine, UserBackend user, DataPool datapool, String name, - String alias, int host_uid, String language, String synopsis, String rules, - String joinkey, boolean hide_dir, boolean hide_search) + static CommunityData createCommunity(EngineBackend engine, UserBackend user, DataPool datapool, String name, + String alias, int host_uid, String language, String synopsis, + String rules, String joinkey, boolean hide_dir, boolean hide_search) throws DataException, AccessError { Connection conn = null; // database connection BitSet def_features = engine.getDefaultFeaturesMask(); - int new_sigid; // ID of the new SIG + int new_cid; // ID of the new community java.util.Date creation; // creation date! AuditRecord ar = null; // the audit record @@ -1918,14 +1920,14 @@ class SIGCoreData implements SIGData, SIGDataBackend stmt.executeUpdate("LOCK TABLES sigs WRITE, sigftrs WRITE, sigmember WRITE;"); try - { // first, we need to check if the SIG alias already exists + { // first, we need to check if the community alias already exists StringBuffer sql = new StringBuffer("SELECT sigid FROM sigs WHERE alias = "); sql.append(SQLUtil.encodeStringArg(alias)).append(';'); ResultSet rs = stmt.executeQuery(sql.toString()); if (rs.next()) // we should get 0 rows back on this one - throw new AccessError("A SIG with that alias already exists."); + throw new AccessError("A community with that alias already exists."); - // Now, here comes the BIG INSERT to create the SIG! + // Now, here comes the BIG INSERT to create the community! sql.setLength(0); sql.append("INSERT INTO sigs (createdate, lastaccess, lastupdate, read_lvl, write_lvl, create_lvl, " + "delete_lvl, join_lvl, host_uid, hide_dir, hide_search, signame, language, synopsis, " @@ -1933,33 +1935,34 @@ class SIGCoreData implements SIGData, SIGDataBackend creation = new java.util.Date(); String creation_str = SQLUtil.encodeDate(creation); sql.append(creation).append("', '").append(creation).append("', '").append(creation).append("', "); - sql.append(DefaultLevels.newSIGRead()).append(", ").append(DefaultLevels.newSIGWrite()).append(", "); - sql.append(DefaultLevels.newSIGCreate()).append(", ").append(DefaultLevels.newSIGDelete()); - sql.append(", ").append(DefaultLevels.newSIGJoin()).append(", ").append(host_uid).append(", "); - sql.append(hide_dir ? '1' : '0').append(", ").append(hide_search ? '1' : '0').append(", "); - sql.append(SQLUtil.encodeStringArg(name)).append(", ").append(SQLUtil.encodeStringArg(language)); - sql.append(", ").append(SQLUtil.encodeStringArg(synopsis)).append(", "); - sql.append(SQLUtil.encodeStringArg(rules)).append(", ").append(SQLUtil.encodeStringArg(joinkey)); - sql.append(", ").append(SQLUtil.encodeStringArg(alias)).append(");"); + sql.append(DefaultLevels.newCommunityRead()).append(", ").append(DefaultLevels.newCommunityWrite()); + sql.append(", ").append(DefaultLevels.newCommunityCreate()).append(", "); + sql.append(DefaultLevels.newCommunityDelete()).append(", ").append(DefaultLevels.newCommunityJoin()); + sql.append(", ").append(host_uid).append(", ").append(hide_dir ? '1' : '0').append(", "); + sql.append(hide_search ? '1' : '0').append(", ").append(SQLUtil.encodeStringArg(name)).append(", "); + sql.append(SQLUtil.encodeStringArg(language)).append(", ").append(SQLUtil.encodeStringArg(synopsis)); + sql.append(", ").append(SQLUtil.encodeStringArg(rules)).append(", "); + sql.append(SQLUtil.encodeStringArg(joinkey)).append(", ").append(SQLUtil.encodeStringArg(alias)); + sql.append(");"); if (logger.isDebugEnabled()) logger.debug("SQL: " + sql.toString()); stmt.executeUpdate(sql.toString()); // here we go! - // Get the SIGID of the new SIG! + // Get the community ID of the new community! rs = stmt.executeQuery("SELECT LAST_INSERT_ID();"); if (rs.next()) - new_sigid = rs.getInt(1); + new_cid = rs.getInt(1); else - { // we should have gotten a SIGID back! - logger.error("readback of new SIGID failed!"); - throw new InternalStateError("failure on createSIG return query - must have 1 row!"); + { // we should have gotten a community ID back! + logger.error("readback of new community ID failed!"); + throw new InternalStateError("failure on createCommunity return query - must have 1 row!"); } // end else if (def_features.length()>0) - { // need to build the SIG's defined feature set + { // need to build the community's defined feature set sql.setLength(0); for (int i=0; i=0) - rc = new ContactInfoImpl(datapool,cid); + if (id>=0) + rc = new ContactInfoImpl(datapool,id); else - rc = new ContactInfoImpl(getSIGData().getHostUID(),sigid); - getSIGData().touch(); + rc = new ContactInfoImpl(getData().getHostUID(),cid); + getData().touch(); return rc; } // end getContactInfo public void putContactInfo(ContactInfo ci) throws DataException, AccessError { - getSIGData().testMembership(level,is_member); - if (ci.getOwnerSIGID()!=sigid) - { // this isn't a valid contact info for the SIG - logger.error("ContactInfo wrong ownership (was " + String.valueOf(ci.getOwnerSIGID()) - + ", should be " + String.valueOf(sigid) + ")"); + getData().testMembership(level,is_member); + if (ci.getOwnerCommunityID()!=cid) + { // this isn't a valid contact info for the community + logger.error("ContactInfo wrong ownership (was " + String.valueOf(ci.getOwnerCommunityID()) + + ", should be " + String.valueOf(cid) + ")"); throw new DataException("invalid contact information record"); } // end if - if (!(getSIGData().canModifySIGProfile(level))) - { // this user can't modify the SIG contact info - logger.error("user not permitted to modify the SIG's contact info"); - throw new AccessError("You are not permitted to modify the SIG's contact information."); + if (!(getData().canModifyCommunityProfile(level))) + { // this user can't modify the community contact info + logger.error("user not permitted to modify the community's contact info"); + throw new AccessError("You are not permitted to modify the community's contact information."); } // end if - getSIGData().putContactInfo(user,ci); + getData().putContactInfo(user,ci); } // end putContactInfo public BitSet getFeatures() { - SIGData sd = getSIGDataNE(); - if (sd!=null) - return sd.getFeatureSet(); + CommunityData d = getDataNE(); + if (d!=null) + return d.getFeatureSet(); else return null; @@ -519,11 +520,11 @@ class SIGUserContextImpl implements SIGContext, SIGBackend public void setFeatures(BitSet feature_set, BitSet mask) throws DataException, AccessError { - getSIGData().testMembership(level,is_member); - if (!(getSIGData().canModifySIGProfile(level))) - { // this user can't modify the SIG feature set - logger.error("user not permitted to modify the SIG's feature set"); - throw new AccessError("You are not permitted to modify the SIG's feature set."); + getData().testMembership(level,is_member); + if (!(getData().canModifyCommunityProfile(level))) + { // this user can't modify the community feature set + logger.error("user not permitted to modify the community's feature set"); + throw new AccessError("You are not permitted to modify the community's feature set."); } // end if @@ -532,7 +533,7 @@ class SIGUserContextImpl implements SIGContext, SIGBackend real_mask.andNot(engine.getLockedFeaturesMask()); // Figure out which bits are being carried over from the old feature set. - BitSet new_features = getSIGData().getFeatureSet(); + BitSet new_features = getData().getFeatureSet(); new_features.andNot(real_mask); // Figure out which bits are being set by the new feature set. @@ -542,25 +543,25 @@ class SIGUserContextImpl implements SIGContext, SIGBackend // Put the features together to result in the final feature set, which we set down in // the "back end" class. new_features.or(update_bits); - getSIGData().putFeatureSet(user,new_features); + getData().putFeatureSet(user,new_features); } // end setFeatures - public List getSIGFeaturesList() + public List getCommunityFeaturesList() { - SIGData sd = getSIGDataNE(); - if (sd!=null) - return sd.getSIGFeaturesList(level); + CommunityData d = getDataNE(); + if (d!=null) + return d.getCommunityFeaturesList(level); else return null; - } // end getSIGFeaturesList + } // end getCommunityFeaturesList public String getDefaultApplet() { - SIGData sd = getSIGDataNE(); - if (sd!=null) - return sd.getDefaultApplet(); + CommunityData d = getDataNE(); + if (d!=null) + return d.getDefaultApplet(); else return null; @@ -568,50 +569,50 @@ class SIGUserContextImpl implements SIGContext, SIGBackend public void setName(String name) throws DataException, AccessError { - getSIGData().testMembership(level,is_member); - if (!(getSIGData().canModifySIGProfile(level))) - { // this user can't modify the SIG feature set - logger.error("user not permitted to modify the SIG's information"); - throw new AccessError("You are not permitted to modify the SIG's information."); + getData().testMembership(level,is_member); + if (!(getData().canModifyCommunityProfile(level))) + { // this user can't modify the community feature set + logger.error("user not permitted to modify the community's information"); + throw new AccessError("You are not permitted to modify the community's information."); } // end if - getSIGData().setName(user,name); + getData().setName(user,name); } // end setName public void setAlias(String alias) throws DataException, AccessError { - getSIGData().testMembership(level,is_member); - if (!(getSIGData().canModifySIGProfile(level))) - { // this user can't modify the SIG feature set - logger.error("user not permitted to modify the SIG's information"); - throw new AccessError("You are not permitted to modify the SIG's information."); + getData().testMembership(level,is_member); + if (!(getData().canModifyCommunityProfile(level))) + { // this user can't modify the community feature set + logger.error("user not permitted to modify the community's information"); + throw new AccessError("You are not permitted to modify the community's information."); } // end if - getSIGData().setAlias(user,alias); + getData().setAlias(user,alias); } // end setAlias public void setCategoryID(int catid) throws DataException, AccessError { - getSIGData().testMembership(level,is_member); - if (!(getSIGData().canModifySIGProfile(level))) - { // this user can't modify the SIG feature set - logger.error("user not permitted to modify the SIG's information"); - throw new AccessError("You are not permitted to modify the SIG's information."); + getData().testMembership(level,is_member); + if (!(getData().canModifyCommunityProfile(level))) + { // this user can't modify the community feature set + logger.error("user not permitted to modify the community's information"); + throw new AccessError("You are not permitted to modify the community's information."); } // end if - if (getSIGData().isAdminSIG()) - { // the Admin SIG cannot change its security - logger.error("trying to change category for the ADMIN SIG"); - throw new AccessError("The administrative SIG's category cannot be modified."); + if (getData().isAdminCommunity()) + { // the Admin Community cannot change its security + logger.error("trying to change category for the ADMIN community"); + throw new AccessError("The administrative community's category cannot be modified."); } // end if - getSIGData().setCategoryID(user,catid); + getData().setCategoryID(user,catid); } // end setCategoryID @@ -623,54 +624,54 @@ class SIGUserContextImpl implements SIGContext, SIGBackend public void setSynopsis(String synopsis) throws DataException, AccessError { - getSIGData().testMembership(level,is_member); - if (!(getSIGData().canModifySIGProfile(level))) - { // this user can't modify the SIG feature set - logger.error("user not permitted to modify the SIG's information"); - throw new AccessError("You are not permitted to modify the SIG's information."); + getData().testMembership(level,is_member); + if (!(getData().canModifyCommunityProfile(level))) + { // this user can't modify the community feature set + logger.error("user not permitted to modify the community's information"); + throw new AccessError("You are not permitted to modify the community's information."); } // end if - getSIGData().setSynopsis(synopsis); + getData().setSynopsis(synopsis); } // end setSynopsis public void setLanguage(String language) throws DataException, AccessError { - getSIGData().testMembership(level,is_member); - if (!(getSIGData().canModifySIGProfile(level))) - { // this user can't modify the SIG feature set - logger.error("user not permitted to modify the SIG's information"); - throw new AccessError("You are not permitted to modify the SIG's information."); + getData().testMembership(level,is_member); + if (!(getData().canModifyCommunityProfile(level))) + { // this user can't modify the community feature set + logger.error("user not permitted to modify the community's information"); + throw new AccessError("You are not permitted to modify the community's information."); } // end if - getSIGData().setLanguage(language); + getData().setLanguage(language); } // end setLanguage public void setRules(String rules) throws DataException, AccessError { - getSIGData().testMembership(level,is_member); - if (!(getSIGData().canModifySIGProfile(level))) - { // this user can't modify the SIG feature set - logger.error("user not permitted to modify the SIG's information"); - throw new AccessError("You are not permitted to modify the SIG's information."); + getData().testMembership(level,is_member); + if (!(getData().canModifyCommunityProfile(level))) + { // this user can't modify the community feature set + logger.error("user not permitted to modify the community's information"); + throw new AccessError("You are not permitted to modify the community's information."); } // end if - getSIGData().setRules(rules); + getData().setRules(rules); } // end setRules public int getHideMode() { - SIGData sd = getSIGDataNE(); - if (sd==null) + CommunityData d = getDataNE(); + if (d==null) return HIDE_NONE; - if (sd.getHideSearch()) + if (d.getHideSearch()) return HIDE_BOTH; - else if (sd.getHideDirectory()) + else if (d.getHideDirectory()) return HIDE_DIRECTORY; else return HIDE_NONE; @@ -681,37 +682,37 @@ class SIGUserContextImpl implements SIGContext, SIGBackend { if ((mode!=HIDE_NONE) && (mode!=HIDE_DIRECTORY) && (mode!=HIDE_BOTH)) { // the mode is not valid - logger.error("mode value " + String.valueOf(mode) + " is not valid"); + logger.error("mode value " + mode + " is not valid"); throw new IllegalArgumentException("invalid hide mode value"); } // end if - getSIGData().testMembership(level,is_member); - if (!(getSIGData().canModifySIGProfile(level))) - { // this user can't modify the SIG feature set - logger.error("user not permitted to modify the SIG's information"); - throw new AccessError("You are not permitted to modify the SIG's information."); + getData().testMembership(level,is_member); + if (!(getData().canModifyCommunityProfile(level))) + { // this user can't modify the community feature set + logger.error("user not permitted to modify the community's information"); + throw new AccessError("You are not permitted to modify the community's information."); } // end if - if (getSIGData().isAdminSIG()) - { // the Admin SIG cannot change its security - logger.error("trying to change security info for the ADMIN SIG"); - throw new AccessError("The administrative SIG's security information cannot be modified."); + if (getData().isAdminCommunity()) + { // the Admin Community cannot change its security + logger.error("trying to change security info for the ADMIN community"); + throw new AccessError("The administrative community's security information cannot be modified."); } // end if boolean hide_dir = (mode!=HIDE_NONE); boolean hide_search = (mode==HIDE_BOTH); - getSIGData().setHideFlags(user,hide_dir,hide_search); + getData().setHideFlags(user,hide_dir,hide_search); } // end setHideMode public boolean getMembersOnly() { - SIGData sd = getSIGDataNE(); - if (sd!=null) - return sd.getMembersOnly(); + CommunityData d = getDataNE(); + if (d!=null) + return d.getMembersOnly(); else return true; @@ -719,30 +720,30 @@ class SIGUserContextImpl implements SIGContext, SIGBackend public void setMembersOnly(boolean flag) throws DataException, AccessError { - getSIGData().testMembership(level,is_member); - if (!(getSIGData().canModifySIGProfile(level))) - { // this user can't modify the SIG feature set - logger.error("user not permitted to modify the SIG's information"); - throw new AccessError("You are not permitted to modify the SIG's information."); + getData().testMembership(level,is_member); + if (!(getData().canModifyCommunityProfile(level))) + { // this user can't modify the community feature set + logger.error("user not permitted to modify the community's information"); + throw new AccessError("You are not permitted to modify the community's information."); } // end if - if (getSIGData().isAdminSIG()) - { // the Admin SIG cannot change its security - logger.error("trying to change security info for the ADMIN SIG"); - throw new AccessError("The administrative SIG's security information cannot be modified."); + if (getData().isAdminCommunity()) + { // the Admin community cannot change its security + logger.error("trying to change security info for the ADMIN community"); + throw new AccessError("The administrative community's security information cannot be modified."); } // end if - getSIGData().setMembersOnly(user,flag); + getData().setMembersOnly(user,flag); } // end setMembersOnly public short getInitialFeatureIndex() { - SIGData sd = getSIGDataNE(); - if (sd!=null) - return sd.getInitialFeatureIndex(); + CommunityData d = getDataNE(); + if (d!=null) + return d.getInitialFeatureIndex(); else return 0; @@ -757,138 +758,138 @@ class SIGUserContextImpl implements SIGContext, SIGBackend } // end if - getSIGData().testMembership(level,is_member); - if (!(getSIGData().canModifySIGProfile(level))) - { // this user can't modify the SIG feature set - logger.error("user not permitted to modify the SIG's information"); - throw new AccessError("You are not permitted to modify the SIG's information."); + getData().testMembership(level,is_member); + if (!(getData().canModifyCommunityProfile(level))) + { // this user can't modify the community feature set + logger.error("user not permitted to modify the community's information"); + throw new AccessError("You are not permitted to modify the community's information."); } // end if - getSIGData().setInitialFeatureIndex(ndx); + getData().setInitialFeatureIndex(ndx); } // end setInitialFeatureIndex public String getJoinKey() throws DataException, AccessError { - getSIGData().testMembership(level,is_member); - if (!(getSIGData().canModifySIGProfile(level))) - { // this user can't modify the SIG feature set + getData().testMembership(level,is_member); + if (!(getData().canModifyCommunityProfile(level))) + { // this user can't modify the community feature set logger.error("user not permitted to retrieve join key"); - throw new AccessError("You are not permitted to retrieve the join key for this SIG."); + throw new AccessError("You are not permitted to retrieve the join key for this community."); } // end if - return getSIGData().getJoinKey(); + return getData().getJoinKey(); } // end getJoinKey public void setJoinKey(String key) throws DataException, AccessError { - getSIGData().testMembership(level,is_member); - if (!(getSIGData().canModifySIGProfile(level))) - { // this user can't modify the SIG feature set - logger.error("user not permitted to modify the SIG's information"); - throw new AccessError("You are not permitted to modify the SIG's information."); + getData().testMembership(level,is_member); + if (!(getData().canModifyCommunityProfile(level))) + { // this user can't modify the community feature set + logger.error("user not permitted to modify the community's information"); + throw new AccessError("You are not permitted to modify the community's information."); } // end if - if (getSIGData().isAdminSIG()) - { // the Admin SIG cannot change its security - logger.error("trying to change security info for the ADMIN SIG"); - throw new AccessError("The administrative SIG's security information cannot be modified."); + if (getData().isAdminCommunity()) + { // the Admin community cannot change its security + logger.error("trying to change security info for the ADMIN community"); + throw new AccessError("The administrative community's security information cannot be modified."); } // end if - getSIGData().setJoinKey(user,key); + getData().setJoinKey(user,key); } // end setJoinKey public int getReadLevel() throws DataException, AccessError { - getSIGData().testMembership(level,is_member); - if (!(getSIGData().canModifySIGProfile(level))) - { // this user can't modify the SIG feature set + getData().testMembership(level,is_member); + if (!(getData().canModifyCommunityProfile(level))) + { // this user can't modify the community feature set logger.error("user not permitted to retrieve security info"); - throw new AccessError("You are not permitted to retrieve security information for this SIG."); + throw new AccessError("You are not permitted to retrieve security information for this community."); } // end if - return getSIGData().getReadLevel(); + return getData().getReadLevel(); } // end getReadLevel public int getWriteLevel() throws DataException, AccessError { - getSIGData().testMembership(level,is_member); - if (!(getSIGData().canModifySIGProfile(level))) - { // this user can't modify the SIG feature set + getData().testMembership(level,is_member); + if (!(getData().canModifyCommunityProfile(level))) + { // this user can't modify the community feature set logger.error("user not permitted to retrieve security info"); - throw new AccessError("You are not permitted to retrieve security information for this SIG."); + throw new AccessError("You are not permitted to retrieve security information for this community."); } // end if - return getSIGData().getWriteLevel(); + return getData().getWriteLevel(); } // end getWriteLevel public int getCreateLevel() throws DataException, AccessError { - getSIGData().testMembership(level,is_member); - if (!(getSIGData().canModifySIGProfile(level))) - { // this user can't modify the SIG feature set + getData().testMembership(level,is_member); + if (!(getData().canModifyCommunityProfile(level))) + { // this user can't modify the community feature set logger.error("user not permitted to retrieve security info"); - throw new AccessError("You are not permitted to retrieve security information for this SIG."); + throw new AccessError("You are not permitted to retrieve security information for this community."); } // end if - return getSIGData().getCreateLevel(); + return getData().getCreateLevel(); } // end getCreateLevel public int getDeleteLevel() throws DataException, AccessError { - getSIGData().testMembership(level,is_member); - if (!(getSIGData().canModifySIGProfile(level))) - { // this user can't modify the SIG feature set + getData().testMembership(level,is_member); + if (!(getData().canModifyCommunityProfile(level))) + { // this user can't modify the community feature set logger.error("user not permitted to retrieve security info"); - throw new AccessError("You are not permitted to retrieve security information for this SIG."); + throw new AccessError("You are not permitted to retrieve security information for this community."); } // end if - return getSIGData().getDeleteLevel(); + return getData().getDeleteLevel(); } // end getDeleteLevel public int getJoinLevel() throws DataException, AccessError { - getSIGData().testMembership(level,is_member); - if (!(getSIGData().canModifySIGProfile(level))) - { // this user can't modify the SIG feature set + getData().testMembership(level,is_member); + if (!(getData().canModifyCommunityProfile(level))) + { // this user can't modify the community feature set logger.error("user not permitted to retrieve security info"); - throw new AccessError("You are not permitted to retrieve security information for this SIG."); + throw new AccessError("You are not permitted to retrieve security information for this community."); } // end if - return getSIGData().getJoinLevel(); + return getData().getJoinLevel(); } // end getJoinLevel public void setSecurityLevels(int read, int write, int create, int delete, int join) throws DataException, AccessError { - getSIGData().testMembership(level,is_member); - if (!(getSIGData().canModifySIGProfile(level))) - { // this user can't modify the SIG feature set - logger.error("user not permitted to modify the SIG's information"); - throw new AccessError("You are not permitted to modify the SIG's information."); + getData().testMembership(level,is_member); + if (!(getData().canModifyCommunityProfile(level))) + { // this user can't modify the community feature set + logger.error("user not permitted to modify the community's information"); + throw new AccessError("You are not permitted to modify the community's information."); } // end if - if (getSIGData().isAdminSIG()) - { // the Admin SIG cannot change its security - logger.error("trying to change security info for the ADMIN SIG"); - throw new AccessError("The administrative SIG's security information cannot be modified."); + if (getData().isAdminCommunity()) + { // the Admin community cannot change its security + logger.error("trying to change security info for the ADMIN community"); + throw new AccessError("The administrative community's security information cannot be modified."); } // end if @@ -919,73 +920,73 @@ class SIGUserContextImpl implements SIGContext, SIGBackend } // end if - getSIGData().setSecurityLevels(user,read,write,create,delete,join); + getData().setSecurityLevels(user,read,write,create,delete,join); } // end setSecurityLevels - public boolean canAdministerSIG() + public boolean canAdministerCommunity() { - SIGData sd = getSIGDataNE(); - if (sd==null) + CommunityData d = getDataNE(); + if (d==null) return false; - if (sd.canDeleteSIG(level)) + if (d.canDeleteCommunity(level)) return true; - if (sd.canModifySIGProfile(level)) + if (d.canModifyCommunityProfile(level)) return true; - if (sd.canCreateSIGSubObjects(level)) + if (d.canCreateCommunitySubObjects(level)) return true; return false; - } // end canAdministerSIG + } // end canAdministerCommunity public boolean canModifyProfile() { - SIGData sd = getSIGDataNE(); - if (sd==null) + CommunityData d = getDataNE(); + if (d==null) return false; - return sd.canModifySIGProfile(level); + return d.canModifyCommunityProfile(level); } // end canModifyProfile - public boolean isAdminSIG() + public boolean isAdminCommunity() { - SIGData sd = getSIGDataNE(); - if (sd!=null) - return sd.isAdminSIG(); + CommunityData d = getDataNE(); + if (d!=null) + return d.isAdminCommunity(); else return false; - } // end isAdminSIG + } // end isAdminCommunity public void join(String joinkey) throws DataException, AccessError { if (deleted) - throw new DataException("This SIG has been deleted."); + throw new DataException("This community has been deleted."); if (is_member) { // we're already a member! - logger.info("attempting to join SIG, but already a member"); + logger.info("attempting to join community, but already a member"); return; // this becomes a no-op } // end if - if (!(getSIGData().canJoinSIG(user.realUID(),level))) + if (!(getData().canJoinCommunity(user.realUID(),level))) { // this user can't join up! - logger.error("user not permitted to join SIG"); - throw new AccessError("You are not permitted to join this SIG."); + logger.error("user not permitted to join community"); + throw new AccessError("You are not permitted to join this community."); } // end if - if (!(getSIGData().isPublicSIG())) - { // this is a private SIG - but admins can join anyway - if (!(Capability.canJoinPrivateSIGWithoutKey(level))) + if (!(getData().isPublicCommunity())) + { // this is a private community - but admins can join anyway + if (!(Capability.canJoinPrivateCommunityWithoutKey(level))) { // we need to test the join key against the one they supply - String real_key = getSIGData().getJoinKey(); + String real_key = getData().getJoinKey(); if (!(real_key.equals(joinkey))) - { // the join key was not the one stored in the SIG + { // the join key was not the one stored in the community logger.error("invalid join key specified"); throw new AccessError("The join key you specified was incorrect."); @@ -998,10 +999,10 @@ class SIGUserContextImpl implements SIGContext, SIGBackend // else we can join without specifying a key // actually set the data in the database - getSIGData().setMembership(user,user.realUID(),DefaultLevels.memberSIG(),false,false); + getData().setMembership(user,user.realUID(),DefaultLevels.memberCommunity(),false,false); // and update our internal data store - setMemberValues(DefaultLevels.memberSIG(),true,false); + setMemberValues(DefaultLevels.memberCommunity(),true,false); // and that's it! You expected lightning bolts maybe? @@ -1010,24 +1011,24 @@ class SIGUserContextImpl implements SIGContext, SIGBackend public void unjoin() throws DataException, AccessError { if (deleted) - throw new DataException("This SIG has been deleted."); + throw new DataException("This community has been deleted."); if (!is_member) { // we're already a member! - logger.info("attempting to unjoin SIG, but not currently a member"); + logger.info("attempting to unjoin community, but not currently a member"); return; // this becomes a no-op } // end if if (locked) { // we're locked - we can't possibly unjoin! - logger.info("membership in SIG is locked, cannot remove"); - throw new AccessError("You are not permitted to unjoin this SIG."); + logger.info("membership in community is locked, cannot remove"); + throw new AccessError("You are not permitted to unjoin this community."); } // end if // actually set the data in the database - getSIGData().setMembership(user,user.realUID(),-1,false,false); + getData().setMembership(user,user.realUID(),-1,false,false); // and update our internal data store setMemberValues(-1,false,false); @@ -1036,7 +1037,7 @@ class SIGUserContextImpl implements SIGContext, SIGBackend public int getMemberCount() throws DataException { - return getSIGData().getMemberCount(Capability.showHiddenSIGMembers(level)); + return getData().getMemberCount(Capability.showHiddenCommunityMembers(level)); } // end getMemberCount @@ -1050,9 +1051,9 @@ class SIGUserContextImpl implements SIGContext, SIGBackend { if (is_member || deleted) return false; - SIGData sd = getSIGDataNE(); - if (sd!=null) - return sd.canJoinSIG(user.realUID(),level); + CommunityData d = getDataNE(); + if (d!=null) + return d.canJoinCommunity(user.realUID(),level); else return false; @@ -1061,7 +1062,7 @@ class SIGUserContextImpl implements SIGContext, SIGBackend public List getConferences() throws DataException, AccessError { testConferenceAccess(); - return ConferenceUserContextImpl.getSIGConferences(engine,this,datapool); + return ConferenceUserContextImpl.getCommunityConferences(engine,this,datapool); } // end getConferences @@ -1082,23 +1083,23 @@ class SIGUserContextImpl implements SIGContext, SIGBackend public ConferenceContext createConference(String name, String alias, String description, boolean pvt, boolean hide_list) throws DataException, AccessError { - getSIGData().testMembership(level,is_member); - if (!(getSIGData().isFeaturePresent("CONF"))) - { // we can't create a conference in this SIG - logger.error("this SIG does not use conferencing"); - throw new AccessError("You are not permitted to create conferences in this SIG."); + getData().testMembership(level,is_member); + if (!(getData().isFeaturePresent("CONF"))) + { // we can't create a conference in this community + logger.error("this community does not use conferencing"); + throw new AccessError("You are not permitted to create conferences in this community."); } // end if - if (!(getSIGData().canCreateSIGSubObjects(level))) + if (!(getData().canCreateCommunitySubObjects(level))) { // this user can't create a conference logger.error("user not permitted to create a conference"); - throw new AccessError("You are not permitted to create conferences in this SIG."); + throw new AccessError("You are not permitted to create conferences in this community."); } // end if - // call down to the SIG core data to create the conference - ConferenceSIGContext cdata = getSIGData().createConference(this,name,alias,description,pvt,hide_list); + // call down to the community core data to create the conference + ConferenceCommunityContext cdata = getData().createConference(this,name,alias,description,pvt,hide_list); // wrap the returned object in a conference user context object and release the extra reference ConferenceUserContextImpl rc; @@ -1119,13 +1120,13 @@ class SIGUserContextImpl implements SIGContext, SIGBackend public boolean canCreateConference() { - SIGData sd = getSIGDataNE(); - if (sd==null) + CommunityData d = getDataNE(); + if (d==null) return false; - if (!(sd.checkMembership(level,is_member))) + if (!(d.checkMembership(level,is_member))) return false; - if (sd.isFeaturePresent("CONF")) - return sd.canCreateSIGSubObjects(level); + if (d.isFeaturePresent("CONF")) + return d.canCreateCommunitySubObjects(level); else return false; @@ -1134,31 +1135,32 @@ class SIGUserContextImpl implements SIGContext, SIGBackend public List searchForMembers(int field, int mode, String term, int offset, int count) throws DataException { - return getSIGData().searchForMembers(field,mode,term,offset,count,Capability.showHiddenSIGMembers(level)); + return getData().searchForMembers(field,mode,term,offset,count, + Capability.showHiddenCommunityMembers(level)); } // end searchForMembers public int getSearchMemberCount(int field, int mode, String term) throws DataException { - return getSIGData().getSearchMemberCount(field,mode,term,Capability.showHiddenSIGMembers(level)); + return getData().getSearchMemberCount(field,mode,term,Capability.showHiddenCommunityMembers(level)); } // end getSearchMemberCount public List getMemberList() throws DataException { - return getSIGData().getMemberList(Capability.showHiddenSIGMembers(level)); + return getData().getMemberList(Capability.showHiddenCommunityMembers(level)); } // end getMemberList public boolean canManageConferences() { - SIGData sd = getSIGDataNE(); - if (sd==null) + CommunityData d = getDataNE(); + if (d==null) return false; - if (!(sd.checkMembership(level,is_member))) + if (!(d.checkMembership(level,is_member))) return false; - if (sd.isFeaturePresent("CONF")) - return sd.canCreateSIGSubObjects(level); + if (d.isFeaturePresent("CONF")) + return d.canCreateCommunitySubObjects(level); else return false; @@ -1166,26 +1168,26 @@ class SIGUserContextImpl implements SIGContext, SIGBackend public int getMemberLevel(int uid) throws DataException, AccessError { - getSIGData().testMembership(level,is_member); + getData().testMembership(level,is_member); - return getSIGData().getMemberLevel(uid); + return getData().getMemberLevel(uid); } // end getMemberLevel public void setMembership(int uid, int new_level) throws DataException, AccessError { - getSIGData().testMembership(level,is_member); - if (!(getSIGData().canModifySIGProfile(level))) - { // this user can't modify the SIG feature set - logger.error("user not permitted to modify the SIG's membership"); + getData().testMembership(level,is_member); + if (!(getData().canModifyCommunityProfile(level))) + { // this user can't modify the community feature set + logger.error("user not permitted to modify the community's membership"); if (logger.isDebugEnabled()) logger.debug("(your level = " + level + ")"); - throw new AccessError("You are not permitted to modify the SIG's membership."); + throw new AccessError("You are not permitted to modify the community's membership."); } // end if // actually set the data in the database - getSIGData().setMembership(user,uid,new_level,false,false); + getData().setMembership(user,uid,new_level,false,false); if (uid==user.realUID()) // and update our internal data store setMemberValues(new_level,(new_level>0),false); @@ -1194,37 +1196,37 @@ class SIGUserContextImpl implements SIGContext, SIGBackend public boolean canDelete() { - SIGData sd = getSIGDataNE(); - if (sd==null) + CommunityData d = getDataNE(); + if (d==null) return false; - if (!(sd.checkMembership(level,is_member))) + if (!(d.checkMembership(level,is_member))) return false; - return sd.canDeleteSIG(level); + return d.canDeleteCommunity(level); } // end canDelete public void delete() throws DataException, AccessError { - SIGData my_sig = getSIGData(); - my_sig.testMembership(level,is_member); - if (!(my_sig.canDeleteSIG(level))) - { // no, repeat NO, way can we delete the SIG! - logger.error("user not permitted to delete SIG"); - throw new AccessError("You are not permitted to delete this SIG."); + CommunityData my_comm = getData(); + my_comm.testMembership(level,is_member); + if (!(my_comm.canDeleteCommunity(level))) + { // no, repeat NO, way can we delete the community! + logger.error("user not permitted to delete community"); + throw new AccessError("You are not permitted to delete this community."); } // end if - // call the methods required to delete the SIG - my_sig.delete(user); - engine.detachSIGDataObject(sigid); + // call the methods required to delete the community + my_comm.delete(user); + engine.detachCommunityDataObject(cid); // flag that we've been deleted cache = null; deleted = true; // detach our references from the lower-level object - sigdata = null; - my_sig.rd_release(); + data = null; + my_comm.rd_release(); } // end delete @@ -1234,28 +1236,28 @@ class SIGUserContextImpl implements SIGContext, SIGBackend if (user.userIsAnonymous()) throw new AccessError("You must be logged in to send an invitation."); - SIGData my_sig = getSIGData(); - my_sig.testMembership(level,is_member); + CommunityData my_comm = getData(); + my_comm.testMembership(level,is_member); // Prepare the subject line to be sent to the user. String subject = engine.getStockMessage("subj-invite"); HashMap vars = new HashMap(5); - vars.put("signame",my_sig.getName()); + vars.put("community.name",my_comm.getName()); subject = StringUtil.replaceAllVariables(subject,vars); // Prepare the message text to be sent to the user. String msg; - if (my_sig.isPublicSIG()) + if (my_comm.isPublicCommunity()) msg = engine.getStockMessage("invite-public"); else { // get the private invite message and set the join key variable msg = engine.getStockMessage("invite-private"); - vars.put("joinkey",my_sig.getJoinKey()); + vars.put("joinkey",my_comm.getJoinKey()); } // end else // Set the remaining variables and replace them. - vars.put("sigalias",my_sig.getAlias()); + vars.put("community.alias",my_comm.getAlias()); vars.put("personal",personal_message); vars.put("fullname",user.realFullName()); String uname = user.realUserName(); @@ -1278,20 +1280,21 @@ class SIGUserContextImpl implements SIGContext, SIGBackend { if (user.userIsAnonymous()) return false; - SIGData sd = getSIGDataNE(); - if (sd==null) + CommunityData d = getDataNE(); + if (d==null) return false; - return sd.checkMembership(level,is_member); + return d.checkMembership(level,is_member); } // end canSendInvitation public List getAuditRecords(int offset, int count) throws AccessError, DataException { - SIGData sd = getSIGData(); - if (!sd.canDeleteSIG(level) && !sd.canModifySIGProfile(level) && !sd.canCreateSIGSubObjects(level)) + CommunityData d = getData(); + if ( !d.canDeleteCommunity(level) && !d.canModifyCommunityProfile(level) + && !d.canCreateCommunitySubObjects(level)) { // user not permitted to retrieve audit records - naughty naughty - logger.error("user not permitted to retrieve audit records for SIG"); - throw new AccessError("You are not permitted to retrieve audit records for this SIG."); + logger.error("user not permitted to retrieve audit records for community"); + throw new AccessError("You are not permitted to retrieve audit records for this community."); } // end if @@ -1301,7 +1304,7 @@ class SIGUserContextImpl implements SIGContext, SIGBackend try { // retrieve a connection from the data pool and get the audit records conn = datapool.getConnection(); - rc = AuditRecord.getAuditRecords(conn,sigid,offset,count); + rc = AuditRecord.getAuditRecords(conn,cid,offset,count); } // end try catch (SQLException e) @@ -1323,11 +1326,12 @@ class SIGUserContextImpl implements SIGContext, SIGBackend public int getAuditRecordCount() throws AccessError, DataException { - SIGData sd = getSIGData(); - if (!sd.canDeleteSIG(level) && !sd.canModifySIGProfile(level) && !sd.canCreateSIGSubObjects(level)) + CommunityData d = getData(); + if ( !d.canDeleteCommunity(level) && !d.canModifyCommunityProfile(level) + && !d.canCreateCommunitySubObjects(level)) { // user not permitted to retrieve audit records - naughty naughty - logger.error("user not permitted to retrieve audit records for SIG"); - throw new AccessError("You are not permitted to retrieve audit records for this SIG."); + logger.error("user not permitted to retrieve audit records for community"); + throw new AccessError("You are not permitted to retrieve audit records for this community."); } // end if @@ -1337,7 +1341,7 @@ class SIGUserContextImpl implements SIGContext, SIGBackend try { // retrieve a connection from the data pool and get the audit records conn = datapool.getConnection(); - rc = AuditRecord.getAuditRecordCount(conn,sigid); + rc = AuditRecord.getAuditRecordCount(conn,cid); } // end try catch (SQLException e) @@ -1417,21 +1421,21 @@ class SIGUserContextImpl implements SIGContext, SIGBackend } // end saveMRU /*-------------------------------------------------------------------------------- - * Implementations from interface SIGBackend + * Implementations from interface CommunityBackend *-------------------------------------------------------------------------------- */ - public SIGContext selfSIG() + public CommunityContext selfCommunity() { return this; - } // end selfsig; + } // end selfCommunity - public int realSIGID() + public int realCommunityID() { - return sigid; + return cid; - } // end realSIGID + } // end realCommunityID public boolean userHideHiddenConferences() { @@ -1439,39 +1443,39 @@ class SIGUserContextImpl implements SIGContext, SIGBackend } // end userHideHiddenConferences - public int realSIGLevel() + public int realCommunityLevel() { return level; - } // end realSIGLevel + } // end realCommunityLevel - public ConferenceSIGContext getConferenceDataObject(int confid) throws DataException + public ConferenceCommunityContext getConferenceDataObject(int confid) throws DataException { - return getSIGData().getConferenceDataObject(confid); + return getData().getConferenceDataObject(confid); } // end getConferenceDataObject public boolean userCanCreateSubobjects() { - SIGData sd = getSIGDataNE(); - if (sd==null) + CommunityData d = getDataNE(); + if (d==null) return false; - if (sd.checkMembership(level,is_member)) - return sd.canCreateSIGSubObjects(level); + if (d.checkMembership(level,is_member)) + return d.canCreateCommunitySubObjects(level); else return false; } // end userCanCreateSubObjects - public String realSIGAlias() + public String realCommunityAlias() { return getAlias(); - } // end realSIGAlias + } // end realCommunityAlias public void detachConferenceDataObject(int confid) throws DataException { - getSIGData().detachConferenceDataObject(confid); + getData().detachConferenceDataObject(confid); } // end detachConferenceDataObject @@ -1486,11 +1490,11 @@ class SIGUserContextImpl implements SIGContext, SIGBackend *-------------------------------------------------------------------------------- */ - static List getMemberSIGEntries(EngineBackend engine, UserBackend user, DataPool datapool) + static List getMemberCommunityEntries(EngineBackend engine, UserBackend user, DataPool datapool) throws DataException { if (logger.isDebugEnabled()) - logger.debug("getMemberSIGEntries for user #" + String.valueOf(user.realUID())); + logger.debug("getMemberCommunityEntries for user #" + String.valueOf(user.realUID())); ArrayList rc = new ArrayList(); // return from this function Connection conn = null; // pooled database connection @@ -1505,11 +1509,11 @@ class SIGUserContextImpl implements SIGContext, SIGBackend ResultSet rs = stmt.executeQuery(sql.toString()); while (rs.next()) { // create the user contexts and add them to the return vector - int the_sigid = rs.getInt(1); + int the_cid = rs.getInt(1); if (logger.isDebugEnabled()) - logger.debug("...found SIG #" + String.valueOf(the_sigid)); - SIGContext tmp = new SIGUserContextImpl(engine,user,datapool,the_sigid,rs.getInt(2),rs.getBoolean(3), - rs.getString(4),rs.getString(5)); + logger.debug("...found community #" + the_cid); + CommunityContext tmp = new CommunityUserContextImpl(engine,user,datapool,the_cid,rs.getInt(2), + rs.getBoolean(3),rs.getString(4),rs.getString(5)); rc.add(tmp); } // end while @@ -1517,8 +1521,8 @@ class SIGUserContextImpl implements SIGContext, SIGBackend } // end try catch (SQLException e) { // turn SQLException into data exception - logger.error("DB error reading SIG entries: " + e.getMessage(),e); - throw new DataException("unable to retrieve user SIG information: " + e.getMessage(),e); + logger.error("DB error reading community entries: " + e.getMessage(),e); + throw new DataException("unable to retrieve user community information: " + e.getMessage(),e); } // end catch finally @@ -1530,10 +1534,10 @@ class SIGUserContextImpl implements SIGContext, SIGBackend return Collections.unmodifiableList(rc); - } // end getMemberSIGEntries + } // end getMemberCommunityEntries - static SIGContext getSIGContext(EngineBackend engine, UserBackend user, DataPool datapool, int sigid) - throws DataException + static CommunityContext getCommunityContext(EngineBackend engine, UserBackend user, DataPool datapool, + int cid) throws DataException { Connection conn = null; // pooled database connection @@ -1541,14 +1545,14 @@ class SIGUserContextImpl implements SIGContext, SIGBackend { // get a database connection conn = datapool.getConnection(); - // return the SIG we want - return getSIGPrivate(engine,user,datapool,conn,sigid); + // return the community we want + return getCommunityPrivate(engine,user,datapool,conn,cid); } // end try catch (SQLException e) { // turn SQLException into data exception - logger.error("DB error reading SIG entry: " + e.getMessage(),e); - throw new DataException("unable to retrieve SIG information: " + e.getMessage(),e); + logger.error("DB error reading community entry: " + e.getMessage(),e); + throw new DataException("unable to retrieve community information: " + e.getMessage(),e); } // end catch finally @@ -1558,10 +1562,10 @@ class SIGUserContextImpl implements SIGContext, SIGBackend } // end finally - } // end getSIGContext + } // end getCommunityContext - static SIGContext getSIGContext(EngineBackend engine, UserBackend user, DataPool datapool, String alias) - throws DataException + static CommunityContext getCommunityContext(EngineBackend engine, UserBackend user, DataPool datapool, + String alias) throws DataException { Connection conn = null; // pooled database connection @@ -1569,29 +1573,29 @@ class SIGUserContextImpl implements SIGContext, SIGBackend { // get a database connection conn = datapool.getConnection(); - // create the query to find the SIG in the table + // create the query to find the community in the table Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer("SELECT sigid, signame FROM sigs WHERE alias = '"); sql.append(SQLUtil.encodeString(alias)).append("';"); ResultSet rs = stmt.executeQuery(sql.toString()); if (!(rs.next())) - { // no SIG entry found... - logger.error("SIG '" + alias + "' not found in the database"); - throw new DataException("The SIG '" + alias + "' was not found in the database."); + { // no community entry found... + logger.error("Community '" + alias + "' not found in the database"); + throw new DataException("The community '" + alias + "' was not found in the database."); } // end if // initialize the object and check membership info - SIGUserContextImpl sc = new SIGUserContextImpl(engine,user,datapool,rs.getInt("sigid"), - rs.getString("signame"),alias); - sc.checkMembership(conn); - return sc; + CommunityUserContextImpl c = new CommunityUserContextImpl(engine,user,datapool,rs.getInt(1), + rs.getString(2),alias); + c.checkMembership(conn); + return c; } // end try catch (SQLException e) { // turn SQLException into data exception - logger.error("DB error reading SIG entry: " + e.getMessage(),e); - throw new DataException("unable to retrieve SIG information: " + e.getMessage(),e); + logger.error("DB error reading community entry: " + e.getMessage(),e); + throw new DataException("unable to retrieve community information: " + e.getMessage(),e); } // end catch finally @@ -1601,22 +1605,21 @@ class SIGUserContextImpl implements SIGContext, SIGBackend } // end finally - } // end getSIGContext + } // end getCommunityContext - static SIGBackend getSIGBackend(EngineBackend engine, UserBackend user, DataPool datapool, Connection conn, - int sigid) throws DataException + static CommunityBackend getCommunityBackend(EngineBackend engine, UserBackend user, DataPool datapool, + Connection conn, int cid) throws DataException { - return getSIGPrivate(engine,user,datapool,conn,sigid); + return getCommunityPrivate(engine,user,datapool,conn,cid); - } // end getSIGBackend + } // end getCommunityBackend - static List searchForSIGs(EngineBackend engine, UserBackend user, DataPool datapool, int field, - int mode, String term, int offset, int count) throws DataException + static List searchForCommunities(EngineBackend engine, UserBackend user, DataPool datapool, int field, + int mode, String term, int offset, int count) throws DataException { if (logger.isDebugEnabled()) - logger.debug("SIG search: field = " + String.valueOf(field) + ", mode = " + String.valueOf(mode) - + ", term '" + term + "', offset = " + String.valueOf(offset) + ", count = " - + String.valueOf(count)); + logger.debug("Community search: field = " + field + ", mode = " + mode + ", term '" + term + + "', offset = " + offset + ", count = " + count); ArrayList rc = new ArrayList(); // return from this function Connection conn = null; // pooled database connection @@ -1629,11 +1632,11 @@ class SIGUserContextImpl implements SIGContext, SIGBackend switch (field) { - case SearchMode.FIELD_SIG_NAME: + case SearchMode.FIELD_COMMUNITY_NAME: sql.append("signame "); break; - case SearchMode.FIELD_SIG_SYNOPSIS: + case SearchMode.FIELD_COMMUNITY_SYNOPSIS: sql.append("synopsis "); break; @@ -1661,7 +1664,7 @@ class SIGUserContextImpl implements SIGContext, SIGBackend } // end switch - if (Capability.hideHiddenSearchSIGs(user.realBaseLevel())) + if (Capability.hideHiddenSearchCommunities(user.realBaseLevel())) sql.append(" AND hide_search = 0"); sql.append(" ORDER BY signame LIMIT ").append(offset).append(", ").append(count+1).append(';'); @@ -1672,11 +1675,11 @@ class SIGUserContextImpl implements SIGContext, SIGBackend ResultSet rs = stmt.executeQuery(sql.toString()); while (rs.next()) - { // load all matching SIGs into the recordset - SIGUserContextImpl sc = new SIGUserContextImpl(engine,user,datapool,rs.getInt("sigid"), - rs.getString("signame"),rs.getString("alias")); - sc.checkMembership(conn); - SIGContext tmp = sc; + { // load all matching communities into the recordset + CommunityUserContextImpl c = new CommunityUserContextImpl(engine,user,datapool,rs.getInt(1), + rs.getString(2),rs.getString(3)); + c.checkMembership(conn); + CommunityContext tmp = c; rc.add(tmp); } // end while @@ -1684,8 +1687,8 @@ class SIGUserContextImpl implements SIGContext, SIGBackend } // end try catch (SQLException e) { // turn SQLException into data exception - logger.error("DB error reading SIG entries: " + e.getMessage(),e); - throw new DataException("unable to retrieve user SIG information: " + e.getMessage(),e); + logger.error("DB error reading community entries: " + e.getMessage(),e); + throw new DataException("unable to retrieve user community information: " + e.getMessage(),e); } // end catch finally @@ -1697,14 +1700,13 @@ class SIGUserContextImpl implements SIGContext, SIGBackend return Collections.unmodifiableList(rc); - } // end searchForSIGs + } // end searchForCommunities - static int getSearchSIGCount(UserBackend user, DataPool datapool, int field, int mode, String term) + static int getSearchCommunityCount(UserBackend user, DataPool datapool, int field, int mode, String term) throws DataException { if (logger.isDebugEnabled()) - logger.debug("SIG search: field = " + String.valueOf(field) + ", mode = " + String.valueOf(mode) - + ", term '" + term + "'"); + logger.debug("Community search: field = " + field + ", mode = " + mode + ", term '" + term + "'"); Connection conn = null; // pooled database connection @@ -1716,11 +1718,11 @@ class SIGUserContextImpl implements SIGContext, SIGBackend switch (field) { - case SearchMode.FIELD_SIG_NAME: + case SearchMode.FIELD_COMMUNITY_NAME: sql.append("signame "); break; - case SearchMode.FIELD_SIG_SYNOPSIS: + case SearchMode.FIELD_COMMUNITY_SYNOPSIS: sql.append("synopsis "); break; @@ -1748,7 +1750,7 @@ class SIGUserContextImpl implements SIGContext, SIGBackend } // end switch - if (Capability.hideHiddenSearchSIGs(user.realBaseLevel())) + if (Capability.hideHiddenSearchCommunities(user.realBaseLevel())) sql.append(" AND hide_search = 0"); sql.append(';'); @@ -1759,15 +1761,15 @@ class SIGUserContextImpl implements SIGContext, SIGBackend ResultSet rs = stmt.executeQuery(sql.toString()); if (!(rs.next())) - throw new InternalStateError("getSearchSIGCount search failure (MUST have 1 row!)"); + throw new InternalStateError("getSearchCommunityCount search failure (MUST have 1 row!)"); return rs.getInt(1); } // end try catch (SQLException e) { // turn SQLException into data exception - logger.error("DB error reading SIG entries: " + e.getMessage(),e); - throw new DataException("unable to retrieve user SIG information: " + e.getMessage(),e); + logger.error("DB error reading community entries: " + e.getMessage(),e); + throw new DataException("unable to retrieve user community information: " + e.getMessage(),e); } // end catch finally @@ -1777,15 +1779,13 @@ class SIGUserContextImpl implements SIGContext, SIGBackend } // end finally - } // end getSearchSIGCount + } // end getSearchCommunityCount - static List getSIGsInCategory(EngineBackend engine, UserBackend user, DataPool datapool, int catid, - int offset, int count) - throws DataException + static List getCommunitiesInCategory(EngineBackend engine, UserBackend user, DataPool datapool, int catid, + int offset, int count) throws DataException { if (logger.isDebugEnabled()) - logger.debug("reading SIGs in category " + String.valueOf(catid) + ", offset = " - + String.valueOf(offset) + ", count = " + String.valueOf(count)); + logger.debug("reading communities in category " + catid + ", offset = " + offset + ", count = " + count); ArrayList rc = new ArrayList(); // return from this function Connection conn = null; // pooled database connection @@ -1796,7 +1796,7 @@ class SIGUserContextImpl implements SIGContext, SIGBackend Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer("SELECT sigid, signame, alias FROM sigs WHERE catid = "); sql.append(catid); - if (Capability.hideHiddenDirectorySIGs(user.realBaseLevel())) + if (Capability.hideHiddenDirectoryCommunities(user.realBaseLevel())) sql.append(" AND hide_dir = 0"); sql.append(" ORDER BY signame LIMIT ").append(offset).append(", ").append(count+1).append(';'); @@ -1807,11 +1807,11 @@ class SIGUserContextImpl implements SIGContext, SIGBackend ResultSet rs = stmt.executeQuery(sql.toString()); while (rs.next()) - { // load all matching SIGs into the recordset - SIGUserContextImpl sc = new SIGUserContextImpl(engine,user,datapool,rs.getInt("sigid"), - rs.getString("signame"),rs.getString("alias")); - sc.checkMembership(conn); - SIGContext tmp = sc; + { // load all matching communities into the recordset + CommunityUserContextImpl c = new CommunityUserContextImpl(engine,user,datapool,rs.getInt(1), + rs.getString(2),rs.getString(3)); + c.checkMembership(conn); + CommunityContext tmp = c; rc.add(tmp); } // end while @@ -1819,8 +1819,8 @@ class SIGUserContextImpl implements SIGContext, SIGBackend } // end try catch (SQLException e) { // turn SQLException into data exception - logger.error("DB error reading SIG entries: " + e.getMessage(),e); - throw new DataException("unable to retrieve user SIG information: " + e.getMessage(),e); + logger.error("DB error reading communities entries: " + e.getMessage(),e); + throw new DataException("unable to retrieve user community information: " + e.getMessage(),e); } // end catch finally @@ -1832,12 +1832,12 @@ class SIGUserContextImpl implements SIGContext, SIGBackend return Collections.unmodifiableList(rc); - } // end getSIGsInCategory + } // end getCommunitiesInCategory - static int getNumSIGsInCategory(UserBackend user, DataPool datapool, int catid) throws DataException + static int getNumCommunitiesInCategory(UserBackend user, DataPool datapool, int catid) throws DataException { if (logger.isDebugEnabled()) - logger.debug("reading SIGs in category " + String.valueOf(catid)); + logger.debug("reading communities in category " + catid); Connection conn = null; // pooled database connection @@ -1847,7 +1847,7 @@ class SIGUserContextImpl implements SIGContext, SIGBackend Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer("SELECT COUNT(*) FROM sigs WHERE catid = "); sql.append(catid); - if (Capability.hideHiddenDirectorySIGs(user.realBaseLevel())) + if (Capability.hideHiddenDirectoryCommunities(user.realBaseLevel())) sql.append(" AND hide_dir = 0"); sql.append(';'); @@ -1858,15 +1858,15 @@ class SIGUserContextImpl implements SIGContext, SIGBackend ResultSet rs = stmt.executeQuery(sql.toString()); if (!(rs.next())) - throw new InternalStateError("getNumSIGsInCategory search failure (MUST have 1 row!)"); + throw new InternalStateError("getNumCommunitiesInCategory search failure (MUST have 1 row!)"); return rs.getInt(1); } // end try catch (SQLException e) { // turn SQLException into data exception - logger.error("DB error reading SIG entries: " + e.getMessage(),e); - throw new DataException("unable to retrieve user SIG information: " + e.getMessage(),e); + logger.error("DB error reading community entries: " + e.getMessage(),e); + throw new DataException("unable to retrieve user community information: " + e.getMessage(),e); } // end catch finally @@ -1876,7 +1876,7 @@ class SIGUserContextImpl implements SIGContext, SIGBackend } // end finally - } // end getNumSIGsInCategory + } // end getNumCommunitiesInCategory /*-------------------------------------------------------------------------------- * Operations for use within the class only @@ -1887,23 +1887,23 @@ class SIGUserContextImpl implements SIGContext, SIGBackend { Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer("SELECT granted_lvl, locked FROM sigmember WHERE sigid = "); - sql.append(sigid).append(" AND uid = ").append(user.realUID()).append(';'); + sql.append(cid).append(" AND uid = ").append(user.realUID()).append(';'); ResultSet rs = stmt.executeQuery(sql.toString()); if (rs.next()) { // we are a member... if (logger.isDebugEnabled()) - logger.debug("we are a member of this SIG"); - setMemberValues(rs.getInt("granted_lvl"),true,rs.getBoolean("locked")); + logger.debug("we are a member of this community"); + setMemberValues(rs.getInt(1),true,rs.getBoolean(2)); } // end if else { // we're NOT a member... if (logger.isDebugEnabled()) - logger.debug("we are NOT a member of this SIG"); + logger.debug("we are NOT a member of this community"); setMemberValues(0,false,false); } // end else } // end checkMembership -} // end class SIGUserContextImpl +} // end class CommunityUserContextImpl diff --git a/src/com/silverwrist/venice/core/impl/ConferenceBackend.java b/src/com/silverwrist/venice/core/impl/ConferenceBackend.java index ba8b624..0b172a4 100644 --- a/src/com/silverwrist/venice/core/impl/ConferenceBackend.java +++ b/src/com/silverwrist/venice/core/impl/ConferenceBackend.java @@ -7,7 +7,7 @@ * WARRANTY OF ANY KIND, either express or implied. See the License for the specific * language governing rights and limitations under the License. * - * The Original Code is the Venice Web Community System. + * The Original Code is the Venice Web Communities System. * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are @@ -23,7 +23,7 @@ import java.util.Date; import com.silverwrist.venice.db.PostLinkDecoderContext; import com.silverwrist.venice.core.DataException; -public interface ConferenceBackend extends SIGBackend +public interface ConferenceBackend extends CommunityBackend { public abstract int realConfID(); diff --git a/src/com/silverwrist/venice/core/impl/ConferenceSIGContext.java b/src/com/silverwrist/venice/core/impl/ConferenceCommunityContext.java similarity index 74% rename from src/com/silverwrist/venice/core/impl/ConferenceSIGContext.java rename to src/com/silverwrist/venice/core/impl/ConferenceCommunityContext.java index 29f5427..1e6945e 100644 --- a/src/com/silverwrist/venice/core/impl/ConferenceSIGContext.java +++ b/src/com/silverwrist/venice/core/impl/ConferenceCommunityContext.java @@ -23,7 +23,7 @@ import java.util.List; import com.silverwrist.util.rcache.ReferencedData; import com.silverwrist.venice.core.DataException; -public interface ConferenceSIGContext extends ReferencedData +public interface ConferenceCommunityContext extends ReferencedData { public abstract int getConfID(); @@ -35,7 +35,7 @@ public interface ConferenceSIGContext extends ReferencedData public abstract Date getLastUpdateDate(); - public abstract int getSIGGrantedLevel(); + public abstract int getCommunityGrantedLevel(); public abstract List getAliases() throws DataException; @@ -63,20 +63,20 @@ public interface ConferenceSIGContext extends ReferencedData public abstract int getDeleteLevel() throws DataException; - public abstract void setSecurityLevels(SIGBackend sig, int read, int post, int create, int hide, + public abstract void setSecurityLevels(CommunityBackend comm, int read, int post, int create, int hide, int nuke, int change, int delete) throws DataException; - public abstract void setName(SIGBackend sig, String val) throws DataException; + public abstract void setName(CommunityBackend comm, String val) throws DataException; public abstract void setDescription(String val) throws DataException; - public abstract void addAlias(SIGBackend sig, String alias) throws DataException; + public abstract void addAlias(CommunityBackend comm, String alias) throws DataException; - public abstract void removeAlias(SIGBackend sig, String alias) throws DataException; + public abstract void removeAlias(CommunityBackend comm, String alias) throws DataException; - public abstract void setMembership(SIGBackend sig, int uid, int grant_level) throws DataException; + public abstract void setMembership(CommunityBackend comm, int uid, int grant_level) throws DataException; - public abstract void setSIGGrantedLevel(SIGBackend sig, int new_level) throws DataException; + public abstract void setCommunityGrantedLevel(CommunityBackend comm, int new_level) throws DataException; public abstract short getSequence(); @@ -84,14 +84,14 @@ public interface ConferenceSIGContext extends ReferencedData public abstract boolean getHideList(); - public abstract void setHideList(SIGBackend sig, boolean flag) throws DataException; + public abstract void setHideList(CommunityBackend comm, boolean flag) throws DataException; public abstract boolean canHideTopics(int level); public abstract String getAnAlias() throws DataException; - public abstract ReturnTopicInfo createNewTopic(SIGBackend sig, String title, String pseud, String body) - throws DataException; + public abstract ReturnTopicInfo createNewTopic(CommunityBackend comm, String title, String pseud, + String body) throws DataException; public abstract boolean canScribblePosts(int level); @@ -109,4 +109,4 @@ public interface ConferenceSIGContext extends ReferencedData public abstract void delete(UserBackend user) throws DataException; -} // end interface ConferenceSIGContext +} // end interface ConferenceCommunityContext diff --git a/src/com/silverwrist/venice/core/impl/ConferenceSIGContextImpl.java b/src/com/silverwrist/venice/core/impl/ConferenceCommunityContextImpl.java similarity index 84% rename from src/com/silverwrist/venice/core/impl/ConferenceSIGContextImpl.java rename to src/com/silverwrist/venice/core/impl/ConferenceCommunityContextImpl.java index 1e9299a..3778e59 100644 --- a/src/com/silverwrist/venice/core/impl/ConferenceSIGContextImpl.java +++ b/src/com/silverwrist/venice/core/impl/ConferenceCommunityContextImpl.java @@ -7,7 +7,7 @@ * WARRANTY OF ANY KIND, either express or implied. See the License for the specific * language governing rights and limitations under the License. * - * The Original Code is the Venice Web Community System. + * The Original Code is the Venice Web Communities System. * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are @@ -25,7 +25,7 @@ import com.silverwrist.venice.htmlcheck.*; import com.silverwrist.venice.security.AuditRecord; import com.silverwrist.venice.core.*; -class ConferenceSIGContextImpl implements ConferenceSIGContext +class ConferenceCommunityContextImpl implements ConferenceCommunityContext { /*-------------------------------------------------------------------------------- * Inner class used to cache locally-important data @@ -71,19 +71,19 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext *-------------------------------------------------------------------------------- */ - private static Category logger = Category.getInstance(ConferenceSIGContextImpl.class.getName()); + private static Category logger = Category.getInstance(ConferenceCommunityContextImpl.class); /*-------------------------------------------------------------------------------- * Attributes *-------------------------------------------------------------------------------- */ - private int refcount = 1; // reference count (within the SIGData) + private int refcount = 1; // reference count (within the CommunityData) private EngineBackend engine; // engine object reference - private SIGDataBackend sig; // SIG object reference + private CommunityDataBackend comm; // community object reference private DataPool datapool; // data pool object private int confid; // ID of this conference - private int level; // level granted in conference to members of the SIG + private int level; // level granted in conference to members of the community private short sequence; // sequence number this conference appears in list private boolean hide_list; // hide the conference in the list? private ConfCache cache; // cache of locally-important information @@ -95,15 +95,15 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext *-------------------------------------------------------------------------------- */ - ConferenceSIGContextImpl(EngineBackend engine, SIGDataBackend sig, DataPool datapool, int confid) - throws DataException + ConferenceCommunityContextImpl(EngineBackend engine, CommunityDataBackend comm, DataPool datapool, + int confid) throws DataException { if (logger.isDebugEnabled()) - logger.debug("new ConferenceSIGContextImpl(#" + String.valueOf(confid) + ") for SIG # " - + String.valueOf(sig.realSIGID())); + logger.debug("new ConferenceCommunityContextImpl(#" + String.valueOf(confid) + ") for community # " + + comm.realCommunityID()); this.engine = engine; - this.sig = sig; + this.comm = comm; this.datapool = datapool; this.confid = confid; @@ -119,15 +119,15 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext StringBuffer sql = new StringBuffer("SELECT c.createdate, c.name, c.descr, s.granted_lvl, s.sequence, s.hide_list " + "FROM sigtoconf s, confs c WHERE s.confid = c.confid AND s.sigid = "); - sql.append(sig.realSIGID()).append(" AND c.confid = ").append(confid).append(';'); + sql.append(comm.realCommunityID()).append(" AND c.confid = ").append(confid).append(';'); if (logger.isDebugEnabled()) logger.debug("SQL: " + sql.toString()); // Run that monster query! ResultSet rs = stmt.executeQuery(sql.toString()); if (!(rs.next())) - throw new DataException("conference ID#" + String.valueOf(confid) + " not found in SIG#" - + String.valueOf(sig.realSIGID())); + throw new DataException("conference ID#" + confid + " not found in community#" + + comm.realCommunityID()); // fill in the "cache" and "level" indicators this.cache = new ConfCache(rs.getString(2),rs.getString(3),SQLUtil.getFullDateTime(rs,1)); @@ -151,15 +151,15 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext } // end constructor - ConferenceSIGContextImpl(EngineBackend engine, SIGDataBackend sig, DataPool datapool, - short sequence, boolean hide_list, ConferenceData cdata) + ConferenceCommunityContextImpl(EngineBackend engine, CommunityDataBackend comm, DataPool datapool, + short sequence, boolean hide_list, ConferenceData cdata) { if (logger.isDebugEnabled()) - logger.debug("new ConferenceSIGContextImpl(NEW#" + String.valueOf(confid) + ") for SIG # " - + String.valueOf(sig.realSIGID())); + logger.debug("new ConferenceCommunityContextImpl(NEW#" + confid + ") for community # " + + comm.realCommunityID()); this.engine = engine; - this.sig = sig; + this.comm = comm; this.datapool = datapool; this.confid = cdata.getID(); this.level = 0; @@ -182,7 +182,7 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext confdata.rd_release(); confdata = null; engine = null; - sig = null; + comm = null; datapool = null; cache = null; @@ -196,7 +196,7 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext private synchronized ConferenceData getConferenceData() throws DataException { if (confdata==null) - { // attempt to load the ConferenceSIGContext + { // attempt to load the ConferenceCommunityContext if (deleted) throw new DataException("This conference has been deleted."); confdata = engine.getConferenceDataObject(confid); @@ -213,12 +213,12 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext private synchronized ConferenceData getConferenceDataNE() { if (confdata==null) - { // we need to load the ConferenceSIGContext... + { // we need to load the ConferenceCommunityContext... if (deleted) return null; // no return on deletion try - { // attempt to load the ConferenceSIGContext + { // attempt to load the ConferenceCommunityContext confdata = engine.getConferenceDataObject(confid); } // end try @@ -268,7 +268,7 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext } // end rd_getKey /*-------------------------------------------------------------------------------- - * Implementations from interface ConferenceSIGContext + * Implementations from interface ConferenceCommunityContext *-------------------------------------------------------------------------------- */ @@ -324,11 +324,11 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext } // end getLastUpdateDate - public int getSIGGrantedLevel() + public int getCommunityGrantedLevel() { return level; - } // end getSIGGrantedLevel + } // end getCommunityGrantedLevel public List getAliases() throws DataException { @@ -432,16 +432,16 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext } // end getDeleteLevel - public synchronized void setSecurityLevels(SIGBackend sig, int read, int post, int create, int hide, + public synchronized void setSecurityLevels(CommunityBackend comm, int read, int post, int create, int hide, int nuke, int change, int delete) throws DataException { - getConferenceData().setSecurityLevels(sig,read,post,create,hide,nuke,change,delete); + getConferenceData().setSecurityLevels(comm,read,post,create,hide,nuke,change,delete); } // end setSecurityLevels - public synchronized void setName(SIGBackend sig, String val) throws DataException + public synchronized void setName(CommunityBackend comm, String val) throws DataException { - getConferenceData().setName(sig,val); + getConferenceData().setName(comm,val); } // end setName @@ -451,25 +451,25 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext } // end setDescription - public synchronized void addAlias(SIGBackend sig, String alias) throws DataException + public synchronized void addAlias(CommunityBackend comm, String alias) throws DataException { - getConferenceData().addAlias(sig,alias); + getConferenceData().addAlias(comm,alias); } // end addAlias - public synchronized void removeAlias(SIGBackend sig, String alias) throws DataException + public synchronized void removeAlias(CommunityBackend comm, String alias) throws DataException { - getConferenceData().removeAlias(sig,alias); + getConferenceData().removeAlias(comm,alias); } // end removeAlias - public synchronized void setMembership(SIGBackend sig, int uid, int grant_level) throws DataException + public synchronized void setMembership(CommunityBackend comm, int uid, int grant_level) throws DataException { - getConferenceData().setMembership(sig,uid,grant_level); + getConferenceData().setMembership(comm,uid,grant_level); } // end setMembership - public synchronized void setSIGGrantedLevel(SIGBackend sig, int new_level) throws DataException + public synchronized void setCommunityGrantedLevel(CommunityBackend comm, int new_level) throws DataException { if (deleted) throw new DataException("This conference has been deleted."); @@ -484,8 +484,8 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext // create the SQL statement Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer("UPDATE sigtoconf SET granted_lvl = "); - sql.append(new_level).append(" WHERE sigid = ").append(this.sig.realSIGID()).append(" AND confid = "); - sql.append(confid).append(';'); + sql.append(new_level).append(" WHERE sigid = ").append(this.comm.realCommunityID()); + sql.append(" AND confid = ").append(confid).append(';'); // execute the update stmt.executeUpdate(sql.toString()); @@ -494,8 +494,8 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext level = new_level; // create an audit record reflecting the change - ar = new AuditRecord(AuditRecord.CONF_SECURITY,sig.realUID(),sig.userRemoteAddress(),sig.realSIGID(), - "conf=" + String.valueOf(confid)); + ar = new AuditRecord(AuditRecord.CONF_SECURITY,comm.realUID(),comm.userRemoteAddress(), + comm.realCommunityID(),"conf=" + confid); } // end try catch (SQLException e) @@ -523,7 +523,7 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext } // end finally - } // end setSIGGrantedLevel + } // end setCommunityGrantedLevel public short getSequence() { @@ -545,7 +545,7 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext // create the SQL statement Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer("UPDATE sigtoconf SET sequence = "); - sql.append(seq).append(" WHERE sigid = ").append(this.sig.realSIGID()).append(" AND confid = "); + sql.append(seq).append(" WHERE sigid = ").append(this.comm.realCommunityID()).append(" AND confid = "); sql.append(confid).append(';'); // execute the update @@ -576,7 +576,7 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext } // end getHideList - public void setHideList(SIGBackend sig, boolean flag) throws DataException + public void setHideList(CommunityBackend comm, boolean flag) throws DataException { if (logger.isDebugEnabled()) logger.debug("setHideList(conf #" + confid + ", " + flag + ")"); @@ -605,7 +605,7 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext // create the SQL statement Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer("UPDATE sigtoconf SET hide_list = "); - sql.append(flag ? '1' : '0').append(" WHERE sigid = ").append(this.sig.realSIGID()); + sql.append(flag ? '1' : '0').append(" WHERE sigid = ").append(this.comm.realCommunityID()); sql.append(" AND confid = ").append(confid).append(';'); if (logger.isDebugEnabled()) logger.debug("SQL: " + sql.toString()); @@ -617,8 +617,8 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext hide_list = flag; // create an audit record reflecting the change - ar = new AuditRecord(AuditRecord.CONF_SECURITY,sig.realUID(),sig.userRemoteAddress(),sig.realSIGID(), - "conf=" + String.valueOf(confid)); + ar = new AuditRecord(AuditRecord.CONF_SECURITY,comm.realUID(),comm.userRemoteAddress(), + comm.realCommunityID(),"conf=" + confid); } // end try catch (SQLException e) @@ -666,7 +666,7 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext } // end getAnAlias - public ReturnTopicInfo createNewTopic(SIGBackend sig, String title, String pseud, String body) + public ReturnTopicInfo createNewTopic(CommunityBackend comm, String title, String pseud, String body) throws DataException { ConferenceData d = getConferenceData(); @@ -677,7 +677,7 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext { // preprocess the body argument through the HTML checker HTMLChecker text_ch = engine.createCheckerObject(engine.HTMLC_POST_BODY); text_ch.setContextValue("PostLinkDecoderContext", - new PostLinkDecoderContext(sig.realSIGAlias(),conf_alias,new_topic)); + new PostLinkDecoderContext(comm.realCommunityAlias(),conf_alias,new_topic)); try { // run through the HTML checker @@ -693,7 +693,7 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext try { // call down to create the new topic! - return d.createNewTopic(sig,title,pseud,text_ch.getValue(),text_ch.getLines()); + return d.createNewTopic(comm,title,pseud,text_ch.getValue(),text_ch.getLines()); } // end try catch (NotYetFinishedException e) @@ -788,15 +788,15 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext // see if we have to delete the core object as well StringBuffer sql = new StringBuffer("SELECT sigid FROM sigtoconf WHERE confid = "); - sql.append(confid).append(" AND sigid <> ").append(sig.realSIGID()).append(" LIMIT 1;"); + sql.append(confid).append(" AND sigid <> ").append(comm.realCommunityID()).append(" LIMIT 1;"); ResultSet rs = stmt.executeQuery(sql.toString()); if (rs.next()) delete_core = false; // we don't delete the core yet - // remove the row that links this conference to this SIG + // remove the row that links this conference to this community sql.setLength(0); sql.append("DELETE FROM sigtoconf WHERE confid = ").append(confid).append(" AND sigid = "); - sql.append(sig.realSIGID()).append(';'); + sql.append(comm.realCommunityID()).append(';'); stmt.executeUpdate(sql.toString()); // record that we've been deleted @@ -821,8 +821,8 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext } // end finally if (delete_core) - { // the conference is not linked to any other SIGs - we need to delete the core as well - c.delete(user,sig.realSIGID()); + { // the conference is not linked to any other communities - we need to delete the core as well + c.delete(user,comm.realCommunityID()); engine.detachConferenceDataObject(confid); } // end if @@ -833,4 +833,4 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext } // end delete -} // end class ConferenceSIGContextImpl +} // end class ConferenceCommunityContextImpl diff --git a/src/com/silverwrist/venice/core/impl/ConferenceCoreData.java b/src/com/silverwrist/venice/core/impl/ConferenceCoreData.java index b6ebdc1..556be0e 100644 --- a/src/com/silverwrist/venice/core/impl/ConferenceCoreData.java +++ b/src/com/silverwrist/venice/core/impl/ConferenceCoreData.java @@ -32,7 +32,7 @@ class ConferenceCoreData implements ConferenceData *-------------------------------------------------------------------------------- */ - private static Category logger = Category.getInstance(ConferenceCoreData.class.getName()); + private static Category logger = Category.getInstance(ConferenceCoreData.class); /*-------------------------------------------------------------------------------- * Attributes @@ -389,7 +389,7 @@ class ConferenceCoreData implements ConferenceData } // end getDeleteLevel - public synchronized void setSecurityLevels(SIGBackend sig, int read, int post, int create, int hide, + public synchronized void setSecurityLevels(CommunityBackend comm, int read, int post, int create, int hide, int nuke, int change, int delete) throws DataException { if (deleted) @@ -425,8 +425,8 @@ class ConferenceCoreData implements ConferenceData last_update = now; // create an audit record reflecting the change - ar = new AuditRecord(AuditRecord.CONF_SECURITY,sig.realUID(),sig.userRemoteAddress(),sig.realSIGID(), - "conf=" + confid); + ar = new AuditRecord(AuditRecord.CONF_SECURITY,comm.realUID(),comm.userRemoteAddress(), + comm.realCommunityID(),"conf=" + confid); } // end try catch (SQLException e) @@ -456,7 +456,7 @@ class ConferenceCoreData implements ConferenceData } // end setSecurityLevels - public synchronized void setName(SIGBackend sig, String val) throws DataException + public synchronized void setName(CommunityBackend comm, String val) throws DataException { if (deleted) throw new DataException("This conference has been deleted."); @@ -483,8 +483,8 @@ class ConferenceCoreData implements ConferenceData last_update = now; // create an audit record reflecting the change - ar = new AuditRecord(AuditRecord.CONF_SECURITY,sig.realUID(),sig.userRemoteAddress(),sig.realSIGID(), - "conf=" + confid); + ar = new AuditRecord(AuditRecord.CONF_SECURITY,comm.realUID(),comm.userRemoteAddress(), + comm.realCommunityID(),"conf=" + confid); } // end try catch (SQLException e) @@ -554,7 +554,7 @@ class ConferenceCoreData implements ConferenceData } // end setDescription - public synchronized void addAlias(SIGBackend sig, String alias) throws DataException + public synchronized void addAlias(CommunityBackend comm, String alias) throws DataException { if (deleted) throw new DataException("This conference has been deleted."); @@ -598,8 +598,8 @@ class ConferenceCoreData implements ConferenceData // set the database's update date and generate a new audit record touchUpdate(conn); - ar = new AuditRecord(AuditRecord.CONF_ALIAS,sig.realUID(),sig.userRemoteAddress(),sig.realSIGID(), - "conf=" + confid,"add=" + alias); + ar = new AuditRecord(AuditRecord.CONF_ALIAS,comm.realUID(),comm.userRemoteAddress(), + comm.realCommunityID(),"conf=" + confid,"add=" + alias); } // end try catch (SQLException e) @@ -629,7 +629,7 @@ class ConferenceCoreData implements ConferenceData } // end addAlias - public synchronized void removeAlias(SIGBackend sig, String alias) throws DataException + public synchronized void removeAlias(CommunityBackend comm, String alias) throws DataException { if (deleted) throw new DataException("This conference has been deleted."); @@ -686,8 +686,8 @@ class ConferenceCoreData implements ConferenceData touchUpdate(conn); if ((cached_alias!=null) && cached_alias.equals(alias)) cached_alias = null; // also release the cached alias and force a re-get - ar = new AuditRecord(AuditRecord.CONF_ALIAS,sig.realUID(),sig.userRemoteAddress(),sig.realSIGID(), - "conf=" + confid,"remove=" + alias); + ar = new AuditRecord(AuditRecord.CONF_ALIAS,comm.realUID(),comm.userRemoteAddress(), + comm.realCommunityID(),"conf=" + confid,"remove=" + alias); } // end if @@ -719,7 +719,7 @@ class ConferenceCoreData implements ConferenceData } // end removeAlias - public synchronized void setMembership(SIGBackend sig, int uid, int grant_level) throws DataException + public synchronized void setMembership(CommunityBackend comm, int uid, int grant_level) throws DataException { if (deleted) throw new DataException("This conference has been deleted."); @@ -780,8 +780,8 @@ class ConferenceCoreData implements ConferenceData if (did_it) { // set the database's update date and generate a new audit record touchUpdate(conn); - ar = new AuditRecord(AuditRecord.CONF_MEMBERSHIP,sig.realUID(),sig.userRemoteAddress(),sig.realSIGID(), - "conf=" + confid,"uid=" + uid,"level=" + grant_level); + ar = new AuditRecord(AuditRecord.CONF_MEMBERSHIP,comm.realUID(),comm.userRemoteAddress(), + comm.realCommunityID(),"conf=" + confid,"uid=" + uid,"level=" + grant_level); } // end if @@ -861,7 +861,7 @@ class ConferenceCoreData implements ConferenceData } // end getAnAlias - public synchronized ReturnTopicInfo createNewTopic(SIGBackend sig, String title, String pseud, + public synchronized ReturnTopicInfo createNewTopic(CommunityBackend comm, String title, String pseud, String body, int body_lines) throws DataException { if (deleted) @@ -888,10 +888,11 @@ class ConferenceCoreData implements ConferenceData // add the topic row to the database StringBuffer sql = new StringBuffer("INSERT INTO topics (confid, num, creator_uid, createdate, " + "lastupdate, name) VALUES ("); - sql.append(confid).append(", ").append(new_topic_num).append(", ").append(sig.realUID()).append(", '"); + sql.append(confid).append(", ").append(new_topic_num).append(", ").append(comm.realUID()); creation = new java.util.Date(); String now_str = SQLUtil.encodeDate(creation); - sql.append(now_str).append("', '").append(now_str).append("', '").append(title).append("');"); + sql.append(", '").append(now_str).append("', '").append(now_str).append("', '").append(title); + sql.append("');"); if (logger.isDebugEnabled()) logger.debug("SQL: " + sql.toString()); stmt.executeUpdate(sql.toString()); @@ -905,7 +906,7 @@ class ConferenceCoreData implements ConferenceData // insert the "header" for the "zero post" in the topic sql.setLength(0); sql.append("INSERT INTO posts (topicid, num, linecount, creator_uid, posted, pseud) VALUES ("); - sql.append(new_topic_id).append(", 0, ").append(body_lines).append(", ").append(sig.realUID()); + sql.append(new_topic_id).append(", 0, ").append(body_lines).append(", ").append(comm.realUID()); sql.append(", '").append(now_str).append("', '").append(pseud).append("');"); if (logger.isDebugEnabled()) logger.debug("SQL: " + sql.toString()); @@ -936,8 +937,9 @@ class ConferenceCoreData implements ConferenceData last_update = creation; // create an audit record indicating we were successful - ar = new AuditRecord(AuditRecord.CREATE_TOPIC,sig.realUID(),sig.userRemoteAddress(),sig.realSIGID(), - "confid=" + confid,"num=" + new_topic_num,"title=" + title); + ar = new AuditRecord(AuditRecord.CREATE_TOPIC,comm.realUID(),comm.userRemoteAddress(), + comm.realCommunityID(),"confid=" + confid,"num=" + new_topic_num, + "title=" + title); } // end try finally @@ -1160,7 +1162,7 @@ class ConferenceCoreData implements ConferenceData } // end canDeleteConference - public synchronized void delete(UserBackend user, int the_sigid) throws DataException + public synchronized void delete(UserBackend user, int the_cid) throws DataException { if (deleted) throw new DataException("This conference has been deleted."); @@ -1214,7 +1216,7 @@ class ConferenceCoreData implements ConferenceData } // end finally // create an audit record indicating we were successful - ar = new AuditRecord(AuditRecord.DELETE_CONF,user.realUID(),user.userRemoteAddress(),the_sigid, + ar = new AuditRecord(AuditRecord.DELETE_CONF,user.realUID(),user.userRemoteAddress(),the_cid, "confid=" + confid); } // end try @@ -1257,9 +1259,9 @@ class ConferenceCoreData implements ConferenceData *-------------------------------------------------------------------------------- */ - static ReturnConfSeq createConference(EngineBackend engine, SIGBackend sig, DataPool datapool, String name, - String alias, String description, boolean pvt, boolean hide_list, - int host_uid) throws DataException + static ReturnConfSeq createConference(EngineBackend engine, CommunityBackend comm, DataPool datapool, + String name, String alias, String description, boolean pvt, + boolean hide_list, int host_uid) throws DataException { Connection conn = null; // database connection AuditRecord ar = null; // audit record @@ -1289,7 +1291,8 @@ class ConferenceCoreData implements ConferenceData // compute our new sequence number sql.setLength(0); - sql.append("SELECT MAX(sequence) FROM sigtoconf WHERE sigid = ").append(sig.realSIGID()).append(';'); + sql.append("SELECT MAX(sequence) FROM sigtoconf WHERE sigid = ").append(comm.realCommunityID()); + sql.append(';'); if (logger.isDebugEnabled()) logger.debug("SQL: " + sql.toString()); rs = stmt.executeQuery(sql.toString()); @@ -1327,10 +1330,10 @@ class ConferenceCoreData implements ConferenceData logger.debug("SQL: " + sql.toString()); stmt.executeUpdate(sql.toString()); - // Link the SIG to the conference by adding a row to sigtoconf. + // Link the community to the conference by adding a row to sigtoconf. sql.setLength(0); sql.append("INSERT INTO sigtoconf (sigid, confid, sequence, hide_list) VALUES ("); - sql.append(sig.realSIGID()).append(", ").append(new_confid).append(", ").append(new_sequence); + sql.append(comm.realCommunityID()).append(", ").append(new_confid).append(", ").append(new_sequence); sql.append(", ").append(hide_list ? '1' : '0').append(");"); if (logger.isDebugEnabled()) logger.debug("SQL: " + sql.toString()); @@ -1353,8 +1356,8 @@ class ConferenceCoreData implements ConferenceData } // end finally // create an audit record indicating we were successful - ar = new AuditRecord(AuditRecord.CREATE_CONF,sig.realUID(),sig.userRemoteAddress(),sig.realSIGID(), - "confid=" + new_confid,"name=" + name,"alias=" + alias); + ar = new AuditRecord(AuditRecord.CREATE_CONF,comm.realUID(),comm.userRemoteAddress(), + comm.realCommunityID(),"confid=" + new_confid,"name=" + name,"alias=" + alias); } // end try catch (SQLException e) diff --git a/src/com/silverwrist/venice/core/impl/ConferenceData.java b/src/com/silverwrist/venice/core/impl/ConferenceData.java index 33c1a75..8a8d625 100644 --- a/src/com/silverwrist/venice/core/impl/ConferenceData.java +++ b/src/com/silverwrist/venice/core/impl/ConferenceData.java @@ -61,25 +61,25 @@ public interface ConferenceData extends ReferencedData public abstract int getDeleteLevel(); - public abstract void setSecurityLevels(SIGBackend sig, int read, int post, int create, int hide, + public abstract void setSecurityLevels(CommunityBackend comm, int read, int post, int create, int hide, int nuke, int change, int delete) throws DataException; - public abstract void setName(SIGBackend sig, String val) throws DataException; + public abstract void setName(CommunityBackend comm, String val) throws DataException; public abstract void setDescription(String val) throws DataException; - public abstract void addAlias(SIGBackend sig, String alias) throws DataException; + public abstract void addAlias(CommunityBackend comm, String alias) throws DataException; - public abstract void removeAlias(SIGBackend sig, String alias) throws DataException; + public abstract void removeAlias(CommunityBackend comm, String alias) throws DataException; - public abstract void setMembership(SIGBackend sig, int uid, int grant_level) throws DataException; + public abstract void setMembership(CommunityBackend comm, int uid, int grant_level) throws DataException; public abstract boolean canHideTopics(int level); public abstract String getAnAlias() throws DataException; - public abstract ReturnTopicInfo createNewTopic(SIGBackend sig, String title, String pseud, String body, - int body_lines) throws DataException; + public abstract ReturnTopicInfo createNewTopic(CommunityBackend comm, String title, String pseud, + String body, int body_lines) throws DataException; public abstract boolean canScribblePosts(int level); @@ -101,6 +101,6 @@ public interface ConferenceData extends ReferencedData public abstract boolean canDeleteConference(int level); - public abstract void delete(UserBackend user, int the_sigid) throws DataException; + public abstract void delete(UserBackend user, int the_cid) throws DataException; } // end interface ConferenceData diff --git a/src/com/silverwrist/venice/core/impl/ConferenceUserContextImpl.java b/src/com/silverwrist/venice/core/impl/ConferenceUserContextImpl.java index 5aa9139..ddf42c5 100644 --- a/src/com/silverwrist/venice/core/impl/ConferenceUserContextImpl.java +++ b/src/com/silverwrist/venice/core/impl/ConferenceUserContextImpl.java @@ -163,12 +163,12 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend */ private EngineBackend engine; // pointer to the engine back end - private SIGBackend sig; // pointer to the SIG back end + private CommunityBackend comm; // pointer to the community back end private DataPool datapool; // pointer to the data pool private int confid; // the conference ID private int level; // access level I have within this conference private ConfCache cache; // cached internal data for the conference - private ConferenceSIGContext confdata = null; // the internal subobject + private ConferenceCommunityContext confdata = null; // the internal subobject private boolean settings_loaded = false; // did we load the settings from the database? private String pseud; // default pseud to use in this conference private java.util.Date last_read; // last date we read this conference @@ -180,32 +180,32 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend *-------------------------------------------------------------------------------- */ - protected ConferenceUserContextImpl(EngineBackend engine, SIGBackend sig, DataPool datapool, int confid, - String name, String description, java.util.Date created, int sig_level, - int user_level, Connection conn) throws DataException + protected ConferenceUserContextImpl(EngineBackend engine, CommunityBackend comm, DataPool datapool, + int confid, String name, String description, java.util.Date created, + int comm_level, int user_level, Connection conn) throws DataException { this.engine = engine; - this.sig = sig; + this.comm = comm; this.datapool = datapool; this.confid = confid; - this.cache = new ConfCache(name,description,created,sig_level); + this.cache = new ConfCache(name,description,created,comm_level); recalcLevel(user_level); tryLoadSettings(conn); } // end constructor - ConferenceUserContextImpl(EngineBackend engine, SIGBackend sig, DataPool datapool, - ConferenceSIGContext cdata) throws DataException + ConferenceUserContextImpl(EngineBackend engine, CommunityBackend comm, DataPool datapool, + ConferenceCommunityContext cdata) throws DataException { this.engine = engine; - this.sig = sig; + this.comm = comm; this.datapool = datapool; this.confid = cdata.getConfID(); this.cache = null; cdata.rd_addRef(); this.confdata = cdata; recalcLevel(DefaultLevels.hostConference()); - this.pseud = sig.userDefaultPseud(); + this.pseud = comm.userDefaultPseud(); this.last_read = null; this.last_post = null; @@ -221,7 +221,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend if (confdata!=null) confdata.rd_release(); engine = null; - sig = null; + comm = null; datapool = null; cache = null; confdata = null; @@ -233,15 +233,15 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend *-------------------------------------------------------------------------------- */ - private ConferenceSIGContext getConferenceData() throws DataException + private ConferenceCommunityContext getConferenceData() throws DataException { if (confdata==null) - { // attempt to load the ConferenceSIGContext + { // attempt to load the ConferenceCommunityContext if (deleted) throw new DataException("This conference has been deleted."); - confdata = sig.getConferenceDataObject(confid); + confdata = comm.getConferenceDataObject(confid); if (confdata!=null) - sig.saveMRU("conf",confdata); + comm.saveMRU("conf",confdata); // clear cache when we get the real confdata cache = null; @@ -252,18 +252,18 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend } // end getConferenceData - private ConferenceSIGContext getConferenceDataNE() + private ConferenceCommunityContext getConferenceDataNE() { if (confdata==null) - { // we need to load the ConferenceSIGContext... + { // we need to load the ConferenceCommunityContext... if (deleted) return null; // no return on deletion try - { // attempt to load the ConferenceSIGContext - confdata = sig.getConferenceDataObject(confid); + { // attempt to load the ConferenceCommunityContext + confdata = comm.getConferenceDataObject(confid); if (confdata!=null) - sig.saveMRU("conf",confdata); + comm.saveMRU("conf",confdata); } // end try catch (DataException e) @@ -284,21 +284,21 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend private void recalcLevel(int new_level) { - level = sig.realSIGLevel(); + level = comm.realCommunityLevel(); - int sig_level = -1; + int comm_level = -1; if (cache!=null) - sig_level = cache.getGrantsLevel(); + comm_level = cache.getGrantsLevel(); else - { // look at the ConferenceSIGContext to get the SIG level - ConferenceSIGContext c = getConferenceDataNE(); + { // look at the ConferenceCommunityContext to get the community level + ConferenceCommunityContext c = getConferenceDataNE(); if (c!=null) - sig_level = c.getSIGGrantedLevel(); + comm_level = c.getCommunityGrantedLevel(); } // end else - if (sig_level>level) - level = sig_level; + if (comm_level>level) + level = comm_level; if (new_level>level) level = new_level; @@ -313,7 +313,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend { // look up the conference settings for this user Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer("SELECT * FROM confsettings WHERE confid = "); - sql.append(confid).append(" AND uid = ").append(sig.realUID()).append(';'); + sql.append(confid).append(" AND uid = ").append(comm.realUID()).append(';'); ResultSet rs = stmt.executeQuery(sql.toString()); if (rs.next()) @@ -327,7 +327,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend else { // just default everything settings_loaded = false; - pseud = sig.userDefaultPseud(); + pseud = comm.userDefaultPseud(); last_read = null; last_post = null; @@ -358,7 +358,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend { if (cache!=null) return cache.getName(); - ConferenceSIGContext c = getConferenceDataNE(); + ConferenceCommunityContext c = getConferenceDataNE(); if (c!=null) return c.getName(); else @@ -370,7 +370,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend { if (cache!=null) return cache.getDescription(); - ConferenceSIGContext c = getConferenceDataNE(); + ConferenceCommunityContext c = getConferenceDataNE(); if (c!=null) return c.getDescription(); else @@ -382,7 +382,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend { if (cache!=null) return cache.getCreated(); - ConferenceSIGContext c = getConferenceDataNE(); + ConferenceCommunityContext c = getConferenceDataNE(); if (c!=null) return c.getCreationDate(); else @@ -392,7 +392,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public java.util.Date getLastUpdateDate() { - ConferenceSIGContext c = getConferenceDataNE(); + ConferenceCommunityContext c = getConferenceDataNE(); if (c!=null) return c.getLastUpdateDate(); else @@ -414,7 +414,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public boolean canReadConference() { - ConferenceSIGContext c = getConferenceDataNE(); + ConferenceCommunityContext c = getConferenceDataNE(); if (c==null) return false; return c.canReadConference(level); @@ -423,7 +423,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public boolean canPostToConference() { - ConferenceSIGContext c = getConferenceDataNE(); + ConferenceCommunityContext c = getConferenceDataNE(); if (c==null) return false; return c.canPostToConference(level); @@ -432,7 +432,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public boolean canCreateTopic() { - ConferenceSIGContext c = getConferenceDataNE(); + ConferenceCommunityContext c = getConferenceDataNE(); if (c==null) return false; return c.canCreateTopic(level); @@ -441,7 +441,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public boolean canChangeConference() { - ConferenceSIGContext c = getConferenceDataNE(); + ConferenceCommunityContext c = getConferenceDataNE(); if (c==null) return false; return c.canChangeConference(level); @@ -592,7 +592,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend } // end if // Now call through to set the security levels. - getConferenceData().setSecurityLevels(sig,read,post,create,hide,nuke,change,delete); + getConferenceData().setSecurityLevels(comm,read,post,create,hide,nuke,change,delete); } // end setSecurityLevels @@ -606,7 +606,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend } // end if // Call through to set the name. - getConferenceData().setName(sig,val); + getConferenceData().setName(comm,val); } // end setName @@ -634,7 +634,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend } // end if // Call through to add the alias. - getConferenceData().addAlias(sig,alias); + getConferenceData().addAlias(comm,alias); } // end addAlias @@ -648,7 +648,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend } // end if // Call through to remove the alias. - getConferenceData().removeAlias(sig,alias); + getConferenceData().removeAlias(comm,alias); } // end removeAlias @@ -662,10 +662,10 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend } // end if // call down to set the level - getConferenceData().setMembership(sig,uid,grant_level); + getConferenceData().setMembership(comm,uid,grant_level); // If we adjusted our OWN level, reflect that change. - if (uid==sig.realUID()) + if (uid==comm.realUID()) recalcLevel(grant_level); } // end setMembership @@ -682,38 +682,38 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend } // end removeMember - public int getSIGGrantedLevel() throws DataException, AccessError + public int getCommunityGrantedLevel() throws DataException, AccessError { - ConferenceSIGContext c = getConferenceData(); - if (!(sig.userCanCreateSubobjects())) + ConferenceCommunityContext c = getConferenceData(); + if (!(comm.userCanCreateSubobjects())) { // this user can't modify the conference security logger.error("user not permitted to retrieve security info"); throw new AccessError("You are not permitted to retrieve security information for this conference."); } // end if - return c.getSIGGrantedLevel(); + return c.getCommunityGrantedLevel(); - } // end getSIGGrantedLevel + } // end getCommunityGrantedLevel - public void setSIGGrantedLevel(int new_level) throws DataException, AccessError + public void setCommunityGrantedLevel(int new_level) throws DataException, AccessError { - ConferenceSIGContext c = getConferenceData(); - if (!(sig.userCanCreateSubobjects())) + ConferenceCommunityContext c = getConferenceData(); + if (!(comm.userCanCreateSubobjects())) { // this user can't modify the conference security logger.error("user not permitted to change security info"); throw new AccessError("You are not permitted to change security information for this conference."); } // end if - c.setSIGGrantedLevel(sig,new_level); + c.setCommunityGrantedLevel(comm,new_level); - } // end setSIGGrantedLevel + } // end setCommunityGrantedLevel public short getSequence() throws DataException, AccessError { - ConferenceSIGContext c = getConferenceData(); - if (!(sig.userCanCreateSubobjects())) + ConferenceCommunityContext c = getConferenceData(); + if (!(comm.userCanCreateSubobjects())) { // this user can't modify the conference security logger.error("user not permitted to retrieve layout info"); throw new AccessError("You are not permitted to retrieve layout information for this conference."); @@ -726,8 +726,8 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public void setSequence(short seq) throws DataException, AccessError { - ConferenceSIGContext c = getConferenceData(); - if (!(sig.userCanCreateSubobjects())) + ConferenceCommunityContext c = getConferenceData(); + if (!(comm.userCanCreateSubobjects())) { // this user can't modify the conference security logger.error("user not permitted to set layout info"); throw new AccessError("You are not permitted to set layout information for this conference."); @@ -740,8 +740,8 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public boolean getHideList() throws DataException, AccessError { - ConferenceSIGContext c = getConferenceData(); - if (!(sig.userCanCreateSubobjects())) + ConferenceCommunityContext c = getConferenceData(); + if (!(comm.userCanCreateSubobjects())) { // this user can't modify the conference security logger.error("user not permitted to retrieve security info"); throw new AccessError("You are not permitted to retrieve security information for this conference."); @@ -754,15 +754,15 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public void setHideList(boolean flag) throws DataException, AccessError { - ConferenceSIGContext c = getConferenceData(); - if (!(sig.userCanCreateSubobjects())) + ConferenceCommunityContext c = getConferenceData(); + if (!(comm.userCanCreateSubobjects())) { // this user can't modify the conference security logger.error("user not permitted to change security info"); throw new AccessError("You are not permitted to change security information for this conference."); } // end if - c.setHideList(sig,flag); + c.setHideList(comm,flag); } // end setHideList @@ -774,7 +774,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public void setDefaultPseud(String val) throws DataException { - if (sig.userIsAnonymous()) + if (comm.userIsAnonymous()) return; // anonymous user can't change pseud if (deleted) throw new DataException("This conference has been deleted."); @@ -790,13 +790,14 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend if (settings_loaded) { // generate an update statement sql.append("UPDATE confsettings SET default_pseud = '").append(SQLUtil.encodeString(val)); - sql.append("' WHERE confid = ").append(confid).append(" AND uid = ").append(sig.realUID()).append(';'); + sql.append("' WHERE confid = ").append(confid).append(" AND uid = ").append(comm.realUID()); + sql.append(';'); } // end if else { // need to insert a confsettings row sql.append("INSERT INTO confsettings (confid, uid, default_pseud) VALUES (").append(confid); - sql.append(", ").append(sig.realUID()).append(", '").append(SQLUtil.encodeString(val)).append("');"); + sql.append(", ").append(comm.realUID()).append(", '").append(SQLUtil.encodeString(val)).append("');"); } // end else @@ -825,7 +826,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public boolean anyUnread() { - if (deleted || sig.userIsAnonymous()) + if (deleted || comm.userIsAnonymous()) return false; Connection conn = null; // pooled database connection @@ -842,7 +843,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer("SELECT t.topicid FROM topics t LEFT JOIN topicsettings s " + "ON t.topicid = s.topicid AND s.uid = "); - sql.append(sig.realUID()).append(" WHERE t.confid = ").append(confid); + sql.append(comm.realUID()).append(" WHERE t.confid = ").append(confid); sql.append(" AND t.archived = 0 AND IFNULL(s.hidden,0) = 0 " + "AND (t.top_message - IFNULL(s.last_message,-1)) > 0 LIMIT 1;"); if (logger.isDebugEnabled()) @@ -931,7 +932,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend try { // call down to create the new topic! real_title = title_ch.getValue(); - new_topic_inf = getConferenceData().createNewTopic(sig,real_title,zp_pseud_ch.getValue(),zp_text); + new_topic_inf = getConferenceData().createNewTopic(comm,real_title,zp_pseud_ch.getValue(),zp_text); } // end try catch (NotYetFinishedException e) @@ -949,7 +950,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend // create a new record in topicsettings (we WERE the first to post in the topic after all!) Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer("INSERT INTO topicsettings (topicid, uid, last_post) VALUES ("); - sql.append(new_topic_inf.getTopicID()).append(", ").append(sig.realUID()).append(", '"); + sql.append(new_topic_inf.getTopicID()).append(", ").append(comm.realUID()).append(", '"); sql.append(SQLUtil.encodeDate(new_topic_inf.getCreateDate())).append("');"); stmt.executeUpdate(sql.toString()); @@ -991,7 +992,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public HTMLChecker getNewTopicPreviewChecker() { - ConferenceSIGContext c = getConferenceDataNE(); + ConferenceCommunityContext c = getConferenceDataNE(); short new_topic; if (c==null) new_topic = 0; @@ -1012,7 +1013,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend } // end if - if (sig.userIsAnonymous()) + if (comm.userIsAnonymous()) return; // anonymous user can't fixseen Connection conn = null; @@ -1031,7 +1032,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend new StringBuffer("SELECT topics.topicid, topics.top_message, ISNULL(topicsettings.last_message) " + "FROM topics LEFT JOIN topicsettings ON topics.topicid = topicsettings.topicid " + "AND topicsettings.uid = "); - sql.append(sig.realUID()).append(" WHERE topics.confid = ").append(confid).append(';'); + sql.append(comm.realUID()).append(" WHERE topics.confid = ").append(confid).append(';'); ResultSet rs = stmt.executeQuery(sql.toString()); // use the results to build up a list of FixSeenHelpers @@ -1045,7 +1046,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend while (it.hasNext()) { // just hit each one in turn FixSeenHelper fsh = (FixSeenHelper)(it.next()); - fsh.doFix(stmt,sig.realUID(),now); + fsh.doFix(stmt,comm.realUID(),now); } // end while @@ -1238,8 +1239,8 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public void delete() throws DataException, AccessError { - ConferenceSIGContext ctxt = getConferenceData(); - if (!(ctxt.canDeleteConference(level)) || !(sig.userCanDeleteSubobjects())) + ConferenceCommunityContext ctxt = getConferenceData(); + if (!(ctxt.canDeleteConference(level)) || !(comm.userCanDeleteSubobjects())) { // no way can we delete this conference, not NO way! logger.error("user not permitted to delete conference"); throw new AccessError("You are not permitted to delete this conference."); @@ -1247,8 +1248,8 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend } // end if // call the methods required to delete the conference - ctxt.delete(sig); - sig.detachConferenceDataObject(confid); + ctxt.delete(comm); + comm.detachConferenceDataObject(confid); // flag that we've been deleted cache = null; @@ -1266,10 +1267,10 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public boolean canDeleteConference() { - ConferenceSIGContext c = getConferenceDataNE(); + ConferenceCommunityContext c = getConferenceDataNE(); if (c==null) return false; - return (c.canDeleteConference(level) && sig.userCanDeleteSubobjects()); + return (c.canDeleteConference(level) && comm.userCanDeleteSubobjects()); } // end canDeleteConference @@ -1284,8 +1285,8 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend // do a quickie query StringBuffer sql = new StringBuffer("SELECT sequence FROM confhotlist WHERE uid = "); - sql.append(sig.realUID()).append(" AND sigid = ").append(sig.realSIGID()).append(" AND confid = "); - sql.append(confid).append(';'); + sql.append(comm.realUID()).append(" AND sigid = ").append(comm.realCommunityID()); + sql.append(" AND confid = ").append(confid).append(';'); ResultSet rs = stmt.executeQuery(sql.toString()); return rs.next(); @@ -1318,15 +1319,15 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend try { // do a quickie query to see if we're already in the hotlist StringBuffer sql = new StringBuffer("SELECT sequence FROM confhotlist WHERE uid = "); - sql.append(sig.realUID()).append(" AND sigid = ").append(sig.realSIGID()).append(" AND confid = "); - sql.append(confid).append(';'); + sql.append(comm.realUID()).append(" AND sigid = ").append(comm.realCommunityID()); + sql.append(" AND confid = ").append(confid).append(';'); ResultSet rs = stmt.executeQuery(sql.toString()); if (rs.next()) return; // already in hotlist - this is a no-op // find a sequence number for the new entry sql.setLength(0); - sql.append("SELECT MAX(sequence) FROM confhotlist WHERE uid = ").append(sig.realUID()).append(';'); + sql.append("SELECT MAX(sequence) FROM confhotlist WHERE uid = ").append(comm.realUID()).append(';'); rs = stmt.executeQuery(sql.toString()); if (!(rs.next())) throw new InternalStateError("bogus query result on addToHotlist"); @@ -1334,8 +1335,8 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend // add the new record sql.setLength(0); - sql.append("INSERT INTO confhotlist (uid, sequence, sigid, confid) VALUES (").append(sig.realUID()); - sql.append(", ").append(new_sequence).append(", ").append(sig.realSIGID()).append(", "); + sql.append("INSERT INTO confhotlist (uid, sequence, sigid, confid) VALUES (").append(comm.realUID()); + sql.append(", ").append(new_sequence).append(", ").append(comm.realCommunityID()).append(", "); sql.append(confid).append(");"); stmt.executeUpdate(sql.toString()); @@ -1365,17 +1366,17 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public boolean canAddToHotlist() { - if (sig.userIsAnonymous()) + if (comm.userIsAnonymous()) return false; return !(isInHotlist()); } // end canAddToHotlist - public SIGContext getEnclosingSIG() + public CommunityContext getEnclosingCommunity() { - return sig.selfSIG(); + return comm.selfCommunity(); - } // end getEnclosingSIG + } // end getEnclosingCommunity public void removeFromHotlist() throws DataException { @@ -1389,8 +1390,8 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend // create the DELETE statement and just execute it blind (if this conference is not in the hotlist, // the DELETE is a no-op). StringBuffer sql = new StringBuffer("DELETE FROM confhotlist WHERE uid = "); - sql.append(sig.realUID()).append(" AND sigid = ").append(sig.realSIGID()).append(" AND confid = "); - sql.append(confid).append(';'); + sql.append(comm.realUID()).append(" AND sigid = ").append(comm.realCommunityID()); + sql.append(" AND confid = ").append(confid).append(';'); stmt.executeUpdate(sql.toString()); } // end try @@ -1421,8 +1422,8 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend // create the UPDATE statement and just execute it blind (if this conference is not in the hotlist, // the UPDATE is a no-op). StringBuffer sql = new StringBuffer("UPDATE confhotlist SET sequence = "); - sql.append(seq).append(" WHERE uid = ").append(sig.realUID()).append(" AND sigid = "); - sql.append(sig.realSIGID()).append(" AND confid = ").append(confid).append(';'); + sql.append(seq).append(" WHERE uid = ").append(comm.realUID()).append(" AND sigid = "); + sql.append(comm.realCommunityID()).append(" AND confid = ").append(confid).append(';'); stmt.executeUpdate(sql.toString()); } // end try @@ -1448,114 +1449,114 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public int realUID() { - return sig.realUID(); + return comm.realUID(); } // end realUID public int realBaseLevel() { - return sig.realBaseLevel(); + return comm.realBaseLevel(); } // end realBaseLevel public String userRemoteAddress() { - return sig.userRemoteAddress(); + return comm.userRemoteAddress(); } // end userRemoteAddress public String userDefaultPseud() throws DataException { - return sig.userDefaultPseud(); + return comm.userDefaultPseud(); } // end userDefaultPseud public boolean userIsAnonymous() { - return sig.userIsAnonymous(); + return comm.userIsAnonymous(); } // end userIsAnonymous public String realUserName() { - return sig.realUserName(); + return comm.realUserName(); } // end realUserName public String realEmailAddress() throws DataException { - return sig.realEmailAddress(); + return comm.realEmailAddress(); } // end realEmailAddress public String realFullName() throws DataException { - return sig.realFullName(); + return comm.realFullName(); } // end realFullName public void saveMRU(String tag, ReferencedData data) { - sig.saveMRU(tag,data); + comm.saveMRU(tag,data); } // end saveMRU /*-------------------------------------------------------------------------------- - * Implementations from interface SIGBackend + * Implementations from interface CommunityBackend *-------------------------------------------------------------------------------- */ - public SIGContext selfSIG() + public CommunityContext selfCommunity() { - return sig.selfSIG(); + return comm.selfCommunity(); - } // end selfsig; + } // end selfCommunity - public int realSIGID() + public int realCommunityID() { - return sig.realSIGID(); + return comm.realCommunityID(); - } // end realSIGID + } // end realCommunityID public boolean userHideHiddenConferences() { - return sig.userHideHiddenConferences(); + return comm.userHideHiddenConferences(); } // end userHideHiddenConferences - public int realSIGLevel() + public int realCommunityLevel() { - return sig.realSIGLevel(); + return comm.realCommunityLevel(); - } // end realSIGLevel + } // end realCommunityLevel - public ConferenceSIGContext getConferenceDataObject(int confid) throws DataException + public ConferenceCommunityContext getConferenceDataObject(int confid) throws DataException { - return sig.getConferenceDataObject(confid); + return comm.getConferenceDataObject(confid); } // end getConferenceDataObject public boolean userCanCreateSubobjects() { - return sig.userCanCreateSubobjects(); + return comm.userCanCreateSubobjects(); } // end userCanCreateSubobjects - public String realSIGAlias() + public String realCommunityAlias() { - return sig.realSIGAlias(); + return comm.realCommunityAlias(); - } // end realSIGAlias + } // end realCommunityAlias public void detachConferenceDataObject(int confid) throws DataException { - sig.detachConferenceDataObject(confid); + comm.detachConferenceDataObject(confid); } // end detachConferenceDataObject public boolean userCanDeleteSubobjects() { - return sig.userCanDeleteSubobjects(); + return comm.userCanDeleteSubobjects(); } // end userCanDeleteSubobjects @@ -1572,7 +1573,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public boolean userCanHide() { - ConferenceSIGContext c = getConferenceDataNE(); + ConferenceCommunityContext c = getConferenceDataNE(); if (c==null) return false; return c.canHideTopics(level); @@ -1581,7 +1582,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public void touchRead(Connection conn) throws SQLException { - if (deleted || sig.userIsAnonymous()) + if (deleted || comm.userIsAnonymous()) return; // anonymous user can't update squat Statement stmt = conn.createStatement(); @@ -1591,13 +1592,13 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend if (settings_loaded) { // generate an update statement sql.append("UPDATE confsettings SET last_read = '").append(SQLUtil.encodeDate(now)); - sql.append("' WHERE confid = ").append(confid).append(" AND uid = ").append(sig.realUID()).append(';'); + sql.append("' WHERE confid = ").append(confid).append(" AND uid = ").append(comm.realUID()).append(';'); } // end if else { // need to insert a confsettings row sql.append("INSERT INTO confsettings (confid, uid, default_pseud, last_read) VALUES (").append(confid); - sql.append(", ").append(sig.realUID()).append(", '").append(SQLUtil.encodeString(pseud)).append("', '"); + sql.append(", ").append(comm.realUID()).append(", '").append(SQLUtil.encodeString(pseud)).append("', '"); sql.append(SQLUtil.encodeDate(now)).append("');"); } // end else @@ -1613,7 +1614,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public void touchPost(Connection conn, java.util.Date post_date) throws SQLException { - if (deleted || sig.userIsAnonymous()) + if (deleted || comm.userIsAnonymous()) return; // anonymous user can't update squat Statement stmt = conn.createStatement(); @@ -1622,13 +1623,13 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend if (settings_loaded) { // generate an update statement sql.append("UPDATE confsettings SET last_post = '").append(SQLUtil.encodeDate(post_date)); - sql.append("' WHERE confid = ").append(confid).append(" AND uid = ").append(sig.realUID()).append(';'); + sql.append("' WHERE confid = ").append(confid).append(" AND uid = ").append(comm.realUID()).append(';'); } // end if else { // need to insert a confsettings row sql.append("INSERT INTO confsettings (confid, uid, default_pseud, last_read) VALUES (").append(confid); - sql.append(", ").append(sig.realUID()).append(", '").append(SQLUtil.encodeString(pseud)).append("', '"); + sql.append(", ").append(comm.realUID()).append(", '").append(SQLUtil.encodeString(pseud)).append("', '"); sql.append(SQLUtil.encodeDate(post_date)).append("');"); } // end else @@ -1663,7 +1664,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public boolean userCanScribble() { - ConferenceSIGContext c = getConferenceDataNE(); + ConferenceCommunityContext c = getConferenceDataNE(); if (c==null) return false; return c.canScribblePosts(level); @@ -1672,7 +1673,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public boolean userCanNuke() { - ConferenceSIGContext c = getConferenceDataNE(); + ConferenceCommunityContext c = getConferenceDataNE(); if (c==null) return false; return c.canNukePosts(level); @@ -1699,7 +1700,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public PostLinkDecoderContext createDecoderContext(short topicid) { - return new PostLinkDecoderContext(sig.realSIGAlias(),realConfAlias(),topicid); + return new PostLinkDecoderContext(comm.realCommunityAlias(),realConfAlias(),topicid); } // end createDecoderContext @@ -1708,10 +1709,12 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend *-------------------------------------------------------------------------------- */ - static List getSIGConferences(EngineBackend engine, SIGBackend sig, DataPool datapool) throws DataException + static List getCommunityConferences(EngineBackend engine, CommunityBackend comm, DataPool datapool) + throws DataException { if (logger.isDebugEnabled()) - logger.debug("getSIGConferences for SIG # " + sig.realSIGID() + ", user #" + sig.realUID()); + logger.debug("getCommunityConferences for community # " + comm.realCommunityID() + ", user #" + + comm.realUID()); ArrayList rc = new ArrayList(); // return from this function Connection conn = null; // pooled database connection @@ -1721,17 +1724,18 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend Statement stmt = conn.createStatement(); // Build a monster query! The idea is that we get the basic info of all conferences linked to the - // SIG, as well as the user level (within the conference) that gets granted to all members of the - // linked SIG. (Commonly this is 0; the standard user level within the SIG will then take precedence.) - // If the user has an entry within the confmember table for that conference, the level granted by - // that entry is also reported. The highest of these two levels and the level of the user within the - // SIG is then taken to be the user's access level within the conference. + // community, as well as the user level (within the conference) that gets granted to all members of the + // linked community. (Commonly this is 0; the standard user level within the community will then take + // precedence.) If the user has an entry within the confmember table for that conference, the level + // granted by that entry is also reported. The highest of these two levels and the level of the user + // within the community is then taken to be the user's access level within the conference. StringBuffer sql = new StringBuffer("SELECT c.confid, c.createdate, c.name, c.descr, s.granted_lvl, m.granted_lvl " + "FROM sigtoconf s, confs c LEFT JOIN confmember m ON c.confid = m.confid " + "AND m.uid = "); - sql.append(sig.realUID()).append(" WHERE s.confid = c.confid AND s.sigid = ").append(sig.realSIGID()); - if (sig.userHideHiddenConferences()) + sql.append(comm.realUID()).append(" WHERE s.confid = c.confid AND s.sigid = "); + sql.append(comm.realCommunityID()); + if (comm.userHideHiddenConferences()) sql.append(" AND s.hide_list = 0"); sql.append(" ORDER BY s.sequence, c.name;"); if (logger.isDebugEnabled()) @@ -1742,7 +1746,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend while (rs.next()) { // create the appropriate objects to return - ConferenceContext cc = new ConferenceUserContextImpl(engine,sig,datapool,rs.getInt(1),rs.getString(3), + ConferenceContext cc = new ConferenceUserContextImpl(engine,comm,datapool,rs.getInt(1),rs.getString(3), rs.getString(4),SQLUtil.getFullDateTime(rs,2), rs.getInt(5),rs.getInt(6),conn); rc.add(cc); @@ -1765,13 +1769,14 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend return Collections.unmodifiableList(rc); - } // end getSIGConferences + } // end getCommunityConferences - static ConferenceContext getConference(EngineBackend engine, SIGBackend sig, DataPool datapool, + static ConferenceContext getConference(EngineBackend engine, CommunityBackend comm, DataPool datapool, int confid) throws DataException { if (logger.isDebugEnabled()) - logger.debug("getConference(#" + confid + ") for SIG # " + sig.realSIGID() + ", user #" + sig.realUID()); + logger.debug("getConference(#" + confid + ") for community # " + comm.realCommunityID() + ", user #" + + comm.realUID()); Connection conn = null; // pooled database connection @@ -1780,24 +1785,25 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend conn = datapool.getConnection(); Statement stmt = conn.createStatement(); - // Build a monster query! This is like the query in getSIGConferences, except that we add the + // Build a monster query! This is like the query in getCommunityConferences, except that we add the // conference ID as a search term (thus we can return at most one row). StringBuffer sql = new StringBuffer("SELECT c.createdate, c.name, c.descr, s.granted_lvl, m.granted_lvl " + "FROM sigtoconf s, confs c LEFT JOIN confmember m ON c.confid = m.confid " + "AND m.uid = "); - sql.append(sig.realUID()).append(" WHERE s.confid = c.confid AND s.sigid = "); - sql.append(sig.realSIGID()).append(" AND c.confid = ").append(confid).append(';'); + sql.append(comm.realUID()).append(" WHERE s.confid = c.confid AND s.sigid = "); + sql.append(comm.realCommunityID()).append(" AND c.confid = ").append(confid).append(';'); if (logger.isDebugEnabled()) logger.debug("SQL: " + sql.toString()); // Run that monster query! ResultSet rs = stmt.executeQuery(sql.toString()); if (!(rs.next())) - throw new DataException("conference ID#" + confid + " not found in SIG#" + sig.realSIGID()); + throw new DataException("conference ID#" + confid + " not found in community#" + + comm.realCommunityID()); // pass back the new object - return new ConferenceUserContextImpl(engine,sig,datapool,confid,rs.getString(2), + return new ConferenceUserContextImpl(engine,comm,datapool,confid,rs.getString(2), rs.getString(3),SQLUtil.getFullDateTime(rs,1), rs.getInt(4),rs.getInt(5),conn); @@ -1817,12 +1823,12 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend } // end getConference - static ConferenceContext getConference(EngineBackend engine, SIGBackend sig, DataPool datapool, + static ConferenceContext getConference(EngineBackend engine, CommunityBackend comm, DataPool datapool, String alias) throws DataException { if (logger.isDebugEnabled()) - logger.debug("getConference(\"" + alias + "\") for SIG # " + sig.realSIGID() + ", user #" - + sig.realUID()); + logger.debug("getConference(\"" + alias + "\") for community # " + comm.realCommunityID() + ", user #" + + comm.realUID()); Connection conn = null; // pooled database connection @@ -1838,8 +1844,8 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend new StringBuffer("SELECT c.confid, c.createdate, c.name, c.descr, s.granted_lvl, m.granted_lvl " + "FROM sigtoconf s, confalias a, confs c LEFT JOIN confmember m ON " + "c.confid = m.confid AND m.uid = "); - sql.append(sig.realUID()).append(" WHERE s.confid = c.confid AND a.confid = c.confid AND s.sigid = "); - sql.append(sig.realSIGID()).append(" AND a.alias = '").append(SQLUtil.encodeString(alias)); + sql.append(comm.realUID()).append(" WHERE s.confid = c.confid AND a.confid = c.confid AND s.sigid = "); + sql.append(comm.realCommunityID()).append(" AND a.alias = '").append(SQLUtil.encodeString(alias)); sql.append("';"); if (logger.isDebugEnabled()) logger.debug("SQL: " + sql.toString()); @@ -1847,10 +1853,11 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend // Run that monster query! ResultSet rs = stmt.executeQuery(sql.toString()); if (!(rs.next())) - throw new DataException("conference \"" + alias + "\" not found in SIG#" + sig.realSIGID()); + throw new DataException("conference \"" + alias + "\" not found in community#" + + comm.realCommunityID()); // pass back the new object - return new ConferenceUserContextImpl(engine,sig,datapool,rs.getInt(1),rs.getString(3),rs.getString(4), + return new ConferenceUserContextImpl(engine,comm,datapool,rs.getInt(1),rs.getString(3),rs.getString(4), SQLUtil.getFullDateTime(rs,2),rs.getInt(5),rs.getInt(6),conn); } // end try @@ -1882,7 +1889,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend conn = datapool.getConnection(); Statement stmt = conn.createStatement(); - // Build a monster query! We pull the SIGID and ConfID entries from the confhotlist table, + // Build a monster query! We pull the CommunityID and ConfID entries from the confhotlist table, // but we need to pull in "confs" and "confmember" (left joined) to get enough data to create // a ConferenceUserContextImpl object. StringBuffer sql = @@ -1898,24 +1905,24 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend ResultSet rs = stmt.executeQuery(sql.toString()); // Create some temporary data structures to assist us in building the return list. - HashMap sig_backend_cache = new HashMap(); + HashMap comm_backend_cache = new HashMap(); while (rs.next()) - { // retrieve the sigid from the resultset first - Integer sigid = new Integer(rs.getInt(1)); + { // retrieve the community id from the resultset first + Integer cid = new Integer(rs.getInt(1)); - // we need a SIG backend for our conference, so make sure we have one - SIGBackend sig = (SIGBackend)(sig_backend_cache.get(sigid)); - if (sig==null) + // we need a community backend for our conference, so make sure we have one + CommunityBackend comm = (CommunityBackend)(comm_backend_cache.get(cid)); + if (comm==null) { // get it and make sure it's in the cache for next time - sig = SIGUserContextImpl.getSIGBackend(engine,user,datapool,conn,sigid.intValue()); - sig_backend_cache.put(sigid,sig); + comm = CommunityUserContextImpl.getCommunityBackend(engine,user,datapool,conn,cid.intValue()); + comm_backend_cache.put(cid,comm); } // end if // make the new ConferenceContext ConferenceContext conf = - new ConferenceUserContextImpl(engine,sig,datapool,rs.getInt(2),rs.getString(3),rs.getString(4), + new ConferenceUserContextImpl(engine,comm,datapool,rs.getInt(2),rs.getString(3),rs.getString(4), SQLUtil.getFullDateTime(rs,5),rs.getInt(6),rs.getInt(7),conn); // and create the actual return value diff --git a/src/com/silverwrist/venice/core/impl/ContactInfoImpl.java b/src/com/silverwrist/venice/core/impl/ContactInfoImpl.java index 86d46f2..4ef4eb5 100644 --- a/src/com/silverwrist/venice/core/impl/ContactInfoImpl.java +++ b/src/com/silverwrist/venice/core/impl/ContactInfoImpl.java @@ -130,7 +130,7 @@ class ContactInfoImpl implements ContactInfo, Stashable private boolean private_fax; // is fax hidden? private boolean private_email; // is email hidden? private int owner_uid; // UID that owns this contact record - private int owner_sigid; // SIGID this contact record is in (-1 for none) + private int owner_cid; // community ID this contact record is in (-1 for none) private java.util.Date last_update; // date of last update private boolean is_modified = false; // have we modified this ContactInfo? private ImageHook image_hook = null; // image hook object @@ -157,13 +157,13 @@ class ContactInfoImpl implements ContactInfo, Stashable * Constructs a new blank ContactInfoImpl object. * * @param owner_uid UID that owns this object. - * @param owner_sigid SIGID that owns this object. + * @param owner_cid Community ID that owns this object. */ - ContactInfoImpl(int owner_uid, int owner_sigid) + ContactInfoImpl(int owner_uid, int owner_cid) { if (logger.isDebugEnabled()) - logger.debug("new ContactInfoImpl (empty) for UID = " + owner_uid + ", SIGID = " + owner_sigid); - makeEmpty(owner_uid,owner_sigid); + logger.debug("new ContactInfoImpl (empty) for UID = " + owner_uid + ", Community ID = " + owner_cid); + makeEmpty(owner_uid,owner_cid); } // end constructor @@ -206,7 +206,7 @@ class ContactInfoImpl implements ContactInfo, Stashable *-------------------------------------------------------------------------------- */ - private void makeEmpty(int owner_uid, int owner_sigid) + private void makeEmpty(int owner_uid, int owner_cid) { this.contactid = -1; this.given_name = null; @@ -232,7 +232,7 @@ class ContactInfoImpl implements ContactInfo, Stashable this.private_fax = false; this.private_email = false; this.owner_uid = owner_uid; - this.owner_sigid = owner_sigid; + this.owner_cid = owner_cid; this.last_update = null; } // end makeEmpty @@ -273,7 +273,7 @@ class ContactInfoImpl implements ContactInfo, Stashable private_fax = rs.getBoolean("pvt_fax"); private_email = rs.getBoolean("pvt_email"); owner_uid = rs.getInt("owner_uid"); - owner_sigid = rs.getInt("owner_sigid"); + owner_cid = rs.getInt("owner_sigid"); photo_url = rs.getString("photo_url"); url = rs.getString("url"); last_update = SQLUtil.getFullDateTime(rs,"lastupdate"); @@ -587,8 +587,8 @@ class ContactInfoImpl implements ContactInfo, Stashable } // end if else { // figure out how to create the image hook object - if (owner_sigid>=0) - image_hook = new NewImageHook(prefix,ImageStore.TYPE_SIG_LOGO,owner_sigid,mimetype,length,data); + if (owner_cid>=0) + image_hook = new NewImageHook(prefix,ImageStore.TYPE_COMMUNITY_LOGO,owner_cid,mimetype,length,data); else image_hook = new NewImageHook(prefix,ImageStore.TYPE_USER_PHOTO,owner_uid,mimetype,length,data); @@ -672,11 +672,11 @@ class ContactInfoImpl implements ContactInfo, Stashable } // end getOwnerUID - public int getOwnerSIGID() + public int getOwnerCommunityID() { - return owner_sigid; + return owner_cid; - } // end getOwnerSIGID + } // end getOwnerCommunityID public java.util.Date getLastUpdate() { @@ -754,7 +754,7 @@ class ContactInfoImpl implements ContactInfo, Stashable } // end if else { // this involves creating a new record - if (owner_sigid>=0) + if (owner_cid>=0) stmt.executeUpdate("LOCK TABLES contacts WRITE, sigs WRITE;"); else stmt.executeUpdate("LOCK TABLES contacts WRITE, users WRITE;"); @@ -788,7 +788,7 @@ class ContactInfoImpl implements ContactInfo, Stashable buf.append(private_phone ? '1' : '0').append(", "); buf.append(private_fax ? '1' : '0').append(", "); buf.append(private_email ? '1' : '0').append(", "); - buf.append(owner_uid).append(", ").append(owner_sigid).append(", "); + buf.append(owner_uid).append(", ").append(owner_cid).append(", "); buf.append(SQLUtil.encodeStringArg(photo_url)).append(", "); buf.append(SQLUtil.encodeStringArg(url)).append(", '"); update = new java.util.Date(); @@ -815,10 +815,10 @@ class ContactInfoImpl implements ContactInfo, Stashable // and patch the database table so we know what our contact ID is buf.setLength(0); - if (owner_sigid>=0) + if (owner_cid>=0) { // update the SIGS table buf.append("UPDATE sigs SET contactid = ").append(new_contactid).append(" WHERE sigid = "); - buf.append(owner_sigid).append(';'); + buf.append(owner_cid).append(';'); } // end if else diff --git a/src/com/silverwrist/venice/core/impl/EngineBackend.java b/src/com/silverwrist/venice/core/impl/EngineBackend.java index 9c28e38..d08ba55 100644 --- a/src/com/silverwrist/venice/core/impl/EngineBackend.java +++ b/src/com/silverwrist/venice/core/impl/EngineBackend.java @@ -34,11 +34,11 @@ public interface EngineBackend public static final int IP_POSTSPERPAGE = 0; public static final int IP_POSTSATTOP = 1; public static final int IP_MAXSEARCHRETURN = 2; - public static final int IP_MAXSIGMEMBERDISPLAY = 3; + public static final int IP_MAXCOMMUNITYMEMBERDISPLAY = 3; public static final int IP_MAXCONFMEMBERDISPLAY = 4; public static final int IP_NUMFRONTPAGEPOSTS = 5; public static final int IP_NUMAUDITRECSPERPAGE = 6; - public static final int IP_CREATESIGLVL = 7; + public static final int IP_CREATECOMMUNITYLVL = 7; public static final int IPC_NUM_PARAMS = 8; public abstract SimpleEmailer createEmailer(); @@ -51,13 +51,13 @@ public interface EngineBackend public abstract String getLanguageNameForCode(String code); - public abstract SIGData getSIGDataObject(int sigid) throws DataException; + public abstract CommunityData getCommunityDataObject(int cid) throws DataException; - public abstract void detachSIGDataObject(int sigid); + public abstract void detachCommunityDataObject(int cid); public abstract BitSet getLockedFeaturesMask(); - public abstract List getSIGFeatureSet(BitSet enabled_features, int level, boolean read_privs); + public abstract List getCommunityFeatureSet(BitSet enabled_features, int level, boolean read_privs); public abstract String getAppletForFeature(int code); @@ -65,7 +65,7 @@ public interface EngineBackend public abstract BitSet getDefaultFeaturesMask(); - public abstract void registerNewSIG(SIGData sig); + public abstract void registerNewCommunity(CommunityData comm); public abstract int getFeatureIndexBySymbol(String symbol); diff --git a/src/com/silverwrist/venice/core/impl/ImageStore.java b/src/com/silverwrist/venice/core/impl/ImageStore.java index 5d18b37..73b25a9 100644 --- a/src/com/silverwrist/venice/core/impl/ImageStore.java +++ b/src/com/silverwrist/venice/core/impl/ImageStore.java @@ -33,7 +33,7 @@ class ImageStore implements BinaryData */ public static final short TYPE_USER_PHOTO = 1; - public static final short TYPE_SIG_LOGO = 2; + public static final short TYPE_COMMUNITY_LOGO = 2; private static Category logger = Category.getInstance(ImageStore.class); diff --git a/src/com/silverwrist/venice/core/impl/ReturnConfSeq.java b/src/com/silverwrist/venice/core/impl/ReturnConfSeq.java index ec755df..e404d88 100644 --- a/src/com/silverwrist/venice/core/impl/ReturnConfSeq.java +++ b/src/com/silverwrist/venice/core/impl/ReturnConfSeq.java @@ -7,7 +7,7 @@ * WARRANTY OF ANY KIND, either express or implied. See the License for the specific * language governing rights and limitations under the License. * - * The Original Code is the Venice Web Community System. + * The Original Code is the Venice Web Communities System. * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are diff --git a/src/com/silverwrist/venice/core/impl/ReturnTopicInfo.java b/src/com/silverwrist/venice/core/impl/ReturnTopicInfo.java index 99d0f41..2235f85 100644 --- a/src/com/silverwrist/venice/core/impl/ReturnTopicInfo.java +++ b/src/com/silverwrist/venice/core/impl/ReturnTopicInfo.java @@ -7,7 +7,7 @@ * WARRANTY OF ANY KIND, either express or implied. See the License for the specific * language governing rights and limitations under the License. * - * The Original Code is the Venice Web Community System. + * The Original Code is the Venice Web Communities System. * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are diff --git a/src/com/silverwrist/venice/core/impl/Stashable.java b/src/com/silverwrist/venice/core/impl/Stashable.java index 8464d1d..006947b 100644 --- a/src/com/silverwrist/venice/core/impl/Stashable.java +++ b/src/com/silverwrist/venice/core/impl/Stashable.java @@ -7,7 +7,7 @@ * WARRANTY OF ANY KIND, either express or implied. See the License for the specific * language governing rights and limitations under the License. * - * The Original Code is the Venice Web Community System. + * The Original Code is the Venice Web Communities System. * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are diff --git a/src/com/silverwrist/venice/core/impl/TopicMessageUserContextImpl.java b/src/com/silverwrist/venice/core/impl/TopicMessageUserContextImpl.java index 2c9d0f5..85b3515 100644 --- a/src/com/silverwrist/venice/core/impl/TopicMessageUserContextImpl.java +++ b/src/com/silverwrist/venice/core/impl/TopicMessageUserContextImpl.java @@ -527,7 +527,7 @@ class TopicMessageUserContextImpl implements TopicMessageContext // record what we did in an audit record ar = new AuditRecord(AuditRecord.HIDE_MESSAGE,conf.realUID(),conf.userRemoteAddress(), - conf.realSIGID(),"conf=" + conf.realConfID() + ",post=" + postid, + conf.realCommunityID(),"conf=" + conf.realConfID() + ",post=" + postid, flag ? "hide" : "unhide"); } // end try @@ -659,7 +659,7 @@ class TopicMessageUserContextImpl implements TopicMessageContext // record what we did in an audit record ar = new AuditRecord(AuditRecord.SCRIBBLE_MESSAGE,conf.realUID(),conf.userRemoteAddress(), - conf.realSIGID(),"conf=" + conf.realConfID() + ",post=" + postid); + conf.realCommunityID(),"conf=" + conf.realConfID() + ",post=" + postid); } // end try catch (SQLException e) @@ -768,7 +768,7 @@ class TopicMessageUserContextImpl implements TopicMessageContext // record what we did in an audit record ar = new AuditRecord(AuditRecord.NUKE_MESSAGE,conf.realUID(),conf.userRemoteAddress(), - conf.realSIGID(),"conf=" + conf.realConfID() + ",post=" + postid); + conf.realCommunityID(),"conf=" + conf.realConfID() + ",post=" + postid); } // end try catch (SQLException e) @@ -949,7 +949,7 @@ class TopicMessageUserContextImpl implements TopicMessageContext // Generate an audit record indicating what we did. ar = new AuditRecord(AuditRecord.UPLOAD_ATTACHMENT,conf.realUID(),conf.userRemoteAddress(), - conf.realSIGID(),"conf=" + conf.realConfID() + ",post=" + postid, + conf.realCommunityID(),"conf=" + conf.realConfID() + ",post=" + postid, "len=" + length + ",type=" + m_type + ",name=" + file + ",method=" + tmp_stgmethod); } // end try @@ -1060,14 +1060,14 @@ class TopicMessageUserContextImpl implements TopicMessageContext { // insert the post reference into the database StringBuffer sql = new StringBuffer("INSERT INTO postpublish (sigid, postid, by_uid, on_date) VALUES ("); - sql.append(conf.realSIGID()).append(", ").append(postid).append(", ").append(conf.realUID()); + sql.append(conf.realCommunityID()).append(", ").append(postid).append(", ").append(conf.realUID()); java.util.Date now = new java.util.Date(); sql.append(", '").append(SQLUtil.encodeDate(now)).append("');"); stmt.executeUpdate(sql.toString()); // generate an audit record indicating what we've done ar = new AuditRecord(AuditRecord.PUBLISH_POST,conf.realUID(),conf.userRemoteAddress(), - conf.realSIGID(),"conf=" + conf.realConfID() + ",post=" + postid); + conf.realCommunityID(),"conf=" + conf.realConfID() + ",post=" + postid); // establish cached data object for front page engine.publishNew(new PublishedMessageImpl(datapool,postid,parent,num,linecount,creator_uid, diff --git a/src/com/silverwrist/venice/core/impl/TopicUserContextImpl.java b/src/com/silverwrist/venice/core/impl/TopicUserContextImpl.java index d01b54e..2a781df 100644 --- a/src/com/silverwrist/venice/core/impl/TopicUserContextImpl.java +++ b/src/com/silverwrist/venice/core/impl/TopicUserContextImpl.java @@ -32,7 +32,7 @@ class TopicUserContextImpl implements TopicContext *-------------------------------------------------------------------------------- */ - private static Category logger = Category.getInstance(TopicUserContextImpl.class.getName()); + private static Category logger = Category.getInstance(TopicUserContextImpl.class); /*-------------------------------------------------------------------------------- * Attributes @@ -302,7 +302,7 @@ class TopicUserContextImpl implements TopicContext { // success! save the flag and generate an audit record frozen = flag; ar = new AuditRecord(AuditRecord.TOPIC_FREEZE,conf.realUID(),conf.userRemoteAddress(), - conf.realSIGID(),"conf=" + String.valueOf(conf.realConfID()) + ",topic=" + conf.realCommunityID(),"conf=" + String.valueOf(conf.realConfID()) + ",topic=" + String.valueOf(topicid),flag ? "freeze" : "unfreeze"); } // end if @@ -363,7 +363,7 @@ class TopicUserContextImpl implements TopicContext { // success! save the flag and generate an audit record archived = flag; ar = new AuditRecord(AuditRecord.TOPIC_ARCHIVE,conf.realUID(),conf.userRemoteAddress(), - conf.realSIGID(),"conf=" + String.valueOf(conf.realConfID()) + ",topic=" + conf.realCommunityID(),"conf=" + String.valueOf(conf.realConfID()) + ",topic=" + String.valueOf(topicid),flag ? "archive" : "unarchive"); } // end if @@ -801,7 +801,7 @@ class TopicUserContextImpl implements TopicContext // record what we did in an audit record ar = new AuditRecord(AuditRecord.POST_MESSAGE,conf.realUID(),conf.userRemoteAddress(), - conf.realSIGID(),"conf=" + String.valueOf(conf.realConfID()) + ",topic=" + conf.realCommunityID(),"conf=" + String.valueOf(conf.realConfID()) + ",topic=" + String.valueOf(topicid) + ",post=" + String.valueOf(new_post_id), "pseud=" + real_pseud); @@ -911,7 +911,7 @@ class TopicUserContextImpl implements TopicContext // record what we did in an audit record ar = new AuditRecord(AuditRecord.DELETE_TOPIC,conf.realUID(),conf.userRemoteAddress(), - conf.realSIGID(),"conf=" + String.valueOf(conf.realConfID()) + ",topic=" + conf.realCommunityID(),"conf=" + String.valueOf(conf.realConfID()) + ",topic=" + String.valueOf(topicid)); } // end try diff --git a/src/com/silverwrist/venice/core/impl/UserContextImpl.java b/src/com/silverwrist/venice/core/impl/UserContextImpl.java index 80ca19f..d33fd51 100644 --- a/src/com/silverwrist/venice/core/impl/UserContextImpl.java +++ b/src/com/silverwrist/venice/core/impl/UserContextImpl.java @@ -223,12 +223,12 @@ class UserContextImpl implements UserContext, UserBackend } // end sendEmailConfirmation - private void autoJoinSIGs(Connection conn) throws SQLException + private void autoJoinCommunities(Connection conn) throws SQLException { if (logger.isDebugEnabled()) - logger.debug("autoJoinSIGs (uid " + uid + ", level " + level + ")"); + logger.debug("autoJoinCommunities (uid " + uid + ", level " + level + ")"); - // See which SIGs we are eligible to autojoin. + // See which communities we are eligible to autojoin. Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer("SELECT sigmember.sigid, sigmember.locked FROM users, sigmember, sigs " @@ -239,22 +239,22 @@ class UserContextImpl implements UserContext, UserBackend logger.debug("SQL: " + sql.toString()); ResultSet rs = stmt.executeQuery(sql.toString()); - // Save the SIGIDs returned into temporary array lists. - ArrayList tmp_sigid = new ArrayList(); + // Save the community IDs returned into temporary array lists. + ArrayList tmp_cid = new ArrayList(); ArrayList tmp_locked = new ArrayList(); while (rs.next()) - { // save off the "sigid" and "locked" column pairs - tmp_sigid.add(new Integer(rs.getInt(1))); + { // save off the "cid" and "locked" column pairs + tmp_cid.add(new Integer(rs.getInt(1))); tmp_locked.add(new Boolean(rs.getBoolean(2))); } // end while - // Figure out which of those SIGs we haven't joined yet and set up to autojoin them. + // Figure out which of those communities we haven't joined yet and set up to autojoin them. sql.setLength(0); - for (int i=0; i=0)) + if ((ci.getOwnerUID()!=uid) || (ci.getOwnerCommunityID()>=0)) { // the contact information is not owned correctly - logger.error("ContactInfo ownership wrong (it's " + ci.getOwnerUID() + ", " + ci.getOwnerSIGID() + logger.error("ContactInfo ownership wrong (it's " + ci.getOwnerUID() + ", " + ci.getOwnerCommunityID() + "), should be (" + uid + ", -1)"); throw new DataException("invalid contact information record"); @@ -857,23 +857,23 @@ class UserContextImpl implements UserContext, UserBackend } // end setDescription - public List getMemberSIGs() throws DataException + public List getMemberCommunities() throws DataException { - return SIGUserContextImpl.getMemberSIGEntries(engine,this,datapool); + return CommunityUserContextImpl.getMemberCommunityEntries(engine,this,datapool); - } // end getMemberSIGs + } // end getMemberCommunities - public SIGContext getSIGContext(int sigid) throws DataException + public CommunityContext getCommunityContext(int cid) throws DataException { - return SIGUserContextImpl.getSIGContext(engine,this,datapool,sigid); + return CommunityUserContextImpl.getCommunityContext(engine,this,datapool,cid); - } // end getSIGContext + } // end getCommunityContext - public SIGContext getSIGContext(String alias) throws DataException + public CommunityContext getCommunityContext(String alias) throws DataException { - return SIGUserContextImpl.getSIGContext(engine,this,datapool,alias); + return CommunityUserContextImpl.getCommunityContext(engine,this,datapool,alias); - } // end getSIGContext + } // end getCommunityContext public List getRootCategoryList() throws DataException { @@ -887,41 +887,43 @@ class UserContextImpl implements UserContext, UserBackend } // end getCategoryDescriptor - public List searchForSIGs(int field, int mode, String term, int offset, int count) throws DataException + public List searchForCommunities(int field, int mode, String term, int offset, int count) + throws DataException { - return SIGUserContextImpl.searchForSIGs(engine,this,datapool,field,mode,term,offset,count); + return CommunityUserContextImpl.searchForCommunities(engine,this,datapool,field,mode,term,offset,count); - } // end searchForSIGs + } // end searchForCommunities - public int getSearchSIGCount(int field, int mode, String term) throws DataException + public int getSearchCommunityCount(int field, int mode, String term) throws DataException { - return SIGUserContextImpl.getSearchSIGCount(this,datapool,field,mode,term); + return CommunityUserContextImpl.getSearchCommunityCount(this,datapool,field,mode,term); - } // end getSearchSIGCount + } // end getSearchCommunityCount - public List getSIGsInCategory(int catid, int offset, int count) throws DataException + public List getCommunitiesInCategory(int catid, int offset, int count) throws DataException { - return SIGUserContextImpl.getSIGsInCategory(engine,this,datapool,catid,offset,count); + return CommunityUserContextImpl.getCommunitiesInCategory(engine,this,datapool,catid,offset,count); - } // end getSIGsInCategory + } // end getCommunitiesInCategory - public List getSIGsInCategory(CategoryDescriptor cat, int offset, int count) throws DataException + public List getCommunitiesInCategory(CategoryDescriptor cat, int offset, int count) throws DataException { - return SIGUserContextImpl.getSIGsInCategory(engine,this,datapool,cat.getLinkedCategoryID(),offset,count); + return CommunityUserContextImpl.getCommunitiesInCategory(engine,this,datapool,cat.getLinkedCategoryID(), + offset,count); - } // end getSIGsInCategory + } // end getCommunitiesInCategory - public int getNumSIGsInCategory(int catid) throws DataException + public int getNumCommunitiesInCategory(int catid) throws DataException { - return SIGUserContextImpl.getNumSIGsInCategory(this,datapool,catid); + return CommunityUserContextImpl.getNumCommunitiesInCategory(this,datapool,catid); - } // end getNumSIGsInCategory + } // end getNumCommunitiessInCategory - public int getNumSIGsInCategory(CategoryDescriptor cat) throws DataException + public int getNumCommunitiesInCategory(CategoryDescriptor cat) throws DataException { - return SIGUserContextImpl.getNumSIGsInCategory(this,datapool,cat.getLinkedCategoryID()); + return CommunityUserContextImpl.getNumCommunitiesInCategory(this,datapool,cat.getLinkedCategoryID()); - } // end getNumSIGsInCategory + } // end getNumCommunitiesInCategory public List searchForCategories(int mode, String term, int offset, int count) throws DataException { @@ -939,36 +941,37 @@ class UserContextImpl implements UserContext, UserBackend } // end getSearchCategoryCount - public SIGContext createSIG(String name, String alias, String language, String synopsis, String rules, - String joinkey, int hide_mode) throws DataException, AccessError + public CommunityContext createCommunity(String name, String alias, String language, String synopsis, + String rules, String joinkey, int hide_mode) + throws DataException, AccessError { - if (!canCreateSIG()) - throw new AccessError("You are not authorized to create new SIGs."); + if (!canCreateCommunity()) + throw new AccessError("You are not authorized to create new communities."); // Convert the "hide mode" value into the two hide flags. - boolean hide_dir = (hide_mode!=SIGContext.HIDE_NONE); - boolean hide_search = (hide_mode==SIGContext.HIDE_BOTH); + boolean hide_dir = (hide_mode!=CommunityContext.HIDE_NONE); + boolean hide_search = (hide_mode==CommunityContext.HIDE_BOTH); - // Create the new SIG's database entries and internal data. - SIGData new_sig = SIGCoreData.createSIG(engine,this,datapool,name,alias,uid,language,synopsis,rules, - joinkey,hide_dir,hide_search); + // Create the new community's database entries and internal data. + CommunityData new_comm = CommunityCoreData.createCommunity(engine,this,datapool,name,alias,uid,language, + synopsis,rules,joinkey,hide_dir,hide_search); - // Create the SIG context we return to the user. - SIGContext rc = new SIGUserContextImpl(engine,this,datapool,new_sig); + // Create the community context we return to the user. + CommunityContext rc = new CommunityUserContextImpl(engine,this,datapool,new_comm); - new_sig.rd_release(); // release the extra reference we have on SIGData + new_comm.rd_release(); // release the extra reference we have on CommunityData // And that's it! You expected lightning bolts maybe? :-) return rc; - } // end createSIG + } // end createCommunity - public boolean canCreateSIG() + public boolean canCreateCommunity() { - return (level>=engine.getParamInt(EngineBackend.IP_CREATESIGLVL)); + return (level>=engine.getParamInt(EngineBackend.IP_CREATECOMMUNITYLVL)); - } // end canCreateSIG + } // end canCreateCommunity public List getSideBoxList() throws DataException { @@ -1550,20 +1553,20 @@ class UserContextImpl implements UserContext, UserBackend } // end loadNewUser - void autoJoinSIGs() throws DataException + void autoJoinCommunities() throws DataException { Connection conn = null; try { // get a database connection and call the internal function conn = datapool.getConnection(); - autoJoinSIGs(conn); + autoJoinCommunities(conn); } // end try catch (SQLException e) { // database error - this is a DataException - logger.error("error autojoining SIGs: " + e.getMessage(),e); - throw new DataException("unable to autojoin SIGs: " + e.getMessage(),e); + logger.error("error autojoining communities: " + e.getMessage(),e); + throw new DataException("unable to autojoin communities: " + e.getMessage(),e); } // end catch finally @@ -1573,6 +1576,6 @@ class UserContextImpl implements UserContext, UserBackend } // end finally - } // end autoJoinSIGs + } // end autoJoinCommunities } // end class UserContextImpl diff --git a/src/com/silverwrist/venice/core/impl/UserFoundImpl.java b/src/com/silverwrist/venice/core/impl/UserFoundImpl.java index da63159..0c7012b 100644 --- a/src/com/silverwrist/venice/core/impl/UserFoundImpl.java +++ b/src/com/silverwrist/venice/core/impl/UserFoundImpl.java @@ -7,7 +7,7 @@ * WARRANTY OF ANY KIND, either express or implied. See the License for the specific * language governing rights and limitations under the License. * - * The Original Code is the Venice Web Community System. + * The Original Code is the Venice Web Communities System. * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are diff --git a/src/com/silverwrist/venice/core/impl/VeniceEngineImpl.java b/src/com/silverwrist/venice/core/impl/VeniceEngineImpl.java index 3929444..e2910cb 100644 --- a/src/com/silverwrist/venice/core/impl/VeniceEngineImpl.java +++ b/src/com/silverwrist/venice/core/impl/VeniceEngineImpl.java @@ -104,7 +104,7 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend *-------------------------------------------------------------------------------- */ - class VeniceFeatureDef implements SIGFeature + class VeniceFeatureDef implements CommunityFeature { int code; String symbol; @@ -331,14 +331,14 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend { // if we're interrupted, just schedule the next run a little early } // end catch - // sweep the SIG cache first - List sigs = sig_refcache.sweepReturn(); - Iterator it = sigs.iterator(); + // sweep the community cache first + List comms = comm_refcache.sweepReturn(); + Iterator it = comms.iterator(); while (it.hasNext()) - { // perform subsweeps on the SIG data - SIGData sig = (SIGData)(it.next()); - sig.sweepCache(); - sig.rd_release(); + { // perform subsweeps on the community data + CommunityData comm = (CommunityData)(it.next()); + comm.sweepCache(); + comm.rd_release(); } // end while @@ -352,22 +352,22 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend } // end class CacheSweeper /*-------------------------------------------------------------------------------- - * Internal class for creating new SIGCoreData objects. + * Internal class for creating new CommunityCoreData objects. *-------------------------------------------------------------------------------- */ - protected class SIGCoreDataCreator implements ReferencedDataBuilder + protected class CommunityCoreDataCreator implements ReferencedDataBuilder { - protected SIGCoreDataCreator() + protected CommunityCoreDataCreator() { // do nothing } // end constructor public ReferencedData build(Object key) throws ReferencedDataBuilderException { - Integer xsigid = (Integer)key; + Integer xcid = (Integer)key; try { // create the desired object - return new SIGCoreData(VeniceEngineImpl.this,datapool,xsigid.intValue()); + return new CommunityCoreData(VeniceEngineImpl.this,datapool,xcid.intValue()); } // end try catch (DataException e) @@ -378,7 +378,7 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend } // end build - } // end class SIGCoreDataCreator + } // end class CommunityCoreDataCreator /*-------------------------------------------------------------------------------- * Internal class for creating new ConferenceCoreData objects. @@ -491,8 +491,8 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend private Properties email_props = null; // email properties private javax.mail.Session mailsession = null; // email session object private Hashtable stock_messages = null; // stock messages holder - private ReferenceCache sig_refcache = new ReferenceCache(); - private SIGCoreDataCreator sig_creator = new SIGCoreDataCreator(); + private ReferenceCache comm_refcache = new ReferenceCache(); + private CommunityCoreDataCreator comm_creator = new CommunityCoreDataCreator(); private VeniceFeatureDef[] features; // master feature table private Hashtable feature_syms = new Hashtable(); // hashtable mapping symbols to features private ReferenceCache conf_refcache = new ReferenceCache(); @@ -544,11 +544,11 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend gp_ints[IP_POSTSPERPAGE] = rs.getInt(1); gp_ints[IP_POSTSATTOP] = rs.getInt(2); gp_ints[IP_MAXSEARCHRETURN] = rs.getInt(3); - gp_ints[IP_MAXSIGMEMBERDISPLAY] = rs.getInt(4); + gp_ints[IP_MAXCOMMUNITYMEMBERDISPLAY] = rs.getInt(4); gp_ints[IP_MAXCONFMEMBERDISPLAY] = rs.getInt(5); gp_ints[IP_NUMFRONTPAGEPOSTS] = rs.getInt(6); gp_ints[IP_NUMAUDITRECSPERPAGE] = rs.getInt(7); - gp_ints[IP_CREATESIGLVL] = rs.getInt(8); + gp_ints[IP_CREATECOMMUNITYLVL] = rs.getInt(8); } // end loadDefaults @@ -1385,14 +1385,14 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend // create a new context for the user (they're now effectively logged in) UserContextImpl rc = new UserContextImpl(this,datapool); rc.loadNewUser(remote_addr,new_uid,DefaultLevels.newUser(),username,confirm_num,created,created); - rc.autoJoinSIGs(); // EJB 4/14/2001 + rc.autoJoinCommunities(); // EJB 4/14/2001 if (logger.isDebugEnabled()) logger.debug("...created new user context"); return rc; } // end createNewAccount - public boolean aliasExists(String alias, int exist_sigid) + public boolean aliasExists(String alias, int exist_cid) { checkInitialized(); Connection conn = null; @@ -1403,8 +1403,8 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer("SELECT sigid FROM sigs WHERE alias = '"); sql.append(alias).append("'"); - if (exist_sigid>0) - sql.append(" AND sigid <> ").append(exist_sigid); + if (exist_cid>0) + sql.append(" AND sigid <> ").append(exist_cid); sql.append(';'); ResultSet rs = stmt.executeQuery(sql.toString()); return rs.next(); @@ -1412,7 +1412,7 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend } // end try catch (SQLException e) { // force to return null - logger.warn("DB error looking up SIG: " + e.getMessage(),e); + logger.warn("DB error looking up community: " + e.getMessage(),e); } // end catch finally @@ -1434,7 +1434,7 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend Connection conn = null; try - { // do a SELECT on the sigs table + { // do a SELECT on the category table conn = datapool.getConnection(); Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer("SELECT catid FROM refcategory WHERE catid = "); @@ -1732,11 +1732,11 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend } // end getMaxNumConferenceMembersDisplay - public int getMaxNumSIGMembersDisplay() + public int getMaxNumCommunityMembersDisplay() { - return gp_ints[IP_MAXSIGMEMBERDISPLAY]; + return gp_ints[IP_MAXCOMMUNITYMEMBERDISPLAY]; - } // end getMaxNumSIGMembersDisplay + } // end getMaxNumCommunityMembersDisplay public List getMasterSideBoxList() { @@ -1929,15 +1929,15 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend } // end getLanguageNameForCode - public SIGData getSIGDataObject(int sigid) throws DataException + public CommunityData getCommunityDataObject(int cid) throws DataException { checkInitialized(); if (logger.isDebugEnabled()) - logger.debug("getSIGDataObject(" + sigid + ")..."); + logger.debug("getCommunityDataObject(" + cid + ")..."); try - { // delegate to the sig_refcache and sig_creator objects - return (SIGData)(sig_refcache.getOrCreate(new Integer(sigid),sig_creator)); + { // delegate to the comm_refcache and comm_creator objects + return (CommunityData)(comm_refcache.getOrCreate(new Integer(cid),comm_creator)); } // end try catch (ReferencedDataBuilderException e) @@ -1946,22 +1946,22 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend if (e2 instanceof DataException) throw (DataException)e2; else - throw new InternalStateError("unknown creation exception thrown in getSIGDataObject: " + throw new InternalStateError("unknown creation exception thrown in getCommunityDataObject: " + e2.getClass().getName(),e2); } // end catch - } // end getSIGDataObject + } // end getCommunityDataObject - public void detachSIGDataObject(int sigid) + public void detachCommunityDataObject(int cid) { checkInitialized(); if (logger.isDebugEnabled()) - logger.debug("detachSIGDataObject(" + sigid + ")..."); + logger.debug("detachCommunityDataObject(" + cid + ")..."); - sig_refcache.detach(new Integer(sigid)); + comm_refcache.detach(new Integer(cid)); - } // end detachSIGDataObject + } // end detachCommunityDataObject public BitSet getLockedFeaturesMask() { @@ -1975,17 +1975,17 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend } // end getLockedFeaturesMask - public List getSIGFeatureSet(BitSet enabled_features, int level, boolean read_privs) + public List getCommunityFeatureSet(BitSet enabled_features, int level, boolean read_privs) { checkInitialized(); ArrayList rc = new ArrayList(); for (int i=0; i0) - { // We have "sig!something" ... store off the SIG name - setSIGName(work.substring(0,pos)); + { // We have "community!something" ... store off the community name + setCommunityName(work.substring(0,pos)); work.delete(0,pos+1); if (work.length()==0) - return; // we had just "sig!" - that's the syntax for a SIG link + return; // we had just "community!" - that's the syntax for a community link } // end if else if (pos==0) @@ -75,8 +75,8 @@ public class PostLinkDecoder // Second Test: Dot Number One pos = work.toString().indexOf('.'); if (pos<0) - { // there's no dots in here...this must have been either "postlink" or "sig!conference" - if (signame!=null) // it's "sig!conference" + { // there's no dots in here...this must have been either "postlink" or "community!conference" + if (commname!=null) // it's "community!conference" setConferenceName(work.toString()); else // it's "postlink" setPostRange(work); @@ -91,8 +91,8 @@ public class PostLinkDecoder work.delete(0,pos+1); if (work.length()==0) - { // we had "conference." or "topic." (or perhaps "sig!conference.") - if (signame==null) + { // we had "conference." or "topic." (or perhaps "community!conference.") + if (commname==null) { // it's either "conference." or "topic." - try topic first try { // try it as a topic number first... @@ -106,7 +106,7 @@ public class PostLinkDecoder } // end catch } // end if - else // it was "sig!conference."...save it off + else // it was "community!conference."...save it off setConferenceName(conf_or_topic); return; // all done here... @@ -116,8 +116,8 @@ public class PostLinkDecoder // Third Test: Dot Number Two pos = work.toString().indexOf('.'); if (pos<0) - { // we had "conference.topic" or "topic.posts" (or perhaps "sig!conference.topic") - if (signame==null) + { // we had "conference.topic" or "topic.posts" (or perhaps "community!conference.topic") + if (commname==null) { // we have "conference.topic" or "topic.posts" - have to determine this boolean is_topic = false; // what does "work" currently hold? try @@ -140,7 +140,7 @@ public class PostLinkDecoder } // end if else - { // it's "sig!conference.topic"...set 'em up accordingly + { // it's "community!conference.topic"...set 'em up accordingly setConferenceName(conf_or_topic); setTopicNumber(work.toString()); @@ -152,14 +152,14 @@ public class PostLinkDecoder else if (pos==0) throw new ValidationException(". at beginning of string"); - // We definitely have "conference.topic.something" (or "sig!conference.topic.sonething") now, + // We definitely have "conference.topic.something" (or "community!conference.topic.something") now, // so save off the conference name and topic number. setConferenceName(conf_or_topic); setTopicNumber(work.substring(0,pos)); work.delete(0,pos+1); if (work.length()==0) - return; // we just had "conference.topic." or "sig!conference.topic.", which is valid + return; // we just had "conference.topic." or "community!conference.topic.", which is valid setPostRange(work); // the rest must be the post range! @@ -183,15 +183,15 @@ public class PostLinkDecoder } // end isAllDigits - private void setSIGName(String name) throws ValidationException + private void setCommunityName(String name) throws ValidationException { - if (name.length()>MAX_SIG_LEN) - throw new ValidationException("SIG alias is too long"); + if (name.length()>MAX_COMM_LEN) + throw new ValidationException("community alias is too long"); if (!(IDUtils.isValidVeniceID(name))) - throw new ValidationException("SIG alias is not a valid Venice identifier"); - signame = name; + throw new ValidationException("community alias is not a valid Venice identifier"); + commname = name; - } // end setSIGName + } // end setCommunityName private void setConferenceName(String name) throws ValidationException { @@ -293,11 +293,11 @@ public class PostLinkDecoder *-------------------------------------------------------------------------------- */ - public String getSIG() + public String getCommunity() { - return signame; + return commname; - } // end getSIG + } // end getCommunity public String getConference() { @@ -325,7 +325,7 @@ public class PostLinkDecoder public boolean needDatabaseVerification() { - return ((signame!=null) || (confname!=null)); + return ((commname!=null) || (confname!=null)); } // end needDatabaseVerification @@ -337,13 +337,13 @@ public class PostLinkDecoder StringBuffer sql = new StringBuffer(); ResultSet rs; - if (signame!=null) - { // verify the SIG name against the database - sql.append("SELECT sigid FROM sigs WHERE alias = '").append(SQLUtil.encodeString(signame)); + if (commname!=null) + { // verify the community name against the database + sql.append("SELECT sigid FROM sigs WHERE alias = '").append(SQLUtil.encodeString(commname)); sql.append("';"); rs = stmt.executeQuery(sql.toString()); if (!(rs.next())) - throw new ValidationException("SIG alias not found"); + throw new ValidationException("community alias not found"); sql.setLength(0); } // end if diff --git a/src/com/silverwrist/venice/db/PostLinkDecoderContext.java b/src/com/silverwrist/venice/db/PostLinkDecoderContext.java index 4e8d987..8de2b96 100644 --- a/src/com/silverwrist/venice/db/PostLinkDecoderContext.java +++ b/src/com/silverwrist/venice/db/PostLinkDecoderContext.java @@ -7,7 +7,7 @@ * WARRANTY OF ANY KIND, either express or implied. See the License for the specific * language governing rights and limitations under the License. * - * The Original Code is the Venice Web Community System. + * The Original Code is the Venice Web Communities System. * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are @@ -24,7 +24,7 @@ public class PostLinkDecoderContext *-------------------------------------------------------------------------------- */ - private String signame; // SIG name that's cached + private String commname; // community name that's cached private String confname; // conference name that's cached private short topic; // topic that's cached @@ -33,9 +33,9 @@ public class PostLinkDecoderContext *-------------------------------------------------------------------------------- */ - public PostLinkDecoderContext(String signame, String confname, short topic) + public PostLinkDecoderContext(String commname, String confname, short topic) { - this.signame = signame; + this.commname = commname; this.confname = confname; this.topic = topic; @@ -46,11 +46,11 @@ public class PostLinkDecoderContext *-------------------------------------------------------------------------------- */ - public String getSIGName() + public String getCommunityName() { - return signame; + return commname; - } // end getSIGName + } // end getCommunityName public String getConferenceName() { diff --git a/src/com/silverwrist/venice/db/PostLinkRewriter.java b/src/com/silverwrist/venice/db/PostLinkRewriter.java index ac4f983..944a20d 100644 --- a/src/com/silverwrist/venice/db/PostLinkRewriter.java +++ b/src/com/silverwrist/venice/db/PostLinkRewriter.java @@ -61,12 +61,12 @@ public class PostLinkRewriter implements Rewriter { StringBuffer b = new StringBuffer(URI_PREFIX); boolean started = false; - if (pl.getSIG()==null) - b.append(ctxt.getSIGName()); + if (pl.getCommunity()==null) + b.append(ctxt.getCommunityName()); else - { // append the real SIG name + { // append the real community name started = true; - b.append(pl.getSIG()); + b.append(pl.getCommunity()); } // end else @@ -151,7 +151,7 @@ public class PostLinkRewriter implements Rewriter pl = new PostLinkDecoder(data); if (pl.needDatabaseVerification()) - { // open up a database connection and verify the SIG/conference names + { // open up a database connection and verify the community/conference names Connection conn = null; try diff --git a/src/com/silverwrist/venice/security/Audit.java b/src/com/silverwrist/venice/security/Audit.java index 56792cd..5d2cce8 100644 --- a/src/com/silverwrist/venice/security/Audit.java +++ b/src/com/silverwrist/venice/security/Audit.java @@ -37,19 +37,19 @@ public interface Audit public static final int ADMIN_SET_SECURITY = 112; public static final int ADMIN_LOCK_OUT = 113; - // Codes 201-300 - SIG events - public static final int CREATE_SIG = 201; + // Codes 201-300 - Community events + public static final int CREATE_COMMUNITY = 201; public static final int SET_MEMBERSHIP = 202; - public static final int SIG_CONTACT_INFO = 203; - public static final int SIG_FEATURE_SET = 204; - public static final int SIG_NAME = 205; - public static final int SIG_ALIAS = 206; - public static final int SIG_CATEGORY = 207; - public static final int SIG_HIDE_INFO = 208; - public static final int SIG_MEMBERS_ONLY = 209; - public static final int SIG_JOIN_KEY = 210; - public static final int SIG_SECURITY = 211; - public static final int DELETE_SIG = 212; + public static final int COMMUNITY_CONTACT_INFO = 203; + public static final int COMMUNITY_FEATURE_SET = 204; + public static final int COMMUNITY_NAME = 205; + public static final int COMMUNITY_ALIAS = 206; + public static final int COMMUNITY_CATEGORY = 207; + public static final int COMMUNITY_HIDE_INFO = 208; + public static final int COMMUNITY_MEMBERS_ONLY = 209; + public static final int COMMUNITY_JOIN_KEY = 210; + public static final int COMMUNITY_SECURITY = 211; + public static final int DELETE_COMMUNITY = 212; // Codes 301-400 - Conference events public static final int CREATE_CONF = 301; diff --git a/src/com/silverwrist/venice/security/AuditRecord.java b/src/com/silverwrist/venice/security/AuditRecord.java index 293f1bf..1b4cfc8 100644 --- a/src/com/silverwrist/venice/security/AuditRecord.java +++ b/src/com/silverwrist/venice/security/AuditRecord.java @@ -35,7 +35,7 @@ public class AuditRecord implements AuditData { private HashMap descr_cache = new HashMap(); private HashMap uname_cache = new HashMap(); - private HashMap signame_cache = new HashMap(); + private HashMap commname_cache = new HashMap(); private Statement stmt; DescrStringCache(Connection conn) throws SQLException @@ -82,25 +82,25 @@ public class AuditRecord implements AuditData } // end getUserName - String getSIGName(int sigid) throws SQLException, DataException + String getCommunityName(int cid) throws SQLException, DataException { - if (sigid<=0) - return ""; // no SIG - Integer sigid_x = new Integer(sigid); - String rc = (String)(signame_cache.get(sigid_x)); + if (cid<=0) + return ""; // no community + Integer cid_x = new Integer(cid); + String rc = (String)(commname_cache.get(cid_x)); if (rc==null) { // OK, get it from the database - ResultSet rs = stmt.executeQuery("SELECT signame FROM sigs WHERE sigid = " + sigid + ";"); + ResultSet rs = stmt.executeQuery("SELECT signame FROM sigs WHERE sigid = " + cid + ";"); if (!(rs.next())) - throw new DataException("SIG name not found for SIGID " + sigid); + throw new DataException("community name not found for community ID " + cid); rc = rs.getString(1); - signame_cache.put(sigid_x,rc); + commname_cache.put(cid_x,rc); } // end if return rc; - } // end getSIGName + } // end getCommunityName } // end class DescrStringCache @@ -113,55 +113,55 @@ public class AuditRecord implements AuditData private java.util.Date when; // the date/time of this audit event private int type; // the audit event type private int uid; // the user ID - private int sigid; // the SIG ID + private int cid; // the community ID private String ip; // the IP address of the user private String[] data; // the data values associated with the record private String descr = null; // audit record description private String uname = null; // user name of user - private String signame = null; // name of SIG + private String commname = null; // name of community /*-------------------------------------------------------------------------------- * Constructors *-------------------------------------------------------------------------------- */ - public AuditRecord(int type, int uid, String ip, int sigid, String data1, String data2, String data3, + public AuditRecord(int type, int uid, String ip, int cid, String data1, String data2, String data3, String data4) { setBaseData(type,uid,ip); - this.sigid = sigid; + this.cid = cid; setData(data1,data2,data3,data4); } // end constructor - public AuditRecord(int type, int uid, String ip, int sigid, String data1, String data2, String data3) + public AuditRecord(int type, int uid, String ip, int cid, String data1, String data2, String data3) { setBaseData(type,uid,ip); - this.sigid = sigid; + this.cid = cid; setData(data1,data2,data3,null); } // end constructor - public AuditRecord(int type, int uid, String ip, int sigid, String data1, String data2) + public AuditRecord(int type, int uid, String ip, int cid, String data1, String data2) { setBaseData(type,uid,ip); - this.sigid = sigid; + this.cid = cid; setData(data1,data2,null,null); } // end constructor - public AuditRecord(int type, int uid, String ip, int sigid, String data1) + public AuditRecord(int type, int uid, String ip, int cid, String data1) { setBaseData(type,uid,ip); - this.sigid = sigid; + this.cid = cid; setData(data1,null,null,null); } // end constructor - public AuditRecord(int type, int uid, String ip, int sigid) + public AuditRecord(int type, int uid, String ip, int cid) { setBaseData(type,uid,ip); - this.sigid = sigid; + this.cid = cid; setData(null,null,null,null); } // end constructor @@ -169,7 +169,7 @@ public class AuditRecord implements AuditData public AuditRecord(int type, int uid, String ip, String data1, String data2, String data3, String data4) { setBaseData(type,uid,ip); - this.sigid = 0; + this.cid = 0; setData(data1,data2,data3,data4); } // end constructor @@ -177,7 +177,7 @@ public class AuditRecord implements AuditData public AuditRecord(int type, int uid, String ip, String data1, String data2, String data3) { setBaseData(type,uid,ip); - this.sigid = 0; + this.cid = 0; setData(data1,data2,data3,null); } // end constructor @@ -185,7 +185,7 @@ public class AuditRecord implements AuditData public AuditRecord(int type, int uid, String ip, String data1, String data2) { setBaseData(type,uid,ip); - this.sigid = 0; + this.cid = 0; setData(data1,data2,null,null); } // end constructor @@ -193,7 +193,7 @@ public class AuditRecord implements AuditData public AuditRecord(int type, int uid, String ip, String data1) { setBaseData(type,uid,ip); - this.sigid = 0; + this.cid = 0; setData(data1,null,null,null); } // end constructor @@ -201,7 +201,7 @@ public class AuditRecord implements AuditData public AuditRecord(int type, int uid, String ip) { setBaseData(type,uid,ip); - this.sigid = 0; + this.cid = 0; setData(null,null,null,null); } // end constructor @@ -212,7 +212,7 @@ public class AuditRecord implements AuditData when = SQLUtil.getFullDateTime(rs,"on_date"); type = rs.getInt("event"); uid = rs.getInt("uid"); - sigid = rs.getInt("sigid"); + cid = rs.getInt("sigid"); ip = rs.getString("ip"); data = new String[DATA_COUNT]; data[0] = rs.getString("data1"); @@ -221,7 +221,7 @@ public class AuditRecord implements AuditData data[3] = rs.getString("data4"); descr = cache.getDescription(type); uname = cache.getUserName(uid); - signame = cache.getSIGName(sigid); + commname = cache.getCommunityName(cid); } // end constructor @@ -279,11 +279,11 @@ public class AuditRecord implements AuditData } // end getType - public int getSIGID() + public int getCommunityID() { - return sigid; + return cid; - } // end getType + } // end getCommunityID public String getIPAddress() { @@ -309,11 +309,11 @@ public class AuditRecord implements AuditData } // end getUserName - public String getSIGName() + public String getCommunityName() { - return signame; + return commname; - } // end getSIGName + } // end getCommunityName /*-------------------------------------------------------------------------------- * External operations @@ -333,7 +333,7 @@ public class AuditRecord implements AuditData + "data3, data4) VALUES ('"); java.util.Date now = new java.util.Date(); sql.append(SQLUtil.encodeDate(now)).append("', ").append(type).append(", ").append(uid).append(", "); - sql.append(sigid).append(", '").append(SQLUtil.encodeString(ip)).append("', "); + sql.append(cid).append(", '").append(SQLUtil.encodeString(ip)).append("', "); sql.append(SQLUtil.encodeStringArg(data[0])).append(", ").append(SQLUtil.encodeStringArg(data[1])); sql.append(", ").append(SQLUtil.encodeStringArg(data[2])).append(", "); sql.append(SQLUtil.encodeStringArg(data[3])).append(");"); @@ -361,7 +361,7 @@ public class AuditRecord implements AuditData *-------------------------------------------------------------------------------- */ - public static List getAuditRecords(Connection conn, int sigid, int offset, int count) + public static List getAuditRecords(Connection conn, int cid, int offset, int count) throws SQLException, DataException { ArrayList rc = new ArrayList(); @@ -369,8 +369,8 @@ public class AuditRecord implements AuditData Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer("SELECT * FROM audit"); - if (sigid>0) - sql.append(" WHERE sigid = ").append(sigid); + if (cid>0) + sql.append(" WHERE sigid = ").append(cid); sql.append(" ORDER BY on_date DESC LIMIT ").append(offset).append(", ").append(count).append(';'); ResultSet rs = stmt.executeQuery(sql.toString()); @@ -385,12 +385,12 @@ public class AuditRecord implements AuditData } // end getAuditRecords - public static int getAuditRecordCount(Connection conn, int sigid) throws SQLException + public static int getAuditRecordCount(Connection conn, int cid) throws SQLException { Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer("SELECT COUNT(*) FROM audit"); - if (sigid>0) - sql.append(" WHERE sigid = ").append(sigid); + if (cid>0) + sql.append(" WHERE sigid = ").append(cid); sql.append(';'); ResultSet rs = stmt.executeQuery(sql.toString()); if (!(rs.next())) diff --git a/src/com/silverwrist/venice/security/Capability.java b/src/com/silverwrist/venice/security/Capability.java index b94a19c..10b514a 100644 --- a/src/com/silverwrist/venice/security/Capability.java +++ b/src/com/silverwrist/venice/security/Capability.java @@ -27,7 +27,7 @@ public class Capability implements SecLevels public static boolean isCommunityAdmin(int level) { - return (level>=SIG_ANYADMIN); + return (level>=COMM_ANYADMIN); } // end isCommunityAdmin @@ -55,39 +55,39 @@ public class Capability implements SecLevels } // end exemptFromMembershipRequirement - public static boolean hideHiddenSearchSIGs(int level) + public static boolean hideHiddenSearchCommunities(int level) { return (level=GLOBAL_ANYADMIN); - } // end canJoinPrivateSIGWithoutKey + } // end canJoinPrivateCommunityWithoutKey public static boolean showHiddenSearchCategories(int level) { return (level>=GLOBAL_ANYADMIN); - } // end hideHiddenSearchSIGs + } // end showHioddenSearchCategories - public static boolean showHiddenSIGMembers(int level) + public static boolean showHiddenCommunityMembers(int level) { - return (level>=SIG_ANYADMIN); + return (level>=COMM_ANYADMIN); - } // end showHiddenSIGMembers + } // end showHiddenCommunityMembers public static boolean hideHiddenConferences(int level) { - return (level, * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are @@ -25,11 +25,11 @@ public class DefaultLevels implements SecLevels } // end newUser - public static int memberSIG() + public static int memberCommunity() { - return SIG_MEMBER; + return COMM_MEMBER; - } // end memberSIG + } // end memberCommunity public static int PFY() { @@ -49,41 +49,41 @@ public class DefaultLevels implements SecLevels } // end afterEmailAddressChange - public static int newSIGRead() + public static int newCommunityRead() { - return SIG_MEMBER; + return COMM_MEMBER; - } // end newSIGRead + } // end newCommunityRead - public static int newSIGWrite() + public static int newCommunityWrite() { - return SIG_COHOST; + return COMM_COHOST; - } // end newSIGWrite + } // end newCommunityWrite - public static int newSIGCreate() + public static int newCommunityCreate() { - return SIG_COHOST; + return COMM_COHOST; - } // end newSIGCreate + } // end newCommunityCreate - public static int newSIGDelete() + public static int newCommunityDelete() { - return SIG_HOST; + return COMM_HOST; - } // end newSIGDelete + } // end newCommunityDelete - public static int newSIGJoin() + public static int newCommunityJoin() { return GLOBAL_NORMAL; - } // end newSIGJoin + } // end newCommunityJoin - public static int creatorSIG() + public static int creatorCommunity() { - return SIG_HOST; + return COMM_HOST; - } // end creatorSIG + } // end creatorCommunity public static int hostPrivsConference() { @@ -105,19 +105,19 @@ public class DefaultLevels implements SecLevels public static int newConferenceRead(boolean pvt) { - return (pvt ? CONFERENCE_MEMBER : SIG_MEMBER); + return (pvt ? CONFERENCE_MEMBER : COMM_MEMBER); } // end newConferenceRead public static int newConferencePost(boolean pvt) { - return (pvt ? CONFERENCE_MEMBER : SIG_MEMBER); + return (pvt ? CONFERENCE_MEMBER : COMM_MEMBER); } // end newConferencePost public static int newConferenceCreate(boolean pvt) { - return (pvt ? CONFERENCE_MEMBER : SIG_MEMBER); + return (pvt ? CONFERENCE_MEMBER : COMM_MEMBER); } // end newConferencePost @@ -141,7 +141,7 @@ public class DefaultLevels implements SecLevels public static int newConferenceDelete() { - return SIG_COHOST; + return COMM_COHOST; } // end newConferenceHide diff --git a/src/com/silverwrist/venice/security/Role.java b/src/com/silverwrist/venice/security/Role.java index d6ec8a3..4630f7b 100644 --- a/src/com/silverwrist/venice/security/Role.java +++ b/src/com/silverwrist/venice/security/Role.java @@ -30,23 +30,23 @@ public class Role implements Comparable, SecLevels private static Role no_access; private static Role unrestricted_user; private static Role global_admin; - private static Role sig_host; + private static Role comm_host; private static ArrayList global_low; private static ArrayList global_high; - private static ArrayList sig_low; - private static ArrayList sig_high; + private static ArrayList comm_low; + private static ArrayList comm_high; private static ArrayList conf_low; private static ArrayList conf_high; private static HashMap all_roles; private static List base_levels = null; private static List base_levels_2 = null; - private static List sigreadlist_rc = null; - private static List sigwritelist_rc = null; - private static List sigcreatelist_rc = null; - private static List sigdeletelist_rc = null; - private static List sigjoinlist_rc = null; - private static List sig_member_levels = null; + private static List commreadlist_rc = null; + private static List commwritelist_rc = null; + private static List commcreatelist_rc = null; + private static List commdeletelist_rc = null; + private static List commjoinlist_rc = null; + private static List comm_member_levels = null; private static List confreadlist_rc = null; private static List confpostlist_rc = null; private static List confhidelist_rc = null; @@ -182,105 +182,105 @@ public class Role implements Comparable, SecLevels } // end getGlobalAdmin - public static List getSIGReadList() + public static List getCommunityReadList() { - if (sigreadlist_rc==null) + if (commreadlist_rc==null) { // create the returned list ArrayList rc = new ArrayList(); rc.addAll(global_low); - rc.addAll(sig_low); + rc.addAll(comm_low); rc.add(unrestricted_user); - rc.addAll(sig_high); + rc.addAll(comm_high); rc.add(global_high.get(0)); - sigreadlist_rc = Collections.unmodifiableList(rc); + commreadlist_rc = Collections.unmodifiableList(rc); } // end if - return sigreadlist_rc; + return commreadlist_rc; - } // end getSIGReadList + } // end getCommunityReadList - public static List getSIGWriteList() + public static List getCommunityWriteList() { - if (sigwritelist_rc==null) + if (commwritelist_rc==null) { // build the return value ArrayList rc = new ArrayList(); - rc.addAll(sig_high); + rc.addAll(comm_high); rc.addAll(global_high); - sigwritelist_rc = Collections.unmodifiableList(rc); + commwritelist_rc = Collections.unmodifiableList(rc); } // end if - return sigwritelist_rc; + return commwritelist_rc; - } // end getSIGWriteList + } // end getCommunityWriteList - public static List getSIGCreateList() + public static List getCommunityCreateList() { - if (sigcreatelist_rc==null) + if (commcreatelist_rc==null) { // create the return list ArrayList rc = new ArrayList(); rc.add(global_low.get(global_low.size()-1)); - rc.addAll(sig_low); + rc.addAll(comm_low); rc.add(unrestricted_user); - rc.addAll(sig_high); + rc.addAll(comm_high); rc.add(global_high.get(0)); - sigcreatelist_rc = Collections.unmodifiableList(rc); + commcreatelist_rc = Collections.unmodifiableList(rc); } // end if - return sigcreatelist_rc; + return commcreatelist_rc; - } // end getSIGCreateList + } // end getCommunityCreateList - public static List getSIGDeleteList() + public static List getCommunityDeleteList() { - if (sigdeletelist_rc==null) + if (commdeletelist_rc==null) { // create the return list ArrayList rc = new ArrayList(); - rc.addAll(sig_high); + rc.addAll(comm_high); rc.addAll(global_high); rc.add(no_access); - sigdeletelist_rc = Collections.unmodifiableList(rc); + commdeletelist_rc = Collections.unmodifiableList(rc); } // end if - return sigdeletelist_rc; + return commdeletelist_rc; - } // end getSIGDeleteList + } // end getCommunityDeleteList - public static List getSIGJoinList() + public static List getCommunityJoinList() { - if (sigjoinlist_rc==null) - sigjoinlist_rc = Collections.unmodifiableList(global_low); - return sigjoinlist_rc; + if (commjoinlist_rc==null) + commjoinlist_rc = Collections.unmodifiableList(global_low); + return commjoinlist_rc; - } // end getSIGJoinList + } // end getCommunityJoinList - public static List getSIGMemberLevelChoices() + public static List getCommunityMemberLevelChoices() { - if (sig_member_levels==null) + if (comm_member_levels==null) { // figure out the member levels list ArrayList rc = new ArrayList(); rc.add(not_in_list); rc.addAll(global_low); - rc.addAll(sig_low); + rc.addAll(comm_low); rc.add(unrestricted_user); - rc.addAll(sig_high); + rc.addAll(comm_high); rc.remove(rc.size()-1); - sig_member_levels = Collections.unmodifiableList(rc); + comm_member_levels = Collections.unmodifiableList(rc); } // end if - return sig_member_levels; + return comm_member_levels; - } // end getSIGMemberLevelChoices + } // end getCommunityMemberLevelChoices - public static Role getSIGHostRole() + public static Role getCommunityHostRole() { - return sig_host; + return comm_host; - } // end getSIGHostRole + } // end getCommunityHostRole public static List getConferenceReadList() { @@ -288,7 +288,7 @@ public class Role implements Comparable, SecLevels { // precalculate the conference read list ArrayList rc = new ArrayList(); rc.addAll(global_low); - rc.addAll(sig_low); + rc.addAll(comm_low); rc.addAll(conf_low); rc.add(unrestricted_user); confreadlist_rc = Collections.unmodifiableList(rc); @@ -305,7 +305,7 @@ public class Role implements Comparable, SecLevels { // precalculate the post list ArrayList rc = new ArrayList(); rc.addAll(global_low); - rc.addAll(sig_low); + rc.addAll(comm_low); rc.addAll(conf_low); rc.add(unrestricted_user); rc.addAll(conf_high); @@ -329,7 +329,7 @@ public class Role implements Comparable, SecLevels { // precalculate the hide list ArrayList rc = new ArrayList(); rc.addAll(conf_high); - rc.addAll(sig_high); + rc.addAll(comm_high); rc.add(global_high.get(0)); confhidelist_rc = Collections.unmodifiableList(rc); @@ -356,7 +356,7 @@ public class Role implements Comparable, SecLevels if (confdeletelist_rc==null) { // precalculate the delete list ArrayList rc = new ArrayList(); - rc.addAll(sig_high); + rc.addAll(comm_high); rc.addAll(global_high); rc.add(no_access); confdeletelist_rc = Collections.unmodifiableList(rc); @@ -374,7 +374,7 @@ public class Role implements Comparable, SecLevels ArrayList rc = new ArrayList(); rc.add(not_in_list); rc.addAll(global_low); - rc.addAll(sig_low); + rc.addAll(comm_low); rc.addAll(conf_low); rc.add(unrestricted_user); rc.add(conf_high.get(conf_high.size()-1)); @@ -429,25 +429,25 @@ public class Role implements Comparable, SecLevels all_roles.put(new Integer(GLOBAL_BOFH),global_admin); global_high.trimToSize(); - // initialize the "SIG lowband" vector - sig_low = new ArrayList(1); - tmp = new Role(SIG_MEMBER,"SIG Member"); - sig_low.add(tmp); - all_roles.put(new Integer(SIG_MEMBER),tmp); - sig_low.trimToSize(); + // initialize the "community lowband" vector + comm_low = new ArrayList(1); + tmp = new Role(COMM_MEMBER,"Community Member"); + comm_low.add(tmp); + all_roles.put(new Integer(COMM_MEMBER),tmp); + comm_low.trimToSize(); - // initialize the "SIG highband" vector - sig_high = new ArrayList(3); - tmp = new Role(SIG_ANYADMIN,"Any SIG Administrator"); - sig_high.add(tmp); - all_roles.put(new Integer(SIG_ANYADMIN),tmp); - tmp = new Role(SIG_COHOST,"SIG Co-Host"); - sig_high.add(tmp); - all_roles.put(new Integer(SIG_COHOST),tmp); - sig_host = new Role(SIG_HOST,"SIG Host"); - sig_high.add(sig_host); - all_roles.put(new Integer(SIG_HOST),sig_host); - sig_high.trimToSize(); + // initialize the "communtiy highband" vector + comm_high = new ArrayList(3); + tmp = new Role(COMM_ANYADMIN,"Any Community Administrator"); + comm_high.add(tmp); + all_roles.put(new Integer(COMM_ANYADMIN),tmp); + tmp = new Role(COMM_COHOST,"Community Co-Host"); + comm_high.add(tmp); + all_roles.put(new Integer(COMM_COHOST),tmp); + comm_host = new Role(COMM_HOST,"Community Host"); + comm_high.add(comm_host); + all_roles.put(new Integer(COMM_HOST),comm_host); + comm_high.trimToSize(); // initialize the "conference lowband" vector conf_low = new ArrayList(1); diff --git a/src/com/silverwrist/venice/security/SecLevels.java b/src/com/silverwrist/venice/security/SecLevels.java index 32a1159..1a2b81e 100644 --- a/src/com/silverwrist/venice/security/SecLevels.java +++ b/src/com/silverwrist/venice/security/SecLevels.java @@ -21,7 +21,7 @@ public interface SecLevels { /** * Indicates "no access" (not even to the global system administrator). Used as the - * "delete" level for the Administration SIG, so it can't be accidentally deleted. + * "delete" level for the Administration Community, so it can't be accidentally deleted. */ public static final int NO_ACCESS = 65500; /** @@ -31,7 +31,7 @@ public interface SecLevels public static final int UNRESTRICTED_USER = 32500; /** * Indicates a user that has not logged in ("Anonymous Honyak"). Can be used as a - * permission level for SIGs and conferences to permit public reading and/or anonymous + * permission level for communities and conferences to permit public reading and/or anonymous * posting. */ public static final int GLOBAL_ANONYMOUS = 100; @@ -42,7 +42,7 @@ public interface SecLevels public static final int GLOBAL_UNVERIFIED = 500; /** * Indicates a user that has registered and been verified. Can be used as a permission - * level for SIGs and conferences to permit reading and/or posting by nonmembers. + * level for communities and conferences to permit reading and/or posting by nonmembers. */ public static final int GLOBAL_NORMAL = 1000; /** @@ -61,26 +61,26 @@ public interface SecLevels */ public static final int GLOBAL_ANYADMIN = 63000; /** - * The security level assigned to members of a SIG within that SIG. + * The security level assigned to members of a community within that community. */ - public static final int SIG_MEMBER = 6500; + public static final int COMM_MEMBER = 6500; /** - * The security level assigned to cohosts of a SIG within that SIG. + * The security level assigned to cohosts of a community within that community. */ - public static final int SIG_COHOST = 58000; + public static final int COMM_COHOST = 58000; /** - * The security level assigned to hosts of a SIG within that SIG. + * The security level assigned to hosts of a community within that community. */ - public static final int SIG_HOST = 58500; + public static final int COMM_HOST = 58500; /** - * A security level used to indicate any account with admin privileges over a specific SIG. + * A security level used to indicate any account with admin privileges over a specific community. */ - public static final int SIG_ANYADMIN = 57000; + public static final int COMM_ANYADMIN = 57000; /** - * The maximum level in the "high band" of the SIG scope; used to test if a user already has - * maximum privs within the SIG (because of being an admin at global scope, perhaps). + * The maximum level in the "high band" of the community scope; used to test if a user already has + * maximum privs within the community (because of being an admin at global scope, perhaps). */ - public static final int SIG_MAXADMIN = 58999; + public static final int COMM_MAXADMIN = 58999; /** * The security level assigned to members of a (private) conference within that conference. */ diff --git a/src/com/silverwrist/venice/servlets/Attachment.java b/src/com/silverwrist/venice/servlets/Attachment.java index 87ab7d3..c25ba13 100644 --- a/src/com/silverwrist/venice/servlets/Attachment.java +++ b/src/com/silverwrist/venice/servlets/Attachment.java @@ -58,12 +58,12 @@ public class Attachment extends VeniceServlet UserContext user, RenderData rdat) throws ServletException, IOException, VeniceServletResult { - // get the SIG - SIGContext sig = getSIGParameter(request,user,true,"top"); - changeMenuSIG(request,sig); + // get the community + CommunityContext comm = getCommunityParameter(request,user,true,"top"); + changeMenuCommunity(request,comm); // get the conference - ConferenceContext conf = getConferenceParameter(request,sig,true,"top"); + ConferenceContext conf = getConferenceParameter(request,comm,true,"top"); // get the message we want to use TopicMessageContext msg = getMessageParameter(request,conf,true,"top"); @@ -125,14 +125,14 @@ public class Attachment extends VeniceServlet } // end if - // get the SIG - SIGContext sig = getSIGParameter(mphandler,user,true,"top"); + // get the community + CommunityContext comm = getCommunityParameter(mphandler,user,true,"top"); if (logger.isDebugEnabled()) - logger.debug("SIG param: #" + sig.getSIGID()); - changeMenuSIG(request,sig); + logger.debug("community param: #" + comm.getCommunityID()); + changeMenuCommunity(request,comm); // get the conference - ConferenceContext conf = getConferenceParameter(mphandler,sig,true,"top"); + ConferenceContext conf = getConferenceParameter(mphandler,comm,true,"top"); if (logger.isDebugEnabled()) logger.debug("Conference param: #" + conf.getConfID()); diff --git a/src/com/silverwrist/venice/servlets/SIGAdmin.java b/src/com/silverwrist/venice/servlets/CommunityAdmin.java similarity index 69% rename from src/com/silverwrist/venice/servlets/SIGAdmin.java rename to src/com/silverwrist/venice/servlets/CommunityAdmin.java index 919bf1e..0430b34 100644 --- a/src/com/silverwrist/venice/servlets/SIGAdmin.java +++ b/src/com/silverwrist/venice/servlets/CommunityAdmin.java @@ -27,56 +27,56 @@ import com.silverwrist.venice.ValidationException; import com.silverwrist.venice.core.*; import com.silverwrist.venice.servlets.format.*; -public class SIGAdmin extends VeniceServlet +public class CommunityAdmin extends VeniceServlet { /*-------------------------------------------------------------------------------- * Static data members *-------------------------------------------------------------------------------- */ - private static final String DELETE_CONFIRM_ATTR = "servlets.SIGAdmin.delete.confirm"; + private static final String DELETE_CONFIRM_ATTR = "servlets.CommunityAdmin.delete.confirm"; private static final String DELETE_CONFIRM_PARAM = "confirm"; - private static Category logger = Category.getInstance(SIGAdmin.class.getName()); + private static Category logger = Category.getInstance(CommunityAdmin.class); /*-------------------------------------------------------------------------------- * Internal functions *-------------------------------------------------------------------------------- */ - private SIGAdminTop makeSIGAdminTop() throws ServletException + private CommunityAdminTop makeCommunityAdminTop() throws ServletException { - final String desired_name = "SIGAdminTop"; + final String desired_name = "CommunityAdminTop"; MenuPanelCache cache = MenuPanelCache.getMenuPanelCache(getServletContext()); if (!(cache.isCached(desired_name))) { // create a template and save it off - SIGAdminTop template = new SIGAdminTop(); + CommunityAdminTop template = new CommunityAdminTop(); cache.saveTemplate(template); } // end if // return a new copy - return (SIGAdminTop)(cache.getNewMenuPanel(desired_name)); + return (CommunityAdminTop)(cache.getNewMenuPanel(desired_name)); - } // end makeSIGAdminTop + } // end makeCommunityAdminTop - private EditSIGProfileDialog makeEditSIGProfileDialog() throws ServletException + private EditCommunityProfileDialog makeEditCommunityProfileDialog() throws ServletException { - final String desired_name = "EditSIGProfileDialog"; + final String desired_name = "EditCommunityProfileDialog"; DialogCache cache = DialogCache.getDialogCache(getServletContext()); if (!(cache.isCached(desired_name))) { // create a template and save it off - EditSIGProfileDialog template = new EditSIGProfileDialog(getCountryList(),getLanguageList()); + EditCommunityProfileDialog template = new EditCommunityProfileDialog(getCountryList(),getLanguageList()); cache.saveTemplate(template); } // end if // return a new copy - return (EditSIGProfileDialog)(cache.getNewDialog(desired_name)); + return (EditCommunityProfileDialog)(cache.getNewDialog(desired_name)); - } // end makeEditSIGProfileDialog + } // end makeEditCommunityProfileDialog /*-------------------------------------------------------------------------------- * Overrides from class HttpServlet @@ -85,7 +85,7 @@ public class SIGAdmin extends VeniceServlet public String getServletInfo() { - String rc = "SIGAdmin servlet - Administrative functions for SIGs\n" + String rc = "CommunityAdmin servlet - Administrative functions for communities\n" + "Part of the Venice Web Communities System\n"; return rc; @@ -100,47 +100,50 @@ public class SIGAdmin extends VeniceServlet UserContext user, RenderData rdat) throws ServletException, IOException, VeniceServletResult { - // get the SIG context - SIGContext sig = getSIGParameter(request,user,true,"top"); - changeMenuSIG(request,sig); + // get the community context + CommunityContext comm = getCommunityParameter(request,user,true,"top"); + changeMenuCommunity(request,comm); setMyLocation(request,"sigadmin?" + request.getQueryString()); - String on_error = "sigadmin?sig=" + sig.getSIGID(); + String on_error = "sigadmin?sig=" + comm.getCommunityID(); if (logger.isDebugEnabled()) - logger.debug("SIGAdmin/doGet operating on SIG \"" + sig.getName() + "\" (" + sig.getSIGID() + ")"); + logger.debug("CommunityAdmin/doGet operating on community \"" + comm.getName() + "\" (" + + comm.getCommunityID() + ")"); // now decide what to do based on the "cmd" parameter String cmd = getStandardCommandParam(request); if (logger.isDebugEnabled()) - logger.debug("SIGAdmin/doGet command value = " + cmd); + logger.debug("CommunityAdmin/doGet command value = " + cmd); if (cmd.equals("P")) { // "P" = "Edit Profile" - if (!(sig.canModifyProfile())) + if (!(comm.canModifyProfile())) { // no access - sorry, dude - logger.error("tried to call up SIG profile screen without access...naughty naughty!"); - return new ErrorBox("Unauthorized","You do not have access to modify this SIG's profile.",on_error); + logger.error("tried to call up community profile screen without access...naughty naughty!"); + return new ErrorBox("Unauthorized","You do not have access to modify this community's profile.", + on_error); } // end if // construct the edit profile dialog and load it up for use - EditSIGProfileDialog dlg = makeEditSIGProfileDialog(); + EditCommunityProfileDialog dlg = makeEditCommunityProfileDialog(); try { // load the values for this dialog - dlg.setupDialog(engine,sig); + dlg.setupDialog(engine,comm); } // end try catch (DataException de) { // we could not load the values because of a data exception - logger.error("DB error loading SIG profile: " + de.getMessage(),de); + logger.error("DB error loading community profile: " + de.getMessage(),de); return new ErrorBox("Database Error","Database error retrieving profile: " + de.getMessage(),on_error); } // end catch catch (AccessError ae) { // we don't have enough privilege - logger.error("Access error loading SIG profile: " + ae.getMessage(),ae); - return new ErrorBox("Unauthorized","You do not have access to modify this SIG's profile.",on_error); + logger.error("Access error loading community profile: " + ae.getMessage(),ae); + return new ErrorBox("Unauthorized","You do not have access to modify this community's profile.", + on_error); } // end catch @@ -150,10 +153,11 @@ public class SIGAdmin extends VeniceServlet if (cmd.equals("T")) { // "T" = "Set Category" - if (!(sig.canModifyProfile())) + if (!(comm.canModifyProfile())) { // no access - sorry man - logger.error("tried to call up SIG category set screen without access...naughty naughty!"); - return new ErrorBox("Unauthorized","You do not have access to modify this SIG's profile.",on_error); + logger.error("tried to call up community category set screen without access...naughty naughty!"); + return new ErrorBox("Unauthorized","You do not have access to modify this community's profile.", + on_error); } // end else @@ -168,7 +172,7 @@ public class SIGAdmin extends VeniceServlet throw new NumberFormatException(); // dump the category if it's not valid // change the category ID - sig.setCategoryID(catid); + comm.setCategoryID(catid); } // end try catch (NumberFormatException nfe) @@ -177,14 +181,15 @@ public class SIGAdmin extends VeniceServlet } // end catch catch (DataException de) - { // unable to update the SIG properly - logger.error("DB error updating SIG: " + de.getMessage(),de); - return new ErrorBox("Database Error","Database error updating SIG: " + de.getMessage(),on_error); + { // unable to update the community properly + logger.error("DB error updating community: " + de.getMessage(),de); + return new ErrorBox("Database Error","Database error updating community: " + de.getMessage(), + on_error); } // end catch catch (AccessError ae) { // database access error - display an error box - logger.error("Access error updating SIG: " + ae.getMessage(),ae); + logger.error("Access error updating community: " + ae.getMessage(),ae); return new ErrorBox("Access Error",ae.getMessage(),on_error); } // end catch @@ -200,7 +205,7 @@ public class SIGAdmin extends VeniceServlet p = request.getParameter("go"); int curr_catid; if (StringUtil.isStringEmpty(p)) - curr_catid = sig.getCategoryID(); + curr_catid = comm.getCategoryID(); else curr_catid = Integer.parseInt(p); @@ -208,7 +213,7 @@ public class SIGAdmin extends VeniceServlet throw new NumberFormatException(); // dump the category if it's not valid // create the browser panel and let it rip - return new SIGCategoryBrowseData(user,sig,curr_catid); + return new CommunityCategoryBrowseData(user,comm,curr_catid); } // end try catch (NumberFormatException nfe) @@ -230,24 +235,25 @@ public class SIGAdmin extends VeniceServlet if (cmd.equals("M")) { // "M" = Set Membership - if (!(sig.canModifyProfile())) + if (!(comm.canModifyProfile())) { // no access - sorry man logger.error("tried to call up membership set screen without access...naughty naughty!"); - return new ErrorBox("Unauthorized","You do not have access to modify this SIG's membership.",on_error); + return new ErrorBox("Unauthorized","You do not have access to modify this community's membership.", + on_error); } // end else try { // display the conference member list! - SIGMembership m = new SIGMembership(engine,sig); - m.doSIGMemberList(); - setMyLocation(request,"sigadmin?sig=" + sig.getSIGID() + "&cmd=M"); + CommunityMembership m = new CommunityMembership(engine,comm); + m.doCommunityMemberList(); + setMyLocation(request,"sigadmin?sig=" + comm.getCommunityID() + "&cmd=M"); return m; } // end try catch (DataException de) { // something wrong in the database - return new ErrorBox("Database Error","Database error listing SIG members: " + de.getMessage(), + return new ErrorBox("Database Error","Database error listing community members: " + de.getMessage(), on_error); } // end catch @@ -273,12 +279,13 @@ public class SIGAdmin extends VeniceServlet } // end catch // generate the lists - List audit_list = sig.getAuditRecords(offset,engine.getNumAuditRecordsPerPage()); - int audit_count = sig.getAuditRecordCount(); + List audit_list = comm.getAuditRecords(offset,engine.getNumAuditRecordsPerPage()); + int audit_count = comm.getAuditRecordCount(); // return the audit viewer - return new AuditDataViewer(engine,audit_list,offset,audit_count,"Audit Records for SIG \"" - + sig.getName() + "\"","sigadmin?sig=" + sig.getSIGID() + "&cmd=A&ofs=%"); + return new AuditDataViewer(engine,audit_list,offset,audit_count,"Audit Records for Community \"" + + comm.getName() + "\"","sigadmin?sig=" + comm.getCommunityID() + + "&cmd=A&ofs=%"); } // end try catch (AccessError ae) @@ -296,42 +303,44 @@ public class SIGAdmin extends VeniceServlet } // end if ("A" command) if (cmd.equals("DEL")) - { // "DEL" = "Delete SIG" (requires a confirmation) - if (!(sig.canDelete())) - { // we can't delete the SIG, so what are we doing here? - logger.error("you can't delete the SIG - not gonna do it, wouldn't be prudent"); - return new ErrorBox("Access Error","You do not have permission to delete this SIG.",on_error); + { // "DEL" = "Delete Community" (requires a confirmation) + if (!(comm.canDelete())) + { // we can't delete the community, so what are we doing here? + logger.error("you can't delete the community - not gonna do it, wouldn't be prudent"); + return new ErrorBox("Access Error","You do not have permission to delete this community.",on_error); } // end if if (ConfirmBox.isConfirmed(request,DELETE_CONFIRM_ATTR,DELETE_CONFIRM_PARAM)) - { // we are confirmed - delete the SIG! + { // we are confirmed - delete the community! try - { // delete the SIG! - sig.delete(); + { // delete the community! + comm.delete(); } // end try catch (DataException de) { // something wrong in the database - logger.error("Database error deleting SIG: " + de.getMessage(),de); - return new ErrorBox("Database Error","Database error deleting SIG: " + de.getMessage(),on_error); + logger.error("Database error deleting community: " + de.getMessage(),de); + return new ErrorBox("Database Error","Database error deleting community: " + de.getMessage(), + on_error); } // end catch catch (AccessError ae) - { // access error changing the SIG values - logger.error("Access error deleting SIG: " + ae.getMessage(),ae); + { // access error changing the community values + logger.error("Access error deleting community: " + ae.getMessage(),ae); return new ErrorBox("Access Error",ae.getMessage(),on_error); } // end catch - // the SIG is now GONE - there's noplace else to go but back to the Top page + // the community is now GONE - there's noplace else to go but back to the Top page throw new RedirectResult("top"); } // end if else { // throw up a confirm box to let the user think it over - String message = "You are about to permanently delete the \"" + sig.getName() + "\" SIG, including " - + "all conferences and other resources it contains! Are you sure you want to do this?"; + String message = "You are about to permanently delete the \"" + comm.getName() + "\" community, " + + "including all conferences and other resources it contains! Are you sure you want " + + "to do this?"; return new ConfirmBox(request,DELETE_CONFIRM_ATTR,DELETE_CONFIRM_PARAM,"Delete Conference",message, on_error + "&cmd=DEL",on_error); @@ -340,16 +349,16 @@ public class SIGAdmin extends VeniceServlet } // end if ("DEL" command) // all unknown requests get turned into menu display requests - if (!(sig.canAdministerSIG())) + if (!(comm.canAdministerCommunity())) { // no access - sorry buddy - logger.error("tried to call up SIG admin menu without access...naughty naughty!"); - return new ErrorBox("Access Error","You do not have access to administer this SIG.",on_error); + logger.error("tried to call up community admin menu without access...naughty naughty!"); + return new ErrorBox("Access Error","You do not have access to administer this community.",on_error); } // end if - // create a SIG administration menu - SIGAdminTop menu = makeSIGAdminTop(); - menu.setSIG(sig); + // create a community administration menu + CommunityAdminTop menu = makeCommunityAdminTop(); + menu.setCommunity(comm); return menu; } // end doVeniceGet @@ -358,43 +367,45 @@ public class SIGAdmin extends VeniceServlet UserContext user, RenderData rdat) throws ServletException, IOException, VeniceServletResult { - // get the SIG context - SIGContext sig = getSIGParameter(request,user,true,"top"); - changeMenuSIG(request,sig); - String on_error = "sigadmin?sig=" + sig.getSIGID(); + // get the community context + CommunityContext comm = getCommunityParameter(request,user,true,"top"); + changeMenuCommunity(request,comm); + String on_error = "sigadmin?sig=" + comm.getCommunityID(); setMyLocation(request,on_error); if (logger.isDebugEnabled()) - logger.debug("SIGAdmin/doPost operating on SIG \"" + sig.getName() + "\" (" + sig.getSIGID() + ")"); + logger.debug("CommunityAdmin/doPost operating on community \"" + comm.getName() + "\" (" + + comm.getCommunityID() + ")"); // now decide what to do based on the "cmd" parameter String cmd = getStandardCommandParam(request); if (logger.isDebugEnabled()) - logger.debug("SIGAdmin/doPost command value = " + cmd); + logger.debug("CommunityAdmin/doPost command value = " + cmd); if (cmd.equals("P")) { // "P" = "Edit Profile" - if (!(sig.canModifyProfile())) + if (!(comm.canModifyProfile())) { // no access - sorry, dude - logger.error("tried to call up SIG profile screen without access...naughty naughty!"); - return new ErrorBox("Unauthorized","You do not have access to modify this SIG's profile.",on_error); + logger.error("tried to call up community profile screen without access...naughty naughty!"); + return new ErrorBox("Unauthorized","You do not have access to modify this community's profile.", + on_error); } // end if // construct the edit profile dialog and load it up for use - EditSIGProfileDialog dlg = makeEditSIGProfileDialog(); - dlg.setupDialogBasic(engine,sig); + EditCommunityProfileDialog dlg = makeEditCommunityProfileDialog(); + dlg.setupDialogBasic(engine,comm); if (dlg.isButtonClicked(request,"cancel")) throw new RedirectResult(on_error); // go back - they canceled out if (dlg.isButtonClicked(request,"update")) - { // begin updating the SIG's contents + { // begin updating the community's contents dlg.loadValues(request); // do value loading now try - { // attempt to change the SIG profile now... - dlg.doDialog(sig); + { // attempt to change the community profile now... + dlg.doDialog(comm); // now jump back to the main menu clearMenu(request); @@ -405,18 +416,19 @@ public class SIGAdmin extends VeniceServlet { // simple validation exception if (logger.isDebugEnabled()) logger.debug("validation failure: " + ve.getMessage()); - dlg.resetOnError(sig,ve.getMessage() + " Please try again."); + dlg.resetOnError(comm,ve.getMessage() + " Please try again."); } // end catch catch (DataException de) - { // database error updating the SIG values - logger.error("DB error updating SIG: " + de.getMessage(),de); - return new ErrorBox("Database Error","Database error updating SIG: " + de.getMessage(),on_error); + { // database error updating the community values + logger.error("DB error updating community: " + de.getMessage(),de); + return new ErrorBox("Database Error","Database error updating community: " + de.getMessage(), + on_error); } // end catch catch (AccessError ae) - { // access error changing the SIG values - logger.error("Access error updating SIG: " + ae.getMessage(),ae); + { // access error changing the community values + logger.error("Access error updating community: " + ae.getMessage(),ae); return new ErrorBox("Access Error",ae.getMessage(),on_error); } // end catch @@ -426,20 +438,21 @@ public class SIGAdmin extends VeniceServlet } // end if ("update" pressed) // what the hell was that button? - logger.error("no known button click on SIGAdmin.doPost, cmd=P"); + logger.error("no known button click on CommunityAdmin.doPost, cmd=P"); return new ErrorBox("Internal Error","Unknown command button pressed",on_error); } // end if ("P" command) if (cmd.equals("M")) - { // "M" = Modify SIG Membership + { // "M" = Modify Community Membership on_error += "&cmd=M"; setMyLocation(request,on_error); - if (!(sig.canModifyProfile())) + if (!(comm.canModifyProfile())) { // no access - sorry, dude - logger.error("tried to call up SIG membership screen without access...naughty naughty!"); - return new ErrorBox("Unauthorized","You do not have access to modify this SIG's membership.",on_error); + logger.error("tried to call up community membership screen without access...naughty naughty!"); + return new ErrorBox("Unauthorized","You do not have access to modify this community's membership.", + on_error); } // end if @@ -496,7 +509,7 @@ public class SIGAdmin extends VeniceServlet Integer new_level = (Integer)(new_vals.get(uid)); if (new_level==null) { // whoops - logger.error("new SIG level not found for uid " + uid.intValue()); + logger.error("new community level not found for uid " + uid.intValue()); return new ErrorBox(null,"Invalid new level parameter.",on_error); } // end if @@ -507,11 +520,11 @@ public class SIGAdmin extends VeniceServlet // call down to set the membership level if (org_level.intValue()!=new_level_x) - { // we need to reset the SIG membership + { // we need to reset the community membership if (logger.isDebugEnabled()) - logger.debug("resetting SIG member level for uid " + uid.intValue() + "(old = " + logger.debug("resetting community member level for uid " + uid.intValue() + "(old = " + org_level.intValue() + ", new = " + new_level_x + ")"); - sig.setMembership(uid.intValue(),new_level_x); + comm.setMembership(uid.intValue(),new_level_x); } // end if @@ -520,19 +533,19 @@ public class SIGAdmin extends VeniceServlet } // end try catch (AccessError ae) { // some sort of access error - display an error dialog - logger.error("AccessError on sig.setMembership: " + ae.getMessage(),ae); + logger.error("AccessError on comm.setMembership: " + ae.getMessage(),ae); return new ErrorBox("Access Error",ae.getMessage(),on_error); } // end catch catch (DataException de) { // database error creating the conference - logger.error("DataException on sig.setMembership: " + de.getMessage(),de); + logger.error("DataException on comm.setMembership: " + de.getMessage(),de); return new ErrorBox("Database Error","Database error setting memberships: " + de.getMessage(), on_error); } // end catch - // trap back to the SIG membership display + // trap back to the community membership display throw new RedirectResult(on_error); } // end if ("update" clicked) @@ -540,7 +553,7 @@ public class SIGAdmin extends VeniceServlet if ( isImageButtonClicked(request,"search") || isImageButtonClicked(request,"previous") || isImageButtonClicked(request,"next")) { // create the new dialog box - SIGMembership m = new SIGMembership(engine,sig); + CommunityMembership m = new CommunityMembership(engine,comm); try { // perform the search! @@ -569,7 +582,7 @@ public class SIGAdmin extends VeniceServlet } // end if (search function clicked) // we don't know what button was pressed - logger.error("no known button click on SIGAdmin.doPost, cmd=M"); + logger.error("no known button click on CommunityAdmin.doPost, cmd=M"); return new ErrorBox("Internal Error","Unknown command button pressed",on_error); } // end if ("M" command) @@ -579,4 +592,4 @@ public class SIGAdmin extends VeniceServlet } // end doVenicePost -} // end class SIGAdmin +} // end class CommunityAdmin diff --git a/src/com/silverwrist/venice/servlets/SIGFrontEnd.java b/src/com/silverwrist/venice/servlets/CommunityFrontEnd.java similarity index 76% rename from src/com/silverwrist/venice/servlets/SIGFrontEnd.java rename to src/com/silverwrist/venice/servlets/CommunityFrontEnd.java index 6ca6b23..63b5f26 100644 --- a/src/com/silverwrist/venice/servlets/SIGFrontEnd.java +++ b/src/com/silverwrist/venice/servlets/CommunityFrontEnd.java @@ -23,7 +23,7 @@ import javax.servlet.http.*; import com.silverwrist.venice.core.*; import com.silverwrist.venice.servlets.format.*; -public class SIGFrontEnd extends VeniceServlet +public class CommunityFrontEnd extends VeniceServlet { /*-------------------------------------------------------------------------------- * Overrides from class HttpServlet @@ -32,7 +32,7 @@ public class SIGFrontEnd extends VeniceServlet public String getServletInfo() { - String rc = "SIGFrontEnd servlet - Redirects to the \"default feature\" of a SIG\n" + String rc = "CommunityFrontEnd servlet - Redirects to the \"default feature\" of a community\n" + "Part of the Venice Web Communities System\n"; return rc; @@ -47,19 +47,19 @@ public class SIGFrontEnd extends VeniceServlet UserContext user, RenderData rdat) throws ServletException, IOException, VeniceServletResult { - // get the SIG alias name from the request path info - String sigalias = request.getPathInfo().substring(1); + // get the community alias name from the request path info + String alias = request.getPathInfo().substring(1); try - { // get the SIG's context from the alias name - SIGContext sig = user.getSIGContext(sigalias); + { // get the community's context from the alias name + CommunityContext comm = user.getCommunityContext(alias); - // get the default servlet from the SIG context - String def_servlet = sig.getDefaultApplet(); + // get the default servlet from the community context + String def_servlet = comm.getDefaultApplet(); if (def_servlet==null) { // return the default servlet changeMenuTop(request); - return new ErrorBox("Internal Error","unable to get SIG default servlet","top"); + return new ErrorBox("Internal Error","unable to get community default servlet","top"); } // end if @@ -70,10 +70,10 @@ public class SIGFrontEnd extends VeniceServlet catch (DataException de) { // set up to display an ErrorBox changeMenuTop(request); - return new ErrorBox("Database Error","Database error finding SIG: " + de.getMessage(),"top"); + return new ErrorBox("Database Error","Database error finding community: " + de.getMessage(),"top"); } // end catch } // end doVeniceGet -} // end class SIGFrontEnd +} // end class CommunityFrontEnd diff --git a/src/com/silverwrist/venice/servlets/SIGOperations.java b/src/com/silverwrist/venice/servlets/CommunityOperations.java similarity index 62% rename from src/com/silverwrist/venice/servlets/SIGOperations.java rename to src/com/silverwrist/venice/servlets/CommunityOperations.java index 0934d15..50cd462 100644 --- a/src/com/silverwrist/venice/servlets/SIGOperations.java +++ b/src/com/silverwrist/venice/servlets/CommunityOperations.java @@ -25,17 +25,17 @@ import com.silverwrist.venice.ValidationException; import com.silverwrist.venice.core.*; import com.silverwrist.venice.servlets.format.*; -public class SIGOperations extends VeniceServlet +public class CommunityOperations extends VeniceServlet { /*-------------------------------------------------------------------------------- * Static data members *-------------------------------------------------------------------------------- */ - private static final String UNJOIN_CONFIRM_ATTR = "servlets.SIGOperations.unjoin.confirm"; + private static final String UNJOIN_CONFIRM_ATTR = "servlets.CommunityOperations.unjoin.confirm"; private static final String UNJOIN_CONFIRM_PARAM = "confirm"; - private static Category logger = Category.getInstance(SIGOperations.class.getName()); + private static Category logger = Category.getInstance(CommunityOperations.class); /*-------------------------------------------------------------------------------- * Internal functions @@ -59,22 +59,22 @@ public class SIGOperations extends VeniceServlet } // end makeJoinKeyDialog - private CreateSIGDialog makeCreateSIGDialog() throws ServletException + private CreateCommunityDialog makeCreateCommunityDialog() throws ServletException { - final String desired_name = "CreateSIGDialog"; + final String desired_name = "CreateCommunityDialog"; DialogCache cache = DialogCache.getDialogCache(getServletContext()); if (!(cache.isCached(desired_name))) { // create a template and save it off - CreateSIGDialog template = new CreateSIGDialog(getCountryList(),getLanguageList()); + CreateCommunityDialog template = new CreateCommunityDialog(getCountryList(),getLanguageList()); cache.saveTemplate(template); } // end if // return a new copy - return (CreateSIGDialog)(cache.getNewDialog(desired_name)); + return (CreateCommunityDialog)(cache.getNewDialog(desired_name)); - } // end makeCreateSIGDialog + } // end makeCreateCommunityDialog /*-------------------------------------------------------------------------------- * Overrides from class HttpServlet @@ -83,7 +83,7 @@ public class SIGOperations extends VeniceServlet public String getServletInfo() { - String rc = "SIGOperations servlet - General SIG operations (join, unjoin, etc.)\n" + String rc = "CommunityOperations servlet - General community operations (join, unjoin, etc.)\n" + "Part of the Venice Web Communities System\n"; return rc; @@ -103,70 +103,70 @@ public class SIGOperations extends VeniceServlet setMyLocation(request,"sigops?" + request.getQueryString()); if (cmd.equals("J")) - { // "J" = "Join" (requires SIG parameter) - SIGContext sig = getSIGParameter(request,user,true,"top"); + { // "J" = "Join" (requires community parameter) + CommunityContext comm = getCommunityParameter(request,user,true,"top"); - if (!(sig.canJoin())) // not permitted to join! - return new ErrorBox("SIG Error","You are not permitted to join this SIG.","top"); + if (!(comm.canJoin())) // not permitted to join! + return new ErrorBox("Community Error","You are not permitted to join this community.","top"); - if (sig.isPublicSIG()) + if (comm.isPublicCommunity()) { // attempt to join right now! (no join key required) try - { // call down to join the SIG - sig.join(null); + { // call down to join the community + comm.join(null); // success! display the "welcome" page clearMenu(request); // force the clear to regen the menus - changeMenuSIG(request,sig); - return new SIGWelcome(sig); + changeMenuCommunity(request,comm); + return new CommunityWelcome(comm); } // end try catch (AccessError ae) { // access error - return new ErrorBox("Access Error","Unable to join SIG: " + ae.getMessage(),"top"); + return new ErrorBox("Access Error","Unable to join community: " + ae.getMessage(),"top"); } // end catch catch (DataException de) { // data exception doing something - return new ErrorBox("Database Error","Database error joining SIG: " + de.getMessage(),"top"); + return new ErrorBox("Database Error","Database error joining community: " + de.getMessage(),"top"); } // end catch - } // end if (public SIG) + } // end if (public community) else { // we need to prompt them for the join key.... JoinKeyDialog dlg = makeJoinKeyDialog(); - dlg.setupDialog(sig); - changeMenuSIG(request,sig); + dlg.setupDialog(comm); + changeMenuCommunity(request,comm); return dlg; - } // end else (private SIG) + } // end else (private community) } // end if ("J" command) if (cmd.equals("U")) - { // "U" = "Unjoin (requires SIG parameter) - SIGContext sig = getSIGParameter(request,user,true,"top"); + { // "U" = "Unjoin (requires community parameter) + CommunityContext comm = getCommunityParameter(request,user,true,"top"); - if (!(sig.canUnjoin())) - return new ErrorBox("SIG Error","You cannot unjoin this SIG.","top"); + if (!(comm.canUnjoin())) + return new ErrorBox("Community Error","You cannot unjoin this community.","top"); // OK, let's test for a confirmation... if (ConfirmBox.isConfirmed(request,UNJOIN_CONFIRM_ATTR,UNJOIN_CONFIRM_PARAM)) { // OK, if you say so, let's unjoin! try { // do the unjoin now... - sig.unjoin(); + comm.unjoin(); } // end try catch (AccessError ae) { // access error - return new ErrorBox("Access Error","Unable to unjoin SIG: " + ae.getMessage(),"top"); + return new ErrorBox("Access Error","Unable to unjoin community: " + ae.getMessage(),"top"); } // end catch catch (DataException de) { // data exception doing something - return new ErrorBox("Database Error","Database error unjoining SIG: " + de.getMessage(),"top"); + return new ErrorBox("Database Error","Database error unjoining community: " + de.getMessage(),"top"); } // end catch @@ -177,21 +177,21 @@ public class SIGOperations extends VeniceServlet } // end if else { // not a proper confirmation - display the confirm box - String message = "Are you sure you want to unjoin the '" + sig.getName() + "' SIG?"; - return new ConfirmBox(request,UNJOIN_CONFIRM_ATTR,UNJOIN_CONFIRM_PARAM,"Unjoining SIG", - message,"sigops?cmd=U&sig=" + sig.getSIGID(),"sig/" + sig.getAlias()); + String message = "Are you sure you want to unjoin the '" + comm.getName() + "' community?"; + return new ConfirmBox(request,UNJOIN_CONFIRM_ATTR,UNJOIN_CONFIRM_PARAM,"Unjoining community", + message,"sigops?cmd=U&sig=" + comm.getCommunityID(),"sig/" + comm.getAlias()); } // end else } // end if ("U" command) if (cmd.equals("C")) - { // "C" - Create SIG (no parameters) - if (!(user.canCreateSIG())) - return new ErrorBox("SIG Error","You are not permitted to create SIGs.","top"); + { // "C" - Create community (no parameters) + if (!(user.canCreateCommunity())) + return new ErrorBox("Community Error","You are not permitted to create communities.","top"); - // present the "Create New SIG" dialog - CreateSIGDialog dlg = makeCreateSIGDialog(); + // present the "Create New Community" dialog + CreateCommunityDialog dlg = makeCreateCommunityDialog(); dlg.setupDialog(engine); dlg.setFieldValue("language","en-US"); dlg.setFieldValue("country","US"); @@ -201,21 +201,21 @@ public class SIGOperations extends VeniceServlet } // end if ("C" command) if (cmd.equals("I")) - { // "I" - Send Invitation (requires SIG parameter) - SIGContext sig = getSIGParameter(request,user,true,"top"); + { // "I" - Send Invitation (requires community parameter) + CommunityContext comm = getCommunityParameter(request,user,true,"top"); - if (!(sig.canSendInvitation())) - return new ErrorBox("SIG Error","You are not permitted to send an invitation.", - "sig/" + sig.getAlias()); + if (!(comm.canSendInvitation())) + return new ErrorBox("Community Error","You are not permitted to send an invitation.", + "sig/" + comm.getAlias()); // present the "Invitation" dialog - return new Invitation(sig); + return new Invitation(comm); } // end if ("I" command) // this is an error! - logger.error("invalid command to SIGOperations.doGet: " + cmd); - return new ErrorBox("Internal Error","Invalid command to SIGOperations.doGet","top"); + logger.error("invalid command to CommunityOperations.doGet: " + cmd); + return new ErrorBox("Internal Error","Invalid command to CommunityOperations.doGet","top"); } // end doVeniceGet @@ -228,45 +228,45 @@ public class SIGOperations extends VeniceServlet setMyLocation(request,"sigops?cmd=" + cmd); if (cmd.equals("J")) - { // "J" = Join SIG (requires SIG parameter) - SIGContext sig = getSIGParameter(request,user,true,"top"); + { // "J" = Join Community (requires community parameter) + CommunityContext comm = getCommunityParameter(request,user,true,"top"); JoinKeyDialog dlg = makeJoinKeyDialog(); - if (dlg.isButtonClicked(request,"cancel")) // cancel - go back to SIG opening page - throw new RedirectResult("sig/" + sig.getAlias()); + if (dlg.isButtonClicked(request,"cancel")) // cancel - go back to community opening page + throw new RedirectResult("sig/" + comm.getAlias()); - if (!(sig.canJoin())) // not permitted to join! - return new ErrorBox("SIG Error","You are not permitted to join this SIG.","top"); + if (!(comm.canJoin())) // not permitted to join! + return new ErrorBox("Community Error","You are not permitted to join this community.","top"); if (dlg.isButtonClicked(request,"join")) - { // OK, go join the SIG + { // OK, go join the community dlg.loadValues(request); // load the dialog try - { // attempt to join the SIG! - dlg.doDialog(sig); + { // attempt to join the community! + dlg.doDialog(comm); // success! display the "welcome" page clearMenu(request); // force the clear to regen the menus - changeMenuSIG(request,sig); - return new SIGWelcome(sig); + changeMenuCommunity(request,comm); + return new CommunityWelcome(comm); } // end try catch (ValidationException ve) { // here, a validation exception causes us to recycle and retry dlg.resetOnError(ve.getMessage() + " Please try again."); - changeMenuSIG(request,sig); + changeMenuCommunity(request,comm); } // end catch catch (AccessError ae) { // this is probably a bogus key - let them retry dlg.resetOnError(ae.getMessage() + " Please try again."); - changeMenuSIG(request,sig); + changeMenuCommunity(request,comm); } // end catch catch (DataException de) { // database error joining something - return new ErrorBox("Database Error","Database error joining SIG: " + de.getMessage(),"top"); + return new ErrorBox("Database Error","Database error joining community: " + de.getMessage(),"top"); } // end catch @@ -275,34 +275,34 @@ public class SIGOperations extends VeniceServlet } // end if ("join" clicked) // error - don't know what button was clicked - logger.error("no known button click on SIGOperations.doPost, cmd=J"); + logger.error("no known button click on CommunityOperations.doPost, cmd=J"); return new ErrorBox("Internal Error","Unknown command button pressed","top"); } // end if ("J" command) if (cmd.equals("C")) - { // "C" = Create New SIG - if (!(user.canCreateSIG())) - return new ErrorBox("SIG Error","You are not permitted to create SIGs.","top"); + { // "C" = Create New Community + if (!(user.canCreateCommunity())) + return new ErrorBox("Community Error","You are not permitted to create communities.","top"); - // load the "Create SIG" dialog - CreateSIGDialog dlg = makeCreateSIGDialog(); + // load the "Create Communities" dialog + CreateCommunityDialog dlg = makeCreateCommunityDialog(); dlg.setupDialog(engine); if (dlg.isButtonClicked(request,"cancel")) // cancel - go back to top throw new RedirectResult("top"); if (dlg.isButtonClicked(request,"create")) - { // OK, they actually want to create the new SIG... + { // OK, they actually want to create the new community... dlg.loadValues(request); // load the form data try - { // attempt to create the SIG! - SIGContext sig = dlg.doDialog(user); + { // attempt to create the community! + CommunityContext comm = dlg.doDialog(user); - // created successfully - display a "new SIG welcome" page - changeMenuSIG(request,sig); // display menus for the first time! - return new NewSIGWelcome(sig); + // created successfully - display a "new community welcome" page + changeMenuCommunity(request,comm); // display menus for the first time! + return new NewCommunityWelcome(comm); } // end try catch (ValidationException ve) @@ -319,7 +319,7 @@ public class SIGOperations extends VeniceServlet } // end catch catch (DataException de) { // database error doing something - return new ErrorBox("Database Error","Database error creating SIG: " + de.getMessage(),"top"); + return new ErrorBox("Database Error","Database error creating community: " + de.getMessage(),"top"); } // end catch @@ -328,24 +328,24 @@ public class SIGOperations extends VeniceServlet } // end if ("create" pressed) // error - don't know what button was clicked - logger.error("no known button click on SIGOperations.doPost, cmd=C"); + logger.error("no known button click on CommunityOperations.doPost, cmd=C"); return new ErrorBox("Internal Error","Unknown command button pressed","top"); } // end if ("C" command) if (cmd.equals("I")) - { // "I" = Send invitation (requires SIG parameter) - SIGContext sig = getSIGParameter(request,user,true,"top"); - String on_error = "sig/" + sig.getAlias(); + { // "I" = Send invitation (requires community parameter) + CommunityContext comm = getCommunityParameter(request,user,true,"top"); + String on_error = "sig/" + comm.getAlias(); - if (isImageButtonClicked(request,"cancel")) // cancel - go back to SIG opening page + if (isImageButtonClicked(request,"cancel")) // cancel - go back to community opening page throw new RedirectResult(on_error); if (isImageButtonClicked(request,"send")) { // the "send" button was pressed try { // send out the invitation - sig.sendInvitation(request.getParameter("addr"),request.getParameter("pb")); + comm.sendInvitation(request.getParameter("addr"),request.getParameter("pb")); } // end try catch (AccessError ae) @@ -355,7 +355,8 @@ public class SIGOperations extends VeniceServlet } // end catch catch (DataException de) { // database error doing something - return new ErrorBox("Database Error","Database error creating SIG: " + de.getMessage(),on_error); + return new ErrorBox("Database Error","Database error sending invitation: " + de.getMessage(), + on_error); } // end catch catch (EmailException ee) @@ -364,21 +365,21 @@ public class SIGOperations extends VeniceServlet } // end catch - // all sent - go back to SIG profile display + // all sent - go back to community profile display throw new RedirectResult(on_error); } // end if ("send" pressed) // error - don't know what button was clicked - logger.error("no known button click on SIGOperations.doPost, cmd=I"); + logger.error("no known button click on CommunityOperations.doPost, cmd=I"); return new ErrorBox("Internal Error","Unknown command button pressed",on_error); } // end if ("I" command) // this is an error! - logger.error("invalid command to SIGOperations.doPost: " + cmd); - return new ErrorBox("Internal Error","Invalid command to SIGOperations.doPost","top"); + logger.error("invalid command to CommunityOperations.doPost: " + cmd); + return new ErrorBox("Internal Error","Invalid command to CommunityOperations.doPost","top"); } // end doVenicePost -} // end class SIGOperations +} // end class CommunityOperations diff --git a/src/com/silverwrist/venice/servlets/SIGProfile.java b/src/com/silverwrist/venice/servlets/CommunityProfile.java similarity index 81% rename from src/com/silverwrist/venice/servlets/SIGProfile.java rename to src/com/silverwrist/venice/servlets/CommunityProfile.java index e25083d..13be3f3 100644 --- a/src/com/silverwrist/venice/servlets/SIGProfile.java +++ b/src/com/silverwrist/venice/servlets/CommunityProfile.java @@ -23,7 +23,7 @@ import javax.servlet.http.*; import com.silverwrist.venice.core.*; import com.silverwrist.venice.servlets.format.*; -public class SIGProfile extends VeniceServlet +public class CommunityProfile extends VeniceServlet { /*-------------------------------------------------------------------------------- * Overrides from class HttpServlet @@ -32,7 +32,7 @@ public class SIGProfile extends VeniceServlet public String getServletInfo() { - String rc = "SIGProfile servlet - Displays the profile of a SIG\n" + String rc = "CommunityProfile servlet - Displays the profile of a community\n" + "Part of the Venice Web Communities System\n"; return rc; @@ -47,22 +47,22 @@ public class SIGProfile extends VeniceServlet UserContext user, RenderData rdat) throws ServletException, IOException, VeniceServletResult { - // get the SIG - SIGContext sig = getSIGParameter(request,user,true,"top"); - setMyLocation(request,"sigprofile?sig=" + sig.getSIGID()); + // get the community + CommunityContext comm = getCommunityParameter(request,user,true,"top"); + setMyLocation(request,"sigprofile?sig=" + comm.getCommunityID()); try { // create the profile display - changeMenuSIG(request,sig); - return new SIGProfileData(engine,user,sig); + changeMenuCommunity(request,comm); + return new CommunityProfileData(engine,user,comm); } // end try catch (DataException de) { // in this case, we had database trouble - return new ErrorBox("Database Error","Database error accessing SIG: " + de.getMessage(),"top"); + return new ErrorBox("Database Error","Database error accessing community: " + de.getMessage(),"top"); } // end catch } // end doVeniceGet -} // end class SIGProfile +} // end class CommunityProfile diff --git a/src/com/silverwrist/venice/servlets/ConfDisplay.java b/src/com/silverwrist/venice/servlets/ConfDisplay.java index c50a68c..d9449c4 100644 --- a/src/com/silverwrist/venice/servlets/ConfDisplay.java +++ b/src/com/silverwrist/venice/servlets/ConfDisplay.java @@ -340,12 +340,12 @@ public class ConfDisplay extends VeniceServlet UserContext user, RenderData rdat) throws ServletException, IOException, VeniceServletResult { - // get the SIG - SIGContext sig = getSIGParameter(request,user,true,"top"); - changeMenuSIG(request,sig); + // get the community + CommunityContext comm = getCommunityParameter(request,user,true,"top"); + changeMenuCommunity(request,comm); // get the conference - ConferenceContext conf = getConferenceParameter(request,sig,true,"top"); + ConferenceContext conf = getConferenceParameter(request,comm,true,"top"); // get the topic, if we have it TopicContext topic = getTopicParameter(request,conf,false,"top"); @@ -354,7 +354,7 @@ public class ConfDisplay extends VeniceServlet { // we're handling messages within a single topic if (logger.isDebugEnabled()) logger.debug("MODE: display messages in topic"); - String on_error = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); + String on_error = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID(); setMyLocation(request,on_error + "&topic=" + topic.getTopicNumber()); // if this request is restoring the number of unread posts in another topic, try to do so @@ -369,7 +369,7 @@ public class ConfDisplay extends VeniceServlet TopicPosts tpos = null; try { // create the display - tpos = new TopicPosts(request,engine,sig,conf,topic,piv.getFirst(),piv.getLast(),read_new,show_adv); + tpos = new TopicPosts(request,engine,comm,conf,topic,piv.getFirst(),piv.getLast(),read_new,show_adv); } // end try catch (DataException de) @@ -390,8 +390,8 @@ public class ConfDisplay extends VeniceServlet { // we're displaying the conference's topic list if (logger.isDebugEnabled()) logger.debug("MODE: display topics in conference"); - String on_error = "confops?sig=" + sig.getSIGID(); - String my_location = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); + String on_error = "confops?sig=" + comm.getCommunityID(); + String my_location = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID(); boolean read_new = !(StringUtil.isStringEmpty(request.getParameter("rnm"))); if (read_new) my_location += "&rn=1"; @@ -426,14 +426,14 @@ public class ConfDisplay extends VeniceServlet } // end while if (topic==null) // no suitable topic found - just create the topic listing - return new TopicListing(request,sig,conf,opts.getViewOption(conf.getConfID()), + return new TopicListing(request,comm,conf,opts.getViewOption(conf.getConfID()), opts.getSortOption(conf.getConfID())); // determine what the post interval is we want to display PostInterval piv = getInterval(engine,request,topic,on_error); // create the topic posts view - return new TopicPosts(request,engine,sig,conf,topic,piv.getFirst(),piv.getLast(),true,false); + return new TopicPosts(request,engine,comm,conf,topic,piv.getFirst(),piv.getLast(),true,false); } // end try catch (DataException de) @@ -452,8 +452,8 @@ public class ConfDisplay extends VeniceServlet { // topic listing only... TopicListing tl = null; try - { // create the topic lict - tl = new TopicListing(request,sig,conf,opts.getViewOption(conf.getConfID()), + { // create the topic list + tl = new TopicListing(request,comm,conf,opts.getViewOption(conf.getConfID()), opts.getSortOption(conf.getConfID())); } // end try diff --git a/src/com/silverwrist/venice/servlets/ConfOperations.java b/src/com/silverwrist/venice/servlets/ConfOperations.java index b2402c9..5a4f7b8 100644 --- a/src/com/silverwrist/venice/servlets/ConfOperations.java +++ b/src/com/silverwrist/venice/servlets/ConfOperations.java @@ -166,31 +166,31 @@ public class ConfOperations extends VeniceServlet * SH = Hide/show conference from sequence manager menu * SS = Change conference sequence from sequence manager menu * T = Create topic (requires conference parameter) - * Other = Display list of conferences in SIG + * Other = Display list of conferences in community */ protected VeniceContent doVeniceGet(HttpServletRequest request, VeniceEngine engine, UserContext user, RenderData rdat) throws ServletException, IOException, VeniceServletResult { - // get the SIG - SIGContext sig = getSIGParameter(request,user,true,"top"); - changeMenuSIG(request,sig); - String on_error = "confops?sig=" + sig.getSIGID(); + // get the community + CommunityContext comm = getCommunityParameter(request,user,true,"top"); + changeMenuCommunity(request,comm); + String on_error = "confops?sig=" + comm.getCommunityID(); // get the command we want to use String cmd = getStandardCommandParam(request); if (cmd.equals("S")) { // "S" = Manage conferences sequence - if (!(sig.canManageConferences())) - return new ErrorBox("Access Error","You are not permitted to manage conferences in this SIG.", + if (!(comm.canManageConferences())) + return new ErrorBox("Access Error","You are not permitted to manage conferences in this community.", on_error); try { // display the Conference Sequence screen - setMyLocation(request,"confops?cmd=S&sig=" + sig.getSIGID()); - return new ConferenceSequence(sig); + setMyLocation(request,"confops?cmd=S&sig=" + comm.getCommunityID()); + return new ConferenceSequence(comm); } // end try catch (DataException de) @@ -209,12 +209,12 @@ public class ConfOperations extends VeniceServlet if (cmd.equals("SH")) { // "SH" = Hide/show conference (requires conference parameter) - if (!(sig.canManageConferences())) - return new ErrorBox("Access Error","You are not permitted to manage conferences in this SIG.", + if (!(comm.canManageConferences())) + return new ErrorBox("Access Error","You are not permitted to manage conferences in this community.", on_error); - ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); - on_error = "confops?sig=" + sig.getSIGID() + "&cmd=S"; + ConferenceContext conf = getConferenceParameter(request,comm,true,on_error); + on_error = "confops?sig=" + comm.getCommunityID() + "&cmd=S"; if (!(conf.canChangeConference())) return new ErrorBox("Access Error","You do not have permission to modify this conference.",on_error); @@ -244,15 +244,15 @@ public class ConfOperations extends VeniceServlet if (cmd.equals("SS")) { // "SS" = Change conference sequence (requires conference parameter) - if (!(sig.canManageConferences())) - return new ErrorBox("Access Error","You are not permitted to manage conferences in this SIG.", + if (!(comm.canManageConferences())) + return new ErrorBox("Access Error","You are not permitted to manage conferences in this community.", on_error); - ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); - on_error = "confops?sig=" + sig.getSIGID() + "&cmd=S"; + ConferenceContext conf = getConferenceParameter(request,comm,true,on_error); + on_error = "confops?sig=" + comm.getCommunityID() + "&cmd=S"; // we need a second conference parameter to exchange with - ConferenceContext other_conf = getConferenceParameter(request.getParameter("oc"),sig,true,on_error); + ConferenceContext other_conf = getConferenceParameter(request.getParameter("oc"),comm,true,on_error); if (!(conf.canChangeConference()) || !(other_conf.canChangeConference())) return new ErrorBox("Access Error","You do not have permission to modify this conference.",on_error); @@ -297,12 +297,12 @@ public class ConfOperations extends VeniceServlet if (cmd.equals("SDEL")) { // "SDEL" = Delete conference (requires conference parameter) - if (!(sig.canManageConferences())) - return new ErrorBox("Access Error","You are not permitted to manage conferences in this SIG.", + if (!(comm.canManageConferences())) + return new ErrorBox("Access Error","You are not permitted to manage conferences in this community.", on_error); - ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); - on_error = "confops?sig=" + sig.getSIGID() + "&cmd=S"; + ConferenceContext conf = getConferenceParameter(request,comm,true,on_error); + on_error = "confops?sig=" + comm.getCommunityID() + "&cmd=S"; if (!(conf.canDeleteConference())) return new ErrorBox("Access Error","You do not have permission to delete this conference.",on_error); @@ -335,7 +335,7 @@ public class ConfOperations extends VeniceServlet String message = "You are about to permanently delete the \"" + conf.getName() + "\" conference! " + "Are you sure you want to do this?"; return new ConfirmBox(request,DELETE_CONFIRM_ATTR,DELETE_CONFIRM_PARAM,"Delete Conference",message, - "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=SDEL", + "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=SDEL", on_error); } // end else @@ -344,13 +344,13 @@ public class ConfOperations extends VeniceServlet if (cmd.equals("C")) { // "C" = "Create conference" - if (!(sig.canCreateConference())) - return new ErrorBox("Access Error","You are not permitted to create conferences in this SIG.", + if (!(comm.canCreateConference())) + return new ErrorBox("Access Error","You are not permitted to create conferences in this community.", on_error); // make the "create" dialog CreateConferenceDialog dlg = makeCreateConferenceDialog(); - dlg.setupDialog(engine,sig); + dlg.setupDialog(engine,comm); setMyLocation(request,on_error + "&cmd=C"); return dlg; @@ -358,32 +358,32 @@ public class ConfOperations extends VeniceServlet if (cmd.equals("T")) { // "T" = "Create topic" (requires conference parameter) - ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); - on_error = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); + ConferenceContext conf = getConferenceParameter(request,comm,true,on_error); + on_error = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID(); // Create the new topic form. - NewTopicForm ntf = new NewTopicForm(sig,conf); + NewTopicForm ntf = new NewTopicForm(comm,conf); ntf.setupNewRequest(); - setMyLocation(request,"confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=T"); + setMyLocation(request,"confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=T"); return ntf; } // end if ("T" command) if (cmd.equals("Q")) { // "Q" = display Manage menu (requires conference parameter) - ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); - on_error = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); + ConferenceContext conf = getConferenceParameter(request,comm,true,on_error); + on_error = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID(); // display the "Manage Conference" display - setMyLocation(request,"confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"); - return new ManageConference(sig,conf); + setMyLocation(request,"confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=Q"); + return new ManageConference(comm,conf); } // end if ("Q" command) if (cmd.equals("FX")) { // "FX" = the dreaded fixseen :-) - catches up the entire conference - ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); - on_error = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); + ConferenceContext conf = getConferenceParameter(request,comm,true,on_error); + on_error = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID(); try { // do the fixseen operation @@ -408,8 +408,8 @@ public class ConfOperations extends VeniceServlet if (cmd.equals("E")) { // "E" = "Edit Conference Settings" (requires conference parameter) - ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); - on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"; + ConferenceContext conf = getConferenceParameter(request,comm,true,on_error); + on_error = "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=Q"; if (!(conf.canChangeConference())) return new ErrorBox("Access Error","You are not permitted to change this conference's settings.", @@ -419,8 +419,8 @@ public class ConfOperations extends VeniceServlet EditConferenceDialog dlg = makeEditConferenceDialog(); try { // set up and return the dialog - dlg.setupDialog(sig,conf); - setMyLocation(request,"confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=E"); + dlg.setupDialog(comm,conf); + setMyLocation(request,"confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=E"); return dlg; } // end try @@ -440,8 +440,8 @@ public class ConfOperations extends VeniceServlet if (cmd.equals("A")) { // "A" = "Manage Aliases" (requires conference parameter) - ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); - on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"; + ConferenceContext conf = getConferenceParameter(request,comm,true,on_error); + on_error = "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=Q"; if (!(conf.canChangeConference())) return new ErrorBox("Access Error","You are not permitted to change this conference's aliases.", @@ -473,8 +473,8 @@ public class ConfOperations extends VeniceServlet // display the "Manage Conference Aliases" display try { // generate the display box - setMyLocation(request,"confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=A"); - return new ManageConferenceAliases(sig,conf); + setMyLocation(request,"confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=A"); + return new ManageConferenceAliases(comm,conf); } // end try catch (DataException de) @@ -488,13 +488,13 @@ public class ConfOperations extends VeniceServlet if (cmd.equals("QR")) { // "QR" = "Reports Menu" (requires conference parameter) - ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); - on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"; + ConferenceContext conf = getConferenceParameter(request,comm,true,on_error); + on_error = "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=Q"; try { // display the "Conference Reports" display - setMyLocation(request,"confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=QR"); - return new ReportConferenceMenu(sig,conf); + setMyLocation(request,"confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=QR"); + return new ReportConferenceMenu(comm,conf); } // end try catch (DataException de) @@ -512,17 +512,17 @@ public class ConfOperations extends VeniceServlet if (cmd.equals("RP") || cmd.equals("RR")) { // "RP" = "Report Posters," "RR" = "Report Readers" (requires conference parameter, optional topic) - ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); + ConferenceContext conf = getConferenceParameter(request,comm,true,on_error); TopicContext topic = getTopicParameter(request,conf,false,on_error); - on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=QR"; + on_error = "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=QR"; try { // generate the listing on this page - String my_loc = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); + String my_loc = "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID(); if (topic!=null) my_loc += ("&top=" + topic.getTopicNumber()); setMyLocation(request,my_loc + "&cmd=" + cmd); - return new ConferenceActivity(sig,conf,topic,cmd.equals("RP")); + return new ConferenceActivity(comm,conf,topic,cmd.equals("RP")); } // end try catch (DataException de) @@ -541,14 +541,14 @@ public class ConfOperations extends VeniceServlet if (cmd.equals("M")) { // "M" - Manage Conference Membership (requires conference parameter) - ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); - on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"; + ConferenceContext conf = getConferenceParameter(request,comm,true,on_error); + on_error = "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=Q"; try { // display the conference member list! - ConferenceMembership m = new ConferenceMembership(engine,sig,conf); + ConferenceMembership m = new ConferenceMembership(engine,comm,conf); m.doConferenceMemberList(); - setMyLocation(request,"confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=M"); + setMyLocation(request,"confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=M"); return m; } // end try @@ -568,8 +568,8 @@ public class ConfOperations extends VeniceServlet if (cmd.equals("H")) { // "H" = "Add Conference To Hotlist" (requires conference parameter) - ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); - on_error = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); + ConferenceContext conf = getConferenceParameter(request,comm,true,on_error); + on_error = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID(); try { // add to the hotlist @@ -590,8 +590,8 @@ public class ConfOperations extends VeniceServlet if (cmd.equals("DEL")) { // "DEL" = "Delete Conference (requires conference parameter) - ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); - on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"; + ConferenceContext conf = getConferenceParameter(request,comm,true,on_error); + on_error = "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=Q"; if (!(conf.canDeleteConference())) return new ErrorBox("Access Error","You do not have permission to delete this conference.",on_error); @@ -616,7 +616,7 @@ public class ConfOperations extends VeniceServlet } // end catch // that's it - trap back to the main conference list - throw new RedirectResult("confops?sig=" + sig.getSIGID()); + throw new RedirectResult("confops?sig=" + comm.getCommunityID()); } // end if else @@ -624,7 +624,7 @@ public class ConfOperations extends VeniceServlet String message = "You are about to permanently delete the \"" + conf.getName() + "\" conference! " + "Are you sure you want to do this?"; return new ConfirmBox(request,DELETE_CONFIRM_ATTR,DELETE_CONFIRM_PARAM,"Delete Conference",message, - "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=DEL", + "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=DEL", on_error); } // end else @@ -632,11 +632,11 @@ public class ConfOperations extends VeniceServlet } // end if ("DEL" command) // Any unrecognized command shows us the conference list. - on_error = "sigprofile?sig=" + sig.getSIGID(); + on_error = "sigprofile?sig=" + comm.getCommunityID(); try { // make a conference listing - setMyLocation(request,"confops?sig=" + sig.getSIGID()); - return new ConferenceListing(sig); + setMyLocation(request,"confops?sig=" + comm.getCommunityID()); + return new ConferenceListing(comm); } // end try catch (DataException de) @@ -656,23 +656,23 @@ public class ConfOperations extends VeniceServlet UserContext user, RenderData rdat) throws ServletException, IOException, VeniceServletResult { - // get the SIG - SIGContext sig = getSIGParameter(request,user,true,"top"); - changeMenuSIG(request,sig); - String on_error = "confops?sig=" + sig.getSIGID(); + // get the community + CommunityContext comm = getCommunityParameter(request,user,true,"top"); + changeMenuCommunity(request,comm); + String on_error = "confops?sig=" + comm.getCommunityID(); // get the command we want to use String cmd = getStandardCommandParam(request); if (cmd.equals("C")) { // "C" = "Create Conference" - if (!(sig.canCreateConference())) - return new ErrorBox("Access Error","You are not permitted to create conferences in this SIG.", + if (!(comm.canCreateConference())) + return new ErrorBox("Access Error","You are not permitted to create conferences in this community.", on_error); // load up the create conference dialog! CreateConferenceDialog dlg = makeCreateConferenceDialog(); - dlg.setupDialog(engine,sig); + dlg.setupDialog(engine,comm); if (dlg.isButtonClicked(request,"cancel")) throw new RedirectResult(on_error); // they chickened out - go back to the conference list @@ -683,10 +683,10 @@ public class ConfOperations extends VeniceServlet try { // attempt to create the conference! - ConferenceContext conf = dlg.doDialog(sig); + ConferenceContext conf = dlg.doDialog(comm); // success! redirect to the conference's topic list - throw new RedirectResult("confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID()); + throw new RedirectResult("confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID()); } // end try catch (ValidationException ve) @@ -719,8 +719,8 @@ public class ConfOperations extends VeniceServlet if (cmd.equals("T")) { // "T" command = Create New Topic (requires conference parameter) - ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); - on_error = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); + ConferenceContext conf = getConferenceParameter(request,comm,true,on_error); + on_error = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID(); // determine what to do based on the button pressed if (isImageButtonClicked(request,"cancel")) @@ -728,7 +728,7 @@ public class ConfOperations extends VeniceServlet if (isImageButtonClicked(request,"preview")) { // generate a preview and redisplay the form - NewTopicForm ntf = new NewTopicForm(sig,conf); + NewTopicForm ntf = new NewTopicForm(comm,conf); try { // generate a preview display @@ -747,7 +747,7 @@ public class ConfOperations extends VeniceServlet return null; // no title or text specified - "204 No Content" -- end removed code */ - setMyLocation(request,"confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=T"); + setMyLocation(request,"confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=T"); return ntf; } // end if ("preview" clicked) @@ -766,7 +766,7 @@ public class ConfOperations extends VeniceServlet if (yes.equals(request.getParameter("attach"))) { // we need to upload an attachment for this post setMyLocation(request,on_error); - return new AttachmentForm(sig,conf,topic.getMessage(0),on_error); + return new AttachmentForm(comm,conf,topic.getMessage(0),on_error); } // end if @@ -795,8 +795,8 @@ public class ConfOperations extends VeniceServlet if (cmd.equals("P")) { // "P" = Set default pseud (requires conference parameter) - ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); - on_error = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); + ConferenceContext conf = getConferenceParameter(request,comm,true,on_error); + on_error = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID(); try { // go set the pseud! @@ -817,8 +817,8 @@ public class ConfOperations extends VeniceServlet if (cmd.equals("E")) { // "E" = "Edit Conference Settings" (requires conference parameter) - ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); - on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"; + ConferenceContext conf = getConferenceParameter(request,comm,true,on_error); + on_error = "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=Q"; if (!(conf.canChangeConference())) return new ErrorBox("Access Error","You are not permitted to change this conference's settings.", @@ -844,7 +844,7 @@ public class ConfOperations extends VeniceServlet } // end try catch (ValidationException ve) { // validation error - throw it back to the user - dlg.resetOnError(sig,conf,ve.getMessage() + " Please try again."); + dlg.resetOnError(comm,conf,ve.getMessage() + " Please try again."); } // end catch catch (AccessError ae) @@ -859,7 +859,7 @@ public class ConfOperations extends VeniceServlet } // end catch - setMyLocation(request,"confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=E"); + setMyLocation(request,"confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=E"); return dlg; // redisplay the dialog } // end if @@ -868,8 +868,8 @@ public class ConfOperations extends VeniceServlet if (cmd.equals("A")) { // "A" = "Add Alias" (requires conference parameter) - ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); - on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"; + ConferenceContext conf = getConferenceParameter(request,comm,true,on_error); + on_error = "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=Q"; if (!(conf.canChangeConference())) return new ErrorBox("Access Error","You are not permitted to change this conference's settings.", @@ -879,7 +879,7 @@ public class ConfOperations extends VeniceServlet if (StringUtil.isStringEmpty(new_alias)) return null; // this is a no-op - on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=A"; + on_error = "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=A"; String error_message = null; if (IDUtils.isValidVeniceID(new_alias)) @@ -909,13 +909,13 @@ public class ConfOperations extends VeniceServlet try { // generate the display box setMyLocation(request,on_error); - return new ManageConferenceAliases(sig,conf); + return new ManageConferenceAliases(comm,conf); } // end try catch (DataException de) { // error generating the display box return new ErrorBox("Database Error","Database error displaying aliases: " + de.getMessage(), - "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"); + "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=Q"); } // end catch @@ -923,8 +923,8 @@ public class ConfOperations extends VeniceServlet if (cmd.equals("M")) { // "M" - Manage Conference Membership (requires conference parameter) - ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); - on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=M"; + ConferenceContext conf = getConferenceParameter(request,comm,true,on_error); + on_error = "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=M"; if (isImageButtonClicked(request,"update")) { // the "update" command that changes all the security levels @@ -1004,7 +1004,7 @@ public class ConfOperations extends VeniceServlet if ( isImageButtonClicked(request,"search") || isImageButtonClicked(request,"previous") || isImageButtonClicked(request,"next")) { // create the new dialog box - ConferenceMembership m = new ConferenceMembership(engine,sig,conf); + ConferenceMembership m = new ConferenceMembership(engine,comm,conf); try { // perform the search! diff --git a/src/com/silverwrist/venice/servlets/Find.java b/src/com/silverwrist/venice/servlets/Find.java index 60f6aff..0013183 100644 --- a/src/com/silverwrist/venice/servlets/Find.java +++ b/src/com/silverwrist/venice/servlets/Find.java @@ -126,7 +126,7 @@ public class Find extends VeniceServlet // figure out the category ID parameter int cat = -1; - if (disp==FindData.FD_SIGS) + if (disp==FindData.FD_COMMUNITIES) cat = getCategoryParam(engine,request); try diff --git a/src/com/silverwrist/venice/servlets/PostMessage.java b/src/com/silverwrist/venice/servlets/PostMessage.java index 7806dc9..f54bcb1 100644 --- a/src/com/silverwrist/venice/servlets/PostMessage.java +++ b/src/com/silverwrist/venice/servlets/PostMessage.java @@ -81,17 +81,17 @@ public class PostMessage extends VeniceServlet UserContext user, RenderData rdat) throws ServletException, IOException, VeniceServletResult { - // get the SIG - SIGContext sig = getSIGParameter(request,user,true,"top"); - changeMenuSIG(request,sig); + // get the community + CommunityContext comm = getCommunityParameter(request,user,true,"top"); + changeMenuCommunity(request,comm); // get the conference - ConferenceContext conf = getConferenceParameter(request,sig,true,"top"); + ConferenceContext conf = getConferenceParameter(request,comm,true,"top"); // get the topic TopicContext topic = getTopicParameter(request,conf,true,"top"); - String on_error = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&top=" + String on_error = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&top=" + topic.getTopicNumber(); if (isImageButtonClicked(request,"cancel")) @@ -110,7 +110,7 @@ public class PostMessage extends VeniceServlet final String yes = "Y"; if (isImageButtonClicked(request,"preview")) // generate a preview - return new PostPreview(engine,sig,conf,topic,request.getParameter("pseud"),raw_postdata, + return new PostPreview(engine,comm,conf,topic,request.getParameter("pseud"),raw_postdata, request.getParameter("next"),getPostNumber(request,on_error), yes.equals(request.getParameter("attach")), yes.equals(request.getParameter("slip"))); @@ -125,7 +125,7 @@ public class PostMessage extends VeniceServlet try { // first check for slippage if (pn!=topic.getTotalMessages()) // slippage detected! display the slippage screen - return new PostSlippage(engine,sig,conf,topic,pn,request.getParameter("next"), + return new PostSlippage(engine,comm,conf,topic,pn,request.getParameter("next"), request.getParameter("pseud"),raw_postdata, yes.equals(request.getParameter("attach"))); @@ -138,7 +138,7 @@ public class PostMessage extends VeniceServlet // where do we want to go now? String target; if (go_topics) - target = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); + target = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID(); else { // figure out what topic to go to next short next; @@ -163,13 +163,13 @@ public class PostMessage extends VeniceServlet } // end catch - target = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&top=" + target = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&top=" + next + "&rnm=1"; } // end else if (yes.equals(request.getParameter("attach"))) - return new AttachmentForm(sig,conf,msg,target); // go to upload an attachment + return new AttachmentForm(comm,conf,msg,target); // go to upload an attachment // no attachment - redirect where we need to go throw new RedirectResult(target); diff --git a/src/com/silverwrist/venice/servlets/PostOperations.java b/src/com/silverwrist/venice/servlets/PostOperations.java index 5a2aba0..f6d6a44 100644 --- a/src/com/silverwrist/venice/servlets/PostOperations.java +++ b/src/com/silverwrist/venice/servlets/PostOperations.java @@ -61,14 +61,14 @@ public class PostOperations extends VeniceServlet UserContext user, RenderData rdat) throws ServletException, IOException, VeniceServletResult { - // get the SIG - SIGContext sig = getSIGParameter(request,user,true,"top"); - changeMenuSIG(request,sig); - String locator = "sig=" + sig.getSIGID(); + // get the community + CommunityContext comm = getCommunityParameter(request,user,true,"top"); + changeMenuCommunity(request,comm); + String locator = "sig=" + comm.getCommunityID(); String location = "sigprofile?" + locator; // get the conference - ConferenceContext conf = getConferenceParameter(request,sig,true,location); + ConferenceContext conf = getConferenceParameter(request,comm,true,location); locator += "&conf=" + conf.getConfID(); location = "confdisp?" + locator; diff --git a/src/com/silverwrist/venice/servlets/PostShortcut.java b/src/com/silverwrist/venice/servlets/PostShortcut.java index 7529787..a3c51d4 100644 --- a/src/com/silverwrist/venice/servlets/PostShortcut.java +++ b/src/com/silverwrist/venice/servlets/PostShortcut.java @@ -64,30 +64,30 @@ public class PostShortcut extends VeniceServlet } // end catch - if (decoder.getSIG()==null) // it must include the SIG + if (decoder.getCommunity()==null) // it must include the community return new ErrorBox("Invalid Post Link","Invalid post link \"" + raw_link - + "\": ambiguous post link (no SIG)",null); + + "\": ambiguous post link (no community)",null); - SIGContext sig; + CommunityContext comm; try - { // get the SIG represented by that alias - sig = user.getSIGContext(decoder.getSIG()); + { // get the community represented by that alias + comm = user.getCommunityContext(decoder.getCommunity()); } // end try catch (DataException e) - { // can't find the SIG - we're screwed - return new ErrorBox("Invalid Post Link","Invalid post link \"" + raw_link + "\": cannot find SIG: " + { // can't find the community - we're screwed + return new ErrorBox("Invalid Post Link","Invalid post link \"" + raw_link + "\": cannot find community: " + e.getMessage(),null); } // end catch - if (decoder.getConference()==null) // it's a SIG link only - redirect to the SIG's default page - throw new RedirectResult("sig/" + decoder.getSIG()); + if (decoder.getConference()==null) // it's a community link only - redirect to the default page + throw new RedirectResult("sig/" + decoder.getCommunity()); ConferenceContext conf; try { // get the conference represented by that alias - conf = sig.getConferenceContext(decoder.getConference()); + conf = comm.getConferenceContext(decoder.getConference()); } // end try catch (DataException e) @@ -103,7 +103,7 @@ public class PostShortcut extends VeniceServlet } // end catch // compute an elementary "locator" - String locator = "sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); + String locator = "sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID(); if (decoder.getTopic()==-1) // just a conference link - go to the top-level display throw new RedirectResult("confdisp?" + locator); diff --git a/src/com/silverwrist/venice/servlets/Settings.java b/src/com/silverwrist/venice/servlets/Settings.java index d5b6347..0efcd13 100644 --- a/src/com/silverwrist/venice/servlets/Settings.java +++ b/src/com/silverwrist/venice/servlets/Settings.java @@ -47,10 +47,10 @@ public class Settings extends VeniceServlet String foo = request.getParameter("sig"); if (foo==null) throw new ErrorBox(null,"Parameter not specified!","settings?cmd=H"); - int sigid; + int cid; try - { // this is the SIG id of the hotlist entry - sigid = Integer.parseInt(foo); + { // this is the community id of the hotlist entry + cid = Integer.parseInt(foo); } // end try catch (NumberFormatException nfe) @@ -78,7 +78,7 @@ public class Settings extends VeniceServlet { // look at the hotlist entries to find the right index ConferenceHotlistEntry hle = (ConferenceHotlistEntry)(hotlist.get(i)); if ( (hle.getConference().getConfID()==confid) - && (hle.getConference().getEnclosingSIG().getSIGID()==sigid)) + && (hle.getConference().getEnclosingCommunity().getCommunityID()==cid)) return i; } // end for @@ -220,44 +220,45 @@ public class Settings extends VeniceServlet } // end if (one of the "H" subcommands) if (cmd.equals("S")) - { // "S" - display the user's SIG list + { // "S" - display the user's community list try - { // return the SIG list viewer + { // return the community list viewer setMyLocation(request,"settings?cmd=S"); - return new UserSIGList(user); + return new UserCommunityList(user); } // end try catch (DataException de) { // oops...can't get it! - return new ErrorBox("Database Error","Error getting SIGs list: " + de.getMessage(),"top"); + return new ErrorBox("Database Error","Error getting communities list: " + de.getMessage(),"top"); } // end catch } // end if ("S" command) if (cmd.equals("SX")) - { // "SX" - unjoin the specified SIG - SIGContext sig = getSIGParameter(request,user,true,"settings?cmd=S"); + { // "SX" - unjoin the specified community + CommunityContext comm = getCommunityParameter(request,user,true,"settings?cmd=S"); - if (!(sig.canUnjoin())) - return new ErrorBox("SIG Error","You cannot unjoin this SIG.","settings?cmd=S"); + if (!(comm.canUnjoin())) + return new ErrorBox("Community Error","You cannot unjoin this community.","settings?cmd=S"); // OK, let's test for a confirmation... if (ConfirmBox.isConfirmed(request,UNJOIN_CONFIRM_ATTR,UNJOIN_CONFIRM_PARAM)) { // OK, if you say so, let's unjoin! try { // do the unjoin now... - sig.unjoin(); + comm.unjoin(); } // end try catch (AccessError ae) { // access error - return new ErrorBox("Access Error","Unable to unjoin SIG: " + ae.getMessage(),"settings?cmd=S"); + return new ErrorBox("Access Error","Unable to unjoin community: " + ae.getMessage(), + "settings?cmd=S"); } // end catch catch (DataException de) { // data exception doing something - return new ErrorBox("Database Error","Database error unjoining SIG: " + de.getMessage(), + return new ErrorBox("Database Error","Database error unjoining community: " + de.getMessage(), "settings?cmd=S"); } // end catch @@ -268,9 +269,9 @@ public class Settings extends VeniceServlet } // end if else { // not a proper confirmation - display the confirm box - String message = "Are you sure you want to unjoin the '" + sig.getName() + "' SIG?"; - return new ConfirmBox(request,UNJOIN_CONFIRM_ATTR,UNJOIN_CONFIRM_PARAM,"Unjoining SIG", - message,"settings?cmd=SX&sig=" + sig.getSIGID(),"settings?cmd=S"); + String message = "Are you sure you want to unjoin the '" + comm.getName() + "' community?"; + return new ConfirmBox(request,UNJOIN_CONFIRM_ATTR,UNJOIN_CONFIRM_PARAM,"Unjoining Community", + message,"settings?cmd=SX&sig=" + comm.getCommunityID(),"settings?cmd=S"); } // end else diff --git a/src/com/silverwrist/venice/servlets/SystemAdmin.java b/src/com/silverwrist/venice/servlets/SystemAdmin.java index 9266a87..235edfa 100644 --- a/src/com/silverwrist/venice/servlets/SystemAdmin.java +++ b/src/com/silverwrist/venice/servlets/SystemAdmin.java @@ -34,7 +34,7 @@ public class SystemAdmin extends VeniceServlet *-------------------------------------------------------------------------------- */ - private static Category logger = Category.getInstance(SIGAdmin.class.getName()); + private static Category logger = Category.getInstance(SystemAdmin.class); /*-------------------------------------------------------------------------------- * Internal functions diff --git a/src/com/silverwrist/venice/servlets/TopicOperations.java b/src/com/silverwrist/venice/servlets/TopicOperations.java index b939b09..9539b99 100644 --- a/src/com/silverwrist/venice/servlets/TopicOperations.java +++ b/src/com/silverwrist/venice/servlets/TopicOperations.java @@ -60,14 +60,14 @@ public class TopicOperations extends VeniceServlet UserContext user, RenderData rdat) throws ServletException, IOException, VeniceServletResult { - // get the SIG - SIGContext sig = getSIGParameter(request,user,true,"top"); - changeMenuSIG(request,sig); - String locator = "sig=" + sig.getSIGID(); + // get the community + CommunityContext comm = getCommunityParameter(request,user,true,"top"); + changeMenuCommunity(request,comm); + String locator = "sig=" + comm.getCommunityID(); String location = "sigprofile?" + locator; // get the conference - ConferenceContext conf = getConferenceParameter(request,sig,true,location); + ConferenceContext conf = getConferenceParameter(request,comm,true,location); locator += "&conf=" + conf.getConfID(); location = "confdisp?" + locator; @@ -150,7 +150,7 @@ public class TopicOperations extends VeniceServlet { // Delete Topic requires a confirmation! if (ConfirmBox.isConfirmed(request,DELETE_CONFIRM_ATTR,DELETE_CONFIRM_PARAM)) { // OK, go ahead, delete the topic! - location = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); + location = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID(); try { // delete the bloody topic! diff --git a/src/com/silverwrist/venice/servlets/Variables.java b/src/com/silverwrist/venice/servlets/Variables.java index 0248b88..22d1ff5 100644 --- a/src/com/silverwrist/venice/servlets/Variables.java +++ b/src/com/silverwrist/venice/servlets/Variables.java @@ -255,27 +255,27 @@ public class Variables } // end setMenuTop - public static void setMenuSIG(HttpSession session, SIGContext sig) + public static void setMenuCommunity(HttpSession session, CommunityContext comm) { Object obj = session.getAttribute(MENU_ATTRIBUTE); boolean do_change; - if ((obj==null) || !(obj instanceof MenuSIG)) + if ((obj==null) || !(obj instanceof MenuCommunity)) do_change = true; else - { // look at the actual SIGIDs underlying the MenuSIG - MenuSIG tmp = (MenuSIG)obj; - do_change = (tmp.getID()!=sig.getSIGID()); + { // look at the actual community IDs underlying the MenuCommunity + MenuCommunity tmp = (MenuCommunity)obj; + do_change = (tmp.getID()!=comm.getCommunityID()); } // end else if (do_change) - { // switch to the appropriate MenuSIG - MenuSIG ms = new MenuSIG(sig); - session.setAttribute(MENU_ATTRIBUTE,ms); + { // switch to the appropriate MenuCommunity + MenuCommunity mc = new MenuCommunity(comm); + session.setAttribute(MENU_ATTRIBUTE,mc); } // end if - } // end setMenuSIG + } // end setMenuCommunity public static void clearMenu(HttpSession session) { diff --git a/src/com/silverwrist/venice/servlets/VeniceServlet.java b/src/com/silverwrist/venice/servlets/VeniceServlet.java index fd5b9a3..b570bb5 100644 --- a/src/com/silverwrist/venice/servlets/VeniceServlet.java +++ b/src/com/silverwrist/venice/servlets/VeniceServlet.java @@ -54,57 +54,58 @@ public abstract class VeniceServlet extends HttpServlet } // end notSupported - private static final SIGContext getSIGParameter(String str, UserContext user, boolean required, - String on_error) throws ErrorBox + private static final CommunityContext getCommunityParameter(String str, UserContext user, boolean required, + String on_error) throws ErrorBox { if (StringUtil.isStringEmpty(str)) - { // there's no SIG parameter + { // there's no community parameter if (required) - { // no SIG parameter - bail out now! - logger.error("SIG parameter not specified!"); - throw new ErrorBox(null,"No SIG specified.",on_error); + { // no communty parameter - bail out now! + logger.error("community parameter not specified!"); + throw new ErrorBox(null,"No community specified.",on_error); } // end if else - { // a null SIGContext is permitted - logger.debug("no SIG specified"); + { // a null CommunityContext is permitted + logger.debug("no community specified"); return null; } // end else } // end if - SIGContext rc = null; + CommunityContext rc = null; try - { // turn the string into a SIGID, and thence to a SIGContext + { // turn the string into a community ID, and thence to a CommunityContext int tmp_id = Integer.parseInt(str); - rc = user.getSIGContext(tmp_id); + rc = user.getCommunityContext(tmp_id); if (rc==null) - { // trap any null results (may not be possible with SIGs, but you never know) - logger.error("SIG #" + tmp_id + " was not found!"); - throw new ErrorBox(null,"The specified SIG (#" + tmp_id + ") was not found in the database.",on_error); + { // trap any null results (may not be possible with communities, but you never know) + logger.error("Community #" + tmp_id + " was not found!"); + throw new ErrorBox(null,"The specified community (#" + tmp_id + ") was not found in the database.", + on_error); } // end if if (logger.isDebugEnabled()) - logger.debug("found SIG #" + rc.getSIGID()); + logger.debug("found community #" + rc.getCommunityID()); } // end try catch (NumberFormatException nfe) { // error in Integer.parseInt - logger.error("Cannot convert SIG parameter '" + str + "'!"); - throw new ErrorBox(null,"Invalid SIG parameter.",on_error); + logger.error("Cannot convert community parameter '" + str + "'!"); + throw new ErrorBox(null,"Invalid community parameter.",on_error); } // end catch catch (DataException de) - { // error looking up the SIG - throw new ErrorBox("Database Error","Database error finding SIG: " + de.getMessage(),on_error); + { // error looking up the community + throw new ErrorBox("Database Error","Database error finding community: " + de.getMessage(),on_error); } // end catch return rc; - } // end getSIGParameter + } // end getCommunityParameter private static TopicContext getTopicParameter(String str, ConferenceContext conf, boolean required, String on_error) throws ErrorBox @@ -341,11 +342,11 @@ public abstract class VeniceServlet extends HttpServlet } // end changeMenuTop - protected final void changeMenuSIG(HttpServletRequest request, SIGContext sig) + protected final void changeMenuCommunity(HttpServletRequest request, CommunityContext comm) { - Variables.setMenuSIG(request.getSession(true),sig); + Variables.setMenuCommunity(request.getSession(true),comm); - } // end changeMenuSIG + } // end changeMenuCommunity protected final void clearMenu(HttpServletRequest request) { @@ -369,24 +370,26 @@ public abstract class VeniceServlet extends HttpServlet } // end setMyLocation - protected final static SIGContext getSIGParameter(ServletRequest request, UserContext user, boolean required, - String on_error) throws ErrorBox + protected final static CommunityContext getCommunityParameter(ServletRequest request, UserContext user, + boolean required, String on_error) + throws ErrorBox { - return getSIGParameter(request.getParameter("sig"),user,required,on_error); + return getCommunityParameter(request.getParameter("sig"),user,required,on_error); - } // end getSIGParameter + } // end getCommunityParameter - protected final static SIGContext getSIGParameter(ServletMultipartHandler mphandler, UserContext user, - boolean required, String on_error) throws ErrorBox + protected final static CommunityContext getCommunityParameter(ServletMultipartHandler mphandler, + UserContext user, boolean required, + String on_error) throws ErrorBox { if (mphandler.isFileParam("sig")) - throw new ErrorBox(null,"Internal Error: SIG should be a normal param",on_error); - return getSIGParameter(mphandler.getValue("sig"),user,required,on_error); + throw new ErrorBox(null,"Internal Error: community should be a normal param",on_error); + return getCommunityParameter(mphandler.getValue("sig"),user,required,on_error); - } // end getSIGParameter + } // end getCommunityParameter - protected static ConferenceContext getConferenceParameter(String str, SIGContext sig, boolean required, - String on_error) throws ErrorBox + protected static ConferenceContext getConferenceParameter(String str, CommunityContext comm, + boolean required, String on_error) throws ErrorBox { if (StringUtil.isStringEmpty(str)) { // there's no conference parameter @@ -409,12 +412,12 @@ public abstract class VeniceServlet extends HttpServlet try { // turn the string into a ConfID, and thence to a ConferenceContext int tmp_id = Integer.parseInt(str); - rc = sig.getConferenceContext(tmp_id); + rc = comm.getConferenceContext(tmp_id); if (rc==null) { // couldn't find the conference - logger.error("SIG #" + sig.getSIGID() + " does not contain conference #" + tmp_id); - throw new ErrorBox(null,"The conference #" + tmp_id + " could not be found in the '" + sig.getName() - + "' SIG.",on_error); + logger.error("community #" + comm.getCommunityID() + " does not contain conference #" + tmp_id); + throw new ErrorBox(null,"The conference #" + tmp_id + " could not be found in the '" + comm.getName() + + "' community.",on_error); } // end if @@ -443,21 +446,21 @@ public abstract class VeniceServlet extends HttpServlet } // end getConferenceParameter - protected final static ConferenceContext getConferenceParameter(ServletRequest request, SIGContext sig, - boolean required, String on_error) - throws ErrorBox + protected final static ConferenceContext getConferenceParameter(ServletRequest request, + CommunityContext comm, boolean required, + String on_error) throws ErrorBox { - return getConferenceParameter(request.getParameter("conf"),sig,required,on_error); + return getConferenceParameter(request.getParameter("conf"),comm,required,on_error); } // end getConferenceParameter protected final static ConferenceContext getConferenceParameter(ServletMultipartHandler mphandler, - SIGContext sig, boolean required, + CommunityContext comm, boolean required, String on_error) throws ErrorBox { if (mphandler.isFileParam("conf")) throw new ErrorBox(null,"Internal Error: conference should be a normal param",on_error); - return getConferenceParameter(mphandler.getValue("conf"),sig,required,on_error); + return getConferenceParameter(mphandler.getValue("conf"),comm,required,on_error); } // end getConferenceParameter diff --git a/src/com/silverwrist/venice/servlets/format/AttachmentForm.java b/src/com/silverwrist/venice/servlets/format/AttachmentForm.java index 56d78d8..88ad534 100644 --- a/src/com/silverwrist/venice/servlets/format/AttachmentForm.java +++ b/src/com/silverwrist/venice/servlets/format/AttachmentForm.java @@ -39,7 +39,7 @@ public class AttachmentForm implements JSPRender *-------------------------------------------------------------------------------- */ - private int sigid; + private int cid; private int confid; private long postid; private String target; @@ -49,9 +49,9 @@ public class AttachmentForm implements JSPRender *-------------------------------------------------------------------------------- */ - public AttachmentForm(SIGContext sig, ConferenceContext conf, TopicMessageContext msg, String target) + public AttachmentForm(CommunityContext comm, ConferenceContext conf, TopicMessageContext msg, String target) { - this.sigid = sig.getSIGID(); + this.cid = comm.getCommunityID(); this.confid = conf.getConfID(); this.postid = msg.getPostID(); this.target = target; @@ -108,11 +108,11 @@ public class AttachmentForm implements JSPRender *-------------------------------------------------------------------------------- */ - public int getSIGID() + public int getCommunityID() { - return sigid; + return cid; - } // end getSIGID + } // end getCommunityID public int getConfID() { diff --git a/src/com/silverwrist/venice/servlets/format/AuditDataViewer.java b/src/com/silverwrist/venice/servlets/format/AuditDataViewer.java index dfd4b4a..4785dca 100644 --- a/src/com/silverwrist/venice/servlets/format/AuditDataViewer.java +++ b/src/com/silverwrist/venice/servlets/format/AuditDataViewer.java @@ -118,7 +118,7 @@ public class AuditDataViewer implements ContentRender, ColorSelectors + tb_font + "Date/Time\n" + tb_font + "Description\n" + tb_font + "User\n" + tb_font - + "SIG\n" + tb_font + + "Community\n" + tb_font + "IP Address\n" + tb_font + "Additional Data\n\n"); Iterator it = audit_list.iterator(); @@ -132,7 +132,7 @@ public class AuditDataViewer implements ContentRender, ColorSelectors + "\n" + tb_font + StringUtil.encodeHTML(dat.getUserName()) + "\n" + tb_font - + StringUtil.encodeHTML(dat.getSIGName()) + + StringUtil.encodeHTML(dat.getCommunityName()) + "\n" + tb_font + StringUtil.encodeHTML(dat.getIPAddress()) + "\n"); for (int i=0; i\n"); out.write(" + diff --git a/web/format/sig_member.jsp b/web/format/comm_member.jsp similarity index 92% rename from web/format/sig_member.jsp rename to web/format/comm_member.jsp index a73af60..f280206 100644 --- a/web/format/sig_member.jsp +++ b/web/format/comm_member.jsp @@ -21,19 +21,19 @@ <%@ page import = "com.silverwrist.venice.servlets.Variables" %> <%@ page import = "com.silverwrist.venice.servlets.format.*" %> <% - SIGMembership data = SIGMembership.retrieve(request); + CommunityMembership data = CommunityMembership.retrieve(request); Variables.failIfNull(data); RenderData rdat = RenderConfig.createRenderData(application,request,response); %> -<% rdat.writeContentHeader(out,"Set SIG Membership:",data.getSIGName()); %> +<% rdat.writeContentHeader(out,"Set Community Membership:",data.getCommunityName()); %> <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> - Return to SIG + Return to Community Administration Menu

      <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,3) %>Find Users:

      ">
      - + <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> @@ -68,10 +68,10 @@ <% if (data.displayList()) { %> <% int dcount = data.getSize(); %>
      - <% if (data.isSIGMemberList()) { %> - <%-- The SIG list header --%> + <% if (data.isCommunityMemberList()) { %> + <%-- The community list header --%> <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,3) %> - Members of SIG "<%= StringUtil.encodeHTML(data.getSIGName()) %>": + Members of community "<%= StringUtil.encodeHTML(data.getCommunityName()) %>":
      <% } else { %> <% @@ -98,7 +98,7 @@ <%-- The navigational form that allows us to page through the results --%> <% if (rdat.useHTMLComments()) { %><% } %> ">
      - + @@ -127,7 +127,7 @@ <%-- Display the results of the search --%> ">
      - + <% for (int i=0; i diff --git a/web/format/sigcatbrowser.jsp b/web/format/commcatbrowser.jsp similarity index 88% rename from web/format/sigcatbrowser.jsp rename to web/format/commcatbrowser.jsp index d6fe9df..287140e 100644 --- a/web/format/sigcatbrowser.jsp +++ b/web/format/commcatbrowser.jsp @@ -21,19 +21,19 @@ <%@ page import = "com.silverwrist.venice.servlets.Variables" %> <%@ page import = "com.silverwrist.venice.servlets.format.*" %> <% - SIGCategoryBrowseData data = SIGCategoryBrowseData.retrieve(request); + CommunityCategoryBrowseData data = CommunityCategoryBrowseData.retrieve(request); Variables.failIfNull(data); RenderData rdat = RenderConfig.createRenderData(application,request,response); CategoryDescriptor cat = data.getCurrentCategory(); int catid = cat.getCategoryID(); %> -<% rdat.writeContentHeader(out,"Set SIG Category:",data.getSIGName()); %> +<% rdat.writeContentHeader(out,"Set Community Category:",data.getCommunityName()); %> <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> - Previous SIG Category: <%= StringUtil.encodeHTML(data.getPreviousCategory()) %>

      + Previous community Category: <%= StringUtil.encodeHTML(data.getPreviousCategory()) %>

      Current category:
      <% if (catid>=0) { %><% } %>Top<% if (catid>=0) { %><% } %>: <% for (int i=0; i @@ -65,7 +65,7 @@ <% } else { %>(None)<% } // end if (subcategory display) %>

      Click on a subcategory name to make that category the currently displayed one.

      - Click on a [set] link to set that category as the SIG's new category and return to the - SIG Administration menu.

      + Click on a [set] link to set that category as the community's new category and return to the + Community Administration menu.

      diff --git a/web/format/sigprofile.jsp b/web/format/commprofile.jsp similarity index 78% rename from web/format/sigprofile.jsp rename to web/format/commprofile.jsp index 9f70ede..d765966 100644 --- a/web/format/sigprofile.jsp +++ b/web/format/commprofile.jsp @@ -21,29 +21,29 @@ <%@ page import = "com.silverwrist.venice.servlets.Variables" %> <%@ page import = "com.silverwrist.venice.servlets.format.*" %> <% - SIGProfileData data = SIGProfileData.retrieve(request); + CommunityProfileData data = CommunityProfileData.retrieve(request); Variables.failIfNull(data); RenderData rdat = RenderConfig.createRenderData(application,request,response); - SIGContext sig = data.getSIGContext(); - ContactInfo ci = data.getSIGContactInfo(); + CommunityContext comm = data.getCommunityContext(); + ContactInfo ci = data.getCommunityContactInfo(); CategoryDescriptor cat = data.getCategory(); String tmp; %> -<% if (rdat.useHTMLComments()) { %><% } %> -<% rdat.writeContentHeader(out,"SIG Profile:",sig.getName()); %> +<% if (rdat.useHTMLComments()) { %><% } %> +<% rdat.writeContentHeader(out,"Community Profile:",comm.getName()); %>

      <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,1) %> -

      +

      - <% Date tmpd = sig.getCreationDate(); %> + <% Date tmpd = comm.getCreationDate(); %> <% if (tmpd!=null) { %> - SIG created:
      <%= StringUtil.encodeHTML(rdat.formatDateForDisplay(tmpd)) %>
      + Community created:
      <%= StringUtil.encodeHTML(rdat.formatDateForDisplay(tmpd)) %>
      <% } // end if %> - <% tmpd = sig.getLastAccessDate(); %> + <% tmpd = comm.getLastAccessDate(); %> <% if (tmpd!=null) { %> Last accessed:
      <%= StringUtil.encodeHTML(rdat.formatDateForDisplay(tmpd)) %>
      <% } // end if %> - <% tmpd = sig.getLastUpdateDate(); %> + <% tmpd = comm.getLastUpdateDate(); %> <% if (tmpd!=null) { %> Profile last updated:
      <%= StringUtil.encodeHTML(rdat.formatDateForDisplay(tmpd)) %>
      <% } // end if %> @@ -51,12 +51,12 @@ <% if (data.isUserLoggedIn()) { %>
      <%-- EJB 4/4/2001 - reverse these tests, put canJoin FIRST --%> - <% if (sig.canJoin()) { %> - "> + ">" ALT="Join Now" WIDTH=80 HEIGHT=24 BORDER=0> - <% } else if (sig.canSendInvitation()) { %> - "> + ">" ALT="Invite" WIDTH=80 HEIGHT=24 BORDER=0> <% } // end if %>
      @@ -65,13 +65,13 @@
      <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> - <% if (sig.isPublicSIG()) { %>Public<% } else { %>Private<% } %> Special Interest Group
      + <% if (comm.isPublicCommunity()) { %>Public<% } else { %>Private<% } %> Community
      Category: <% for (int i=0; i <% if (i>0) { %>: <% } %> <%= StringUtil.encodeHTML(cat.getTitleAtLevel(i)) %> <% } // end for %>

      - <%= StringUtil.encodeHTML(sig.getSynopsis()) %>

      + <%= StringUtil.encodeHTML(comm.getSynopsis()) %>

      <% tmp = data.getHostUserName(); %> Host: "><%= tmp %>
      @@ -89,9 +89,9 @@ <% if (!(StringUtil.isStringEmpty(tmp))) { %><%= StringUtil.encodeHTML(tmp) %>
      <% } %>
      - <% tmp = sig.getLanguageFullName(); %> + <% tmp = comm.getLanguageFullName(); %> <% if (!(StringUtil.isStringEmpty(tmp))) { %>Primary Language: <%= StringUtil.encodeHTML(tmp) %>
      <% } %> - <% tmp = sig.getRules(); %> + <% tmp = comm.getRules(); %> <% if (!(StringUtil.isStringEmpty(tmp))) { %>Standards of Conduct: <%= StringUtil.encodeHTML(tmp) %>
      <% } %> <% tmp = ci.getURL(); %> <% if (!(StringUtil.isStringEmpty(tmp))) { %> diff --git a/web/format/siglist.jsp b/web/format/communitylist.jsp similarity index 74% rename from web/format/siglist.jsp rename to web/format/communitylist.jsp index 98a8e0e..287cd1c 100644 --- a/web/format/siglist.jsp +++ b/web/format/communitylist.jsp @@ -21,29 +21,29 @@ <%@ page import = "com.silverwrist.venice.servlets.Variables" %> <%@ page import = "com.silverwrist.venice.servlets.format.*" %> <% - UserSIGList data = UserSIGList.retrieve(request); + UserCommunityList data = UserCommunityList.retrieve(request); Variables.failIfNull(data); RenderData rdat = RenderConfig.createRenderData(application,request,response); %> <% if (rdat.useHTMLComments()) { %><% } %> -<% rdat.writeContentHeader(out,"Your SIGs",null); %> +<% rdat.writeContentHeader(out,"Your Communities",null); %> <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> ">Return to Front Page

      -<% if (data.getNumSIGs()>0) { %> +<% if (data.getNumCommunities()>0) { %> - <% for (int i=0; i - <% SIGContext sig = data.getSIG(i); %> + <% for (int i=0; i + <% CommunityContext comm = data.getCommunity(i); %> <% } // end for %> @@ -52,14 +52,14 @@
      - <% if (sig.canUnjoin()) { %> - "> ALT="Unjoin" BORDER=0 WIDTH=16 + <% if (comm.canUnjoin()) { %> + ">" ALT="Unjoin" BORDER=0 WIDTH=16 HEIGHT=16> <% } else { %> <% } %> <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> - "><%= StringUtil.encodeHTML(sig.getName()) %> + "><%= StringUtil.encodeHTML(comm.getName()) %>
      - ALT="Unjoin" BORDER=0 WIDTH=16 HEIGHT=16> + " ALT="Unjoin" BORDER=0 WIDTH=16 HEIGHT=16> <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> - Click this symbol to unjoin the specified SIG. + Click this symbol to unjoin the specified community.
      <% } else { %> <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>You are not a member of - any SIGs. + any communities. <% } // end if %> diff --git a/web/format/sigwelcome.jsp b/web/format/commwelcome.jsp similarity index 79% rename from web/format/sigwelcome.jsp rename to web/format/commwelcome.jsp index edd6469..b8bf74d 100644 --- a/web/format/sigwelcome.jsp +++ b/web/format/commwelcome.jsp @@ -21,15 +21,15 @@ <%@ page import = "com.silverwrist.venice.servlets.Variables" %> <%@ page import = "com.silverwrist.venice.servlets.format.*" %> <% - SIGWelcome data = SIGWelcome.retrieve(request); + CommunityWelcome data = CommunityWelcome.retrieve(request); Variables.failIfNull(data); RenderData rdat = RenderConfig.createRenderData(application,request,response); %> -<% if (rdat.useHTMLComments()) { %><% } %> +<% if (rdat.useHTMLComments()) { %><% } %> <% rdat.writeContentHeader(out,"Welcome!",null); %> <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> - Welcome to the "<%= StringUtil.encodeHTML(data.getSIGName()) %>" SIG! - As a SIG member, you now have access to the various resources which your SIG's host + Welcome to the "<%= StringUtil.encodeHTML(data.getCommunityName()) %>" community! + As a community member, you now have access to the various resources which your community's host has elected to provide. Enjoy your membership!

      -

      + diff --git a/web/format/conf_member.jsp b/web/format/conf_member.jsp index 489314c..3fa3650 100644 --- a/web/format/conf_member.jsp +++ b/web/format/conf_member.jsp @@ -31,15 +31,15 @@ Manage Conference Menu

      -<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,3) %>Find users in SIG -"<%= data.getSIGName() %>":

      +<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,3) %>Find users in community +"<%= data.getCommunityName() %>":

      ">

      - + <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> - Display all SIG members whose   + Display all community members whose   + @@ -130,7 +130,7 @@ <%-- Display the results of the search --%> ">
      - + diff --git a/web/format/conf_sequence.jsp b/web/format/conf_sequence.jsp index 5c9ba0c..0997e4e 100644 --- a/web/format/conf_sequence.jsp +++ b/web/format/conf_sequence.jsp @@ -25,17 +25,17 @@ Variables.failIfNull(data); RenderData rdat = RenderConfig.createRenderData(application,request,response); %> -<% if (rdat.useHTMLComments()) { %><% } %> +<% if (rdat.useHTMLComments()) { %><% } %> <% rdat.writeContentHeader(out,"Manage Conference List",null); %> <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> - Return to Conference List + Return to Conference List

      <% if (data.getNumConferences()>0) { %>

      <% for (int i=0; i <% ConferenceContext conf = data.getConference(i); - String partial = "confops?sig=" + data.getSIGID() + "&conf=" + conf.getConfID(); + String partial = "confops?sig=" + data.getCommunityID() + "&conf=" + conf.getConfID(); String tail, image, alt; %> @@ -94,7 +94,7 @@ HEIGHT=16> @@ -104,7 +104,7 @@ HEIGHT=16> @@ -113,7 +113,7 @@ " ALT="Move Down" BORDER=0 WIDTH=16 HEIGHT=16> @@ -121,7 +121,7 @@ " ALT="Move Up" BORDER=0 WIDTH=16 HEIGHT=16> @@ -136,5 +136,5 @@
      <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> - This indicates that the conference is displayed in the SIG's conference list. Click the symbol + This indicates that the conference is displayed in the community's conference list. Click the symbol to hide it.
      <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> - This indicates that the conference is hidden in the SIG's conference list. Click the symbol + This indicates that the conference is hidden in the community's conference list. Click the symbol to display it.
      <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> - Click this symbol to move the specified conference down in the SIG's conference list. + Click this symbol to move the specified conference down in the community's conference list.
      <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> - Click this symbol to move the specified conference up in the SIG's conference list. + Click this symbol to move the specified conference up in the community's conference list.
      <% } else { %> <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>There are no conferences in - this SIG. + this community. <% } // end if %> diff --git a/web/format/conferences.jsp b/web/format/conferences.jsp index 4aa3b25..2ea9658 100644 --- a/web/format/conferences.jsp +++ b/web/format/conferences.jsp @@ -25,8 +25,8 @@ Variables.failIfNull(data); RenderData rdat = RenderConfig.createRenderData(application,request,response); %> -<% if (rdat.useHTMLComments()) { %><% } %> -<% rdat.writeContentHeader(out,"Conference List:",data.getSIGName()); %> +<% if (rdat.useHTMLComments()) { %><% } %> +<% rdat.writeContentHeader(out,"Conference List:",data.getCommunityName()); %> <% if (data.getNumConferences()>0) { %> <% for (int i=0; i @@ -35,7 +35,7 @@ " ALT="*" WIDTH=14 HEIGHT=14 BORDER=0>
      <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> - <% String path = "confdisp?sig=" + data.getSIGID() + "&conf=" + data.getConferenceID(i); %> + <% String path = "confdisp?sig=" + data.getCommunityID() + "&conf=" + data.getConferenceID(i); %> <%= StringUtil.encodeHTML(data.getConferenceName(i)) %> - Latest activity: <%= rdat.getActivityString(data.getLastUpdateDate(i)) %> <% if (data.anyUnread(i)) { %> @@ -58,17 +58,17 @@ <% } // end for (each conference) %>

      <% } else { %> - No conferences found in this SIG.
      + No conferences found in this community.
      <% } // end if (conferences present) %>

      <% if (data.canManageConferences()) { %> - ">">" ALT="Manage" WIDTH=80 HEIGHT=24 BORDER=0>  <% } // end if %> <% if (data.canCreateConference()) { %> - ">">" ALT="Create New" WIDTH=80 HEIGHT=24 BORDER=0>  <% } // end if %> diff --git a/web/format/find.jsp b/web/format/find.jsp index 8be22fe..68b0f38 100644 --- a/web/format/find.jsp +++ b/web/format/find.jsp @@ -21,11 +21,11 @@ <%@ page import = "com.silverwrist.venice.servlets.Variables" %> <%@ page import = "com.silverwrist.venice.servlets.format.*" %> <%! -private static String getSIGHostName(SIGContext sig) +private static String getCommunityHostName(CommunityContext comm) { try - { // get the host name for the specified SIG - UserProfile prof = sig.getHostProfile(); + { // get the host name for the specified community + UserProfile prof = comm.getHostProfile(); return prof.getUserName(); } // end try @@ -35,13 +35,13 @@ private static String getSIGHostName(SIGContext sig) } // end catch -} // end getSIGHostName +} // end getCommunityHostName -private static int getSIGMemberCount(SIGContext sig) +private static int getCommunityMemberCount(CommunityContext comm) { try - { // get the member count for the specified SIG - return sig.getMemberCount(); + { // get the member count for the specified community + return comm.getMemberCount(); } // end try catch (DataException e) @@ -50,11 +50,11 @@ private static int getSIGMemberCount(SIGContext sig) } // end catch -} // end getSIGMemberCount +} // end getCommunityMemberCount -private static String getActivityString(SIGContext sig, RenderData rdat) +private static String getActivityString(CommunityContext comm, RenderData rdat) { - return rdat.getActivityString(sig.getLastAccessDate()); + return rdat.getActivityString(comm.getLastAccessDate()); } // end getActivityString @@ -71,16 +71,16 @@ private static String getActivityString(SIGContext sig, RenderData rdat) ">
      - <% if (data.getDisplayOption()==FindData.FD_SIGS) { %> - <% if (rdat.useHTMLComments()) { %><% } %> - <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,4) %>Find SIGs:
      + <% if (data.getDisplayOption()==FindData.FD_COMMUNITIES) { %> + <% if (rdat.useHTMLComments()) { %><% } %> + <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,4) %>Find Communities:
      <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> - Display all SIGs whose   + Display all communities whose  
      <% } else if (data.getDisplayOption()==FindData.FD_USERS) { %> @@ -203,7 +203,7 @@ private static String getActivityString(SIGContext sig, RenderData rdat) <% } // end for %> diff --git a/web/format/invitation.jsp b/web/format/invitation.jsp index d35d1a7..b15b5ad 100644 --- a/web/format/invitation.jsp +++ b/web/format/invitation.jsp @@ -25,10 +25,10 @@ Variables.failIfNull(data); RenderData rdat = RenderConfig.createRenderData(application,request,response); %> -<% if (rdat.useHTMLComments()) { %><% } %> -<% rdat.writeContentHeader(out,"Send SIG Invitation:",data.getSIGName()); %> +<% if (rdat.useHTMLComments()) { %><% } %> +<% rdat.writeContentHeader(out,"Send Community Invitation:",data.getCommunityName()); %> ">
      - +
      <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,3) %> <%-- The initial search results --%> - <% if (cat!=null) { %>SIGs in Category<% } else { %>Search Results<% } %> + <% if (cat!=null) { %>Communities in Category<% } else { %>Search Results<% } %> <% if (data.getFindCount()>0) { %> (Displaying <%= data.getOffset() + 1 %>-<%= data.getOffset() + dcount %> of <%= data.getFindCount() %>) @@ -250,13 +250,13 @@ private static String getActivityString(SIGContext sig, RenderData rdat) <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> <% Object item = results.get(i); %> - <% if (data.getDisplayOption()==FindData.FD_SIGS) { %> + <% if (data.getDisplayOption()==FindData.FD_COMMUNITIES) { %> <% - SIGContext sig = (SIGContext)item; - String host_name = getSIGHostName(sig); - int members = getSIGMemberCount(sig); + CommunityContext comm = (CommunityContext)item; + String host_name = getCommunityHostName(comm); + int members = getCommunityMemberCount(comm); %> - "><%= StringUtil.encodeHTML(sig.getName()) %>
      + "><%= StringUtil.encodeHTML(comm.getName()) %>
      <% if (host_name!=null) { %> Host: "><%= host_name %> <% } // end if (got host name) %> @@ -265,8 +265,8 @@ private static String getActivityString(SIGContext sig, RenderData rdat) <%= members %> members <% } // end if (got member count) %> <% if ((host_name!=null) || (members>=0)) { %>
      <% } %> - Latest activity: <%= getActivityString(sig,rdat) %>
      - <%= StringUtil.encodeHTML(sig.getSynopsis()) %> + Latest activity: <%= getActivityString(comm,rdat) %>
      + <%= StringUtil.encodeHTML(comm.getSynopsis()) %> <% } else if (data.getDisplayOption()==FindData.FD_USERS) { %> <% UserFound uf = (UserFound)item; %> diff --git a/web/format/hotlist.jsp b/web/format/hotlist.jsp index 7eb0c52..e5e9112 100644 --- a/web/format/hotlist.jsp +++ b/web/format/hotlist.jsp @@ -34,7 +34,8 @@ <% for (int i=0; i <% ConferenceContext conf = data.getConference(i); - String partial = "settings?sig=" + conf.getEnclosingSIG().getSIGID() + "&conf=" + conf.getConfID(); + String partial = "settings?sig=" + conf.getEnclosingCommunity().getCommunityID() + "&conf=" + + conf.getConfID(); %>
      @@ -58,7 +59,7 @@ <%= stdfont %> <%= StringUtil.encodeHTML(conf.getName()) %> - (<%= StringUtil.encodeHTML(conf.getEnclosingSIG().getName()) %>) + (<%= StringUtil.encodeHTML(conf.getEnclosingCommunity().getName()) %>)
      diff --git a/web/format/manage_aliases.jsp b/web/format/manage_aliases.jsp index 84ec316..569bac0 100644 --- a/web/format/manage_aliases.jsp +++ b/web/format/manage_aliases.jsp @@ -61,7 +61,7 @@ Add New Alias:

      ">

      - + <% } %> ">
      - + <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> diff --git a/web/format/newsigwelcome.jsp b/web/format/newcommwelcome.jsp similarity index 65% rename from web/format/newsigwelcome.jsp rename to web/format/newcommwelcome.jsp index 852118a..0d849d9 100644 --- a/web/format/newsigwelcome.jsp +++ b/web/format/newcommwelcome.jsp @@ -21,22 +21,22 @@ <%@ page import = "com.silverwrist.venice.servlets.Variables" %> <%@ page import = "com.silverwrist.venice.servlets.format.*" %> <% - NewSIGWelcome data = NewSIGWelcome.retrieve(request); + NewCommunityWelcome data = NewCommunityWelcome.retrieve(request); Variables.failIfNull(data); RenderData rdat = RenderConfig.createRenderData(application,request,response); %> -<% if (rdat.useHTMLComments()) { %><% } %> +<% if (rdat.useHTMLComments()) { %><% } %> <% rdat.writeContentHeader(out,"Welcome!",null); %> <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> - Your new SIG "<%= StringUtil.encodeHTML(data.getSIGName()) %>" has been created, and - you are its host. You may now wish to send out invitations to other people to join your new SIG. - You will also want to enter your SIG's administration page and set its category and/or additional - security options, if desired.

      - Your new SIG's URL is: + Your new community "<%= StringUtil.encodeHTML(data.getCommunityName()) %>" has been + created, and you are its host. You may now wish to send out invitations to other people to join your new + community. You will also want to enter your community's administration page and set its category and/or + additional security options, if desired.

      + Your new community's URL is:

      <%= StringUtil.encodeHTML(data.getDisplayURL(rdat)) %>
      - Enjoy your new SIG on our system! + Enjoy your new community on our system! diff --git a/web/format/newtopic.jsp b/web/format/newtopic.jsp index 04c5565..ca7f682 100644 --- a/web/format/newtopic.jsp +++ b/web/format/newtopic.jsp @@ -42,7 +42,7 @@ <% } // end if %> ">
      - +
      diff --git a/web/format/posts.jsp b/web/format/posts.jsp index d49fd59..5446781 100644 --- a/web/format/posts.jsp +++ b/web/format/posts.jsp @@ -108,7 +108,7 @@
      <% if (rdat.useHTMLComments()) { %><% } %> ">
      - +
      ">
      - + <% if (data.canDoNextTopic()) { %> diff --git a/web/format/preview.jsp b/web/format/preview.jsp index 83b8508..acd309e 100644 --- a/web/format/preview.jsp +++ b/web/format/preview.jsp @@ -38,7 +38,7 @@

      <%= rdat.rewritePostData(data.getPreviewData()) %>

      ">
      - + <% if (!(StringUtil.isStringEmpty(data.getNextVal()))) { %> diff --git a/web/format/slippage.jsp b/web/format/slippage.jsp index 29f08fc..971d85e 100644 --- a/web/format/slippage.jsp +++ b/web/format/slippage.jsp @@ -63,7 +63,7 @@ "<%= data.getTopicName() %>":
      ">
      - + <% if (!(StringUtil.isStringEmpty(data.getNextVal()))) { %> diff --git a/web/format/topics.jsp b/web/format/topics.jsp index a71e046..fe12f41 100644 --- a/web/format/topics.jsp +++ b/web/format/topics.jsp @@ -32,7 +32,7 @@ <% rdat.writeContentHeader(out,"Topics in " + data.getConfName(),null); %> <%= stdfont %>
      - " ALT="Conference List" WIDTH=80 HEIGHT=24 BORDER=0>  <% if (data.canCreateTopic()) { %>