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!
This commit is contained in:
Eric J. Bowersox 2001-11-07 08:43:09 +00:00
parent fe352efbd1
commit dde12bdf2e
131 changed files with 2573 additions and 2503 deletions

17
FAQS
View File

@ -6,9 +6,10 @@ Frequently-Asked Questions about Venice (*)
Q: What is Venice? Q: What is Venice?
A: The Venice Web Community System is a system for supporting online A: The Venice Web Community System is a system for supporting online
communities and special interest groups. A single Venice server will communities and special interest groups. A single Venice server will
support multiple SIGs, and all users authenticating themselves with the support multiple communities, and all users authenticating themselves with
Venice server will be able to join any SIG based on that server. SIGs the Venice server will be able to join any community based on that server.
will support features like Web conferencing, chat, and instant messaging. Communities will support features like Web conferencing, chat, and instant
messaging.
Q: Aren't there already conferencing packages out there? Q: Aren't there already conferencing packages out there?
A: Yes, and some of them are very good. However, Venice is being designed 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 with a more self-consistent one. As time goes on, Venice will continue
to incorporate features that distinguish it from the original WebbMe. 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? Q: Did WebbMe have instant messaging, too?
A: Yes, it did. The original CommunityWare instant messaging and chat was 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 based on code derived from Durand's earlier MindWire product. It was later

18
README
View File

@ -8,16 +8,16 @@ SourceForge Home: <http://sourceforge.net/projects/venice/>
Description: Description:
The Venice Web Communities System is a system for supporting online The Venice Web Communities System is a system for supporting online
communities and special interest groups. A single Venice server will communities and special interest groups. A single Venice server will
support multiple SIGs, and all users authenticating themselves with the support multiple communities, and all users authenticating themselves with
Venice server will be able to join any SIG based on that server. 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 Communities support multiple features, the first of which will be Web-based
conferencing (along the lines of WellEngaged, UBB, and other conferencing linear conferencing (along the lines of WellEngaged, UBB, and other
systems). Features to be added thereafter include instant messaging and conferencing systems). Features to be added thereafter include instant
chat (which will be based on the Jabber open-source instant-messaging messaging and chat (which will be based on the Jabber open-source
system), calendars, link directories, e-mail newsletters, and possibly instant-messaging system), calendars, link directories, e-mail newsletters,
advanced features such as collaborative databases and content creation/ and possibly advanced features such as collaborative databases and content
publishing. creation/publishing.
Implementation: Implementation:
Venice is written in Java using Java Servlet and JSP technologies, and Venice is written in Java using Java Servlet and JSP technologies, and

4
TODO
View File

@ -36,8 +36,8 @@ Lots!
- <SiteHelp.3.38>: move topics from one conf to another? - <SiteHelp.3.38>: move topics from one conf to another?
- Unimplemented functions on the SIG Administration page: - Unimplemented functions on the Community Administration page:
Set SIG Features (sigadmin, command=F) Set Community Features (sigadmin, command=F)
- Unimplemented functions in the system admin menu: - Unimplemented functions in the system admin menu:
Set Global Parameters Set Global Parameters

View File

@ -1,4 +1,4 @@
CATEGORY SYSTEM FOR VENICE SIGS CATEGORY SYSTEM FOR VENICE COMMUNITIES
(Based on the Mozilla Open Directory Project category system) (Based on the Mozilla Open Directory Project category system)
Arts Arts

View File

@ -12,8 +12,8 @@
<OL> <OL>
<LI>A replacement for the CommunityWare/WebbMe conferencing system</LI> <LI>A replacement for the CommunityWare/WebbMe conferencing system</LI>
<LI>Java/JSP/servlets implementation running under Apache Tomcat, MySQL backend</LI> <LI>Java/JSP/servlets implementation running under Apache Tomcat, MySQL backend</LI>
<LI>Multiple SIGs (communities) hosted per server, each with multiple conferences <LI>Multiple communities hosted per server, each with multiple conferences
(and other features); users logged into one server can join multiple SIGs</LI> (and other features); users logged into one server can join multiple communities</LI>
<LI>Conferencing functionality similar to CW/WebbMe: <LI>Conferencing functionality similar to CW/WebbMe:
<UL> <UL>
<LI>Linear topics composed of HTML messages</LI> <LI>Linear topics composed of HTML messages</LI>

View File

@ -9,7 +9,7 @@
<EM>Eric J. Bowersox &lt;<A HREF="mailto:erbo@silcom.com">erbo@silcom.com</A>&gt; - <EM>Eric J. Bowersox &lt;<A HREF="mailto:erbo@silcom.com">erbo@silcom.com</A>&gt; -
January 26, 2001</EM><P> January 26, 2001</EM><P>
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 identifiers in the future). A valid Venice ID consists of characters from the following character set
only: only:
<UL> <UL>

View File

@ -109,7 +109,7 @@
"high band" security level refers to someone who exercises administrative control over that scope "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 (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 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).<P> than a community, which in turn would have a higher scope value than 0 (the "global" scope).<P>
The values 65000-65535 are not used, except that the value 65500 is defined as "no access" (something 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 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 the value 32500 is defined as "unrestricted user" (lying above the low bands of all scopes but below
@ -122,34 +122,34 @@
<LI>64000 - Assistant administrator accounts ("PFY" level)</LI> <LI>64000 - Assistant administrator accounts ("PFY" level)</LI>
<LI>64999 - Global system administrator ("BOFH" level)</LI> <LI>64999 - Global system administrator ("BOFH" level)</LI>
</UL><P> </UL><P>
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:
<UL> <UL>
<LI>6500 - SIG member</LI> <LI>6500 - Community member</LI>
<LI>58000 - SIG co-host</LI> <LI>58000 - Community co-host</LI>
<LI>58500 - SIG host</LI> <LI>58500 - Community host</LI>
</UL><P> </UL><P>
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:
<UL> <UL>
<LI>12500 - Conference member (for private conferences)</LI> <LI>12500 - Conference member (for private conferences)</LI>
<LI>52500 - Conference host</LI> <LI>52500 - Conference host</LI>
</UL><P> </UL><P>
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: has four defined access levels associated with it:
<UL> <UL>
<LI><B>Read level</B> - minimum access level required to read the SIG's data. This is commonly 6500 <LI><B>Read level</B> - minimum access level required to read the community's data. This is commonly
(must be a member) but may be lower for special cases.</LI> 6500 (must be a member) but may be lower for special cases.</LI>
<LI><B>Write level</B> - minimum access level required to write the SIG's data. Since this refers to <LI><B>Write level</B> - minimum access level required to write the community's data. Since this
the SIG itself, this is commonly 58000 (hosts/co-hosts only)</LI> refers to the community itself, this is commonly 58000 (hosts/co-hosts only)</LI>
<LI><B>Create level</B> - minimum access level required to create new objects in the SIG. Typically <LI><B>Create level</B> - minimum access level required to create new objects in the community.
58000 (hosts/co-hosts only).</LI> Typically 58000 (hosts/co-hosts only).</LI>
<LI><B>Delete level</B> - minimum access level required to delete the SIG. Typically 58500 (host <LI><B>Delete level</B> - minimum access level required to delete the community. Typically 58500 (host
only).</LI> only).</LI>
</UL><P> </UL><P>
The "sigmember" table maps UIDs to SIGIDs, adding a "granted level" field that specifies a given user's The "sigmember" table maps UIDs to community IDs, adding a "granted level" field that specifies a given
access level within the SIG itself. (If a user already has a higher access level than the "granted" user's access level within the community itself. (If a user already has a higher access level than the
access level, as in the case of the global sysadmin, the higher level takes precedence.) Note that "granted" access level, as in the case of the global sysadmin, the higher level takes precedence.) Note
this level grant is within the context of <EM>that SIG only,</EM> and does not affect access privileges that this level grant is within the context of <EM>that community only,</EM> and does not affect access
to any other SIG.<P> privileges to any other community.<P>
Each conference has seven defined access levels associated with it: Each conference has seven defined access levels associated with it:
<UL> <UL>
<LI><B>Read level</B> - minimum access level required to read the posts. Commonly 6500 (member of <LI><B>Read level</B> - minimum access level required to read the posts. Commonly 6500 (member of
@ -165,15 +165,16 @@
<LI><B>Change level</B> - minimum access level required to change the conference's profile or <LI><B>Change level</B> - minimum access level required to change the conference's profile or
membership list. Commonly 52500 (conference hosts only).</LI> membership list. Commonly 52500 (conference hosts only).</LI>
<LI><B>Delete level</B> - minimum access level required to delete the conference. Commonly 58000 <LI><B>Delete level</B> - minimum access level required to delete the conference. Commonly 58000
(hosts/cohosts of the enclosing SIG only).</LI> (hosts/cohosts of the enclosing community only).</LI>
</UL><P> </UL><P>
As with SIGs, there is a "confmember" table that maps UIDs to CONFIDs, adding a "granted level" field As with communities, there is a "confmember" table that maps UIDs to CONFIDs, adding a "granted level"
that grants additional access privileges. (There is also a field in the table that maps conferences field that grants additional access privileges. (There is also a field in the table that maps
into SIGs that allows a SIG to grant its users additional privileges within a conference. Normally, conferences into communities that allows a community to grant its users additional privileges within a
this field is 0, and so it "drops out" of the calculation of access levels.) Note that, if a user has conference. Normally, this field is 0, and so it "drops out" of the calculation of access levels.) Note
no membership entry for a conference, the entry for the conference's enclosing SIG takes precedence, that, if a user has no membership entry for a conference, the entry for the conference's enclosing
or the base level if there is no entry in any enclosing SIG. Also note that a grant of level for a community takes precedence, or the base level if there is no entry in any enclosing community. Also
conference or SIG only applies with respect to <EM>that</EM> conference or SIG, not any other.<P> note that a grant of level for a conference or community only applies with respect to <EM>that</EM>
conference or community, not any other.<P>
Additional scopes and levels will be defined for additional objects as they are added to Venice.<P> Additional scopes and levels will be defined for additional objects as they are added to Venice.<P>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -136,7 +136,7 @@ Text of this agreement is TBD.
<!-- Menu definitions for the base page --> <!-- Menu definitions for the base page -->
<menu-definitions> <menu-definitions>
<!-- Definition for the "top" menu (when not in a SIG) --> <!-- Definition for the "top" menu (when not in a community) -->
<menudef id="top"> <menudef id="top">
<header>Front Page</header> <header>Front Page</header>
<menuitem> <menuitem>
@ -151,7 +151,7 @@ Text of this agreement is TBD.
</menuitem> </menuitem>
</menudef> </menudef>
<!-- Definition for the "fixed" menu (always displayed under the "top" or "SIG" menus) --> <!-- Definition for the "fixed" menu (always displayed under the "top" or "community" menus) -->
<menudef id="fixed"> <menudef id="fixed">
<header>About This Site</header> <header>About This Site</header>
<menuitem> <menuitem>

View File

@ -20,10 +20,10 @@
<sidebox-config> <sidebox-config>
<sidebox id="1"> <sidebox id="1">
<title>Your SIGs</title> <title>Your Communities</title>
<anon-title>Featured SIGs</anon-title> <anon-title>Featured Communities</anon-title>
<factory-class>com.silverwrist.venice.servlets.format.sideboxes.SIGBox</factory-class> <factory-class>com.silverwrist.venice.servlets.format.sideboxes.CommunityBox</factory-class>
<null-msg>You are not a member of any SIGs.</null-msg> <null-msg>You are not a member of any communities.</null-msg>
<manage-link>Manage</manage-link> <manage-link>Manage</manage-link>
<create-new-link>Create New</create-new-link> <create-new-link>Create New</create-new-link>
<bullet width="14" height="14" fixup="true">purple-ball.gif</bullet> <bullet width="14" height="14" fixup="true">purple-ball.gif</bullet>

View File

@ -157,51 +157,51 @@ IMMEDIATELY.
<password-change-subject>Venice Password Changed</password-change-subject> <password-change-subject>Venice Password Changed</password-change-subject>
<!-- Invitation message to a public SIG --> <!-- Invitation message to a public community -->
<!-- Parameters: signame = name of SIG, sigalias = alias of SIG, personal = personal message, <!-- Parameters: community.name = name of community, community.alias = alias of community,
fullname = name of inviter, username = user name of inviter --> personal = personal message, fullname = name of inviter,
username = user name of inviter -->
<invite-public> <invite-public>
<![CDATA[ <![CDATA[
Hi! I would like to invite you to join the "${signame}" Special Interest Group (SIG) on the Venice Hi! I would like to invite you to join the "${community.name}" community on the Venice conferencing system.
conferencing system. To do so, you must register as a user, which is absolutely free! Just point To do so, you must register as a user, which is absolutely free! Just point your Web browser at
your Web browser at <http://delenn/venice/sig/${sigalias}> and click the "Create Account" link <http://delenn/venice/sig/${community.alias}> and click the "Create Account" link at the top of the page,
at the top of the page, or click the "Log In" link if you already have a Venice account. Once you have or click the "Log In" link if you already have a Venice account. Once you have completed the process,
completed the process, click the "Join Now" button. You will then be able to take part in the conferences click the "Join Now" button. You will then be able to take part in the conferences that are going on in
that are going on in the SIG. the community.
${personal} ${personal}
Hope to see you in "${signame}" soon! Hope to see you in "${community.name}" soon!
-- ${fullname} (Venice user ID: ${username}) -- ${fullname} (Venice user ID: ${username})
]]> ]]>
</invite-public> </invite-public>
<!-- Invitation message to a private SIG --> <!-- Invitation message to a private community -->
<!-- Parameters: signame = name of SIG, sigalias = alias of SIG, joinkey = join key for SIG, <!-- Parameters: community.name = name of community, community.alias = alias of community,
personal = personal message, fullname = name of inviter, joinkey = join key for community, personal = personal message,
username = user name of inviter --> fullname = name of inviter, username = user name of inviter -->
<invite-private> <invite-private>
<![CDATA[ <![CDATA[
Hi! I would like to invite you to join the "${signame}" Special Interest Group (SIG) on the Venice Hi! I would like to invite you to join the "${community.name}" community on the Venice conferencing system.
conferencing system. To do so, you must register as a user, which is absolutely free! Just point To do so, you must register as a user, which is absolutely free! Just point your Web browser at
your Web browser at <http://delenn/venice/sig/${sigalias}> and click the "Create Account" link <http://delenn/venice/sig/${community.alias}> and click the "Create Account" link at the top of the page,
at the top of the page, or click the "Log In" link if you already have a Venice account. Once you have or click the "Log In" link if you already have a Venice account. Once you have completed the process,
completed the process, click the "Join Now" button. You will be prompted for the "password" for this click the "Join Now" button. You will be prompted for the "password" for this community, which is
SIG, which is "${joinkey}". You will then be able to take part in the conferences that are going on in the "${joinkey}". You will then be able to take part in the conferences that are going on in the community.
SIG.
${personal} ${personal}
Hope to see you in "${signame}" soon! Hope to see you in "${community.name}" soon!
-- ${fullname} (Venice user ID: ${username}) -- ${fullname} (Venice user ID: ${username})
]]> ]]>
</invite-private> </invite-private>
<!-- Subject line for invitation messages --> <!-- Subject line for invitation messages -->
<!-- Parameters: signame = name of SIG --> <!-- Parameters: community.name = name of community -->
<subj-invite>Invitation to "${signame}" SIG</subj-invite> <subj-invite>Invitation to "${community.name}" Community</subj-invite>
</messages> </messages>

View File

@ -110,36 +110,36 @@
</servlet> </servlet>
<servlet> <servlet>
<servlet-name>sigfrontend</servlet-name> <servlet-name>communityfrontend</servlet-name>
<description> <description>
The "front end" for SIG display; it redirects the user to whatever page has The "front end" for community display; it redirects the user to whatever page has
been defined as the "default" for that SIG. been defined as the "default" for that community.
</description> </description>
<servlet-class>com.silverwrist.venice.servlets.SIGFrontEnd</servlet-class> <servlet-class>com.silverwrist.venice.servlets.CommunityFrontEnd</servlet-class>
</servlet> </servlet>
<servlet> <servlet>
<servlet-name>sigprofile</servlet-name> <servlet-name>communityprofile</servlet-name>
<description> <description>
Displays the profile for a given SIG. Displays the profile for a given community.
</description> </description>
<servlet-class>com.silverwrist.venice.servlets.SIGProfile</servlet-class> <servlet-class>com.silverwrist.venice.servlets.CommunityProfile</servlet-class>
</servlet> </servlet>
<servlet> <servlet>
<servlet-name>sigadmin</servlet-name> <servlet-name>communityadmin</servlet-name>
<description> <description>
SIG administration functions. Community administration functions.
</description> </description>
<servlet-class>com.silverwrist.venice.servlets.SIGAdmin</servlet-class> <servlet-class>com.silverwrist.venice.servlets.CommunityAdmin</servlet-class>
</servlet> </servlet>
<servlet> <servlet>
<servlet-name>sigoperations</servlet-name> <servlet-name>communityoperations</servlet-name>
<description> <description>
General SIG operations. General community operations.
</description> </description>
<servlet-class>com.silverwrist.venice.servlets.SIGOperations</servlet-class> <servlet-class>com.silverwrist.venice.servlets.CommunityOperations</servlet-class>
</servlet> </servlet>
<servlet> <servlet>
@ -282,22 +282,22 @@
</servlet-mapping> </servlet-mapping>
<servlet-mapping> <servlet-mapping>
<servlet-name>sigfrontend</servlet-name> <servlet-name>communityfrontend</servlet-name>
<url-pattern>/sig/*</url-pattern> <url-pattern>/sig/*</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet-mapping> <servlet-mapping>
<servlet-name>sigprofile</servlet-name> <servlet-name>communityprofile</servlet-name>
<url-pattern>/sigprofile</url-pattern> <url-pattern>/sigprofile</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet-mapping> <servlet-mapping>
<servlet-name>sigadmin</servlet-name> <servlet-name>communityadmin</servlet-name>
<url-pattern>/sigadmin</url-pattern> <url-pattern>/sigadmin</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet-mapping> <servlet-mapping>
<servlet-name>sigoperations</servlet-name> <servlet-name>communityoperations</servlet-name>
<url-pattern>/sigops</url-pattern> <url-pattern>/sigops</url-pattern>
</servlet-mapping> </servlet-mapping>

View File

@ -7,7 +7,7 @@
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License. * 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 <erbo@silcom.com>, * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are

View File

@ -32,7 +32,7 @@ public interface AuditData extends Audit
public abstract int getUID(); public abstract int getUID();
public abstract int getSIGID(); public abstract int getCommunityID();
public abstract String getIPAddress(); public abstract String getIPAddress();
@ -42,6 +42,6 @@ public interface AuditData extends Audit
public abstract String getUserName(); public abstract String getUserName();
public abstract String getSIGName(); public abstract String getCommunityName();
} // end interface AuditData } // end interface AuditData

View File

@ -7,7 +7,7 @@
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License. * 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 <erbo@silcom.com>, * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are

View File

@ -21,13 +21,13 @@ import java.util.BitSet;
import java.util.Date; import java.util.Date;
import java.util.List; 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_NONE = 0;
public static final int HIDE_DIRECTORY = 1; public static final int HIDE_DIRECTORY = 1;
public static final int HIDE_BOTH = 2; public static final int HIDE_BOTH = 2;
public abstract int getSIGID(); public abstract int getCommunityID();
public abstract String getName(); public abstract String getName();
@ -37,7 +37,7 @@ public interface SIGContext extends SearchMode
public abstract boolean isAdmin(); public abstract boolean isAdmin();
public abstract boolean isPublicSIG(); public abstract boolean isPublicCommunity();
public abstract int getCategoryID(); 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 void setFeatures(BitSet feature_set, BitSet mask) throws DataException, AccessError;
public abstract List getSIGFeaturesList(); public abstract List getCommunityFeaturesList();
public abstract String getDefaultApplet(); 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) public abstract void setSecurityLevels(int read, int write, int create, int delete, int join)
throws DataException, AccessError; throws DataException, AccessError;
public abstract boolean canAdministerSIG(); public abstract boolean canAdministerCommunity();
public abstract boolean canModifyProfile(); public abstract boolean canModifyProfile();
public abstract boolean isAdminSIG(); public abstract boolean isAdminCommunity();
public abstract void join(String joinkey) throws DataException, AccessError; 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; public abstract int getAuditRecordCount() throws AccessError, DataException;
} // end interface SIGContext } // end interface CommunityContext

View File

@ -17,7 +17,7 @@
*/ */
package com.silverwrist.venice.core; package com.silverwrist.venice.core;
public interface SIGFeature public interface CommunityFeature
{ {
public abstract int getFeatureCode(); public abstract int getFeatureCode();
@ -29,4 +29,4 @@ public interface SIGFeature
public abstract int getSequence(); public abstract int getSequence();
} // end interface SIGFeature } // end interface CommunityFeature

View File

@ -90,9 +90,9 @@ public interface ConferenceContext
public abstract void removeMember(int uid) throws DataException, AccessError; 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; public abstract short getSequence() throws DataException, AccessError;
@ -147,7 +147,7 @@ public interface ConferenceContext
public abstract boolean canAddToHotlist(); public abstract boolean canAddToHotlist();
public abstract SIGContext getEnclosingSIG(); public abstract CommunityContext getEnclosingCommunity();
public abstract void removeFromHotlist() throws DataException; public abstract void removeFromHotlist() throws DataException;

View File

@ -7,7 +7,7 @@
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License. * 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 <erbo@silcom.com>, * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are

View File

@ -7,7 +7,7 @@
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License. * 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 <erbo@silcom.com>, * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * 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 getOwnerUID();
public abstract int getOwnerSIGID(); public abstract int getOwnerCommunityID();
public abstract Date getLastUpdate(); public abstract Date getLastUpdate();

View File

@ -7,7 +7,7 @@
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License. * 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 <erbo@silcom.com>, * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are

View File

@ -7,7 +7,7 @@
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License. * 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 <erbo@silcom.com>, * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are

View File

@ -7,7 +7,7 @@
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License. * 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 <erbo@silcom.com>, * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are

View File

@ -7,7 +7,7 @@
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License. * 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 <erbo@silcom.com>, * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are

View File

@ -7,7 +7,7 @@
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License. * 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 <erbo@silcom.com>, * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are

View File

@ -7,7 +7,7 @@
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License. * 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 <erbo@silcom.com>, * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
@ -19,9 +19,9 @@ package com.silverwrist.venice.core;
public interface SearchMode 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; public static final int FIELD_USER_NAME = 2;

View File

@ -7,7 +7,7 @@
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License. * 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 <erbo@silcom.com>, * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are

View File

@ -7,7 +7,7 @@
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License. * 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 <erbo@silcom.com>, * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are

View File

@ -54,38 +54,39 @@ public interface UserContext extends SearchMode
public abstract void setDescription(String new_descr) throws DataException; 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 List getRootCategoryList() throws DataException;
public abstract CategoryDescriptor getCategoryDescriptor(int catid) 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; 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 List searchForCategories(int mode, String term, int offset, int count) throws DataException;
public abstract int getSearchCategoryCount(int mode, String term) throws DataException; public abstract int getSearchCategoryCount(int mode, String term) throws DataException;
public abstract SIGContext createSIG(String name, String alias, String language, String synopsis, public abstract CommunityContext createCommunity(String name, String alias, String language, String synopsis,
String rules, String joinkey, int hide_mode) String rules, String joinkey, int hide_mode)
throws DataException, AccessError; throws DataException, AccessError;
public abstract boolean canCreateSIG(); public abstract boolean canCreateCommunity();
public abstract List getSideBoxList() throws DataException; public abstract List getSideBoxList() throws DataException;

View File

@ -50,7 +50,7 @@ public interface VeniceEngine extends SearchMode
public abstract UserContext createNewAccount(String remote_addr, String username, String password, public abstract UserContext createNewAccount(String remote_addr, String username, String password,
String reminder) throws DataException, AccessError; 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); public abstract boolean isValidCategoryID(int catid);
@ -73,7 +73,7 @@ public interface VeniceEngine extends SearchMode
public abstract int getMaxNumConferenceMembersDisplay(); public abstract int getMaxNumConferenceMembersDisplay();
public abstract int getMaxNumSIGMembersDisplay(); public abstract int getMaxNumCommunityMembersDisplay();
public abstract List getMasterSideBoxList(); public abstract List getMasterSideBoxList();

View File

@ -338,9 +338,9 @@ class AdminUserContextImpl implements AdminUserContext
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("putContactInfo() for UID " + uid); 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 { // 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)"); + "), should be (" + uid + ", -1)");
throw new DataException("invalid contact information record"); throw new DataException("invalid contact information record");

View File

@ -26,14 +26,14 @@ import com.silverwrist.venice.db.*;
import com.silverwrist.venice.core.DataException; import com.silverwrist.venice.core.DataException;
import com.silverwrist.venice.core.InternalStateError; import com.silverwrist.venice.core.InternalStateError;
class BackgroundSIGPurge implements Runnable class BackgroundCommunityPurge implements Runnable
{ {
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Static data members * Static data members
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
private static Category logger = Category.getInstance(BackgroundSIGPurge.class.getName()); private static Category logger = Category.getInstance(BackgroundCommunityPurge.class);
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Attributes * Attributes
@ -43,7 +43,7 @@ class BackgroundSIGPurge implements Runnable
private EngineBackend engine; private EngineBackend engine;
private DataPool datapool; private DataPool datapool;
private UserBackend user; private UserBackend user;
private int sigid; private int cid;
private int num_confs; private int num_confs;
private int max_confid; private int max_confid;
private ReferenceCache conf_refcache; private ReferenceCache conf_refcache;
@ -53,13 +53,13 @@ class BackgroundSIGPurge implements Runnable
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
BackgroundSIGPurge(EngineBackend engine, DataPool datapool, UserBackend user, int sigid, int num_confs, BackgroundCommunityPurge(EngineBackend engine, DataPool datapool, UserBackend user, int cid, int num_confs,
int max_confid, ReferenceCache conf_refcache) int max_confid, ReferenceCache conf_refcache)
{ {
this.engine = engine; this.engine = engine;
this.datapool = datapool; this.datapool = datapool;
this.user = user; this.user = user;
this.sigid = sigid; this.cid = cid;
this.num_confs = num_confs; this.num_confs = num_confs;
this.max_confid = max_confid; this.max_confid = max_confid;
this.conf_refcache = conf_refcache; this.conf_refcache = conf_refcache;
@ -74,7 +74,7 @@ class BackgroundSIGPurge implements Runnable
public void run() public void run()
{ {
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("BackgroundSIGPurge running on SIG #" + sigid); logger.debug("BackgroundCommunityPurge running on community #" + cid);
Connection conn = null; // pooled database connection Connection conn = null; // pooled database connection
ParallelRunQueue rq = new ParallelRunQueue(2); ParallelRunQueue rq = new ParallelRunQueue(2);
@ -85,23 +85,23 @@ class BackgroundSIGPurge implements Runnable
Statement stmt = conn.createStatement(); Statement stmt = conn.createStatement();
// run some "lower priority" deletes // run some "lower priority" deletes
stmt.executeUpdate("DELETE FROM contacts WHERE owner_sigid = " + sigid + ";"); stmt.executeUpdate("DELETE FROM contacts WHERE owner_sigid = " + cid + ";");
stmt.executeUpdate("DELETE FROM sigftrs WHERE sigid = " + sigid + ";"); stmt.executeUpdate("DELETE FROM sigftrs WHERE sigid = " + cid + ";");
stmt.executeUpdate("DELETE FROM sigban WHERE sigid = " + sigid + ";"); 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]; int[] conf_ids = new int[num_confs];
StringBuffer sql = new StringBuffer("SELECT confid FROM sigtoconf WHERE sigid = "); 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()); ResultSet rs = stmt.executeQuery(sql.toString());
int conferences = 0; int conferences = 0;
while (rs.next()) while (rs.next())
conf_ids[conferences++] = rs.getInt(1); conf_ids[conferences++] = rs.getInt(1);
for (int i=0; i<conferences; i++) for (int i=0; i<conferences; i++)
{ // look to see if there's a conference SIG object first { // look to see if there's a conference community object first
Integer key = new Integer(conf_ids[i]); Integer key = new Integer(conf_ids[i]);
ConferenceSIGContext confobj = (ConferenceSIGContext)(conf_refcache.get(key)); ConferenceCommunityContext confobj = (ConferenceCommunityContext)(conf_refcache.get(key));
if (confobj!=null) if (confobj!=null)
{ // OK, there's an object - do the delete internally and release the object { // OK, there's an object - do the delete internally and release the object
conf_refcache.detach(key); conf_refcache.detach(key);
@ -113,18 +113,18 @@ class BackgroundSIGPurge implements Runnable
{ // we need to manually remove the conference ourselves { // we need to manually remove the conference ourselves
boolean delete_core = true; boolean delete_core = true;
// see if conference is linked to other SIGs - will determine whether we do the core purge // see if conference is linked to other communities - will determine whether we do the core purge
// routine // routine
sql.setLength(0); sql.setLength(0);
sql.append("SELECT sigid FROM sigtoconf WHERE confid = ").append(key).append(" AND sigid <> "); sql.append("SELECT sigid FROM sigtoconf WHERE confid = ").append(key).append(" AND sigid <> ");
sql.append(sigid).append(" LIMIT 1;"); sql.append(cid).append(" LIMIT 1;");
rs = stmt.executeQuery(sql.toString()); rs = stmt.executeQuery(sql.toString());
if (rs.next()) if (rs.next())
delete_core = false; delete_core = false;
// delete the sigtoconf record // delete the sigtoconf record
sql.setLength(0); 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(';'); sql.append(key).append(';');
if (delete_core) if (delete_core)
@ -139,7 +139,7 @@ class BackgroundSIGPurge implements Runnable
sql.append("SELECT COUNT(*), MAX(topicid) FROM topics WHERE confid = ").append(key).append(';'); sql.append("SELECT COUNT(*), MAX(topicid) FROM topics WHERE confid = ").append(key).append(';');
rs = stmt.executeQuery(sql.toString()); rs = stmt.executeQuery(sql.toString());
if (!(rs.next())) 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))); rq.queue(new BackgroundConferencePurge(engine,datapool,key.intValue(),rs.getInt(1),rs.getInt(2)));
} // end if (have to delete conference data) } // end if (have to delete conference data)
@ -149,18 +149,18 @@ class BackgroundSIGPurge implements Runnable
} // end for } // end for
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("BackgroundSIGPurge basic delete complete for sig #" + sigid); logger.debug("BackgroundCommunityPurge basic delete complete for community #" + cid);
} // end try } // end try
catch (SQLException e) catch (SQLException e)
{ // on an error, just die { // 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; return;
} // end catch } // end catch
catch (DataException de) catch (DataException de)
{ // on an error, just die { // 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; return;
} // end catch } // end catch
@ -174,8 +174,8 @@ class BackgroundSIGPurge implements Runnable
rq.run(); // now run the parallel queue to finish processing rq.run(); // now run the parallel queue to finish processing
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("BackgroundSIGPurge COMPLETE for sig #" + sigid); logger.debug("BackgroundCommunityPurge COMPLETE for community #" + cid);
} // end run } // end run
} // end class BackgroundSIGPurge } // end class BackgroundCommunityPurge

View File

@ -486,8 +486,8 @@ class CategoryDescriptorImpl implements CategoryDescriptor, Cloneable
} // end try } // end try
catch (SQLException e) catch (SQLException e)
{ // turn SQLException into data exception { // turn SQLException into data exception
logger.error("DB error reading SIG entries: " + e.getMessage(),e); logger.error("DB error reading category entries: " + e.getMessage(),e);
throw new DataException("unable to retrieve user SIG information: " + e.getMessage(),e); throw new DataException("unable to retrieve category information: " + e.getMessage(),e);
} // end catch } // end catch
finally finally
@ -554,8 +554,8 @@ class CategoryDescriptorImpl implements CategoryDescriptor, Cloneable
} // end try } // end try
catch (SQLException e) catch (SQLException e)
{ // turn SQLException into data exception { // turn SQLException into data exception
logger.error("DB error reading SIG entries: " + e.getMessage(),e); logger.error("DB error reading category entries: " + e.getMessage(),e);
throw new DataException("unable to retrieve user SIG information: " + e.getMessage(),e); throw new DataException("unable to retrieve category information: " + e.getMessage(),e);
} // end catch } // end catch
finally finally

View File

@ -18,26 +18,26 @@
package com.silverwrist.venice.core.impl; package com.silverwrist.venice.core.impl;
import com.silverwrist.venice.core.DataException; 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 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 boolean userCanCreateSubobjects();
public abstract String realSIGAlias(); public abstract String realCommunityAlias();
public abstract void detachConferenceDataObject(int confid) throws DataException; public abstract void detachConferenceDataObject(int confid) throws DataException;
public abstract boolean userCanDeleteSubobjects(); public abstract boolean userCanDeleteSubobjects();
} // end interface SIGBackend } // end interface CommunityBackend

View File

@ -25,7 +25,7 @@ import com.silverwrist.venice.core.AccessError;
import com.silverwrist.venice.core.ContactInfo; import com.silverwrist.venice.core.ContactInfo;
import com.silverwrist.venice.core.DataException; import com.silverwrist.venice.core.DataException;
public interface SIGData extends ReferencedData public interface CommunityData extends ReferencedData
{ {
public abstract int getID(); public abstract int getID();
@ -33,7 +33,7 @@ public interface SIGData extends ReferencedData
public abstract String getAlias(); public abstract String getAlias();
public abstract boolean isPublicSIG(); public abstract boolean isPublicCommunity();
public abstract int getCategoryID(); public abstract int getCategoryID();
@ -57,15 +57,15 @@ public interface SIGData extends ReferencedData
public abstract boolean checkMembership(int level, boolean is_member); public abstract boolean checkMembership(int level, boolean is_member);
public abstract boolean canReadSIGSubObjects(int level); public abstract boolean canReadCommunitySubObjects(int level);
public abstract boolean canModifySIGProfile(int level); public abstract boolean canModifyCommunityProfile(int level);
public abstract boolean canCreateSIGSubObjects(int level); public abstract boolean canCreateCommunitySubObjects(int level);
public abstract boolean canDeleteSIG(int level); public abstract boolean canDeleteCommunity(int level);
public abstract boolean canJoinSIG(int uid, int level); public abstract boolean canJoinCommunity(int uid, int level);
public abstract void putContactInfo(UserBackend user, ContactInfo ci) throws DataException; public abstract void putContactInfo(UserBackend user, ContactInfo ci) throws DataException;
@ -73,7 +73,7 @@ public interface SIGData extends ReferencedData
public abstract void putFeatureSet(UserBackend user, BitSet set) throws DataException; public abstract void putFeatureSet(UserBackend user, BitSet set) throws DataException;
public abstract List getSIGFeaturesList(int level); public abstract List getCommunityFeaturesList(int level);
public abstract String getDefaultApplet(); public abstract String getDefaultApplet();
@ -122,7 +122,7 @@ public interface SIGData extends ReferencedData
public abstract void setSecurityLevels(UserBackend user, int read, int write, int create, int delete, public abstract void setSecurityLevels(UserBackend user, int read, int write, int create, int delete,
int join) throws DataException; int join) throws DataException;
public abstract boolean isAdminSIG(); public abstract boolean isAdminCommunity();
public abstract void setMembership(UserBackend user, int uid, int grant_level, boolean locked, public abstract void setMembership(UserBackend user, int uid, int grant_level, boolean locked,
boolean hidden) throws DataException; boolean hidden) throws DataException;
@ -131,12 +131,13 @@ public interface SIGData extends ReferencedData
public abstract boolean isFeaturePresent(String symbol); public abstract boolean isFeaturePresent(String symbol);
public abstract ConferenceSIGContext getConferenceDataObject(int confid) throws DataException; public abstract ConferenceCommunityContext getConferenceDataObject(int confid) throws DataException;
public abstract void detachConferenceDataObject(int confid); public abstract void detachConferenceDataObject(int confid);
public abstract ConferenceSIGContext createConference(SIGBackend sig, String name, String alias, public abstract ConferenceCommunityContext createConference(CommunityBackend comm, String name, String alias,
String description, boolean pvt, boolean hide_list) String description, boolean pvt,
boolean hide_list)
throws DataException; throws DataException;
public abstract List searchForMembers(int field, int mode, String term, int offset, int count, public abstract List searchForMembers(int field, int mode, String term, int offset, int count,
@ -153,4 +154,4 @@ public interface SIGData extends ReferencedData
public abstract void sweepCache(); public abstract void sweepCache();
} // end interface SIGData } // end interface CommunityData

View File

@ -17,8 +17,8 @@
*/ */
package com.silverwrist.venice.core.impl; package com.silverwrist.venice.core.impl;
public interface SIGDataBackend public interface CommunityDataBackend
{ {
public abstract int realSIGID(); public abstract int realCommunityID();
} // end interface SIGDataBackend } // end interface CommunityDataBackend

View File

@ -7,7 +7,7 @@
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License. * 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 <erbo@silcom.com>, * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * 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.db.PostLinkDecoderContext;
import com.silverwrist.venice.core.DataException; import com.silverwrist.venice.core.DataException;
public interface ConferenceBackend extends SIGBackend public interface ConferenceBackend extends CommunityBackend
{ {
public abstract int realConfID(); public abstract int realConfID();

View File

@ -23,7 +23,7 @@ import java.util.List;
import com.silverwrist.util.rcache.ReferencedData; import com.silverwrist.util.rcache.ReferencedData;
import com.silverwrist.venice.core.DataException; import com.silverwrist.venice.core.DataException;
public interface ConferenceSIGContext extends ReferencedData public interface ConferenceCommunityContext extends ReferencedData
{ {
public abstract int getConfID(); public abstract int getConfID();
@ -35,7 +35,7 @@ public interface ConferenceSIGContext extends ReferencedData
public abstract Date getLastUpdateDate(); public abstract Date getLastUpdateDate();
public abstract int getSIGGrantedLevel(); public abstract int getCommunityGrantedLevel();
public abstract List getAliases() throws DataException; public abstract List getAliases() throws DataException;
@ -63,20 +63,20 @@ public interface ConferenceSIGContext extends ReferencedData
public abstract int getDeleteLevel() throws DataException; 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; 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 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(); public abstract short getSequence();
@ -84,14 +84,14 @@ public interface ConferenceSIGContext extends ReferencedData
public abstract boolean getHideList(); 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 boolean canHideTopics(int level);
public abstract String getAnAlias() throws DataException; public abstract String getAnAlias() throws DataException;
public abstract ReturnTopicInfo createNewTopic(SIGBackend sig, String title, String pseud, String body) public abstract ReturnTopicInfo createNewTopic(CommunityBackend comm, String title, String pseud,
throws DataException; String body) throws DataException;
public abstract boolean canScribblePosts(int level); public abstract boolean canScribblePosts(int level);
@ -109,4 +109,4 @@ public interface ConferenceSIGContext extends ReferencedData
public abstract void delete(UserBackend user) throws DataException; public abstract void delete(UserBackend user) throws DataException;
} // end interface ConferenceSIGContext } // end interface ConferenceCommunityContext

View File

@ -7,7 +7,7 @@
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License. * 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 <erbo@silcom.com>, * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * 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.security.AuditRecord;
import com.silverwrist.venice.core.*; import com.silverwrist.venice.core.*;
class ConferenceSIGContextImpl implements ConferenceSIGContext class ConferenceCommunityContextImpl implements ConferenceCommunityContext
{ {
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Inner class used to cache locally-important data * 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 * 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 EngineBackend engine; // engine object reference
private SIGDataBackend sig; // SIG object reference private CommunityDataBackend comm; // community object reference
private DataPool datapool; // data pool object private DataPool datapool; // data pool object
private int confid; // ID of this conference 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 short sequence; // sequence number this conference appears in list
private boolean hide_list; // hide the conference in the list? private boolean hide_list; // hide the conference in the list?
private ConfCache cache; // cache of locally-important information 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) ConferenceCommunityContextImpl(EngineBackend engine, CommunityDataBackend comm, DataPool datapool,
throws DataException int confid) throws DataException
{ {
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("new ConferenceSIGContextImpl(#" + String.valueOf(confid) + ") for SIG # " logger.debug("new ConferenceCommunityContextImpl(#" + String.valueOf(confid) + ") for community # "
+ String.valueOf(sig.realSIGID())); + comm.realCommunityID());
this.engine = engine; this.engine = engine;
this.sig = sig; this.comm = comm;
this.datapool = datapool; this.datapool = datapool;
this.confid = confid; this.confid = confid;
@ -119,15 +119,15 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
StringBuffer sql = StringBuffer sql =
new StringBuffer("SELECT c.createdate, c.name, c.descr, s.granted_lvl, s.sequence, s.hide_list " 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 = "); + "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()) if (logger.isDebugEnabled())
logger.debug("SQL: " + sql.toString()); logger.debug("SQL: " + sql.toString());
// Run that monster query! // Run that monster query!
ResultSet rs = stmt.executeQuery(sql.toString()); ResultSet rs = stmt.executeQuery(sql.toString());
if (!(rs.next())) if (!(rs.next()))
throw new DataException("conference ID#" + String.valueOf(confid) + " not found in SIG#" throw new DataException("conference ID#" + confid + " not found in community#"
+ String.valueOf(sig.realSIGID())); + comm.realCommunityID());
// fill in the "cache" and "level" indicators // fill in the "cache" and "level" indicators
this.cache = new ConfCache(rs.getString(2),rs.getString(3),SQLUtil.getFullDateTime(rs,1)); this.cache = new ConfCache(rs.getString(2),rs.getString(3),SQLUtil.getFullDateTime(rs,1));
@ -151,15 +151,15 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
} // end constructor } // end constructor
ConferenceSIGContextImpl(EngineBackend engine, SIGDataBackend sig, DataPool datapool, ConferenceCommunityContextImpl(EngineBackend engine, CommunityDataBackend comm, DataPool datapool,
short sequence, boolean hide_list, ConferenceData cdata) short sequence, boolean hide_list, ConferenceData cdata)
{ {
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("new ConferenceSIGContextImpl(NEW#" + String.valueOf(confid) + ") for SIG # " logger.debug("new ConferenceCommunityContextImpl(NEW#" + confid + ") for community # "
+ String.valueOf(sig.realSIGID())); + comm.realCommunityID());
this.engine = engine; this.engine = engine;
this.sig = sig; this.comm = comm;
this.datapool = datapool; this.datapool = datapool;
this.confid = cdata.getID(); this.confid = cdata.getID();
this.level = 0; this.level = 0;
@ -182,7 +182,7 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
confdata.rd_release(); confdata.rd_release();
confdata = null; confdata = null;
engine = null; engine = null;
sig = null; comm = null;
datapool = null; datapool = null;
cache = null; cache = null;
@ -196,7 +196,7 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
private synchronized ConferenceData getConferenceData() throws DataException private synchronized ConferenceData getConferenceData() throws DataException
{ {
if (confdata==null) if (confdata==null)
{ // attempt to load the ConferenceSIGContext { // attempt to load the ConferenceCommunityContext
if (deleted) if (deleted)
throw new DataException("This conference has been deleted."); throw new DataException("This conference has been deleted.");
confdata = engine.getConferenceDataObject(confid); confdata = engine.getConferenceDataObject(confid);
@ -213,12 +213,12 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
private synchronized ConferenceData getConferenceDataNE() private synchronized ConferenceData getConferenceDataNE()
{ {
if (confdata==null) if (confdata==null)
{ // we need to load the ConferenceSIGContext... { // we need to load the ConferenceCommunityContext...
if (deleted) if (deleted)
return null; // no return on deletion return null; // no return on deletion
try try
{ // attempt to load the ConferenceSIGContext { // attempt to load the ConferenceCommunityContext
confdata = engine.getConferenceDataObject(confid); confdata = engine.getConferenceDataObject(confid);
} // end try } // end try
@ -268,7 +268,7 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
} // end rd_getKey } // end rd_getKey
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Implementations from interface ConferenceSIGContext * Implementations from interface ConferenceCommunityContext
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
@ -324,11 +324,11 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
} // end getLastUpdateDate } // end getLastUpdateDate
public int getSIGGrantedLevel() public int getCommunityGrantedLevel()
{ {
return level; return level;
} // end getSIGGrantedLevel } // end getCommunityGrantedLevel
public List getAliases() throws DataException public List getAliases() throws DataException
{ {
@ -432,16 +432,16 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
} // end getDeleteLevel } // 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 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 } // 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 } // end setName
@ -451,25 +451,25 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
} // end setDescription } // 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 } // 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 } // 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 } // 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) if (deleted)
throw new DataException("This conference has been deleted."); throw new DataException("This conference has been deleted.");
@ -484,8 +484,8 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
// create the SQL statement // create the SQL statement
Statement stmt = conn.createStatement(); Statement stmt = conn.createStatement();
StringBuffer sql = new StringBuffer("UPDATE sigtoconf SET granted_lvl = "); 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(new_level).append(" WHERE sigid = ").append(this.comm.realCommunityID());
sql.append(confid).append(';'); sql.append(" AND confid = ").append(confid).append(';');
// execute the update // execute the update
stmt.executeUpdate(sql.toString()); stmt.executeUpdate(sql.toString());
@ -494,8 +494,8 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
level = new_level; level = new_level;
// create an audit record reflecting the change // create an audit record reflecting the change
ar = new AuditRecord(AuditRecord.CONF_SECURITY,sig.realUID(),sig.userRemoteAddress(),sig.realSIGID(), ar = new AuditRecord(AuditRecord.CONF_SECURITY,comm.realUID(),comm.userRemoteAddress(),
"conf=" + String.valueOf(confid)); comm.realCommunityID(),"conf=" + confid);
} // end try } // end try
catch (SQLException e) catch (SQLException e)
@ -523,7 +523,7 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
} // end finally } // end finally
} // end setSIGGrantedLevel } // end setCommunityGrantedLevel
public short getSequence() public short getSequence()
{ {
@ -545,7 +545,7 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
// create the SQL statement // create the SQL statement
Statement stmt = conn.createStatement(); Statement stmt = conn.createStatement();
StringBuffer sql = new StringBuffer("UPDATE sigtoconf SET sequence = "); 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(';'); sql.append(confid).append(';');
// execute the update // execute the update
@ -576,7 +576,7 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
} // end getHideList } // end getHideList
public void setHideList(SIGBackend sig, boolean flag) throws DataException public void setHideList(CommunityBackend comm, boolean flag) throws DataException
{ {
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("setHideList(conf #" + confid + ", " + flag + ")"); logger.debug("setHideList(conf #" + confid + ", " + flag + ")");
@ -605,7 +605,7 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
// create the SQL statement // create the SQL statement
Statement stmt = conn.createStatement(); Statement stmt = conn.createStatement();
StringBuffer sql = new StringBuffer("UPDATE sigtoconf SET hide_list = "); 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(';'); sql.append(" AND confid = ").append(confid).append(';');
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("SQL: " + sql.toString()); logger.debug("SQL: " + sql.toString());
@ -617,8 +617,8 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
hide_list = flag; hide_list = flag;
// create an audit record reflecting the change // create an audit record reflecting the change
ar = new AuditRecord(AuditRecord.CONF_SECURITY,sig.realUID(),sig.userRemoteAddress(),sig.realSIGID(), ar = new AuditRecord(AuditRecord.CONF_SECURITY,comm.realUID(),comm.userRemoteAddress(),
"conf=" + String.valueOf(confid)); comm.realCommunityID(),"conf=" + confid);
} // end try } // end try
catch (SQLException e) catch (SQLException e)
@ -666,7 +666,7 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
} // end getAnAlias } // 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 throws DataException
{ {
ConferenceData d = getConferenceData(); ConferenceData d = getConferenceData();
@ -677,7 +677,7 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
{ // preprocess the body argument through the HTML checker { // preprocess the body argument through the HTML checker
HTMLChecker text_ch = engine.createCheckerObject(engine.HTMLC_POST_BODY); HTMLChecker text_ch = engine.createCheckerObject(engine.HTMLC_POST_BODY);
text_ch.setContextValue("PostLinkDecoderContext", text_ch.setContextValue("PostLinkDecoderContext",
new PostLinkDecoderContext(sig.realSIGAlias(),conf_alias,new_topic)); new PostLinkDecoderContext(comm.realCommunityAlias(),conf_alias,new_topic));
try try
{ // run through the HTML checker { // run through the HTML checker
@ -693,7 +693,7 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
try try
{ // call down to create the new topic! { // 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 } // end try
catch (NotYetFinishedException e) catch (NotYetFinishedException e)
@ -788,15 +788,15 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
// see if we have to delete the core object as well // see if we have to delete the core object as well
StringBuffer sql = new StringBuffer("SELECT sigid FROM sigtoconf WHERE confid = "); 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()); ResultSet rs = stmt.executeQuery(sql.toString());
if (rs.next()) if (rs.next())
delete_core = false; // we don't delete the core yet 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.setLength(0);
sql.append("DELETE FROM sigtoconf WHERE confid = ").append(confid).append(" AND sigid = "); 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()); stmt.executeUpdate(sql.toString());
// record that we've been deleted // record that we've been deleted
@ -821,8 +821,8 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
} // end finally } // end finally
if (delete_core) if (delete_core)
{ // the conference is not linked to any other SIGs - we need to delete the core as well { // the conference is not linked to any other communities - we need to delete the core as well
c.delete(user,sig.realSIGID()); c.delete(user,comm.realCommunityID());
engine.detachConferenceDataObject(confid); engine.detachConferenceDataObject(confid);
} // end if } // end if
@ -833,4 +833,4 @@ class ConferenceSIGContextImpl implements ConferenceSIGContext
} // end delete } // end delete
} // end class ConferenceSIGContextImpl } // end class ConferenceCommunityContextImpl

View File

@ -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 * Attributes
@ -389,7 +389,7 @@ class ConferenceCoreData implements ConferenceData
} // end getDeleteLevel } // 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 int nuke, int change, int delete) throws DataException
{ {
if (deleted) if (deleted)
@ -425,8 +425,8 @@ class ConferenceCoreData implements ConferenceData
last_update = now; last_update = now;
// create an audit record reflecting the change // create an audit record reflecting the change
ar = new AuditRecord(AuditRecord.CONF_SECURITY,sig.realUID(),sig.userRemoteAddress(),sig.realSIGID(), ar = new AuditRecord(AuditRecord.CONF_SECURITY,comm.realUID(),comm.userRemoteAddress(),
"conf=" + confid); comm.realCommunityID(),"conf=" + confid);
} // end try } // end try
catch (SQLException e) catch (SQLException e)
@ -456,7 +456,7 @@ class ConferenceCoreData implements ConferenceData
} // end setSecurityLevels } // end setSecurityLevels
public synchronized void setName(SIGBackend sig, String val) throws DataException public synchronized void setName(CommunityBackend comm, String val) throws DataException
{ {
if (deleted) if (deleted)
throw new DataException("This conference has been deleted."); throw new DataException("This conference has been deleted.");
@ -483,8 +483,8 @@ class ConferenceCoreData implements ConferenceData
last_update = now; last_update = now;
// create an audit record reflecting the change // create an audit record reflecting the change
ar = new AuditRecord(AuditRecord.CONF_SECURITY,sig.realUID(),sig.userRemoteAddress(),sig.realSIGID(), ar = new AuditRecord(AuditRecord.CONF_SECURITY,comm.realUID(),comm.userRemoteAddress(),
"conf=" + confid); comm.realCommunityID(),"conf=" + confid);
} // end try } // end try
catch (SQLException e) catch (SQLException e)
@ -554,7 +554,7 @@ class ConferenceCoreData implements ConferenceData
} // end setDescription } // end setDescription
public synchronized void addAlias(SIGBackend sig, String alias) throws DataException public synchronized void addAlias(CommunityBackend comm, String alias) throws DataException
{ {
if (deleted) if (deleted)
throw new DataException("This conference has been 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 // set the database's update date and generate a new audit record
touchUpdate(conn); touchUpdate(conn);
ar = new AuditRecord(AuditRecord.CONF_ALIAS,sig.realUID(),sig.userRemoteAddress(),sig.realSIGID(), ar = new AuditRecord(AuditRecord.CONF_ALIAS,comm.realUID(),comm.userRemoteAddress(),
"conf=" + confid,"add=" + alias); comm.realCommunityID(),"conf=" + confid,"add=" + alias);
} // end try } // end try
catch (SQLException e) catch (SQLException e)
@ -629,7 +629,7 @@ class ConferenceCoreData implements ConferenceData
} // end addAlias } // end addAlias
public synchronized void removeAlias(SIGBackend sig, String alias) throws DataException public synchronized void removeAlias(CommunityBackend comm, String alias) throws DataException
{ {
if (deleted) if (deleted)
throw new DataException("This conference has been deleted."); throw new DataException("This conference has been deleted.");
@ -686,8 +686,8 @@ class ConferenceCoreData implements ConferenceData
touchUpdate(conn); touchUpdate(conn);
if ((cached_alias!=null) && cached_alias.equals(alias)) if ((cached_alias!=null) && cached_alias.equals(alias))
cached_alias = null; // also release the cached alias and force a re-get 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(), ar = new AuditRecord(AuditRecord.CONF_ALIAS,comm.realUID(),comm.userRemoteAddress(),
"conf=" + confid,"remove=" + alias); comm.realCommunityID(),"conf=" + confid,"remove=" + alias);
} // end if } // end if
@ -719,7 +719,7 @@ class ConferenceCoreData implements ConferenceData
} // end removeAlias } // 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) if (deleted)
throw new DataException("This conference has been deleted."); throw new DataException("This conference has been deleted.");
@ -780,8 +780,8 @@ class ConferenceCoreData implements ConferenceData
if (did_it) if (did_it)
{ // set the database's update date and generate a new audit record { // set the database's update date and generate a new audit record
touchUpdate(conn); touchUpdate(conn);
ar = new AuditRecord(AuditRecord.CONF_MEMBERSHIP,sig.realUID(),sig.userRemoteAddress(),sig.realSIGID(), ar = new AuditRecord(AuditRecord.CONF_MEMBERSHIP,comm.realUID(),comm.userRemoteAddress(),
"conf=" + confid,"uid=" + uid,"level=" + grant_level); comm.realCommunityID(),"conf=" + confid,"uid=" + uid,"level=" + grant_level);
} // end if } // end if
@ -861,7 +861,7 @@ class ConferenceCoreData implements ConferenceData
} // end getAnAlias } // 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 String body, int body_lines) throws DataException
{ {
if (deleted) if (deleted)
@ -888,10 +888,11 @@ class ConferenceCoreData implements ConferenceData
// add the topic row to the database // add the topic row to the database
StringBuffer sql = new StringBuffer("INSERT INTO topics (confid, num, creator_uid, createdate, " StringBuffer sql = new StringBuffer("INSERT INTO topics (confid, num, creator_uid, createdate, "
+ "lastupdate, name) VALUES ("); + "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(); creation = new java.util.Date();
String now_str = SQLUtil.encodeDate(creation); 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()) if (logger.isDebugEnabled())
logger.debug("SQL: " + sql.toString()); logger.debug("SQL: " + sql.toString());
stmt.executeUpdate(sql.toString()); stmt.executeUpdate(sql.toString());
@ -905,7 +906,7 @@ class ConferenceCoreData implements ConferenceData
// insert the "header" for the "zero post" in the topic // insert the "header" for the "zero post" in the topic
sql.setLength(0); sql.setLength(0);
sql.append("INSERT INTO posts (topicid, num, linecount, creator_uid, posted, pseud) VALUES ("); 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("');"); sql.append(", '").append(now_str).append("', '").append(pseud).append("');");
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("SQL: " + sql.toString()); logger.debug("SQL: " + sql.toString());
@ -936,8 +937,9 @@ class ConferenceCoreData implements ConferenceData
last_update = creation; last_update = creation;
// create an audit record indicating we were successful // create an audit record indicating we were successful
ar = new AuditRecord(AuditRecord.CREATE_TOPIC,sig.realUID(),sig.userRemoteAddress(),sig.realSIGID(), ar = new AuditRecord(AuditRecord.CREATE_TOPIC,comm.realUID(),comm.userRemoteAddress(),
"confid=" + confid,"num=" + new_topic_num,"title=" + title); comm.realCommunityID(),"confid=" + confid,"num=" + new_topic_num,
"title=" + title);
} // end try } // end try
finally finally
@ -1160,7 +1162,7 @@ class ConferenceCoreData implements ConferenceData
} // end canDeleteConference } // 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) if (deleted)
throw new DataException("This conference has been deleted."); throw new DataException("This conference has been deleted.");
@ -1214,7 +1216,7 @@ class ConferenceCoreData implements ConferenceData
} // end finally } // end finally
// create an audit record indicating we were successful // 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); "confid=" + confid);
} // end try } // end try
@ -1257,9 +1259,9 @@ class ConferenceCoreData implements ConferenceData
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
static ReturnConfSeq createConference(EngineBackend engine, SIGBackend sig, DataPool datapool, String name, static ReturnConfSeq createConference(EngineBackend engine, CommunityBackend comm, DataPool datapool,
String alias, String description, boolean pvt, boolean hide_list, String name, String alias, String description, boolean pvt,
int host_uid) throws DataException boolean hide_list, int host_uid) throws DataException
{ {
Connection conn = null; // database connection Connection conn = null; // database connection
AuditRecord ar = null; // audit record AuditRecord ar = null; // audit record
@ -1289,7 +1291,8 @@ class ConferenceCoreData implements ConferenceData
// compute our new sequence number // compute our new sequence number
sql.setLength(0); 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()) if (logger.isDebugEnabled())
logger.debug("SQL: " + sql.toString()); logger.debug("SQL: " + sql.toString());
rs = stmt.executeQuery(sql.toString()); rs = stmt.executeQuery(sql.toString());
@ -1327,10 +1330,10 @@ class ConferenceCoreData implements ConferenceData
logger.debug("SQL: " + sql.toString()); logger.debug("SQL: " + sql.toString());
stmt.executeUpdate(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.setLength(0);
sql.append("INSERT INTO sigtoconf (sigid, confid, sequence, hide_list) VALUES ("); 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(");"); sql.append(", ").append(hide_list ? '1' : '0').append(");");
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("SQL: " + sql.toString()); logger.debug("SQL: " + sql.toString());
@ -1353,8 +1356,8 @@ class ConferenceCoreData implements ConferenceData
} // end finally } // end finally
// create an audit record indicating we were successful // create an audit record indicating we were successful
ar = new AuditRecord(AuditRecord.CREATE_CONF,sig.realUID(),sig.userRemoteAddress(),sig.realSIGID(), ar = new AuditRecord(AuditRecord.CREATE_CONF,comm.realUID(),comm.userRemoteAddress(),
"confid=" + new_confid,"name=" + name,"alias=" + alias); comm.realCommunityID(),"confid=" + new_confid,"name=" + name,"alias=" + alias);
} // end try } // end try
catch (SQLException e) catch (SQLException e)

View File

@ -61,25 +61,25 @@ public interface ConferenceData extends ReferencedData
public abstract int getDeleteLevel(); 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; 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 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 boolean canHideTopics(int level);
public abstract String getAnAlias() throws DataException; public abstract String getAnAlias() throws DataException;
public abstract ReturnTopicInfo createNewTopic(SIGBackend sig, String title, String pseud, String body, public abstract ReturnTopicInfo createNewTopic(CommunityBackend comm, String title, String pseud,
int body_lines) throws DataException; String body, int body_lines) throws DataException;
public abstract boolean canScribblePosts(int level); public abstract boolean canScribblePosts(int level);
@ -101,6 +101,6 @@ public interface ConferenceData extends ReferencedData
public abstract boolean canDeleteConference(int level); 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 } // end interface ConferenceData

View File

@ -163,12 +163,12 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
*/ */
private EngineBackend engine; // pointer to the engine back end 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 DataPool datapool; // pointer to the data pool
private int confid; // the conference ID private int confid; // the conference ID
private int level; // access level I have within this conference private int level; // access level I have within this conference
private ConfCache cache; // cached internal data for the 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 boolean settings_loaded = false; // did we load the settings from the database?
private String pseud; // default pseud to use in this conference private String pseud; // default pseud to use in this conference
private java.util.Date last_read; // last date we read 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, protected ConferenceUserContextImpl(EngineBackend engine, CommunityBackend comm, DataPool datapool,
String name, String description, java.util.Date created, int sig_level, int confid, String name, String description, java.util.Date created,
int user_level, Connection conn) throws DataException int comm_level, int user_level, Connection conn) throws DataException
{ {
this.engine = engine; this.engine = engine;
this.sig = sig; this.comm = comm;
this.datapool = datapool; this.datapool = datapool;
this.confid = confid; this.confid = confid;
this.cache = new ConfCache(name,description,created,sig_level); this.cache = new ConfCache(name,description,created,comm_level);
recalcLevel(user_level); recalcLevel(user_level);
tryLoadSettings(conn); tryLoadSettings(conn);
} // end constructor } // end constructor
ConferenceUserContextImpl(EngineBackend engine, SIGBackend sig, DataPool datapool, ConferenceUserContextImpl(EngineBackend engine, CommunityBackend comm, DataPool datapool,
ConferenceSIGContext cdata) throws DataException ConferenceCommunityContext cdata) throws DataException
{ {
this.engine = engine; this.engine = engine;
this.sig = sig; this.comm = comm;
this.datapool = datapool; this.datapool = datapool;
this.confid = cdata.getConfID(); this.confid = cdata.getConfID();
this.cache = null; this.cache = null;
cdata.rd_addRef(); cdata.rd_addRef();
this.confdata = cdata; this.confdata = cdata;
recalcLevel(DefaultLevels.hostConference()); recalcLevel(DefaultLevels.hostConference());
this.pseud = sig.userDefaultPseud(); this.pseud = comm.userDefaultPseud();
this.last_read = null; this.last_read = null;
this.last_post = null; this.last_post = null;
@ -221,7 +221,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
if (confdata!=null) if (confdata!=null)
confdata.rd_release(); confdata.rd_release();
engine = null; engine = null;
sig = null; comm = null;
datapool = null; datapool = null;
cache = null; cache = null;
confdata = 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) if (confdata==null)
{ // attempt to load the ConferenceSIGContext { // attempt to load the ConferenceCommunityContext
if (deleted) if (deleted)
throw new DataException("This conference has been deleted."); throw new DataException("This conference has been deleted.");
confdata = sig.getConferenceDataObject(confid); confdata = comm.getConferenceDataObject(confid);
if (confdata!=null) if (confdata!=null)
sig.saveMRU("conf",confdata); comm.saveMRU("conf",confdata);
// clear cache when we get the real confdata // clear cache when we get the real confdata
cache = null; cache = null;
@ -252,18 +252,18 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
} // end getConferenceData } // end getConferenceData
private ConferenceSIGContext getConferenceDataNE() private ConferenceCommunityContext getConferenceDataNE()
{ {
if (confdata==null) if (confdata==null)
{ // we need to load the ConferenceSIGContext... { // we need to load the ConferenceCommunityContext...
if (deleted) if (deleted)
return null; // no return on deletion return null; // no return on deletion
try try
{ // attempt to load the ConferenceSIGContext { // attempt to load the ConferenceCommunityContext
confdata = sig.getConferenceDataObject(confid); confdata = comm.getConferenceDataObject(confid);
if (confdata!=null) if (confdata!=null)
sig.saveMRU("conf",confdata); comm.saveMRU("conf",confdata);
} // end try } // end try
catch (DataException e) catch (DataException e)
@ -284,21 +284,21 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
private void recalcLevel(int new_level) private void recalcLevel(int new_level)
{ {
level = sig.realSIGLevel(); level = comm.realCommunityLevel();
int sig_level = -1; int comm_level = -1;
if (cache!=null) if (cache!=null)
sig_level = cache.getGrantsLevel(); comm_level = cache.getGrantsLevel();
else else
{ // look at the ConferenceSIGContext to get the SIG level { // look at the ConferenceCommunityContext to get the community level
ConferenceSIGContext c = getConferenceDataNE(); ConferenceCommunityContext c = getConferenceDataNE();
if (c!=null) if (c!=null)
sig_level = c.getSIGGrantedLevel(); comm_level = c.getCommunityGrantedLevel();
} // end else } // end else
if (sig_level>level) if (comm_level>level)
level = sig_level; level = comm_level;
if (new_level>level) if (new_level>level)
level = new_level; level = new_level;
@ -313,7 +313,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
{ // look up the conference settings for this user { // look up the conference settings for this user
Statement stmt = conn.createStatement(); Statement stmt = conn.createStatement();
StringBuffer sql = new StringBuffer("SELECT * FROM confsettings WHERE confid = "); 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()); ResultSet rs = stmt.executeQuery(sql.toString());
if (rs.next()) if (rs.next())
@ -327,7 +327,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
else else
{ // just default everything { // just default everything
settings_loaded = false; settings_loaded = false;
pseud = sig.userDefaultPseud(); pseud = comm.userDefaultPseud();
last_read = null; last_read = null;
last_post = null; last_post = null;
@ -358,7 +358,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
{ {
if (cache!=null) if (cache!=null)
return cache.getName(); return cache.getName();
ConferenceSIGContext c = getConferenceDataNE(); ConferenceCommunityContext c = getConferenceDataNE();
if (c!=null) if (c!=null)
return c.getName(); return c.getName();
else else
@ -370,7 +370,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
{ {
if (cache!=null) if (cache!=null)
return cache.getDescription(); return cache.getDescription();
ConferenceSIGContext c = getConferenceDataNE(); ConferenceCommunityContext c = getConferenceDataNE();
if (c!=null) if (c!=null)
return c.getDescription(); return c.getDescription();
else else
@ -382,7 +382,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
{ {
if (cache!=null) if (cache!=null)
return cache.getCreated(); return cache.getCreated();
ConferenceSIGContext c = getConferenceDataNE(); ConferenceCommunityContext c = getConferenceDataNE();
if (c!=null) if (c!=null)
return c.getCreationDate(); return c.getCreationDate();
else else
@ -392,7 +392,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
public java.util.Date getLastUpdateDate() public java.util.Date getLastUpdateDate()
{ {
ConferenceSIGContext c = getConferenceDataNE(); ConferenceCommunityContext c = getConferenceDataNE();
if (c!=null) if (c!=null)
return c.getLastUpdateDate(); return c.getLastUpdateDate();
else else
@ -414,7 +414,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
public boolean canReadConference() public boolean canReadConference()
{ {
ConferenceSIGContext c = getConferenceDataNE(); ConferenceCommunityContext c = getConferenceDataNE();
if (c==null) if (c==null)
return false; return false;
return c.canReadConference(level); return c.canReadConference(level);
@ -423,7 +423,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
public boolean canPostToConference() public boolean canPostToConference()
{ {
ConferenceSIGContext c = getConferenceDataNE(); ConferenceCommunityContext c = getConferenceDataNE();
if (c==null) if (c==null)
return false; return false;
return c.canPostToConference(level); return c.canPostToConference(level);
@ -432,7 +432,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
public boolean canCreateTopic() public boolean canCreateTopic()
{ {
ConferenceSIGContext c = getConferenceDataNE(); ConferenceCommunityContext c = getConferenceDataNE();
if (c==null) if (c==null)
return false; return false;
return c.canCreateTopic(level); return c.canCreateTopic(level);
@ -441,7 +441,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
public boolean canChangeConference() public boolean canChangeConference()
{ {
ConferenceSIGContext c = getConferenceDataNE(); ConferenceCommunityContext c = getConferenceDataNE();
if (c==null) if (c==null)
return false; return false;
return c.canChangeConference(level); return c.canChangeConference(level);
@ -592,7 +592,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
} // end if } // end if
// Now call through to set the security levels. // 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 } // end setSecurityLevels
@ -606,7 +606,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
} // end if } // end if
// Call through to set the name. // Call through to set the name.
getConferenceData().setName(sig,val); getConferenceData().setName(comm,val);
} // end setName } // end setName
@ -634,7 +634,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
} // end if } // end if
// Call through to add the alias. // Call through to add the alias.
getConferenceData().addAlias(sig,alias); getConferenceData().addAlias(comm,alias);
} // end addAlias } // end addAlias
@ -648,7 +648,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
} // end if } // end if
// Call through to remove the alias. // Call through to remove the alias.
getConferenceData().removeAlias(sig,alias); getConferenceData().removeAlias(comm,alias);
} // end removeAlias } // end removeAlias
@ -662,10 +662,10 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
} // end if } // end if
// call down to set the level // 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 we adjusted our OWN level, reflect that change.
if (uid==sig.realUID()) if (uid==comm.realUID())
recalcLevel(grant_level); recalcLevel(grant_level);
} // end setMembership } // end setMembership
@ -682,38 +682,38 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
} // end removeMember } // end removeMember
public int getSIGGrantedLevel() throws DataException, AccessError public int getCommunityGrantedLevel() throws DataException, AccessError
{ {
ConferenceSIGContext c = getConferenceData(); ConferenceCommunityContext c = getConferenceData();
if (!(sig.userCanCreateSubobjects())) if (!(comm.userCanCreateSubobjects()))
{ // this user can't modify the conference security { // this user can't modify the conference security
logger.error("user not permitted to retrieve security info"); logger.error("user not permitted to retrieve security info");
throw new AccessError("You are not permitted to retrieve security information for this conference."); throw new AccessError("You are not permitted to retrieve security information for this conference.");
} // end if } // 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(); ConferenceCommunityContext c = getConferenceData();
if (!(sig.userCanCreateSubobjects())) if (!(comm.userCanCreateSubobjects()))
{ // this user can't modify the conference security { // this user can't modify the conference security
logger.error("user not permitted to change security info"); logger.error("user not permitted to change security info");
throw new AccessError("You are not permitted to change security information for this conference."); throw new AccessError("You are not permitted to change security information for this conference.");
} // end if } // end if
c.setSIGGrantedLevel(sig,new_level); c.setCommunityGrantedLevel(comm,new_level);
} // end setSIGGrantedLevel } // end setCommunityGrantedLevel
public short getSequence() throws DataException, AccessError public short getSequence() throws DataException, AccessError
{ {
ConferenceSIGContext c = getConferenceData(); ConferenceCommunityContext c = getConferenceData();
if (!(sig.userCanCreateSubobjects())) if (!(comm.userCanCreateSubobjects()))
{ // this user can't modify the conference security { // this user can't modify the conference security
logger.error("user not permitted to retrieve layout info"); logger.error("user not permitted to retrieve layout info");
throw new AccessError("You are not permitted to retrieve layout information for this conference."); 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 public void setSequence(short seq) throws DataException, AccessError
{ {
ConferenceSIGContext c = getConferenceData(); ConferenceCommunityContext c = getConferenceData();
if (!(sig.userCanCreateSubobjects())) if (!(comm.userCanCreateSubobjects()))
{ // this user can't modify the conference security { // this user can't modify the conference security
logger.error("user not permitted to set layout info"); logger.error("user not permitted to set layout info");
throw new AccessError("You are not permitted to set layout information for this conference."); 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 public boolean getHideList() throws DataException, AccessError
{ {
ConferenceSIGContext c = getConferenceData(); ConferenceCommunityContext c = getConferenceData();
if (!(sig.userCanCreateSubobjects())) if (!(comm.userCanCreateSubobjects()))
{ // this user can't modify the conference security { // this user can't modify the conference security
logger.error("user not permitted to retrieve security info"); logger.error("user not permitted to retrieve security info");
throw new AccessError("You are not permitted to retrieve security information for this conference."); 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 public void setHideList(boolean flag) throws DataException, AccessError
{ {
ConferenceSIGContext c = getConferenceData(); ConferenceCommunityContext c = getConferenceData();
if (!(sig.userCanCreateSubobjects())) if (!(comm.userCanCreateSubobjects()))
{ // this user can't modify the conference security { // this user can't modify the conference security
logger.error("user not permitted to change security info"); logger.error("user not permitted to change security info");
throw new AccessError("You are not permitted to change security information for this conference."); throw new AccessError("You are not permitted to change security information for this conference.");
} // end if } // end if
c.setHideList(sig,flag); c.setHideList(comm,flag);
} // end setHideList } // end setHideList
@ -774,7 +774,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
public void setDefaultPseud(String val) throws DataException public void setDefaultPseud(String val) throws DataException
{ {
if (sig.userIsAnonymous()) if (comm.userIsAnonymous())
return; // anonymous user can't change pseud return; // anonymous user can't change pseud
if (deleted) if (deleted)
throw new DataException("This conference has been deleted."); throw new DataException("This conference has been deleted.");
@ -790,13 +790,14 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
if (settings_loaded) if (settings_loaded)
{ // generate an update statement { // generate an update statement
sql.append("UPDATE confsettings SET default_pseud = '").append(SQLUtil.encodeString(val)); 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 } // end if
else else
{ // need to insert a confsettings row { // need to insert a confsettings row
sql.append("INSERT INTO confsettings (confid, uid, default_pseud) VALUES (").append(confid); 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 } // end else
@ -825,7 +826,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
public boolean anyUnread() public boolean anyUnread()
{ {
if (deleted || sig.userIsAnonymous()) if (deleted || comm.userIsAnonymous())
return false; return false;
Connection conn = null; // pooled database connection Connection conn = null; // pooled database connection
@ -842,7 +843,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
Statement stmt = conn.createStatement(); Statement stmt = conn.createStatement();
StringBuffer sql = new StringBuffer("SELECT t.topicid FROM topics t LEFT JOIN topicsettings s " StringBuffer sql = new StringBuffer("SELECT t.topicid FROM topics t LEFT JOIN topicsettings s "
+ "ON t.topicid = s.topicid AND s.uid = "); + "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 " sql.append(" AND t.archived = 0 AND IFNULL(s.hidden,0) = 0 "
+ "AND (t.top_message - IFNULL(s.last_message,-1)) > 0 LIMIT 1;"); + "AND (t.top_message - IFNULL(s.last_message,-1)) > 0 LIMIT 1;");
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
@ -931,7 +932,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
try try
{ // call down to create the new topic! { // call down to create the new topic!
real_title = title_ch.getValue(); 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 } // end try
catch (NotYetFinishedException e) 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!) // create a new record in topicsettings (we WERE the first to post in the topic after all!)
Statement stmt = conn.createStatement(); Statement stmt = conn.createStatement();
StringBuffer sql = new StringBuffer("INSERT INTO topicsettings (topicid, uid, last_post) VALUES ("); 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("');"); sql.append(SQLUtil.encodeDate(new_topic_inf.getCreateDate())).append("');");
stmt.executeUpdate(sql.toString()); stmt.executeUpdate(sql.toString());
@ -991,7 +992,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
public HTMLChecker getNewTopicPreviewChecker() public HTMLChecker getNewTopicPreviewChecker()
{ {
ConferenceSIGContext c = getConferenceDataNE(); ConferenceCommunityContext c = getConferenceDataNE();
short new_topic; short new_topic;
if (c==null) if (c==null)
new_topic = 0; new_topic = 0;
@ -1012,7 +1013,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
} // end if } // end if
if (sig.userIsAnonymous()) if (comm.userIsAnonymous())
return; // anonymous user can't fixseen return; // anonymous user can't fixseen
Connection conn = null; Connection conn = null;
@ -1031,7 +1032,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
new StringBuffer("SELECT topics.topicid, topics.top_message, ISNULL(topicsettings.last_message) " new StringBuffer("SELECT topics.topicid, topics.top_message, ISNULL(topicsettings.last_message) "
+ "FROM topics LEFT JOIN topicsettings ON topics.topicid = topicsettings.topicid " + "FROM topics LEFT JOIN topicsettings ON topics.topicid = topicsettings.topicid "
+ "AND topicsettings.uid = "); + "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()); ResultSet rs = stmt.executeQuery(sql.toString());
// use the results to build up a list of FixSeenHelpers // use the results to build up a list of FixSeenHelpers
@ -1045,7 +1046,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
while (it.hasNext()) while (it.hasNext())
{ // just hit each one in turn { // just hit each one in turn
FixSeenHelper fsh = (FixSeenHelper)(it.next()); FixSeenHelper fsh = (FixSeenHelper)(it.next());
fsh.doFix(stmt,sig.realUID(),now); fsh.doFix(stmt,comm.realUID(),now);
} // end while } // end while
@ -1238,8 +1239,8 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
public void delete() throws DataException, AccessError public void delete() throws DataException, AccessError
{ {
ConferenceSIGContext ctxt = getConferenceData(); ConferenceCommunityContext ctxt = getConferenceData();
if (!(ctxt.canDeleteConference(level)) || !(sig.userCanDeleteSubobjects())) if (!(ctxt.canDeleteConference(level)) || !(comm.userCanDeleteSubobjects()))
{ // no way can we delete this conference, not NO way! { // no way can we delete this conference, not NO way!
logger.error("user not permitted to delete conference"); logger.error("user not permitted to delete conference");
throw new AccessError("You are not permitted to delete this conference."); throw new AccessError("You are not permitted to delete this conference.");
@ -1247,8 +1248,8 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
} // end if } // end if
// call the methods required to delete the conference // call the methods required to delete the conference
ctxt.delete(sig); ctxt.delete(comm);
sig.detachConferenceDataObject(confid); comm.detachConferenceDataObject(confid);
// flag that we've been deleted // flag that we've been deleted
cache = null; cache = null;
@ -1266,10 +1267,10 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
public boolean canDeleteConference() public boolean canDeleteConference()
{ {
ConferenceSIGContext c = getConferenceDataNE(); ConferenceCommunityContext c = getConferenceDataNE();
if (c==null) if (c==null)
return false; return false;
return (c.canDeleteConference(level) && sig.userCanDeleteSubobjects()); return (c.canDeleteConference(level) && comm.userCanDeleteSubobjects());
} // end canDeleteConference } // end canDeleteConference
@ -1284,8 +1285,8 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
// do a quickie query // do a quickie query
StringBuffer sql = new StringBuffer("SELECT sequence FROM confhotlist WHERE uid = "); 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(comm.realUID()).append(" AND sigid = ").append(comm.realCommunityID());
sql.append(confid).append(';'); sql.append(" AND confid = ").append(confid).append(';');
ResultSet rs = stmt.executeQuery(sql.toString()); ResultSet rs = stmt.executeQuery(sql.toString());
return rs.next(); return rs.next();
@ -1318,15 +1319,15 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
try try
{ // do a quickie query to see if we're already in the hotlist { // do a quickie query to see if we're already in the hotlist
StringBuffer sql = new StringBuffer("SELECT sequence FROM confhotlist WHERE uid = "); 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(comm.realUID()).append(" AND sigid = ").append(comm.realCommunityID());
sql.append(confid).append(';'); sql.append(" AND confid = ").append(confid).append(';');
ResultSet rs = stmt.executeQuery(sql.toString()); ResultSet rs = stmt.executeQuery(sql.toString());
if (rs.next()) if (rs.next())
return; // already in hotlist - this is a no-op return; // already in hotlist - this is a no-op
// find a sequence number for the new entry // find a sequence number for the new entry
sql.setLength(0); 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()); rs = stmt.executeQuery(sql.toString());
if (!(rs.next())) if (!(rs.next()))
throw new InternalStateError("bogus query result on addToHotlist"); throw new InternalStateError("bogus query result on addToHotlist");
@ -1334,8 +1335,8 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
// add the new record // add the new record
sql.setLength(0); sql.setLength(0);
sql.append("INSERT INTO confhotlist (uid, sequence, sigid, confid) VALUES (").append(sig.realUID()); sql.append("INSERT INTO confhotlist (uid, sequence, sigid, confid) VALUES (").append(comm.realUID());
sql.append(", ").append(new_sequence).append(", ").append(sig.realSIGID()).append(", "); sql.append(", ").append(new_sequence).append(", ").append(comm.realCommunityID()).append(", ");
sql.append(confid).append(");"); sql.append(confid).append(");");
stmt.executeUpdate(sql.toString()); stmt.executeUpdate(sql.toString());
@ -1365,17 +1366,17 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
public boolean canAddToHotlist() public boolean canAddToHotlist()
{ {
if (sig.userIsAnonymous()) if (comm.userIsAnonymous())
return false; return false;
return !(isInHotlist()); return !(isInHotlist());
} // end canAddToHotlist } // end canAddToHotlist
public SIGContext getEnclosingSIG() public CommunityContext getEnclosingCommunity()
{ {
return sig.selfSIG(); return comm.selfCommunity();
} // end getEnclosingSIG } // end getEnclosingCommunity
public void removeFromHotlist() throws DataException 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, // create the DELETE statement and just execute it blind (if this conference is not in the hotlist,
// the DELETE is a no-op). // the DELETE is a no-op).
StringBuffer sql = new StringBuffer("DELETE FROM confhotlist WHERE uid = "); StringBuffer sql = new StringBuffer("DELETE FROM confhotlist WHERE uid = ");
sql.append(sig.realUID()).append(" AND sigid = ").append(sig.realSIGID()).append(" AND confid = "); sql.append(comm.realUID()).append(" AND sigid = ").append(comm.realCommunityID());
sql.append(confid).append(';'); sql.append(" AND confid = ").append(confid).append(';');
stmt.executeUpdate(sql.toString()); stmt.executeUpdate(sql.toString());
} // end try } // 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, // create the UPDATE statement and just execute it blind (if this conference is not in the hotlist,
// the UPDATE is a no-op). // the UPDATE is a no-op).
StringBuffer sql = new StringBuffer("UPDATE confhotlist SET sequence = "); StringBuffer sql = new StringBuffer("UPDATE confhotlist SET sequence = ");
sql.append(seq).append(" WHERE uid = ").append(sig.realUID()).append(" AND sigid = "); sql.append(seq).append(" WHERE uid = ").append(comm.realUID()).append(" AND sigid = ");
sql.append(sig.realSIGID()).append(" AND confid = ").append(confid).append(';'); sql.append(comm.realCommunityID()).append(" AND confid = ").append(confid).append(';');
stmt.executeUpdate(sql.toString()); stmt.executeUpdate(sql.toString());
} // end try } // end try
@ -1448,114 +1449,114 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
public int realUID() public int realUID()
{ {
return sig.realUID(); return comm.realUID();
} // end realUID } // end realUID
public int realBaseLevel() public int realBaseLevel()
{ {
return sig.realBaseLevel(); return comm.realBaseLevel();
} // end realBaseLevel } // end realBaseLevel
public String userRemoteAddress() public String userRemoteAddress()
{ {
return sig.userRemoteAddress(); return comm.userRemoteAddress();
} // end userRemoteAddress } // end userRemoteAddress
public String userDefaultPseud() throws DataException public String userDefaultPseud() throws DataException
{ {
return sig.userDefaultPseud(); return comm.userDefaultPseud();
} // end userDefaultPseud } // end userDefaultPseud
public boolean userIsAnonymous() public boolean userIsAnonymous()
{ {
return sig.userIsAnonymous(); return comm.userIsAnonymous();
} // end userIsAnonymous } // end userIsAnonymous
public String realUserName() public String realUserName()
{ {
return sig.realUserName(); return comm.realUserName();
} // end realUserName } // end realUserName
public String realEmailAddress() throws DataException public String realEmailAddress() throws DataException
{ {
return sig.realEmailAddress(); return comm.realEmailAddress();
} // end realEmailAddress } // end realEmailAddress
public String realFullName() throws DataException public String realFullName() throws DataException
{ {
return sig.realFullName(); return comm.realFullName();
} // end realFullName } // end realFullName
public void saveMRU(String tag, ReferencedData data) public void saveMRU(String tag, ReferencedData data)
{ {
sig.saveMRU(tag,data); comm.saveMRU(tag,data);
} // end saveMRU } // 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() public boolean userHideHiddenConferences()
{ {
return sig.userHideHiddenConferences(); return comm.userHideHiddenConferences();
} // end 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 } // end getConferenceDataObject
public boolean userCanCreateSubobjects() public boolean userCanCreateSubobjects()
{ {
return sig.userCanCreateSubobjects(); return comm.userCanCreateSubobjects();
} // end 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 public void detachConferenceDataObject(int confid) throws DataException
{ {
sig.detachConferenceDataObject(confid); comm.detachConferenceDataObject(confid);
} // end detachConferenceDataObject } // end detachConferenceDataObject
public boolean userCanDeleteSubobjects() public boolean userCanDeleteSubobjects()
{ {
return sig.userCanDeleteSubobjects(); return comm.userCanDeleteSubobjects();
} // end userCanDeleteSubobjects } // end userCanDeleteSubobjects
@ -1572,7 +1573,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
public boolean userCanHide() public boolean userCanHide()
{ {
ConferenceSIGContext c = getConferenceDataNE(); ConferenceCommunityContext c = getConferenceDataNE();
if (c==null) if (c==null)
return false; return false;
return c.canHideTopics(level); return c.canHideTopics(level);
@ -1581,7 +1582,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
public void touchRead(Connection conn) throws SQLException public void touchRead(Connection conn) throws SQLException
{ {
if (deleted || sig.userIsAnonymous()) if (deleted || comm.userIsAnonymous())
return; // anonymous user can't update squat return; // anonymous user can't update squat
Statement stmt = conn.createStatement(); Statement stmt = conn.createStatement();
@ -1591,13 +1592,13 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
if (settings_loaded) if (settings_loaded)
{ // generate an update statement { // generate an update statement
sql.append("UPDATE confsettings SET last_read = '").append(SQLUtil.encodeDate(now)); 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 } // end if
else else
{ // need to insert a confsettings row { // need to insert a confsettings row
sql.append("INSERT INTO confsettings (confid, uid, default_pseud, last_read) VALUES (").append(confid); 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("');"); sql.append(SQLUtil.encodeDate(now)).append("');");
} // end else } // end else
@ -1613,7 +1614,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
public void touchPost(Connection conn, java.util.Date post_date) throws SQLException 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 return; // anonymous user can't update squat
Statement stmt = conn.createStatement(); Statement stmt = conn.createStatement();
@ -1622,13 +1623,13 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
if (settings_loaded) if (settings_loaded)
{ // generate an update statement { // generate an update statement
sql.append("UPDATE confsettings SET last_post = '").append(SQLUtil.encodeDate(post_date)); 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 } // end if
else else
{ // need to insert a confsettings row { // need to insert a confsettings row
sql.append("INSERT INTO confsettings (confid, uid, default_pseud, last_read) VALUES (").append(confid); 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("');"); sql.append(SQLUtil.encodeDate(post_date)).append("');");
} // end else } // end else
@ -1663,7 +1664,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
public boolean userCanScribble() public boolean userCanScribble()
{ {
ConferenceSIGContext c = getConferenceDataNE(); ConferenceCommunityContext c = getConferenceDataNE();
if (c==null) if (c==null)
return false; return false;
return c.canScribblePosts(level); return c.canScribblePosts(level);
@ -1672,7 +1673,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
public boolean userCanNuke() public boolean userCanNuke()
{ {
ConferenceSIGContext c = getConferenceDataNE(); ConferenceCommunityContext c = getConferenceDataNE();
if (c==null) if (c==null)
return false; return false;
return c.canNukePosts(level); return c.canNukePosts(level);
@ -1699,7 +1700,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
public PostLinkDecoderContext createDecoderContext(short topicid) public PostLinkDecoderContext createDecoderContext(short topicid)
{ {
return new PostLinkDecoderContext(sig.realSIGAlias(),realConfAlias(),topicid); return new PostLinkDecoderContext(comm.realCommunityAlias(),realConfAlias(),topicid);
} // end createDecoderContext } // 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()) 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 ArrayList rc = new ArrayList(); // return from this function
Connection conn = null; // pooled database connection Connection conn = null; // pooled database connection
@ -1721,17 +1724,18 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
Statement stmt = conn.createStatement(); Statement stmt = conn.createStatement();
// Build a monster query! The idea is that we get the basic info of all conferences linked to the // 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 // community, 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.) // linked community. (Commonly this is 0; the standard user level within the community will then take
// If the user has an entry within the confmember table for that conference, the level granted by // precedence.) If the user has an entry within the confmember table for that conference, the level
// that entry is also reported. The highest of these two levels and the level of the user within the // granted by that entry is also reported. The highest of these two levels and the level of the user
// SIG is then taken to be the user's access level within the conference. // within the community is then taken to be the user's access level within the conference.
StringBuffer sql = StringBuffer sql =
new StringBuffer("SELECT c.confid, c.createdate, c.name, c.descr, s.granted_lvl, m.granted_lvl " 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 " + "FROM sigtoconf s, confs c LEFT JOIN confmember m ON c.confid = m.confid "
+ "AND m.uid = "); + "AND m.uid = ");
sql.append(sig.realUID()).append(" WHERE s.confid = c.confid AND s.sigid = ").append(sig.realSIGID()); sql.append(comm.realUID()).append(" WHERE s.confid = c.confid AND s.sigid = ");
if (sig.userHideHiddenConferences()) sql.append(comm.realCommunityID());
if (comm.userHideHiddenConferences())
sql.append(" AND s.hide_list = 0"); sql.append(" AND s.hide_list = 0");
sql.append(" ORDER BY s.sequence, c.name;"); sql.append(" ORDER BY s.sequence, c.name;");
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
@ -1742,7 +1746,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
while (rs.next()) while (rs.next())
{ // create the appropriate objects to return { // 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.getString(4),SQLUtil.getFullDateTime(rs,2),
rs.getInt(5),rs.getInt(6),conn); rs.getInt(5),rs.getInt(6),conn);
rc.add(cc); rc.add(cc);
@ -1765,13 +1769,14 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
return Collections.unmodifiableList(rc); 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 int confid) throws DataException
{ {
if (logger.isDebugEnabled()) 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 Connection conn = null; // pooled database connection
@ -1780,24 +1785,25 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
conn = datapool.getConnection(); conn = datapool.getConnection();
Statement stmt = conn.createStatement(); 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). // conference ID as a search term (thus we can return at most one row).
StringBuffer sql = StringBuffer sql =
new StringBuffer("SELECT c.createdate, c.name, c.descr, s.granted_lvl, m.granted_lvl " 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 " + "FROM sigtoconf s, confs c LEFT JOIN confmember m ON c.confid = m.confid "
+ "AND m.uid = "); + "AND m.uid = ");
sql.append(sig.realUID()).append(" WHERE s.confid = c.confid AND s.sigid = "); sql.append(comm.realUID()).append(" 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()) if (logger.isDebugEnabled())
logger.debug("SQL: " + sql.toString()); logger.debug("SQL: " + sql.toString());
// Run that monster query! // Run that monster query!
ResultSet rs = stmt.executeQuery(sql.toString()); ResultSet rs = stmt.executeQuery(sql.toString());
if (!(rs.next())) 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 // 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.getString(3),SQLUtil.getFullDateTime(rs,1),
rs.getInt(4),rs.getInt(5),conn); rs.getInt(4),rs.getInt(5),conn);
@ -1817,12 +1823,12 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
} // end getConference } // end getConference
static ConferenceContext getConference(EngineBackend engine, SIGBackend sig, DataPool datapool, static ConferenceContext getConference(EngineBackend engine, CommunityBackend comm, DataPool datapool,
String alias) throws DataException String alias) throws DataException
{ {
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("getConference(\"" + alias + "\") for SIG # " + sig.realSIGID() + ", user #" logger.debug("getConference(\"" + alias + "\") for community # " + comm.realCommunityID() + ", user #"
+ sig.realUID()); + comm.realUID());
Connection conn = null; // pooled database connection 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 " 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 " + "FROM sigtoconf s, confalias a, confs c LEFT JOIN confmember m ON "
+ "c.confid = m.confid AND m.uid = "); + "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(comm.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.realCommunityID()).append(" AND a.alias = '").append(SQLUtil.encodeString(alias));
sql.append("';"); sql.append("';");
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("SQL: " + sql.toString()); logger.debug("SQL: " + sql.toString());
@ -1847,10 +1853,11 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
// Run that monster query! // Run that monster query!
ResultSet rs = stmt.executeQuery(sql.toString()); ResultSet rs = stmt.executeQuery(sql.toString());
if (!(rs.next())) 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 // 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); SQLUtil.getFullDateTime(rs,2),rs.getInt(5),rs.getInt(6),conn);
} // end try } // end try
@ -1882,7 +1889,7 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
conn = datapool.getConnection(); conn = datapool.getConnection();
Statement stmt = conn.createStatement(); 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 // but we need to pull in "confs" and "confmember" (left joined) to get enough data to create
// a ConferenceUserContextImpl object. // a ConferenceUserContextImpl object.
StringBuffer sql = StringBuffer sql =
@ -1898,24 +1905,24 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend
ResultSet rs = stmt.executeQuery(sql.toString()); ResultSet rs = stmt.executeQuery(sql.toString());
// Create some temporary data structures to assist us in building the return list. // 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()) while (rs.next())
{ // retrieve the sigid from the resultset first { // retrieve the community id from the resultset first
Integer sigid = new Integer(rs.getInt(1)); Integer cid = new Integer(rs.getInt(1));
// we need a SIG backend for our conference, so make sure we have one // we need a community backend for our conference, so make sure we have one
SIGBackend sig = (SIGBackend)(sig_backend_cache.get(sigid)); CommunityBackend comm = (CommunityBackend)(comm_backend_cache.get(cid));
if (sig==null) if (comm==null)
{ // get it and make sure it's in the cache for next time { // get it and make sure it's in the cache for next time
sig = SIGUserContextImpl.getSIGBackend(engine,user,datapool,conn,sigid.intValue()); comm = CommunityUserContextImpl.getCommunityBackend(engine,user,datapool,conn,cid.intValue());
sig_backend_cache.put(sigid,sig); comm_backend_cache.put(cid,comm);
} // end if } // end if
// make the new ConferenceContext // make the new ConferenceContext
ConferenceContext conf = 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); SQLUtil.getFullDateTime(rs,5),rs.getInt(6),rs.getInt(7),conn);
// and create the actual return value // and create the actual return value

View File

@ -130,7 +130,7 @@ class ContactInfoImpl implements ContactInfo, Stashable
private boolean private_fax; // is fax hidden? private boolean private_fax; // is fax hidden?
private boolean private_email; // is email hidden? private boolean private_email; // is email hidden?
private int owner_uid; // UID that owns this contact record 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 java.util.Date last_update; // date of last update
private boolean is_modified = false; // have we modified this ContactInfo? private boolean is_modified = false; // have we modified this ContactInfo?
private ImageHook image_hook = null; // image hook object private ImageHook image_hook = null; // image hook object
@ -157,13 +157,13 @@ class ContactInfoImpl implements ContactInfo, Stashable
* Constructs a new blank <CODE>ContactInfoImpl</CODE> object. * Constructs a new blank <CODE>ContactInfoImpl</CODE> object.
* *
* @param owner_uid UID that owns this 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()) if (logger.isDebugEnabled())
logger.debug("new ContactInfoImpl (empty) for UID = " + owner_uid + ", SIGID = " + owner_sigid); logger.debug("new ContactInfoImpl (empty) for UID = " + owner_uid + ", Community ID = " + owner_cid);
makeEmpty(owner_uid,owner_sigid); makeEmpty(owner_uid,owner_cid);
} // end constructor } // 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.contactid = -1;
this.given_name = null; this.given_name = null;
@ -232,7 +232,7 @@ class ContactInfoImpl implements ContactInfo, Stashable
this.private_fax = false; this.private_fax = false;
this.private_email = false; this.private_email = false;
this.owner_uid = owner_uid; this.owner_uid = owner_uid;
this.owner_sigid = owner_sigid; this.owner_cid = owner_cid;
this.last_update = null; this.last_update = null;
} // end makeEmpty } // end makeEmpty
@ -273,7 +273,7 @@ class ContactInfoImpl implements ContactInfo, Stashable
private_fax = rs.getBoolean("pvt_fax"); private_fax = rs.getBoolean("pvt_fax");
private_email = rs.getBoolean("pvt_email"); private_email = rs.getBoolean("pvt_email");
owner_uid = rs.getInt("owner_uid"); owner_uid = rs.getInt("owner_uid");
owner_sigid = rs.getInt("owner_sigid"); owner_cid = rs.getInt("owner_sigid");
photo_url = rs.getString("photo_url"); photo_url = rs.getString("photo_url");
url = rs.getString("url"); url = rs.getString("url");
last_update = SQLUtil.getFullDateTime(rs,"lastupdate"); last_update = SQLUtil.getFullDateTime(rs,"lastupdate");
@ -587,8 +587,8 @@ class ContactInfoImpl implements ContactInfo, Stashable
} // end if } // end if
else else
{ // figure out how to create the image hook object { // figure out how to create the image hook object
if (owner_sigid>=0) if (owner_cid>=0)
image_hook = new NewImageHook(prefix,ImageStore.TYPE_SIG_LOGO,owner_sigid,mimetype,length,data); image_hook = new NewImageHook(prefix,ImageStore.TYPE_COMMUNITY_LOGO,owner_cid,mimetype,length,data);
else else
image_hook = new NewImageHook(prefix,ImageStore.TYPE_USER_PHOTO,owner_uid,mimetype,length,data); 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 } // end getOwnerUID
public int getOwnerSIGID() public int getOwnerCommunityID()
{ {
return owner_sigid; return owner_cid;
} // end getOwnerSIGID } // end getOwnerCommunityID
public java.util.Date getLastUpdate() public java.util.Date getLastUpdate()
{ {
@ -754,7 +754,7 @@ class ContactInfoImpl implements ContactInfo, Stashable
} // end if } // end if
else else
{ // this involves creating a new record { // this involves creating a new record
if (owner_sigid>=0) if (owner_cid>=0)
stmt.executeUpdate("LOCK TABLES contacts WRITE, sigs WRITE;"); stmt.executeUpdate("LOCK TABLES contacts WRITE, sigs WRITE;");
else else
stmt.executeUpdate("LOCK TABLES contacts WRITE, users WRITE;"); 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_phone ? '1' : '0').append(", ");
buf.append(private_fax ? '1' : '0').append(", "); buf.append(private_fax ? '1' : '0').append(", ");
buf.append(private_email ? '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(photo_url)).append(", ");
buf.append(SQLUtil.encodeStringArg(url)).append(", '"); buf.append(SQLUtil.encodeStringArg(url)).append(", '");
update = new java.util.Date(); 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 // and patch the database table so we know what our contact ID is
buf.setLength(0); buf.setLength(0);
if (owner_sigid>=0) if (owner_cid>=0)
{ // update the SIGS table { // update the SIGS table
buf.append("UPDATE sigs SET contactid = ").append(new_contactid).append(" WHERE sigid = "); buf.append("UPDATE sigs SET contactid = ").append(new_contactid).append(" WHERE sigid = ");
buf.append(owner_sigid).append(';'); buf.append(owner_cid).append(';');
} // end if } // end if
else else

View File

@ -34,11 +34,11 @@ public interface EngineBackend
public static final int IP_POSTSPERPAGE = 0; public static final int IP_POSTSPERPAGE = 0;
public static final int IP_POSTSATTOP = 1; public static final int IP_POSTSATTOP = 1;
public static final int IP_MAXSEARCHRETURN = 2; 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_MAXCONFMEMBERDISPLAY = 4;
public static final int IP_NUMFRONTPAGEPOSTS = 5; public static final int IP_NUMFRONTPAGEPOSTS = 5;
public static final int IP_NUMAUDITRECSPERPAGE = 6; 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 static final int IPC_NUM_PARAMS = 8;
public abstract SimpleEmailer createEmailer(); public abstract SimpleEmailer createEmailer();
@ -51,13 +51,13 @@ public interface EngineBackend
public abstract String getLanguageNameForCode(String code); 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 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); public abstract String getAppletForFeature(int code);
@ -65,7 +65,7 @@ public interface EngineBackend
public abstract BitSet getDefaultFeaturesMask(); public abstract BitSet getDefaultFeaturesMask();
public abstract void registerNewSIG(SIGData sig); public abstract void registerNewCommunity(CommunityData comm);
public abstract int getFeatureIndexBySymbol(String symbol); public abstract int getFeatureIndexBySymbol(String symbol);

View File

@ -33,7 +33,7 @@ class ImageStore implements BinaryData
*/ */
public static final short TYPE_USER_PHOTO = 1; 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); private static Category logger = Category.getInstance(ImageStore.class);

View File

@ -7,7 +7,7 @@
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License. * 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 <erbo@silcom.com>, * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are

View File

@ -7,7 +7,7 @@
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License. * 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 <erbo@silcom.com>, * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are

View File

@ -7,7 +7,7 @@
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License. * 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 <erbo@silcom.com>, * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are

View File

@ -527,7 +527,7 @@ class TopicMessageUserContextImpl implements TopicMessageContext
// record what we did in an audit record // record what we did in an audit record
ar = new AuditRecord(AuditRecord.HIDE_MESSAGE,conf.realUID(),conf.userRemoteAddress(), 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"); flag ? "hide" : "unhide");
} // end try } // end try
@ -659,7 +659,7 @@ class TopicMessageUserContextImpl implements TopicMessageContext
// record what we did in an audit record // record what we did in an audit record
ar = new AuditRecord(AuditRecord.SCRIBBLE_MESSAGE,conf.realUID(),conf.userRemoteAddress(), 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 } // end try
catch (SQLException e) catch (SQLException e)
@ -768,7 +768,7 @@ class TopicMessageUserContextImpl implements TopicMessageContext
// record what we did in an audit record // record what we did in an audit record
ar = new AuditRecord(AuditRecord.NUKE_MESSAGE,conf.realUID(),conf.userRemoteAddress(), 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 } // end try
catch (SQLException e) catch (SQLException e)
@ -949,7 +949,7 @@ class TopicMessageUserContextImpl implements TopicMessageContext
// Generate an audit record indicating what we did. // Generate an audit record indicating what we did.
ar = new AuditRecord(AuditRecord.UPLOAD_ATTACHMENT,conf.realUID(),conf.userRemoteAddress(), 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); "len=" + length + ",type=" + m_type + ",name=" + file + ",method=" + tmp_stgmethod);
} // end try } // end try
@ -1060,14 +1060,14 @@ class TopicMessageUserContextImpl implements TopicMessageContext
{ // insert the post reference into the database { // insert the post reference into the database
StringBuffer sql = StringBuffer sql =
new StringBuffer("INSERT INTO postpublish (sigid, postid, by_uid, on_date) VALUES ("); 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(); java.util.Date now = new java.util.Date();
sql.append(", '").append(SQLUtil.encodeDate(now)).append("');"); sql.append(", '").append(SQLUtil.encodeDate(now)).append("');");
stmt.executeUpdate(sql.toString()); stmt.executeUpdate(sql.toString());
// generate an audit record indicating what we've done // generate an audit record indicating what we've done
ar = new AuditRecord(AuditRecord.PUBLISH_POST,conf.realUID(),conf.userRemoteAddress(), 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 // establish cached data object for front page
engine.publishNew(new PublishedMessageImpl(datapool,postid,parent,num,linecount,creator_uid, engine.publishNew(new PublishedMessageImpl(datapool,postid,parent,num,linecount,creator_uid,

View File

@ -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 * Attributes
@ -302,7 +302,7 @@ class TopicUserContextImpl implements TopicContext
{ // success! save the flag and generate an audit record { // success! save the flag and generate an audit record
frozen = flag; frozen = flag;
ar = new AuditRecord(AuditRecord.TOPIC_FREEZE,conf.realUID(),conf.userRemoteAddress(), 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"); + String.valueOf(topicid),flag ? "freeze" : "unfreeze");
} // end if } // end if
@ -363,7 +363,7 @@ class TopicUserContextImpl implements TopicContext
{ // success! save the flag and generate an audit record { // success! save the flag and generate an audit record
archived = flag; archived = flag;
ar = new AuditRecord(AuditRecord.TOPIC_ARCHIVE,conf.realUID(),conf.userRemoteAddress(), 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"); + String.valueOf(topicid),flag ? "archive" : "unarchive");
} // end if } // end if
@ -801,7 +801,7 @@ class TopicUserContextImpl implements TopicContext
// record what we did in an audit record // record what we did in an audit record
ar = new AuditRecord(AuditRecord.POST_MESSAGE,conf.realUID(),conf.userRemoteAddress(), 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), + String.valueOf(topicid) + ",post=" + String.valueOf(new_post_id),
"pseud=" + real_pseud); "pseud=" + real_pseud);
@ -911,7 +911,7 @@ class TopicUserContextImpl implements TopicContext
// record what we did in an audit record // record what we did in an audit record
ar = new AuditRecord(AuditRecord.DELETE_TOPIC,conf.realUID(),conf.userRemoteAddress(), 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)); + String.valueOf(topicid));
} // end try } // end try

View File

@ -223,12 +223,12 @@ class UserContextImpl implements UserContext, UserBackend
} // end sendEmailConfirmation } // end sendEmailConfirmation
private void autoJoinSIGs(Connection conn) throws SQLException private void autoJoinCommunities(Connection conn) throws SQLException
{ {
if (logger.isDebugEnabled()) 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(); Statement stmt = conn.createStatement();
StringBuffer sql = StringBuffer sql =
new StringBuffer("SELECT sigmember.sigid, sigmember.locked FROM users, sigmember, sigs " 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()); logger.debug("SQL: " + sql.toString());
ResultSet rs = stmt.executeQuery(sql.toString()); ResultSet rs = stmt.executeQuery(sql.toString());
// Save the SIGIDs returned into temporary array lists. // Save the community IDs returned into temporary array lists.
ArrayList tmp_sigid = new ArrayList(); ArrayList tmp_cid = new ArrayList();
ArrayList tmp_locked = new ArrayList(); ArrayList tmp_locked = new ArrayList();
while (rs.next()) while (rs.next())
{ // save off the "sigid" and "locked" column pairs { // save off the "cid" and "locked" column pairs
tmp_sigid.add(new Integer(rs.getInt(1))); tmp_cid.add(new Integer(rs.getInt(1)));
tmp_locked.add(new Boolean(rs.getBoolean(2))); tmp_locked.add(new Boolean(rs.getBoolean(2)));
} // end while } // 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); sql.setLength(0);
for (int i=0; i<tmp_sigid.size(); i++) for (int i=0; i<tmp_cid.size(); i++)
{ // see if the user is already a member of this SIG { // see if the user is already a member of this community
Integer x_sigid = (Integer)(tmp_sigid.get(i)); Integer x_cid = (Integer)(tmp_cid.get(i));
rs = stmt.executeQuery("SELECT sigid FROM sigmember WHERE sigid = " + x_sigid + " AND uid = " + uid rs = stmt.executeQuery("SELECT sigid FROM sigmember WHERE sigid = " + x_cid + " AND uid = " + uid
+ ";"); + ";");
if (!(rs.next())) if (!(rs.next()))
{ // tack this information onto the end of our big "INSERT" command { // tack this information onto the end of our big "INSERT" command
@ -263,8 +263,8 @@ class UserContextImpl implements UserContext, UserBackend
sql.append("INSERT INTO sigmember (sigid, uid, granted_lvl, locked) VALUES "); sql.append("INSERT INTO sigmember (sigid, uid, granted_lvl, locked) VALUES ");
else else
sql.append(", "); sql.append(", ");
sql.append("(").append(x_sigid).append(", ").append(uid).append(", "); sql.append("(").append(x_cid).append(", ").append(uid).append(", ");
sql.append(DefaultLevels.memberSIG()).append(", ").append(x_locked.booleanValue() ? '1' : '0'); sql.append(DefaultLevels.memberCommunity()).append(", ").append(x_locked.booleanValue() ? '1' : '0');
sql.append(")"); sql.append(")");
} // end if } // end if
@ -280,7 +280,7 @@ class UserContextImpl implements UserContext, UserBackend
} // end if } // end if
} // end autoJoinSIGs } // end autoJoinCommunities
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Implementations from interface UserContext * Implementations from interface UserContext
@ -468,8 +468,8 @@ class UserContextImpl implements UserContext, UserBackend
email_verified = true; email_verified = true;
level = DefaultLevels.afterEmailVerification(); level = DefaultLevels.afterEmailVerification();
autoJoinSIGs(conn); // EJB 4/14/2001 - handle autojoin of any SIGs we couldn't autojoin at account autoJoinCommunities(conn); // EJB 4/14/2001 - handle autojoin of any SIGs we couldn't autojoin at
// creation time // account creation time
// record an audit message indicating that we verified OK // record an audit message indicating that we verified OK
ar = new AuditRecord(AuditRecord.VERIFY_OK,uid,remote_addr); ar = new AuditRecord(AuditRecord.VERIFY_OK,uid,remote_addr);
@ -594,9 +594,9 @@ class UserContextImpl implements UserContext, UserBackend
logger.debug("putContactInfo() for UID " + uid); logger.debug("putContactInfo() for UID " + uid);
boolean email_changed = false; boolean email_changed = false;
if ((ci.getOwnerUID()!=uid) || (ci.getOwnerSIGID()>=0)) if ((ci.getOwnerUID()!=uid) || (ci.getOwnerCommunityID()>=0))
{ // the contact information is not owned correctly { // 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)"); + "), should be (" + uid + ", -1)");
throw new DataException("invalid contact information record"); throw new DataException("invalid contact information record");
@ -857,23 +857,23 @@ class UserContextImpl implements UserContext, UserBackend
} // end setDescription } // 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 public List getRootCategoryList() throws DataException
{ {
@ -887,41 +887,43 @@ class UserContextImpl implements UserContext, UserBackend
} // end getCategoryDescriptor } // 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 public List searchForCategories(int mode, String term, int offset, int count) throws DataException
{ {
@ -939,36 +941,37 @@ class UserContextImpl implements UserContext, UserBackend
} // end getSearchCategoryCount } // end getSearchCategoryCount
public SIGContext createSIG(String name, String alias, String language, String synopsis, String rules, public CommunityContext createCommunity(String name, String alias, String language, String synopsis,
String joinkey, int hide_mode) throws DataException, AccessError String rules, String joinkey, int hide_mode)
throws DataException, AccessError
{ {
if (!canCreateSIG()) if (!canCreateCommunity())
throw new AccessError("You are not authorized to create new SIGs."); throw new AccessError("You are not authorized to create new communities.");
// Convert the "hide mode" value into the two hide flags. // Convert the "hide mode" value into the two hide flags.
boolean hide_dir = (hide_mode!=SIGContext.HIDE_NONE); boolean hide_dir = (hide_mode!=CommunityContext.HIDE_NONE);
boolean hide_search = (hide_mode==SIGContext.HIDE_BOTH); boolean hide_search = (hide_mode==CommunityContext.HIDE_BOTH);
// Create the new SIG's database entries and internal data. // Create the new community's database entries and internal data.
SIGData new_sig = SIGCoreData.createSIG(engine,this,datapool,name,alias,uid,language,synopsis,rules, CommunityData new_comm = CommunityCoreData.createCommunity(engine,this,datapool,name,alias,uid,language,
joinkey,hide_dir,hide_search); synopsis,rules,joinkey,hide_dir,hide_search);
// Create the SIG context we return to the user. // Create the community context we return to the user.
SIGContext rc = new SIGUserContextImpl(engine,this,datapool,new_sig); 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? :-) // And that's it! You expected lightning bolts maybe? :-)
return rc; 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 public List getSideBoxList() throws DataException
{ {
@ -1550,20 +1553,20 @@ class UserContextImpl implements UserContext, UserBackend
} // end loadNewUser } // end loadNewUser
void autoJoinSIGs() throws DataException void autoJoinCommunities() throws DataException
{ {
Connection conn = null; Connection conn = null;
try try
{ // get a database connection and call the internal function { // get a database connection and call the internal function
conn = datapool.getConnection(); conn = datapool.getConnection();
autoJoinSIGs(conn); autoJoinCommunities(conn);
} // end try } // end try
catch (SQLException e) catch (SQLException e)
{ // database error - this is a DataException { // database error - this is a DataException
logger.error("error autojoining SIGs: " + e.getMessage(),e); logger.error("error autojoining communities: " + e.getMessage(),e);
throw new DataException("unable to autojoin SIGs: " + e.getMessage(),e); throw new DataException("unable to autojoin communities: " + e.getMessage(),e);
} // end catch } // end catch
finally finally
@ -1573,6 +1576,6 @@ class UserContextImpl implements UserContext, UserBackend
} // end finally } // end finally
} // end autoJoinSIGs } // end autoJoinCommunities
} // end class UserContextImpl } // end class UserContextImpl

View File

@ -7,7 +7,7 @@
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License. * 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 <erbo@silcom.com>, * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are

View File

@ -104,7 +104,7 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
class VeniceFeatureDef implements SIGFeature class VeniceFeatureDef implements CommunityFeature
{ {
int code; int code;
String symbol; String symbol;
@ -331,14 +331,14 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend
{ // if we're interrupted, just schedule the next run a little early { // if we're interrupted, just schedule the next run a little early
} // end catch } // end catch
// sweep the SIG cache first // sweep the community cache first
List sigs = sig_refcache.sweepReturn(); List comms = comm_refcache.sweepReturn();
Iterator it = sigs.iterator(); Iterator it = comms.iterator();
while (it.hasNext()) while (it.hasNext())
{ // perform subsweeps on the SIG data { // perform subsweeps on the community data
SIGData sig = (SIGData)(it.next()); CommunityData comm = (CommunityData)(it.next());
sig.sweepCache(); comm.sweepCache();
sig.rd_release(); comm.rd_release();
} // end while } // end while
@ -352,22 +352,22 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend
} // end class CacheSweeper } // 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 { // do nothing
} // end constructor } // end constructor
public ReferencedData build(Object key) throws ReferencedDataBuilderException public ReferencedData build(Object key) throws ReferencedDataBuilderException
{ {
Integer xsigid = (Integer)key; Integer xcid = (Integer)key;
try try
{ // create the desired object { // create the desired object
return new SIGCoreData(VeniceEngineImpl.this,datapool,xsigid.intValue()); return new CommunityCoreData(VeniceEngineImpl.this,datapool,xcid.intValue());
} // end try } // end try
catch (DataException e) catch (DataException e)
@ -378,7 +378,7 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend
} // end build } // end build
} // end class SIGCoreDataCreator } // end class CommunityCoreDataCreator
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Internal class for creating new ConferenceCoreData objects. * 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 Properties email_props = null; // email properties
private javax.mail.Session mailsession = null; // email session object private javax.mail.Session mailsession = null; // email session object
private Hashtable stock_messages = null; // stock messages holder private Hashtable stock_messages = null; // stock messages holder
private ReferenceCache sig_refcache = new ReferenceCache(); private ReferenceCache comm_refcache = new ReferenceCache();
private SIGCoreDataCreator sig_creator = new SIGCoreDataCreator(); private CommunityCoreDataCreator comm_creator = new CommunityCoreDataCreator();
private VeniceFeatureDef[] features; // master feature table private VeniceFeatureDef[] features; // master feature table
private Hashtable feature_syms = new Hashtable(); // hashtable mapping symbols to features private Hashtable feature_syms = new Hashtable(); // hashtable mapping symbols to features
private ReferenceCache conf_refcache = new ReferenceCache(); 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_POSTSPERPAGE] = rs.getInt(1);
gp_ints[IP_POSTSATTOP] = rs.getInt(2); gp_ints[IP_POSTSATTOP] = rs.getInt(2);
gp_ints[IP_MAXSEARCHRETURN] = rs.getInt(3); 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_MAXCONFMEMBERDISPLAY] = rs.getInt(5);
gp_ints[IP_NUMFRONTPAGEPOSTS] = rs.getInt(6); gp_ints[IP_NUMFRONTPAGEPOSTS] = rs.getInt(6);
gp_ints[IP_NUMAUDITRECSPERPAGE] = rs.getInt(7); gp_ints[IP_NUMAUDITRECSPERPAGE] = rs.getInt(7);
gp_ints[IP_CREATESIGLVL] = rs.getInt(8); gp_ints[IP_CREATECOMMUNITYLVL] = rs.getInt(8);
} // end loadDefaults } // 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) // create a new context for the user (they're now effectively logged in)
UserContextImpl rc = new UserContextImpl(this,datapool); UserContextImpl rc = new UserContextImpl(this,datapool);
rc.loadNewUser(remote_addr,new_uid,DefaultLevels.newUser(),username,confirm_num,created,created); 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()) if (logger.isDebugEnabled())
logger.debug("...created new user context"); logger.debug("...created new user context");
return rc; return rc;
} // end createNewAccount } // end createNewAccount
public boolean aliasExists(String alias, int exist_sigid) public boolean aliasExists(String alias, int exist_cid)
{ {
checkInitialized(); checkInitialized();
Connection conn = null; Connection conn = null;
@ -1403,8 +1403,8 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend
Statement stmt = conn.createStatement(); Statement stmt = conn.createStatement();
StringBuffer sql = new StringBuffer("SELECT sigid FROM sigs WHERE alias = '"); StringBuffer sql = new StringBuffer("SELECT sigid FROM sigs WHERE alias = '");
sql.append(alias).append("'"); sql.append(alias).append("'");
if (exist_sigid>0) if (exist_cid>0)
sql.append(" AND sigid <> ").append(exist_sigid); sql.append(" AND sigid <> ").append(exist_cid);
sql.append(';'); sql.append(';');
ResultSet rs = stmt.executeQuery(sql.toString()); ResultSet rs = stmt.executeQuery(sql.toString());
return rs.next(); return rs.next();
@ -1412,7 +1412,7 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend
} // end try } // end try
catch (SQLException e) catch (SQLException e)
{ // force to return null { // 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 } // end catch
finally finally
@ -1434,7 +1434,7 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend
Connection conn = null; Connection conn = null;
try try
{ // do a SELECT on the sigs table { // do a SELECT on the category table
conn = datapool.getConnection(); conn = datapool.getConnection();
Statement stmt = conn.createStatement(); Statement stmt = conn.createStatement();
StringBuffer sql = new StringBuffer("SELECT catid FROM refcategory WHERE catid = "); StringBuffer sql = new StringBuffer("SELECT catid FROM refcategory WHERE catid = ");
@ -1732,11 +1732,11 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend
} // end getMaxNumConferenceMembersDisplay } // 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() public List getMasterSideBoxList()
{ {
@ -1929,15 +1929,15 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend
} // end getLanguageNameForCode } // end getLanguageNameForCode
public SIGData getSIGDataObject(int sigid) throws DataException public CommunityData getCommunityDataObject(int cid) throws DataException
{ {
checkInitialized(); checkInitialized();
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("getSIGDataObject(" + sigid + ")..."); logger.debug("getCommunityDataObject(" + cid + ")...");
try try
{ // delegate to the sig_refcache and sig_creator objects { // delegate to the comm_refcache and comm_creator objects
return (SIGData)(sig_refcache.getOrCreate(new Integer(sigid),sig_creator)); return (CommunityData)(comm_refcache.getOrCreate(new Integer(cid),comm_creator));
} // end try } // end try
catch (ReferencedDataBuilderException e) catch (ReferencedDataBuilderException e)
@ -1946,22 +1946,22 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend
if (e2 instanceof DataException) if (e2 instanceof DataException)
throw (DataException)e2; throw (DataException)e2;
else else
throw new InternalStateError("unknown creation exception thrown in getSIGDataObject: " throw new InternalStateError("unknown creation exception thrown in getCommunityDataObject: "
+ e2.getClass().getName(),e2); + e2.getClass().getName(),e2);
} // end catch } // end catch
} // end getSIGDataObject } // end getCommunityDataObject
public void detachSIGDataObject(int sigid) public void detachCommunityDataObject(int cid)
{ {
checkInitialized(); checkInitialized();
if (logger.isDebugEnabled()) 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() public BitSet getLockedFeaturesMask()
{ {
@ -1975,17 +1975,17 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend
} // end getLockedFeaturesMask } // 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(); checkInitialized();
ArrayList rc = new ArrayList(); ArrayList rc = new ArrayList();
for (int i=0; i<features.length; i++) for (int i=0; i<features.length; i++)
if (enabled_features.get(i) && features[i].featureAllowed(level,read_privs)) if (enabled_features.get(i) && features[i].featureAllowed(level,read_privs))
{ // this feature must be included in the eventual output set { // this feature must be included in the eventual output set
SIGFeature elt = features[i]; CommunityFeature elt = features[i];
boolean insert_me = true; boolean insert_me = true;
for (int j=0; insert_me && (j<rc.size()); j++) for (int j=0; insert_me && (j<rc.size()); j++)
if (elt.getSequence()<((SIGFeature)(rc.get(j))).getSequence()) if (elt.getSequence()<((CommunityFeature)(rc.get(j))).getSequence())
{ // put the item in the list { // put the item in the list
rc.add(j,elt); rc.add(j,elt);
insert_me = false; insert_me = false;
@ -1998,11 +1998,11 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend
} // end if and for } // end if and for
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("getSIGFeatureSet() loaded " + rc.size() + " elements"); logger.debug("getCommunityFeatureSet() loaded " + rc.size() + " elements");
return Collections.unmodifiableList(rc); // wrap the vector for return return Collections.unmodifiableList(rc); // wrap the vector for return
} // end getSIGFeatureSet } // end getCommunityFeatureSet
public String getAppletForFeature(int code) public String getAppletForFeature(int code)
{ {
@ -2041,15 +2041,15 @@ public class VeniceEngineImpl implements VeniceEngine, EngineBackend
} // end getDefaultFeaturesMask } // end getDefaultFeaturesMask
public void registerNewSIG(SIGData sig) public void registerNewCommunity(CommunityData comm)
{ {
checkInitialized(); checkInitialized();
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("registerNewSIG(" + sig.getID() + ")..."); logger.debug("registerNewCommunity(" + comm.getID() + ")...");
sig_refcache.register(sig); comm_refcache.register(comm);
} // end registerNewSIG } // end registerNewCommunity
public int getFeatureIndexBySymbol(String symbol) public int getFeatureIndexBySymbol(String symbol)
{ {

View File

@ -30,7 +30,7 @@ public class PostLinkDecoder
*/ */
private static final int MAX_LINK_LEN = 130; private static final int MAX_LINK_LEN = 130;
private static final int MAX_SIG_LEN = 32; private static final int MAX_COMM_LEN = 32;
private static final int MAX_CONF_LEN = 64; private static final int MAX_CONF_LEN = 64;
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
@ -38,7 +38,7 @@ public class PostLinkDecoder
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
private String signame = null; private String commname = null;
private String confname = null; private String confname = null;
private short topicnum = -1; private short topicnum = -1;
private int first_post = -1; private int first_post = -1;
@ -62,11 +62,11 @@ public class PostLinkDecoder
// First Test: Bang // First Test: Bang
int pos = work.toString().indexOf('!'); int pos = work.toString().indexOf('!');
if (pos>0) if (pos>0)
{ // We have "sig!something" ... store off the SIG name { // We have "community!something" ... store off the community name
setSIGName(work.substring(0,pos)); setCommunityName(work.substring(0,pos));
work.delete(0,pos+1); work.delete(0,pos+1);
if (work.length()==0) 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 } // end if
else if (pos==0) else if (pos==0)
@ -75,8 +75,8 @@ public class PostLinkDecoder
// Second Test: Dot Number One // Second Test: Dot Number One
pos = work.toString().indexOf('.'); pos = work.toString().indexOf('.');
if (pos<0) if (pos<0)
{ // there's no dots in here...this must have been either "postlink" or "sig!conference" { // there's no dots in here...this must have been either "postlink" or "community!conference"
if (signame!=null) // it's "sig!conference" if (commname!=null) // it's "community!conference"
setConferenceName(work.toString()); setConferenceName(work.toString());
else // it's "postlink" else // it's "postlink"
setPostRange(work); setPostRange(work);
@ -91,8 +91,8 @@ public class PostLinkDecoder
work.delete(0,pos+1); work.delete(0,pos+1);
if (work.length()==0) if (work.length()==0)
{ // we had "conference." or "topic." (or perhaps "sig!conference.") { // we had "conference." or "topic." (or perhaps "community!conference.")
if (signame==null) if (commname==null)
{ // it's either "conference." or "topic." - try topic first { // it's either "conference." or "topic." - try topic first
try try
{ // try it as a topic number first... { // try it as a topic number first...
@ -106,7 +106,7 @@ public class PostLinkDecoder
} // end catch } // end catch
} // end if } // end if
else // it was "sig!conference."...save it off else // it was "community!conference."...save it off
setConferenceName(conf_or_topic); setConferenceName(conf_or_topic);
return; // all done here... return; // all done here...
@ -116,8 +116,8 @@ public class PostLinkDecoder
// Third Test: Dot Number Two // Third Test: Dot Number Two
pos = work.toString().indexOf('.'); pos = work.toString().indexOf('.');
if (pos<0) if (pos<0)
{ // we had "conference.topic" or "topic.posts" (or perhaps "sig!conference.topic") { // we had "conference.topic" or "topic.posts" (or perhaps "community!conference.topic")
if (signame==null) if (commname==null)
{ // we have "conference.topic" or "topic.posts" - have to determine this { // we have "conference.topic" or "topic.posts" - have to determine this
boolean is_topic = false; // what does "work" currently hold? boolean is_topic = false; // what does "work" currently hold?
try try
@ -140,7 +140,7 @@ public class PostLinkDecoder
} // end if } // end if
else else
{ // it's "sig!conference.topic"...set 'em up accordingly { // it's "community!conference.topic"...set 'em up accordingly
setConferenceName(conf_or_topic); setConferenceName(conf_or_topic);
setTopicNumber(work.toString()); setTopicNumber(work.toString());
@ -152,14 +152,14 @@ public class PostLinkDecoder
else if (pos==0) else if (pos==0)
throw new ValidationException(". at beginning of string"); 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. // so save off the conference name and topic number.
setConferenceName(conf_or_topic); setConferenceName(conf_or_topic);
setTopicNumber(work.substring(0,pos)); setTopicNumber(work.substring(0,pos));
work.delete(0,pos+1); work.delete(0,pos+1);
if (work.length()==0) 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! setPostRange(work); // the rest must be the post range!
@ -183,15 +183,15 @@ public class PostLinkDecoder
} // end isAllDigits } // end isAllDigits
private void setSIGName(String name) throws ValidationException private void setCommunityName(String name) throws ValidationException
{ {
if (name.length()>MAX_SIG_LEN) if (name.length()>MAX_COMM_LEN)
throw new ValidationException("SIG alias is too long"); throw new ValidationException("community alias is too long");
if (!(IDUtils.isValidVeniceID(name))) if (!(IDUtils.isValidVeniceID(name)))
throw new ValidationException("SIG alias is not a valid Venice identifier"); throw new ValidationException("community alias is not a valid Venice identifier");
signame = name; commname = name;
} // end setSIGName } // end setCommunityName
private void setConferenceName(String name) throws ValidationException 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() public String getConference()
{ {
@ -325,7 +325,7 @@ public class PostLinkDecoder
public boolean needDatabaseVerification() public boolean needDatabaseVerification()
{ {
return ((signame!=null) || (confname!=null)); return ((commname!=null) || (confname!=null));
} // end needDatabaseVerification } // end needDatabaseVerification
@ -337,13 +337,13 @@ public class PostLinkDecoder
StringBuffer sql = new StringBuffer(); StringBuffer sql = new StringBuffer();
ResultSet rs; ResultSet rs;
if (signame!=null) if (commname!=null)
{ // verify the SIG name against the database { // verify the community name against the database
sql.append("SELECT sigid FROM sigs WHERE alias = '").append(SQLUtil.encodeString(signame)); sql.append("SELECT sigid FROM sigs WHERE alias = '").append(SQLUtil.encodeString(commname));
sql.append("';"); sql.append("';");
rs = stmt.executeQuery(sql.toString()); rs = stmt.executeQuery(sql.toString());
if (!(rs.next())) if (!(rs.next()))
throw new ValidationException("SIG alias not found"); throw new ValidationException("community alias not found");
sql.setLength(0); sql.setLength(0);
} // end if } // end if

View File

@ -7,7 +7,7 @@
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License. * 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 <erbo@silcom.com>, * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * 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 String confname; // conference name that's cached
private short topic; // topic 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.confname = confname;
this.topic = topic; 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() public String getConferenceName()
{ {

View File

@ -61,12 +61,12 @@ public class PostLinkRewriter implements Rewriter
{ {
StringBuffer b = new StringBuffer(URI_PREFIX); StringBuffer b = new StringBuffer(URI_PREFIX);
boolean started = false; boolean started = false;
if (pl.getSIG()==null) if (pl.getCommunity()==null)
b.append(ctxt.getSIGName()); b.append(ctxt.getCommunityName());
else else
{ // append the real SIG name { // append the real community name
started = true; started = true;
b.append(pl.getSIG()); b.append(pl.getCommunity());
} // end else } // end else
@ -151,7 +151,7 @@ public class PostLinkRewriter implements Rewriter
pl = new PostLinkDecoder(data); pl = new PostLinkDecoder(data);
if (pl.needDatabaseVerification()) 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; Connection conn = null;
try try

View File

@ -37,19 +37,19 @@ public interface Audit
public static final int ADMIN_SET_SECURITY = 112; public static final int ADMIN_SET_SECURITY = 112;
public static final int ADMIN_LOCK_OUT = 113; public static final int ADMIN_LOCK_OUT = 113;
// Codes 201-300 - SIG events // Codes 201-300 - Community events
public static final int CREATE_SIG = 201; public static final int CREATE_COMMUNITY = 201;
public static final int SET_MEMBERSHIP = 202; public static final int SET_MEMBERSHIP = 202;
public static final int SIG_CONTACT_INFO = 203; public static final int COMMUNITY_CONTACT_INFO = 203;
public static final int SIG_FEATURE_SET = 204; public static final int COMMUNITY_FEATURE_SET = 204;
public static final int SIG_NAME = 205; public static final int COMMUNITY_NAME = 205;
public static final int SIG_ALIAS = 206; public static final int COMMUNITY_ALIAS = 206;
public static final int SIG_CATEGORY = 207; public static final int COMMUNITY_CATEGORY = 207;
public static final int SIG_HIDE_INFO = 208; public static final int COMMUNITY_HIDE_INFO = 208;
public static final int SIG_MEMBERS_ONLY = 209; public static final int COMMUNITY_MEMBERS_ONLY = 209;
public static final int SIG_JOIN_KEY = 210; public static final int COMMUNITY_JOIN_KEY = 210;
public static final int SIG_SECURITY = 211; public static final int COMMUNITY_SECURITY = 211;
public static final int DELETE_SIG = 212; public static final int DELETE_COMMUNITY = 212;
// Codes 301-400 - Conference events // Codes 301-400 - Conference events
public static final int CREATE_CONF = 301; public static final int CREATE_CONF = 301;

View File

@ -35,7 +35,7 @@ public class AuditRecord implements AuditData
{ {
private HashMap descr_cache = new HashMap(); private HashMap descr_cache = new HashMap();
private HashMap uname_cache = new HashMap(); private HashMap uname_cache = new HashMap();
private HashMap signame_cache = new HashMap(); private HashMap commname_cache = new HashMap();
private Statement stmt; private Statement stmt;
DescrStringCache(Connection conn) throws SQLException DescrStringCache(Connection conn) throws SQLException
@ -82,25 +82,25 @@ public class AuditRecord implements AuditData
} // end getUserName } // end getUserName
String getSIGName(int sigid) throws SQLException, DataException String getCommunityName(int cid) throws SQLException, DataException
{ {
if (sigid<=0) if (cid<=0)
return ""; // no SIG return ""; // no community
Integer sigid_x = new Integer(sigid); Integer cid_x = new Integer(cid);
String rc = (String)(signame_cache.get(sigid_x)); String rc = (String)(commname_cache.get(cid_x));
if (rc==null) if (rc==null)
{ // OK, get it from the database { // 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())) 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); rc = rs.getString(1);
signame_cache.put(sigid_x,rc); commname_cache.put(cid_x,rc);
} // end if } // end if
return rc; return rc;
} // end getSIGName } // end getCommunityName
} // end class DescrStringCache } // 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 java.util.Date when; // the date/time of this audit event
private int type; // the audit event type private int type; // the audit event type
private int uid; // the user ID 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 ip; // the IP address of the user
private String[] data; // the data values associated with the record private String[] data; // the data values associated with the record
private String descr = null; // audit record description private String descr = null; // audit record description
private String uname = null; // user name of user private String uname = null; // user name of user
private String signame = null; // name of SIG private String commname = null; // name of community
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Constructors * 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) String data4)
{ {
setBaseData(type,uid,ip); setBaseData(type,uid,ip);
this.sigid = sigid; this.cid = cid;
setData(data1,data2,data3,data4); setData(data1,data2,data3,data4);
} // end constructor } // 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); setBaseData(type,uid,ip);
this.sigid = sigid; this.cid = cid;
setData(data1,data2,data3,null); setData(data1,data2,data3,null);
} // end constructor } // 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); setBaseData(type,uid,ip);
this.sigid = sigid; this.cid = cid;
setData(data1,data2,null,null); setData(data1,data2,null,null);
} // end constructor } // 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); setBaseData(type,uid,ip);
this.sigid = sigid; this.cid = cid;
setData(data1,null,null,null); setData(data1,null,null,null);
} // end constructor } // 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); setBaseData(type,uid,ip);
this.sigid = sigid; this.cid = cid;
setData(null,null,null,null); setData(null,null,null,null);
} // end constructor } // 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) public AuditRecord(int type, int uid, String ip, String data1, String data2, String data3, String data4)
{ {
setBaseData(type,uid,ip); setBaseData(type,uid,ip);
this.sigid = 0; this.cid = 0;
setData(data1,data2,data3,data4); setData(data1,data2,data3,data4);
} // end constructor } // 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) public AuditRecord(int type, int uid, String ip, String data1, String data2, String data3)
{ {
setBaseData(type,uid,ip); setBaseData(type,uid,ip);
this.sigid = 0; this.cid = 0;
setData(data1,data2,data3,null); setData(data1,data2,data3,null);
} // end constructor } // end constructor
@ -185,7 +185,7 @@ public class AuditRecord implements AuditData
public AuditRecord(int type, int uid, String ip, String data1, String data2) public AuditRecord(int type, int uid, String ip, String data1, String data2)
{ {
setBaseData(type,uid,ip); setBaseData(type,uid,ip);
this.sigid = 0; this.cid = 0;
setData(data1,data2,null,null); setData(data1,data2,null,null);
} // end constructor } // end constructor
@ -193,7 +193,7 @@ public class AuditRecord implements AuditData
public AuditRecord(int type, int uid, String ip, String data1) public AuditRecord(int type, int uid, String ip, String data1)
{ {
setBaseData(type,uid,ip); setBaseData(type,uid,ip);
this.sigid = 0; this.cid = 0;
setData(data1,null,null,null); setData(data1,null,null,null);
} // end constructor } // end constructor
@ -201,7 +201,7 @@ public class AuditRecord implements AuditData
public AuditRecord(int type, int uid, String ip) public AuditRecord(int type, int uid, String ip)
{ {
setBaseData(type,uid,ip); setBaseData(type,uid,ip);
this.sigid = 0; this.cid = 0;
setData(null,null,null,null); setData(null,null,null,null);
} // end constructor } // end constructor
@ -212,7 +212,7 @@ public class AuditRecord implements AuditData
when = SQLUtil.getFullDateTime(rs,"on_date"); when = SQLUtil.getFullDateTime(rs,"on_date");
type = rs.getInt("event"); type = rs.getInt("event");
uid = rs.getInt("uid"); uid = rs.getInt("uid");
sigid = rs.getInt("sigid"); cid = rs.getInt("sigid");
ip = rs.getString("ip"); ip = rs.getString("ip");
data = new String[DATA_COUNT]; data = new String[DATA_COUNT];
data[0] = rs.getString("data1"); data[0] = rs.getString("data1");
@ -221,7 +221,7 @@ public class AuditRecord implements AuditData
data[3] = rs.getString("data4"); data[3] = rs.getString("data4");
descr = cache.getDescription(type); descr = cache.getDescription(type);
uname = cache.getUserName(uid); uname = cache.getUserName(uid);
signame = cache.getSIGName(sigid); commname = cache.getCommunityName(cid);
} // end constructor } // end constructor
@ -279,11 +279,11 @@ public class AuditRecord implements AuditData
} // end getType } // end getType
public int getSIGID() public int getCommunityID()
{ {
return sigid; return cid;
} // end getType } // end getCommunityID
public String getIPAddress() public String getIPAddress()
{ {
@ -309,11 +309,11 @@ public class AuditRecord implements AuditData
} // end getUserName } // end getUserName
public String getSIGName() public String getCommunityName()
{ {
return signame; return commname;
} // end getSIGName } // end getCommunityName
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* External operations * External operations
@ -333,7 +333,7 @@ public class AuditRecord implements AuditData
+ "data3, data4) VALUES ('"); + "data3, data4) VALUES ('");
java.util.Date now = new java.util.Date(); java.util.Date now = new java.util.Date();
sql.append(SQLUtil.encodeDate(now)).append("', ").append(type).append(", ").append(uid).append(", "); 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(SQLUtil.encodeStringArg(data[0])).append(", ").append(SQLUtil.encodeStringArg(data[1]));
sql.append(", ").append(SQLUtil.encodeStringArg(data[2])).append(", "); sql.append(", ").append(SQLUtil.encodeStringArg(data[2])).append(", ");
sql.append(SQLUtil.encodeStringArg(data[3])).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 throws SQLException, DataException
{ {
ArrayList rc = new ArrayList(); ArrayList rc = new ArrayList();
@ -369,8 +369,8 @@ public class AuditRecord implements AuditData
Statement stmt = conn.createStatement(); Statement stmt = conn.createStatement();
StringBuffer sql = new StringBuffer("SELECT * FROM audit"); StringBuffer sql = new StringBuffer("SELECT * FROM audit");
if (sigid>0) if (cid>0)
sql.append(" WHERE sigid = ").append(sigid); sql.append(" WHERE sigid = ").append(cid);
sql.append(" ORDER BY on_date DESC LIMIT ").append(offset).append(", ").append(count).append(';'); sql.append(" ORDER BY on_date DESC LIMIT ").append(offset).append(", ").append(count).append(';');
ResultSet rs = stmt.executeQuery(sql.toString()); ResultSet rs = stmt.executeQuery(sql.toString());
@ -385,12 +385,12 @@ public class AuditRecord implements AuditData
} // end getAuditRecords } // 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(); Statement stmt = conn.createStatement();
StringBuffer sql = new StringBuffer("SELECT COUNT(*) FROM audit"); StringBuffer sql = new StringBuffer("SELECT COUNT(*) FROM audit");
if (sigid>0) if (cid>0)
sql.append(" WHERE sigid = ").append(sigid); sql.append(" WHERE sigid = ").append(cid);
sql.append(';'); sql.append(';');
ResultSet rs = stmt.executeQuery(sql.toString()); ResultSet rs = stmt.executeQuery(sql.toString());
if (!(rs.next())) if (!(rs.next()))

View File

@ -27,7 +27,7 @@ public class Capability implements SecLevels
public static boolean isCommunityAdmin(int level) public static boolean isCommunityAdmin(int level)
{ {
return (level>=SIG_ANYADMIN); return (level>=COMM_ANYADMIN);
} // end isCommunityAdmin } // end isCommunityAdmin
@ -55,39 +55,39 @@ public class Capability implements SecLevels
} // end exemptFromMembershipRequirement } // end exemptFromMembershipRequirement
public static boolean hideHiddenSearchSIGs(int level) public static boolean hideHiddenSearchCommunities(int level)
{ {
return (level<GLOBAL_ANYADMIN); return (level<GLOBAL_ANYADMIN);
} // end hideHiddenSearchSIGs } // end hideHiddenSearchCommunities
public static boolean hideHiddenDirectorySIGs(int level) public static boolean hideHiddenDirectoryCommunities(int level)
{ {
return (level<GLOBAL_ANYADMIN); return (level<GLOBAL_ANYADMIN);
} // end hideHiddenSearchSIGs } // end hideHiddenSearchCommunities
public static boolean canJoinPrivateSIGWithoutKey(int level) public static boolean canJoinPrivateCommunityWithoutKey(int level)
{ {
return (level>=GLOBAL_ANYADMIN); return (level>=GLOBAL_ANYADMIN);
} // end canJoinPrivateSIGWithoutKey } // end canJoinPrivateCommunityWithoutKey
public static boolean showHiddenSearchCategories(int level) public static boolean showHiddenSearchCategories(int level)
{ {
return (level>=GLOBAL_ANYADMIN); 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) public static boolean hideHiddenConferences(int level)
{ {
return (level<SIG_ANYADMIN); return (level<COMM_ANYADMIN);
} // end hideHiddenConferences } // end hideHiddenConferences

View File

@ -7,7 +7,7 @@
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License. * 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 <erbo@silcom.com>, * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
@ -25,11 +25,11 @@ public class DefaultLevels implements SecLevels
} // end newUser } // end newUser
public static int memberSIG() public static int memberCommunity()
{ {
return SIG_MEMBER; return COMM_MEMBER;
} // end memberSIG } // end memberCommunity
public static int PFY() public static int PFY()
{ {
@ -49,41 +49,41 @@ public class DefaultLevels implements SecLevels
} // end afterEmailAddressChange } // 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; 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() public static int hostPrivsConference()
{ {
@ -105,19 +105,19 @@ public class DefaultLevels implements SecLevels
public static int newConferenceRead(boolean pvt) public static int newConferenceRead(boolean pvt)
{ {
return (pvt ? CONFERENCE_MEMBER : SIG_MEMBER); return (pvt ? CONFERENCE_MEMBER : COMM_MEMBER);
} // end newConferenceRead } // end newConferenceRead
public static int newConferencePost(boolean pvt) public static int newConferencePost(boolean pvt)
{ {
return (pvt ? CONFERENCE_MEMBER : SIG_MEMBER); return (pvt ? CONFERENCE_MEMBER : COMM_MEMBER);
} // end newConferencePost } // end newConferencePost
public static int newConferenceCreate(boolean pvt) public static int newConferenceCreate(boolean pvt)
{ {
return (pvt ? CONFERENCE_MEMBER : SIG_MEMBER); return (pvt ? CONFERENCE_MEMBER : COMM_MEMBER);
} // end newConferencePost } // end newConferencePost
@ -141,7 +141,7 @@ public class DefaultLevels implements SecLevels
public static int newConferenceDelete() public static int newConferenceDelete()
{ {
return SIG_COHOST; return COMM_COHOST;
} // end newConferenceHide } // end newConferenceHide

View File

@ -30,23 +30,23 @@ public class Role implements Comparable, SecLevels
private static Role no_access; private static Role no_access;
private static Role unrestricted_user; private static Role unrestricted_user;
private static Role global_admin; private static Role global_admin;
private static Role sig_host; private static Role comm_host;
private static ArrayList global_low; private static ArrayList global_low;
private static ArrayList global_high; private static ArrayList global_high;
private static ArrayList sig_low; private static ArrayList comm_low;
private static ArrayList sig_high; private static ArrayList comm_high;
private static ArrayList conf_low; private static ArrayList conf_low;
private static ArrayList conf_high; private static ArrayList conf_high;
private static HashMap all_roles; private static HashMap all_roles;
private static List base_levels = null; private static List base_levels = null;
private static List base_levels_2 = null; private static List base_levels_2 = null;
private static List sigreadlist_rc = null; private static List commreadlist_rc = null;
private static List sigwritelist_rc = null; private static List commwritelist_rc = null;
private static List sigcreatelist_rc = null; private static List commcreatelist_rc = null;
private static List sigdeletelist_rc = null; private static List commdeletelist_rc = null;
private static List sigjoinlist_rc = null; private static List commjoinlist_rc = null;
private static List sig_member_levels = null; private static List comm_member_levels = null;
private static List confreadlist_rc = null; private static List confreadlist_rc = null;
private static List confpostlist_rc = null; private static List confpostlist_rc = null;
private static List confhidelist_rc = null; private static List confhidelist_rc = null;
@ -182,105 +182,105 @@ public class Role implements Comparable, SecLevels
} // end getGlobalAdmin } // end getGlobalAdmin
public static List getSIGReadList() public static List getCommunityReadList()
{ {
if (sigreadlist_rc==null) if (commreadlist_rc==null)
{ // create the returned list { // create the returned list
ArrayList rc = new ArrayList(); ArrayList rc = new ArrayList();
rc.addAll(global_low); rc.addAll(global_low);
rc.addAll(sig_low); rc.addAll(comm_low);
rc.add(unrestricted_user); rc.add(unrestricted_user);
rc.addAll(sig_high); rc.addAll(comm_high);
rc.add(global_high.get(0)); rc.add(global_high.get(0));
sigreadlist_rc = Collections.unmodifiableList(rc); commreadlist_rc = Collections.unmodifiableList(rc);
} // end if } // 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 { // build the return value
ArrayList rc = new ArrayList(); ArrayList rc = new ArrayList();
rc.addAll(sig_high); rc.addAll(comm_high);
rc.addAll(global_high); rc.addAll(global_high);
sigwritelist_rc = Collections.unmodifiableList(rc); commwritelist_rc = Collections.unmodifiableList(rc);
} // end if } // 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 { // create the return list
ArrayList rc = new ArrayList(); ArrayList rc = new ArrayList();
rc.add(global_low.get(global_low.size()-1)); rc.add(global_low.get(global_low.size()-1));
rc.addAll(sig_low); rc.addAll(comm_low);
rc.add(unrestricted_user); rc.add(unrestricted_user);
rc.addAll(sig_high); rc.addAll(comm_high);
rc.add(global_high.get(0)); rc.add(global_high.get(0));
sigcreatelist_rc = Collections.unmodifiableList(rc); commcreatelist_rc = Collections.unmodifiableList(rc);
} // end if } // 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 { // create the return list
ArrayList rc = new ArrayList(); ArrayList rc = new ArrayList();
rc.addAll(sig_high); rc.addAll(comm_high);
rc.addAll(global_high); rc.addAll(global_high);
rc.add(no_access); rc.add(no_access);
sigdeletelist_rc = Collections.unmodifiableList(rc); commdeletelist_rc = Collections.unmodifiableList(rc);
} // end if } // end if
return sigdeletelist_rc; return commdeletelist_rc;
} // end getSIGDeleteList } // end getCommunityDeleteList
public static List getSIGJoinList() public static List getCommunityJoinList()
{ {
if (sigjoinlist_rc==null) if (commjoinlist_rc==null)
sigjoinlist_rc = Collections.unmodifiableList(global_low); commjoinlist_rc = Collections.unmodifiableList(global_low);
return sigjoinlist_rc; 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 { // figure out the member levels list
ArrayList rc = new ArrayList(); ArrayList rc = new ArrayList();
rc.add(not_in_list); rc.add(not_in_list);
rc.addAll(global_low); rc.addAll(global_low);
rc.addAll(sig_low); rc.addAll(comm_low);
rc.add(unrestricted_user); rc.add(unrestricted_user);
rc.addAll(sig_high); rc.addAll(comm_high);
rc.remove(rc.size()-1); rc.remove(rc.size()-1);
sig_member_levels = Collections.unmodifiableList(rc); comm_member_levels = Collections.unmodifiableList(rc);
} // end if } // 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() public static List getConferenceReadList()
{ {
@ -288,7 +288,7 @@ public class Role implements Comparable, SecLevels
{ // precalculate the conference read list { // precalculate the conference read list
ArrayList rc = new ArrayList(); ArrayList rc = new ArrayList();
rc.addAll(global_low); rc.addAll(global_low);
rc.addAll(sig_low); rc.addAll(comm_low);
rc.addAll(conf_low); rc.addAll(conf_low);
rc.add(unrestricted_user); rc.add(unrestricted_user);
confreadlist_rc = Collections.unmodifiableList(rc); confreadlist_rc = Collections.unmodifiableList(rc);
@ -305,7 +305,7 @@ public class Role implements Comparable, SecLevels
{ // precalculate the post list { // precalculate the post list
ArrayList rc = new ArrayList(); ArrayList rc = new ArrayList();
rc.addAll(global_low); rc.addAll(global_low);
rc.addAll(sig_low); rc.addAll(comm_low);
rc.addAll(conf_low); rc.addAll(conf_low);
rc.add(unrestricted_user); rc.add(unrestricted_user);
rc.addAll(conf_high); rc.addAll(conf_high);
@ -329,7 +329,7 @@ public class Role implements Comparable, SecLevels
{ // precalculate the hide list { // precalculate the hide list
ArrayList rc = new ArrayList(); ArrayList rc = new ArrayList();
rc.addAll(conf_high); rc.addAll(conf_high);
rc.addAll(sig_high); rc.addAll(comm_high);
rc.add(global_high.get(0)); rc.add(global_high.get(0));
confhidelist_rc = Collections.unmodifiableList(rc); confhidelist_rc = Collections.unmodifiableList(rc);
@ -356,7 +356,7 @@ public class Role implements Comparable, SecLevels
if (confdeletelist_rc==null) if (confdeletelist_rc==null)
{ // precalculate the delete list { // precalculate the delete list
ArrayList rc = new ArrayList(); ArrayList rc = new ArrayList();
rc.addAll(sig_high); rc.addAll(comm_high);
rc.addAll(global_high); rc.addAll(global_high);
rc.add(no_access); rc.add(no_access);
confdeletelist_rc = Collections.unmodifiableList(rc); confdeletelist_rc = Collections.unmodifiableList(rc);
@ -374,7 +374,7 @@ public class Role implements Comparable, SecLevels
ArrayList rc = new ArrayList(); ArrayList rc = new ArrayList();
rc.add(not_in_list); rc.add(not_in_list);
rc.addAll(global_low); rc.addAll(global_low);
rc.addAll(sig_low); rc.addAll(comm_low);
rc.addAll(conf_low); rc.addAll(conf_low);
rc.add(unrestricted_user); rc.add(unrestricted_user);
rc.add(conf_high.get(conf_high.size()-1)); 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); all_roles.put(new Integer(GLOBAL_BOFH),global_admin);
global_high.trimToSize(); global_high.trimToSize();
// initialize the "SIG lowband" vector // initialize the "community lowband" vector
sig_low = new ArrayList(1); comm_low = new ArrayList(1);
tmp = new Role(SIG_MEMBER,"SIG Member"); tmp = new Role(COMM_MEMBER,"Community Member");
sig_low.add(tmp); comm_low.add(tmp);
all_roles.put(new Integer(SIG_MEMBER),tmp); all_roles.put(new Integer(COMM_MEMBER),tmp);
sig_low.trimToSize(); comm_low.trimToSize();
// initialize the "SIG highband" vector // initialize the "communtiy highband" vector
sig_high = new ArrayList(3); comm_high = new ArrayList(3);
tmp = new Role(SIG_ANYADMIN,"Any SIG Administrator"); tmp = new Role(COMM_ANYADMIN,"Any Community Administrator");
sig_high.add(tmp); comm_high.add(tmp);
all_roles.put(new Integer(SIG_ANYADMIN),tmp); all_roles.put(new Integer(COMM_ANYADMIN),tmp);
tmp = new Role(SIG_COHOST,"SIG Co-Host"); tmp = new Role(COMM_COHOST,"Community Co-Host");
sig_high.add(tmp); comm_high.add(tmp);
all_roles.put(new Integer(SIG_COHOST),tmp); all_roles.put(new Integer(COMM_COHOST),tmp);
sig_host = new Role(SIG_HOST,"SIG Host"); comm_host = new Role(COMM_HOST,"Community Host");
sig_high.add(sig_host); comm_high.add(comm_host);
all_roles.put(new Integer(SIG_HOST),sig_host); all_roles.put(new Integer(COMM_HOST),comm_host);
sig_high.trimToSize(); comm_high.trimToSize();
// initialize the "conference lowband" vector // initialize the "conference lowband" vector
conf_low = new ArrayList(1); conf_low = new ArrayList(1);

View File

@ -21,7 +21,7 @@ public interface SecLevels
{ {
/** /**
* Indicates "no access" (not even to the global system administrator). Used as the * 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; public static final int NO_ACCESS = 65500;
/** /**
@ -31,7 +31,7 @@ public interface SecLevels
public static final int UNRESTRICTED_USER = 32500; public static final int UNRESTRICTED_USER = 32500;
/** /**
* Indicates a user that has not logged in ("Anonymous Honyak"). Can be used as a * 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. * posting.
*/ */
public static final int GLOBAL_ANONYMOUS = 100; public static final int GLOBAL_ANONYMOUS = 100;
@ -42,7 +42,7 @@ public interface SecLevels
public static final int GLOBAL_UNVERIFIED = 500; public static final int GLOBAL_UNVERIFIED = 500;
/** /**
* Indicates a user that has registered and been verified. Can be used as a permission * 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; public static final int GLOBAL_NORMAL = 1000;
/** /**
@ -61,26 +61,26 @@ public interface SecLevels
*/ */
public static final int GLOBAL_ANYADMIN = 63000; 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 * The maximum level in the "high band" of the community scope; used to test if a user already has
* maximum privs within the SIG (because of being an admin at global scope, perhaps). * 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. * The security level assigned to members of a (private) conference within that conference.
*/ */

View File

@ -58,12 +58,12 @@ public class Attachment extends VeniceServlet
UserContext user, RenderData rdat) UserContext user, RenderData rdat)
throws ServletException, IOException, VeniceServletResult throws ServletException, IOException, VeniceServletResult
{ {
// get the SIG // get the community
SIGContext sig = getSIGParameter(request,user,true,"top"); CommunityContext comm = getCommunityParameter(request,user,true,"top");
changeMenuSIG(request,sig); changeMenuCommunity(request,comm);
// get the conference // get the conference
ConferenceContext conf = getConferenceParameter(request,sig,true,"top"); ConferenceContext conf = getConferenceParameter(request,comm,true,"top");
// get the message we want to use // get the message we want to use
TopicMessageContext msg = getMessageParameter(request,conf,true,"top"); TopicMessageContext msg = getMessageParameter(request,conf,true,"top");
@ -125,14 +125,14 @@ public class Attachment extends VeniceServlet
} // end if } // end if
// get the SIG // get the community
SIGContext sig = getSIGParameter(mphandler,user,true,"top"); CommunityContext comm = getCommunityParameter(mphandler,user,true,"top");
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("SIG param: #" + sig.getSIGID()); logger.debug("community param: #" + comm.getCommunityID());
changeMenuSIG(request,sig); changeMenuCommunity(request,comm);
// get the conference // get the conference
ConferenceContext conf = getConferenceParameter(mphandler,sig,true,"top"); ConferenceContext conf = getConferenceParameter(mphandler,comm,true,"top");
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("Conference param: #" + conf.getConfID()); logger.debug("Conference param: #" + conf.getConfID());

View File

@ -27,56 +27,56 @@ import com.silverwrist.venice.ValidationException;
import com.silverwrist.venice.core.*; import com.silverwrist.venice.core.*;
import com.silverwrist.venice.servlets.format.*; import com.silverwrist.venice.servlets.format.*;
public class SIGAdmin extends VeniceServlet public class CommunityAdmin extends VeniceServlet
{ {
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Static data members * 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 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 * 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()); MenuPanelCache cache = MenuPanelCache.getMenuPanelCache(getServletContext());
if (!(cache.isCached(desired_name))) if (!(cache.isCached(desired_name)))
{ // create a template and save it off { // create a template and save it off
SIGAdminTop template = new SIGAdminTop(); CommunityAdminTop template = new CommunityAdminTop();
cache.saveTemplate(template); cache.saveTemplate(template);
} // end if } // end if
// return a new copy // 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()); DialogCache cache = DialogCache.getDialogCache(getServletContext());
if (!(cache.isCached(desired_name))) if (!(cache.isCached(desired_name)))
{ // create a template and save it off { // create a template and save it off
EditSIGProfileDialog template = new EditSIGProfileDialog(getCountryList(),getLanguageList()); EditCommunityProfileDialog template = new EditCommunityProfileDialog(getCountryList(),getLanguageList());
cache.saveTemplate(template); cache.saveTemplate(template);
} // end if } // end if
// return a new copy // return a new copy
return (EditSIGProfileDialog)(cache.getNewDialog(desired_name)); return (EditCommunityProfileDialog)(cache.getNewDialog(desired_name));
} // end makeEditSIGProfileDialog } // end makeEditCommunityProfileDialog
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Overrides from class HttpServlet * Overrides from class HttpServlet
@ -85,7 +85,7 @@ public class SIGAdmin extends VeniceServlet
public String getServletInfo() 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"; + "Part of the Venice Web Communities System\n";
return rc; return rc;
@ -100,47 +100,50 @@ public class SIGAdmin extends VeniceServlet
UserContext user, RenderData rdat) UserContext user, RenderData rdat)
throws ServletException, IOException, VeniceServletResult throws ServletException, IOException, VeniceServletResult
{ {
// get the SIG context // get the community context
SIGContext sig = getSIGParameter(request,user,true,"top"); CommunityContext comm = getCommunityParameter(request,user,true,"top");
changeMenuSIG(request,sig); changeMenuCommunity(request,comm);
setMyLocation(request,"sigadmin?" + request.getQueryString()); setMyLocation(request,"sigadmin?" + request.getQueryString());
String on_error = "sigadmin?sig=" + sig.getSIGID(); String on_error = "sigadmin?sig=" + comm.getCommunityID();
if (logger.isDebugEnabled()) 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 // now decide what to do based on the "cmd" parameter
String cmd = getStandardCommandParam(request); String cmd = getStandardCommandParam(request);
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("SIGAdmin/doGet command value = " + cmd); logger.debug("CommunityAdmin/doGet command value = " + cmd);
if (cmd.equals("P")) if (cmd.equals("P"))
{ // "P" = "Edit Profile" { // "P" = "Edit Profile"
if (!(sig.canModifyProfile())) if (!(comm.canModifyProfile()))
{ // no access - sorry, dude { // no access - sorry, dude
logger.error("tried to call up SIG profile screen without access...naughty naughty!"); 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 SIG's profile.",on_error); return new ErrorBox("Unauthorized","You do not have access to modify this community's profile.",
on_error);
} // end if } // end if
// construct the edit profile dialog and load it up for use // construct the edit profile dialog and load it up for use
EditSIGProfileDialog dlg = makeEditSIGProfileDialog(); EditCommunityProfileDialog dlg = makeEditCommunityProfileDialog();
try try
{ // load the values for this dialog { // load the values for this dialog
dlg.setupDialog(engine,sig); dlg.setupDialog(engine,comm);
} // end try } // end try
catch (DataException de) catch (DataException de)
{ // we could not load the values because of a data exception { // 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); return new ErrorBox("Database Error","Database error retrieving profile: " + de.getMessage(),on_error);
} // end catch } // end catch
catch (AccessError ae) catch (AccessError ae)
{ // we don't have enough privilege { // we don't have enough privilege
logger.error("Access error loading SIG profile: " + ae.getMessage(),ae); logger.error("Access error loading community profile: " + ae.getMessage(),ae);
return new ErrorBox("Unauthorized","You do not have access to modify this SIG's profile.",on_error); return new ErrorBox("Unauthorized","You do not have access to modify this community's profile.",
on_error);
} // end catch } // end catch
@ -150,10 +153,11 @@ public class SIGAdmin extends VeniceServlet
if (cmd.equals("T")) if (cmd.equals("T"))
{ // "T" = "Set Category" { // "T" = "Set Category"
if (!(sig.canModifyProfile())) if (!(comm.canModifyProfile()))
{ // no access - sorry man { // no access - sorry man
logger.error("tried to call up SIG category set screen without access...naughty naughty!"); 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 SIG's profile.",on_error); return new ErrorBox("Unauthorized","You do not have access to modify this community's profile.",
on_error);
} // end else } // end else
@ -168,7 +172,7 @@ public class SIGAdmin extends VeniceServlet
throw new NumberFormatException(); // dump the category if it's not valid throw new NumberFormatException(); // dump the category if it's not valid
// change the category ID // change the category ID
sig.setCategoryID(catid); comm.setCategoryID(catid);
} // end try } // end try
catch (NumberFormatException nfe) catch (NumberFormatException nfe)
@ -177,14 +181,15 @@ public class SIGAdmin extends VeniceServlet
} // end catch } // end catch
catch (DataException de) catch (DataException de)
{ // unable to update the SIG properly { // unable to update the community properly
logger.error("DB error updating SIG: " + de.getMessage(),de); logger.error("DB error updating community: " + de.getMessage(),de);
return new ErrorBox("Database Error","Database error updating SIG: " + de.getMessage(),on_error); return new ErrorBox("Database Error","Database error updating community: " + de.getMessage(),
on_error);
} // end catch } // end catch
catch (AccessError ae) catch (AccessError ae)
{ // database access error - display an error box { // 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); return new ErrorBox("Access Error",ae.getMessage(),on_error);
} // end catch } // end catch
@ -200,7 +205,7 @@ public class SIGAdmin extends VeniceServlet
p = request.getParameter("go"); p = request.getParameter("go");
int curr_catid; int curr_catid;
if (StringUtil.isStringEmpty(p)) if (StringUtil.isStringEmpty(p))
curr_catid = sig.getCategoryID(); curr_catid = comm.getCategoryID();
else else
curr_catid = Integer.parseInt(p); 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 throw new NumberFormatException(); // dump the category if it's not valid
// create the browser panel and let it rip // create the browser panel and let it rip
return new SIGCategoryBrowseData(user,sig,curr_catid); return new CommunityCategoryBrowseData(user,comm,curr_catid);
} // end try } // end try
catch (NumberFormatException nfe) catch (NumberFormatException nfe)
@ -230,24 +235,25 @@ public class SIGAdmin extends VeniceServlet
if (cmd.equals("M")) if (cmd.equals("M"))
{ // "M" = Set Membership { // "M" = Set Membership
if (!(sig.canModifyProfile())) if (!(comm.canModifyProfile()))
{ // no access - sorry man { // no access - sorry man
logger.error("tried to call up membership set screen without access...naughty naughty!"); 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 } // end else
try try
{ // display the conference member list! { // display the conference member list!
SIGMembership m = new SIGMembership(engine,sig); CommunityMembership m = new CommunityMembership(engine,comm);
m.doSIGMemberList(); m.doCommunityMemberList();
setMyLocation(request,"sigadmin?sig=" + sig.getSIGID() + "&cmd=M"); setMyLocation(request,"sigadmin?sig=" + comm.getCommunityID() + "&cmd=M");
return m; return m;
} // end try } // end try
catch (DataException de) catch (DataException de)
{ // something wrong in the database { // 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); on_error);
} // end catch } // end catch
@ -273,12 +279,13 @@ public class SIGAdmin extends VeniceServlet
} // end catch } // end catch
// generate the lists // generate the lists
List audit_list = sig.getAuditRecords(offset,engine.getNumAuditRecordsPerPage()); List audit_list = comm.getAuditRecords(offset,engine.getNumAuditRecordsPerPage());
int audit_count = sig.getAuditRecordCount(); int audit_count = comm.getAuditRecordCount();
// return the audit viewer // return the audit viewer
return new AuditDataViewer(engine,audit_list,offset,audit_count,"Audit Records for SIG \"" return new AuditDataViewer(engine,audit_list,offset,audit_count,"Audit Records for Community \""
+ sig.getName() + "\"","sigadmin?sig=" + sig.getSIGID() + "&cmd=A&ofs=%"); + comm.getName() + "\"","sigadmin?sig=" + comm.getCommunityID()
+ "&cmd=A&ofs=%");
} // end try } // end try
catch (AccessError ae) catch (AccessError ae)
@ -296,42 +303,44 @@ public class SIGAdmin extends VeniceServlet
} // end if ("A" command) } // end if ("A" command)
if (cmd.equals("DEL")) if (cmd.equals("DEL"))
{ // "DEL" = "Delete SIG" (requires a confirmation) { // "DEL" = "Delete Community" (requires a confirmation)
if (!(sig.canDelete())) if (!(comm.canDelete()))
{ // we can't delete the SIG, so what are we doing here? { // we can't delete the community, so what are we doing here?
logger.error("you can't delete the SIG - not gonna do it, wouldn't be prudent"); 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 SIG.",on_error); return new ErrorBox("Access Error","You do not have permission to delete this community.",on_error);
} // end if } // end if
if (ConfirmBox.isConfirmed(request,DELETE_CONFIRM_ATTR,DELETE_CONFIRM_PARAM)) if (ConfirmBox.isConfirmed(request,DELETE_CONFIRM_ATTR,DELETE_CONFIRM_PARAM))
{ // we are confirmed - delete the SIG! { // we are confirmed - delete the community!
try try
{ // delete the SIG! { // delete the community!
sig.delete(); comm.delete();
} // end try } // end try
catch (DataException de) catch (DataException de)
{ // something wrong in the database { // something wrong in the database
logger.error("Database error deleting SIG: " + de.getMessage(),de); logger.error("Database error deleting community: " + de.getMessage(),de);
return new ErrorBox("Database Error","Database error deleting SIG: " + de.getMessage(),on_error); return new ErrorBox("Database Error","Database error deleting community: " + de.getMessage(),
on_error);
} // end catch } // end catch
catch (AccessError ae) catch (AccessError ae)
{ // access error changing the SIG values { // access error changing the community values
logger.error("Access error deleting SIG: " + ae.getMessage(),ae); logger.error("Access error deleting community: " + ae.getMessage(),ae);
return new ErrorBox("Access Error",ae.getMessage(),on_error); return new ErrorBox("Access Error",ae.getMessage(),on_error);
} // end catch } // 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"); throw new RedirectResult("top");
} // end if } // end if
else else
{ // throw up a confirm box to let the user think it over { // 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 " String message = "You are about to permanently delete the \"" + comm.getName() + "\" community, "
+ "all conferences and other resources it contains! Are you sure you want to do this?"; + "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, return new ConfirmBox(request,DELETE_CONFIRM_ATTR,DELETE_CONFIRM_PARAM,"Delete Conference",message,
on_error + "&cmd=DEL",on_error); on_error + "&cmd=DEL",on_error);
@ -340,16 +349,16 @@ public class SIGAdmin extends VeniceServlet
} // end if ("DEL" command) } // end if ("DEL" command)
// all unknown requests get turned into menu display requests // all unknown requests get turned into menu display requests
if (!(sig.canAdministerSIG())) if (!(comm.canAdministerCommunity()))
{ // no access - sorry buddy { // no access - sorry buddy
logger.error("tried to call up SIG admin menu without access...naughty naughty!"); 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 SIG.",on_error); return new ErrorBox("Access Error","You do not have access to administer this community.",on_error);
} // end if } // end if
// create a SIG administration menu // create a community administration menu
SIGAdminTop menu = makeSIGAdminTop(); CommunityAdminTop menu = makeCommunityAdminTop();
menu.setSIG(sig); menu.setCommunity(comm);
return menu; return menu;
} // end doVeniceGet } // end doVeniceGet
@ -358,43 +367,45 @@ public class SIGAdmin extends VeniceServlet
UserContext user, RenderData rdat) UserContext user, RenderData rdat)
throws ServletException, IOException, VeniceServletResult throws ServletException, IOException, VeniceServletResult
{ {
// get the SIG context // get the community context
SIGContext sig = getSIGParameter(request,user,true,"top"); CommunityContext comm = getCommunityParameter(request,user,true,"top");
changeMenuSIG(request,sig); changeMenuCommunity(request,comm);
String on_error = "sigadmin?sig=" + sig.getSIGID(); String on_error = "sigadmin?sig=" + comm.getCommunityID();
setMyLocation(request,on_error); setMyLocation(request,on_error);
if (logger.isDebugEnabled()) 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 // now decide what to do based on the "cmd" parameter
String cmd = getStandardCommandParam(request); String cmd = getStandardCommandParam(request);
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("SIGAdmin/doPost command value = " + cmd); logger.debug("CommunityAdmin/doPost command value = " + cmd);
if (cmd.equals("P")) if (cmd.equals("P"))
{ // "P" = "Edit Profile" { // "P" = "Edit Profile"
if (!(sig.canModifyProfile())) if (!(comm.canModifyProfile()))
{ // no access - sorry, dude { // no access - sorry, dude
logger.error("tried to call up SIG profile screen without access...naughty naughty!"); 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 SIG's profile.",on_error); return new ErrorBox("Unauthorized","You do not have access to modify this community's profile.",
on_error);
} // end if } // end if
// construct the edit profile dialog and load it up for use // construct the edit profile dialog and load it up for use
EditSIGProfileDialog dlg = makeEditSIGProfileDialog(); EditCommunityProfileDialog dlg = makeEditCommunityProfileDialog();
dlg.setupDialogBasic(engine,sig); dlg.setupDialogBasic(engine,comm);
if (dlg.isButtonClicked(request,"cancel")) if (dlg.isButtonClicked(request,"cancel"))
throw new RedirectResult(on_error); // go back - they canceled out throw new RedirectResult(on_error); // go back - they canceled out
if (dlg.isButtonClicked(request,"update")) if (dlg.isButtonClicked(request,"update"))
{ // begin updating the SIG's contents { // begin updating the community's contents
dlg.loadValues(request); // do value loading now dlg.loadValues(request); // do value loading now
try try
{ // attempt to change the SIG profile now... { // attempt to change the community profile now...
dlg.doDialog(sig); dlg.doDialog(comm);
// now jump back to the main menu // now jump back to the main menu
clearMenu(request); clearMenu(request);
@ -405,18 +416,19 @@ public class SIGAdmin extends VeniceServlet
{ // simple validation exception { // simple validation exception
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("validation failure: " + ve.getMessage()); logger.debug("validation failure: " + ve.getMessage());
dlg.resetOnError(sig,ve.getMessage() + " Please try again."); dlg.resetOnError(comm,ve.getMessage() + " Please try again.");
} // end catch } // end catch
catch (DataException de) catch (DataException de)
{ // database error updating the SIG values { // database error updating the community values
logger.error("DB error updating SIG: " + de.getMessage(),de); logger.error("DB error updating community: " + de.getMessage(),de);
return new ErrorBox("Database Error","Database error updating SIG: " + de.getMessage(),on_error); return new ErrorBox("Database Error","Database error updating community: " + de.getMessage(),
on_error);
} // end catch } // end catch
catch (AccessError ae) catch (AccessError ae)
{ // access error changing the SIG values { // access error changing the community values
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); return new ErrorBox("Access Error",ae.getMessage(),on_error);
} // end catch } // end catch
@ -426,20 +438,21 @@ public class SIGAdmin extends VeniceServlet
} // end if ("update" pressed) } // end if ("update" pressed)
// what the hell was that button? // 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); return new ErrorBox("Internal Error","Unknown command button pressed",on_error);
} // end if ("P" command) } // end if ("P" command)
if (cmd.equals("M")) if (cmd.equals("M"))
{ // "M" = Modify SIG Membership { // "M" = Modify Community Membership
on_error += "&cmd=M"; on_error += "&cmd=M";
setMyLocation(request,on_error); setMyLocation(request,on_error);
if (!(sig.canModifyProfile())) if (!(comm.canModifyProfile()))
{ // no access - sorry, dude { // no access - sorry, dude
logger.error("tried to call up SIG membership screen without access...naughty naughty!"); 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 SIG's membership.",on_error); return new ErrorBox("Unauthorized","You do not have access to modify this community's membership.",
on_error);
} // end if } // end if
@ -496,7 +509,7 @@ public class SIGAdmin extends VeniceServlet
Integer new_level = (Integer)(new_vals.get(uid)); Integer new_level = (Integer)(new_vals.get(uid));
if (new_level==null) if (new_level==null)
{ // whoops { // 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); return new ErrorBox(null,"Invalid new level parameter.",on_error);
} // end if } // end if
@ -507,11 +520,11 @@ public class SIGAdmin extends VeniceServlet
// call down to set the membership level // call down to set the membership level
if (org_level.intValue()!=new_level_x) if (org_level.intValue()!=new_level_x)
{ // we need to reset the SIG membership { // we need to reset the community membership
if (logger.isDebugEnabled()) 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 + ")"); + org_level.intValue() + ", new = " + new_level_x + ")");
sig.setMembership(uid.intValue(),new_level_x); comm.setMembership(uid.intValue(),new_level_x);
} // end if } // end if
@ -520,19 +533,19 @@ public class SIGAdmin extends VeniceServlet
} // end try } // end try
catch (AccessError ae) catch (AccessError ae)
{ // some sort of access error - display an error dialog { // 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); return new ErrorBox("Access Error",ae.getMessage(),on_error);
} // end catch } // end catch
catch (DataException de) catch (DataException de)
{ // database error creating the conference { // 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(), return new ErrorBox("Database Error","Database error setting memberships: " + de.getMessage(),
on_error); on_error);
} // end catch } // end catch
// trap back to the SIG membership display // trap back to the community membership display
throw new RedirectResult(on_error); throw new RedirectResult(on_error);
} // end if ("update" clicked) } // end if ("update" clicked)
@ -540,7 +553,7 @@ public class SIGAdmin extends VeniceServlet
if ( isImageButtonClicked(request,"search") || isImageButtonClicked(request,"previous") if ( isImageButtonClicked(request,"search") || isImageButtonClicked(request,"previous")
|| isImageButtonClicked(request,"next")) || isImageButtonClicked(request,"next"))
{ // create the new dialog box { // create the new dialog box
SIGMembership m = new SIGMembership(engine,sig); CommunityMembership m = new CommunityMembership(engine,comm);
try try
{ // perform the search! { // perform the search!
@ -569,7 +582,7 @@ public class SIGAdmin extends VeniceServlet
} // end if (search function clicked) } // end if (search function clicked)
// we don't know what button was pressed // 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); return new ErrorBox("Internal Error","Unknown command button pressed",on_error);
} // end if ("M" command) } // end if ("M" command)
@ -579,4 +592,4 @@ public class SIGAdmin extends VeniceServlet
} // end doVenicePost } // end doVenicePost
} // end class SIGAdmin } // end class CommunityAdmin

View File

@ -23,7 +23,7 @@ import javax.servlet.http.*;
import com.silverwrist.venice.core.*; import com.silverwrist.venice.core.*;
import com.silverwrist.venice.servlets.format.*; import com.silverwrist.venice.servlets.format.*;
public class SIGFrontEnd extends VeniceServlet public class CommunityFrontEnd extends VeniceServlet
{ {
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Overrides from class HttpServlet * Overrides from class HttpServlet
@ -32,7 +32,7 @@ public class SIGFrontEnd extends VeniceServlet
public String getServletInfo() 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"; + "Part of the Venice Web Communities System\n";
return rc; return rc;
@ -47,19 +47,19 @@ public class SIGFrontEnd extends VeniceServlet
UserContext user, RenderData rdat) UserContext user, RenderData rdat)
throws ServletException, IOException, VeniceServletResult throws ServletException, IOException, VeniceServletResult
{ {
// get the SIG alias name from the request path info // get the community alias name from the request path info
String sigalias = request.getPathInfo().substring(1); String alias = request.getPathInfo().substring(1);
try try
{ // get the SIG's context from the alias name { // get the community's context from the alias name
SIGContext sig = user.getSIGContext(sigalias); CommunityContext comm = user.getCommunityContext(alias);
// get the default servlet from the SIG context // get the default servlet from the community context
String def_servlet = sig.getDefaultApplet(); String def_servlet = comm.getDefaultApplet();
if (def_servlet==null) if (def_servlet==null)
{ // return the default servlet { // return the default servlet
changeMenuTop(request); 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 } // end if
@ -70,10 +70,10 @@ public class SIGFrontEnd extends VeniceServlet
catch (DataException de) catch (DataException de)
{ // set up to display an ErrorBox { // set up to display an ErrorBox
changeMenuTop(request); 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 catch
} // end doVeniceGet } // end doVeniceGet
} // end class SIGFrontEnd } // end class CommunityFrontEnd

View File

@ -25,17 +25,17 @@ import com.silverwrist.venice.ValidationException;
import com.silverwrist.venice.core.*; import com.silverwrist.venice.core.*;
import com.silverwrist.venice.servlets.format.*; import com.silverwrist.venice.servlets.format.*;
public class SIGOperations extends VeniceServlet public class CommunityOperations extends VeniceServlet
{ {
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Static data members * 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 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 * Internal functions
@ -59,22 +59,22 @@ public class SIGOperations extends VeniceServlet
} // end makeJoinKeyDialog } // 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()); DialogCache cache = DialogCache.getDialogCache(getServletContext());
if (!(cache.isCached(desired_name))) if (!(cache.isCached(desired_name)))
{ // create a template and save it off { // create a template and save it off
CreateSIGDialog template = new CreateSIGDialog(getCountryList(),getLanguageList()); CreateCommunityDialog template = new CreateCommunityDialog(getCountryList(),getLanguageList());
cache.saveTemplate(template); cache.saveTemplate(template);
} // end if } // end if
// return a new copy // return a new copy
return (CreateSIGDialog)(cache.getNewDialog(desired_name)); return (CreateCommunityDialog)(cache.getNewDialog(desired_name));
} // end makeCreateSIGDialog } // end makeCreateCommunityDialog
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Overrides from class HttpServlet * Overrides from class HttpServlet
@ -83,7 +83,7 @@ public class SIGOperations extends VeniceServlet
public String getServletInfo() 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"; + "Part of the Venice Web Communities System\n";
return rc; return rc;
@ -103,70 +103,70 @@ public class SIGOperations extends VeniceServlet
setMyLocation(request,"sigops?" + request.getQueryString()); setMyLocation(request,"sigops?" + request.getQueryString());
if (cmd.equals("J")) if (cmd.equals("J"))
{ // "J" = "Join" (requires SIG parameter) { // "J" = "Join" (requires community parameter)
SIGContext sig = getSIGParameter(request,user,true,"top"); CommunityContext comm = getCommunityParameter(request,user,true,"top");
if (!(sig.canJoin())) // not permitted to join! if (!(comm.canJoin())) // not permitted to join!
return new ErrorBox("SIG Error","You are not permitted to join this SIG.","top"); 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) { // attempt to join right now! (no join key required)
try try
{ // call down to join the SIG { // call down to join the community
sig.join(null); comm.join(null);
// success! display the "welcome" page // success! display the "welcome" page
clearMenu(request); // force the clear to regen the menus clearMenu(request); // force the clear to regen the menus
changeMenuSIG(request,sig); changeMenuCommunity(request,comm);
return new SIGWelcome(sig); return new CommunityWelcome(comm);
} // end try } // end try
catch (AccessError ae) catch (AccessError ae)
{ // access error { // 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 } // end catch
catch (DataException de) catch (DataException de)
{ // data exception doing something { // 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 catch
} // end if (public SIG) } // end if (public community)
else else
{ // we need to prompt them for the join key.... { // we need to prompt them for the join key....
JoinKeyDialog dlg = makeJoinKeyDialog(); JoinKeyDialog dlg = makeJoinKeyDialog();
dlg.setupDialog(sig); dlg.setupDialog(comm);
changeMenuSIG(request,sig); changeMenuCommunity(request,comm);
return dlg; return dlg;
} // end else (private SIG) } // end else (private community)
} // end if ("J" command) } // end if ("J" command)
if (cmd.equals("U")) if (cmd.equals("U"))
{ // "U" = "Unjoin (requires SIG parameter) { // "U" = "Unjoin (requires community parameter)
SIGContext sig = getSIGParameter(request,user,true,"top"); CommunityContext comm = getCommunityParameter(request,user,true,"top");
if (!(sig.canUnjoin())) if (!(comm.canUnjoin()))
return new ErrorBox("SIG Error","You cannot unjoin this SIG.","top"); return new ErrorBox("Community Error","You cannot unjoin this community.","top");
// OK, let's test for a confirmation... // OK, let's test for a confirmation...
if (ConfirmBox.isConfirmed(request,UNJOIN_CONFIRM_ATTR,UNJOIN_CONFIRM_PARAM)) if (ConfirmBox.isConfirmed(request,UNJOIN_CONFIRM_ATTR,UNJOIN_CONFIRM_PARAM))
{ // OK, if you say so, let's unjoin! { // OK, if you say so, let's unjoin!
try try
{ // do the unjoin now... { // do the unjoin now...
sig.unjoin(); comm.unjoin();
} // end try } // end try
catch (AccessError ae) catch (AccessError ae)
{ // access error { // 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 } // end catch
catch (DataException de) catch (DataException de)
{ // data exception doing something { // 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 } // end catch
@ -177,21 +177,21 @@ public class SIGOperations extends VeniceServlet
} // end if } // end if
else else
{ // not a proper confirmation - display the confirm box { // not a proper confirmation - display the confirm box
String message = "Are you sure you want to unjoin the '" + sig.getName() + "' SIG?"; String message = "Are you sure you want to unjoin the '" + comm.getName() + "' community?";
return new ConfirmBox(request,UNJOIN_CONFIRM_ATTR,UNJOIN_CONFIRM_PARAM,"Unjoining SIG", return new ConfirmBox(request,UNJOIN_CONFIRM_ATTR,UNJOIN_CONFIRM_PARAM,"Unjoining community",
message,"sigops?cmd=U&sig=" + sig.getSIGID(),"sig/" + sig.getAlias()); message,"sigops?cmd=U&sig=" + comm.getCommunityID(),"sig/" + comm.getAlias());
} // end else } // end else
} // end if ("U" command) } // end if ("U" command)
if (cmd.equals("C")) if (cmd.equals("C"))
{ // "C" - Create SIG (no parameters) { // "C" - Create community (no parameters)
if (!(user.canCreateSIG())) if (!(user.canCreateCommunity()))
return new ErrorBox("SIG Error","You are not permitted to create SIGs.","top"); return new ErrorBox("Community Error","You are not permitted to create communities.","top");
// present the "Create New SIG" dialog // present the "Create New Community" dialog
CreateSIGDialog dlg = makeCreateSIGDialog(); CreateCommunityDialog dlg = makeCreateCommunityDialog();
dlg.setupDialog(engine); dlg.setupDialog(engine);
dlg.setFieldValue("language","en-US"); dlg.setFieldValue("language","en-US");
dlg.setFieldValue("country","US"); dlg.setFieldValue("country","US");
@ -201,21 +201,21 @@ public class SIGOperations extends VeniceServlet
} // end if ("C" command) } // end if ("C" command)
if (cmd.equals("I")) if (cmd.equals("I"))
{ // "I" - Send Invitation (requires SIG parameter) { // "I" - Send Invitation (requires community parameter)
SIGContext sig = getSIGParameter(request,user,true,"top"); CommunityContext comm = getCommunityParameter(request,user,true,"top");
if (!(sig.canSendInvitation())) if (!(comm.canSendInvitation()))
return new ErrorBox("SIG Error","You are not permitted to send an invitation.", return new ErrorBox("Community Error","You are not permitted to send an invitation.",
"sig/" + sig.getAlias()); "sig/" + comm.getAlias());
// present the "Invitation" dialog // present the "Invitation" dialog
return new Invitation(sig); return new Invitation(comm);
} // end if ("I" command) } // end if ("I" command)
// this is an error! // this is an error!
logger.error("invalid command to SIGOperations.doGet: " + cmd); logger.error("invalid command to CommunityOperations.doGet: " + cmd);
return new ErrorBox("Internal Error","Invalid command to SIGOperations.doGet","top"); return new ErrorBox("Internal Error","Invalid command to CommunityOperations.doGet","top");
} // end doVeniceGet } // end doVeniceGet
@ -228,45 +228,45 @@ public class SIGOperations extends VeniceServlet
setMyLocation(request,"sigops?cmd=" + cmd); setMyLocation(request,"sigops?cmd=" + cmd);
if (cmd.equals("J")) if (cmd.equals("J"))
{ // "J" = Join SIG (requires SIG parameter) { // "J" = Join Community (requires community parameter)
SIGContext sig = getSIGParameter(request,user,true,"top"); CommunityContext comm = getCommunityParameter(request,user,true,"top");
JoinKeyDialog dlg = makeJoinKeyDialog(); JoinKeyDialog dlg = makeJoinKeyDialog();
if (dlg.isButtonClicked(request,"cancel")) // cancel - go back to SIG opening page if (dlg.isButtonClicked(request,"cancel")) // cancel - go back to community opening page
throw new RedirectResult("sig/" + sig.getAlias()); throw new RedirectResult("sig/" + comm.getAlias());
if (!(sig.canJoin())) // not permitted to join! if (!(comm.canJoin())) // not permitted to join!
return new ErrorBox("SIG Error","You are not permitted to join this SIG.","top"); return new ErrorBox("Community Error","You are not permitted to join this community.","top");
if (dlg.isButtonClicked(request,"join")) if (dlg.isButtonClicked(request,"join"))
{ // OK, go join the SIG { // OK, go join the community
dlg.loadValues(request); // load the dialog dlg.loadValues(request); // load the dialog
try try
{ // attempt to join the SIG! { // attempt to join the community!
dlg.doDialog(sig); dlg.doDialog(comm);
// success! display the "welcome" page // success! display the "welcome" page
clearMenu(request); // force the clear to regen the menus clearMenu(request); // force the clear to regen the menus
changeMenuSIG(request,sig); changeMenuCommunity(request,comm);
return new SIGWelcome(sig); return new CommunityWelcome(comm);
} // end try } // end try
catch (ValidationException ve) catch (ValidationException ve)
{ // here, a validation exception causes us to recycle and retry { // here, a validation exception causes us to recycle and retry
dlg.resetOnError(ve.getMessage() + " Please try again."); dlg.resetOnError(ve.getMessage() + " Please try again.");
changeMenuSIG(request,sig); changeMenuCommunity(request,comm);
} // end catch } // end catch
catch (AccessError ae) catch (AccessError ae)
{ // this is probably a bogus key - let them retry { // this is probably a bogus key - let them retry
dlg.resetOnError(ae.getMessage() + " Please try again."); dlg.resetOnError(ae.getMessage() + " Please try again.");
changeMenuSIG(request,sig); changeMenuCommunity(request,comm);
} // end catch } // end catch
catch (DataException de) catch (DataException de)
{ // database error joining something { // 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 } // end catch
@ -275,34 +275,34 @@ public class SIGOperations extends VeniceServlet
} // end if ("join" clicked) } // end if ("join" clicked)
// error - don't know what button was 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"); return new ErrorBox("Internal Error","Unknown command button pressed","top");
} // end if ("J" command) } // end if ("J" command)
if (cmd.equals("C")) if (cmd.equals("C"))
{ // "C" = Create New SIG { // "C" = Create New Community
if (!(user.canCreateSIG())) if (!(user.canCreateCommunity()))
return new ErrorBox("SIG Error","You are not permitted to create SIGs.","top"); return new ErrorBox("Community Error","You are not permitted to create communities.","top");
// load the "Create SIG" dialog // load the "Create Communities" dialog
CreateSIGDialog dlg = makeCreateSIGDialog(); CreateCommunityDialog dlg = makeCreateCommunityDialog();
dlg.setupDialog(engine); dlg.setupDialog(engine);
if (dlg.isButtonClicked(request,"cancel")) // cancel - go back to top if (dlg.isButtonClicked(request,"cancel")) // cancel - go back to top
throw new RedirectResult("top"); throw new RedirectResult("top");
if (dlg.isButtonClicked(request,"create")) 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 dlg.loadValues(request); // load the form data
try try
{ // attempt to create the SIG! { // attempt to create the community!
SIGContext sig = dlg.doDialog(user); CommunityContext comm = dlg.doDialog(user);
// created successfully - display a "new SIG welcome" page // created successfully - display a "new community welcome" page
changeMenuSIG(request,sig); // display menus for the first time! changeMenuCommunity(request,comm); // display menus for the first time!
return new NewSIGWelcome(sig); return new NewCommunityWelcome(comm);
} // end try } // end try
catch (ValidationException ve) catch (ValidationException ve)
@ -319,7 +319,7 @@ public class SIGOperations extends VeniceServlet
} // end catch } // end catch
catch (DataException de) catch (DataException de)
{ // database error doing something { // 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 } // end catch
@ -328,24 +328,24 @@ public class SIGOperations extends VeniceServlet
} // end if ("create" pressed) } // end if ("create" pressed)
// error - don't know what button was clicked // 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"); return new ErrorBox("Internal Error","Unknown command button pressed","top");
} // end if ("C" command) } // end if ("C" command)
if (cmd.equals("I")) if (cmd.equals("I"))
{ // "I" = Send invitation (requires SIG parameter) { // "I" = Send invitation (requires community parameter)
SIGContext sig = getSIGParameter(request,user,true,"top"); CommunityContext comm = getCommunityParameter(request,user,true,"top");
String on_error = "sig/" + sig.getAlias(); 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); throw new RedirectResult(on_error);
if (isImageButtonClicked(request,"send")) if (isImageButtonClicked(request,"send"))
{ // the "send" button was pressed { // the "send" button was pressed
try try
{ // send out the invitation { // send out the invitation
sig.sendInvitation(request.getParameter("addr"),request.getParameter("pb")); comm.sendInvitation(request.getParameter("addr"),request.getParameter("pb"));
} // end try } // end try
catch (AccessError ae) catch (AccessError ae)
@ -355,7 +355,8 @@ public class SIGOperations extends VeniceServlet
} // end catch } // end catch
catch (DataException de) catch (DataException de)
{ // database error doing something { // 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 } // end catch
catch (EmailException ee) catch (EmailException ee)
@ -364,21 +365,21 @@ public class SIGOperations extends VeniceServlet
} // end catch } // end catch
// all sent - go back to SIG profile display // all sent - go back to community profile display
throw new RedirectResult(on_error); throw new RedirectResult(on_error);
} // end if ("send" pressed) } // end if ("send" pressed)
// error - don't know what button was clicked // 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); return new ErrorBox("Internal Error","Unknown command button pressed",on_error);
} // end if ("I" command) } // end if ("I" command)
// this is an error! // this is an error!
logger.error("invalid command to SIGOperations.doPost: " + cmd); logger.error("invalid command to CommunityOperations.doPost: " + cmd);
return new ErrorBox("Internal Error","Invalid command to SIGOperations.doPost","top"); return new ErrorBox("Internal Error","Invalid command to CommunityOperations.doPost","top");
} // end doVenicePost } // end doVenicePost
} // end class SIGOperations } // end class CommunityOperations

View File

@ -23,7 +23,7 @@ import javax.servlet.http.*;
import com.silverwrist.venice.core.*; import com.silverwrist.venice.core.*;
import com.silverwrist.venice.servlets.format.*; import com.silverwrist.venice.servlets.format.*;
public class SIGProfile extends VeniceServlet public class CommunityProfile extends VeniceServlet
{ {
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Overrides from class HttpServlet * Overrides from class HttpServlet
@ -32,7 +32,7 @@ public class SIGProfile extends VeniceServlet
public String getServletInfo() 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"; + "Part of the Venice Web Communities System\n";
return rc; return rc;
@ -47,22 +47,22 @@ public class SIGProfile extends VeniceServlet
UserContext user, RenderData rdat) UserContext user, RenderData rdat)
throws ServletException, IOException, VeniceServletResult throws ServletException, IOException, VeniceServletResult
{ {
// get the SIG // get the community
SIGContext sig = getSIGParameter(request,user,true,"top"); CommunityContext comm = getCommunityParameter(request,user,true,"top");
setMyLocation(request,"sigprofile?sig=" + sig.getSIGID()); setMyLocation(request,"sigprofile?sig=" + comm.getCommunityID());
try try
{ // create the profile display { // create the profile display
changeMenuSIG(request,sig); changeMenuCommunity(request,comm);
return new SIGProfileData(engine,user,sig); return new CommunityProfileData(engine,user,comm);
} // end try } // end try
catch (DataException de) catch (DataException de)
{ // in this case, we had database trouble { // 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 catch
} // end doVeniceGet } // end doVeniceGet
} // end class SIGProfile } // end class CommunityProfile

View File

@ -340,12 +340,12 @@ public class ConfDisplay extends VeniceServlet
UserContext user, RenderData rdat) UserContext user, RenderData rdat)
throws ServletException, IOException, VeniceServletResult throws ServletException, IOException, VeniceServletResult
{ {
// get the SIG // get the community
SIGContext sig = getSIGParameter(request,user,true,"top"); CommunityContext comm = getCommunityParameter(request,user,true,"top");
changeMenuSIG(request,sig); changeMenuCommunity(request,comm);
// get the conference // get the conference
ConferenceContext conf = getConferenceParameter(request,sig,true,"top"); ConferenceContext conf = getConferenceParameter(request,comm,true,"top");
// get the topic, if we have it // get the topic, if we have it
TopicContext topic = getTopicParameter(request,conf,false,"top"); TopicContext topic = getTopicParameter(request,conf,false,"top");
@ -354,7 +354,7 @@ public class ConfDisplay extends VeniceServlet
{ // we're handling messages within a single topic { // we're handling messages within a single topic
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("MODE: display messages in topic"); 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()); setMyLocation(request,on_error + "&topic=" + topic.getTopicNumber());
// if this request is restoring the number of unread posts in another topic, try to do so // 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; TopicPosts tpos = null;
try try
{ // create the display { // 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 } // end try
catch (DataException de) catch (DataException de)
@ -390,8 +390,8 @@ public class ConfDisplay extends VeniceServlet
{ // we're displaying the conference's topic list { // we're displaying the conference's topic list
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("MODE: display topics in conference"); logger.debug("MODE: display topics in conference");
String on_error = "confops?sig=" + sig.getSIGID(); String on_error = "confops?sig=" + comm.getCommunityID();
String my_location = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); String my_location = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID();
boolean read_new = !(StringUtil.isStringEmpty(request.getParameter("rnm"))); boolean read_new = !(StringUtil.isStringEmpty(request.getParameter("rnm")));
if (read_new) if (read_new)
my_location += "&rn=1"; my_location += "&rn=1";
@ -426,14 +426,14 @@ public class ConfDisplay extends VeniceServlet
} // end while } // end while
if (topic==null) // no suitable topic found - just create the topic listing 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())); opts.getSortOption(conf.getConfID()));
// determine what the post interval is we want to display // determine what the post interval is we want to display
PostInterval piv = getInterval(engine,request,topic,on_error); PostInterval piv = getInterval(engine,request,topic,on_error);
// create the topic posts view // 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 } // end try
catch (DataException de) catch (DataException de)
@ -452,8 +452,8 @@ public class ConfDisplay extends VeniceServlet
{ // topic listing only... { // topic listing only...
TopicListing tl = null; TopicListing tl = null;
try try
{ // create the topic lict { // create the topic list
tl = new TopicListing(request,sig,conf,opts.getViewOption(conf.getConfID()), tl = new TopicListing(request,comm,conf,opts.getViewOption(conf.getConfID()),
opts.getSortOption(conf.getConfID())); opts.getSortOption(conf.getConfID()));
} // end try } // end try

View File

@ -166,31 +166,31 @@ public class ConfOperations extends VeniceServlet
* SH = Hide/show conference from sequence manager menu * SH = Hide/show conference from sequence manager menu
* SS = Change conference sequence from sequence manager menu * SS = Change conference sequence from sequence manager menu
* T = Create topic (requires conference parameter) * 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, protected VeniceContent doVeniceGet(HttpServletRequest request, VeniceEngine engine,
UserContext user, RenderData rdat) UserContext user, RenderData rdat)
throws ServletException, IOException, VeniceServletResult throws ServletException, IOException, VeniceServletResult
{ {
// get the SIG // get the community
SIGContext sig = getSIGParameter(request,user,true,"top"); CommunityContext comm = getCommunityParameter(request,user,true,"top");
changeMenuSIG(request,sig); changeMenuCommunity(request,comm);
String on_error = "confops?sig=" + sig.getSIGID(); String on_error = "confops?sig=" + comm.getCommunityID();
// get the command we want to use // get the command we want to use
String cmd = getStandardCommandParam(request); String cmd = getStandardCommandParam(request);
if (cmd.equals("S")) if (cmd.equals("S"))
{ // "S" = Manage conferences sequence { // "S" = Manage conferences sequence
if (!(sig.canManageConferences())) if (!(comm.canManageConferences()))
return new ErrorBox("Access Error","You are not permitted to manage conferences in this SIG.", return new ErrorBox("Access Error","You are not permitted to manage conferences in this community.",
on_error); on_error);
try try
{ // display the Conference Sequence screen { // display the Conference Sequence screen
setMyLocation(request,"confops?cmd=S&sig=" + sig.getSIGID()); setMyLocation(request,"confops?cmd=S&sig=" + comm.getCommunityID());
return new ConferenceSequence(sig); return new ConferenceSequence(comm);
} // end try } // end try
catch (DataException de) catch (DataException de)
@ -209,12 +209,12 @@ public class ConfOperations extends VeniceServlet
if (cmd.equals("SH")) if (cmd.equals("SH"))
{ // "SH" = Hide/show conference (requires conference parameter) { // "SH" = Hide/show conference (requires conference parameter)
if (!(sig.canManageConferences())) if (!(comm.canManageConferences()))
return new ErrorBox("Access Error","You are not permitted to manage conferences in this SIG.", return new ErrorBox("Access Error","You are not permitted to manage conferences in this community.",
on_error); on_error);
ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); ConferenceContext conf = getConferenceParameter(request,comm,true,on_error);
on_error = "confops?sig=" + sig.getSIGID() + "&cmd=S"; on_error = "confops?sig=" + comm.getCommunityID() + "&cmd=S";
if (!(conf.canChangeConference())) if (!(conf.canChangeConference()))
return new ErrorBox("Access Error","You do not have permission to modify this conference.",on_error); 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")) if (cmd.equals("SS"))
{ // "SS" = Change conference sequence (requires conference parameter) { // "SS" = Change conference sequence (requires conference parameter)
if (!(sig.canManageConferences())) if (!(comm.canManageConferences()))
return new ErrorBox("Access Error","You are not permitted to manage conferences in this SIG.", return new ErrorBox("Access Error","You are not permitted to manage conferences in this community.",
on_error); on_error);
ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); ConferenceContext conf = getConferenceParameter(request,comm,true,on_error);
on_error = "confops?sig=" + sig.getSIGID() + "&cmd=S"; on_error = "confops?sig=" + comm.getCommunityID() + "&cmd=S";
// we need a second conference parameter to exchange with // 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())) if (!(conf.canChangeConference()) || !(other_conf.canChangeConference()))
return new ErrorBox("Access Error","You do not have permission to modify this conference.",on_error); 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")) if (cmd.equals("SDEL"))
{ // "SDEL" = Delete conference (requires conference parameter) { // "SDEL" = Delete conference (requires conference parameter)
if (!(sig.canManageConferences())) if (!(comm.canManageConferences()))
return new ErrorBox("Access Error","You are not permitted to manage conferences in this SIG.", return new ErrorBox("Access Error","You are not permitted to manage conferences in this community.",
on_error); on_error);
ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); ConferenceContext conf = getConferenceParameter(request,comm,true,on_error);
on_error = "confops?sig=" + sig.getSIGID() + "&cmd=S"; on_error = "confops?sig=" + comm.getCommunityID() + "&cmd=S";
if (!(conf.canDeleteConference())) if (!(conf.canDeleteConference()))
return new ErrorBox("Access Error","You do not have permission to delete this conference.",on_error); 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! " String message = "You are about to permanently delete the \"" + conf.getName() + "\" conference! "
+ "Are you sure you want to do this?"; + "Are you sure you want to do this?";
return new ConfirmBox(request,DELETE_CONFIRM_ATTR,DELETE_CONFIRM_PARAM,"Delete Conference",message, 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); on_error);
} // end else } // end else
@ -344,13 +344,13 @@ public class ConfOperations extends VeniceServlet
if (cmd.equals("C")) if (cmd.equals("C"))
{ // "C" = "Create conference" { // "C" = "Create conference"
if (!(sig.canCreateConference())) if (!(comm.canCreateConference()))
return new ErrorBox("Access Error","You are not permitted to create conferences in this SIG.", return new ErrorBox("Access Error","You are not permitted to create conferences in this community.",
on_error); on_error);
// make the "create" dialog // make the "create" dialog
CreateConferenceDialog dlg = makeCreateConferenceDialog(); CreateConferenceDialog dlg = makeCreateConferenceDialog();
dlg.setupDialog(engine,sig); dlg.setupDialog(engine,comm);
setMyLocation(request,on_error + "&cmd=C"); setMyLocation(request,on_error + "&cmd=C");
return dlg; return dlg;
@ -358,32 +358,32 @@ public class ConfOperations extends VeniceServlet
if (cmd.equals("T")) if (cmd.equals("T"))
{ // "T" = "Create topic" (requires conference parameter) { // "T" = "Create topic" (requires conference parameter)
ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); ConferenceContext conf = getConferenceParameter(request,comm,true,on_error);
on_error = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); on_error = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID();
// Create the new topic form. // Create the new topic form.
NewTopicForm ntf = new NewTopicForm(sig,conf); NewTopicForm ntf = new NewTopicForm(comm,conf);
ntf.setupNewRequest(); 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; return ntf;
} // end if ("T" command) } // end if ("T" command)
if (cmd.equals("Q")) if (cmd.equals("Q"))
{ // "Q" = display Manage menu (requires conference parameter) { // "Q" = display Manage menu (requires conference parameter)
ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); ConferenceContext conf = getConferenceParameter(request,comm,true,on_error);
on_error = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); on_error = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID();
// display the "Manage Conference" display // display the "Manage Conference" display
setMyLocation(request,"confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"); setMyLocation(request,"confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=Q");
return new ManageConference(sig,conf); return new ManageConference(comm,conf);
} // end if ("Q" command) } // end if ("Q" command)
if (cmd.equals("FX")) if (cmd.equals("FX"))
{ // "FX" = the dreaded fixseen :-) - catches up the entire conference { // "FX" = the dreaded fixseen :-) - catches up the entire conference
ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); ConferenceContext conf = getConferenceParameter(request,comm,true,on_error);
on_error = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); on_error = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID();
try try
{ // do the fixseen operation { // do the fixseen operation
@ -408,8 +408,8 @@ public class ConfOperations extends VeniceServlet
if (cmd.equals("E")) if (cmd.equals("E"))
{ // "E" = "Edit Conference Settings" (requires conference parameter) { // "E" = "Edit Conference Settings" (requires conference parameter)
ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); ConferenceContext conf = getConferenceParameter(request,comm,true,on_error);
on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"; on_error = "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=Q";
if (!(conf.canChangeConference())) if (!(conf.canChangeConference()))
return new ErrorBox("Access Error","You are not permitted to change this conference's settings.", 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(); EditConferenceDialog dlg = makeEditConferenceDialog();
try try
{ // set up and return the dialog { // set up and return the dialog
dlg.setupDialog(sig,conf); dlg.setupDialog(comm,conf);
setMyLocation(request,"confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=E"); setMyLocation(request,"confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=E");
return dlg; return dlg;
} // end try } // end try
@ -440,8 +440,8 @@ public class ConfOperations extends VeniceServlet
if (cmd.equals("A")) if (cmd.equals("A"))
{ // "A" = "Manage Aliases" (requires conference parameter) { // "A" = "Manage Aliases" (requires conference parameter)
ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); ConferenceContext conf = getConferenceParameter(request,comm,true,on_error);
on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"; on_error = "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=Q";
if (!(conf.canChangeConference())) if (!(conf.canChangeConference()))
return new ErrorBox("Access Error","You are not permitted to change this conference's aliases.", 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 // display the "Manage Conference Aliases" display
try try
{ // generate the display box { // generate the display box
setMyLocation(request,"confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=A"); setMyLocation(request,"confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=A");
return new ManageConferenceAliases(sig,conf); return new ManageConferenceAliases(comm,conf);
} // end try } // end try
catch (DataException de) catch (DataException de)
@ -488,13 +488,13 @@ public class ConfOperations extends VeniceServlet
if (cmd.equals("QR")) if (cmd.equals("QR"))
{ // "QR" = "Reports Menu" (requires conference parameter) { // "QR" = "Reports Menu" (requires conference parameter)
ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); ConferenceContext conf = getConferenceParameter(request,comm,true,on_error);
on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"; on_error = "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=Q";
try try
{ // display the "Conference Reports" display { // display the "Conference Reports" display
setMyLocation(request,"confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=QR"); setMyLocation(request,"confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=QR");
return new ReportConferenceMenu(sig,conf); return new ReportConferenceMenu(comm,conf);
} // end try } // end try
catch (DataException de) catch (DataException de)
@ -512,17 +512,17 @@ public class ConfOperations extends VeniceServlet
if (cmd.equals("RP") || cmd.equals("RR")) if (cmd.equals("RP") || cmd.equals("RR"))
{ // "RP" = "Report Posters," "RR" = "Report Readers" (requires conference parameter, optional topic) { // "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); 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 try
{ // generate the listing on this page { // 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) if (topic!=null)
my_loc += ("&top=" + topic.getTopicNumber()); my_loc += ("&top=" + topic.getTopicNumber());
setMyLocation(request,my_loc + "&cmd=" + cmd); 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 } // end try
catch (DataException de) catch (DataException de)
@ -541,14 +541,14 @@ public class ConfOperations extends VeniceServlet
if (cmd.equals("M")) if (cmd.equals("M"))
{ // "M" - Manage Conference Membership (requires conference parameter) { // "M" - Manage Conference Membership (requires conference parameter)
ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); ConferenceContext conf = getConferenceParameter(request,comm,true,on_error);
on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"; on_error = "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=Q";
try try
{ // display the conference member list! { // display the conference member list!
ConferenceMembership m = new ConferenceMembership(engine,sig,conf); ConferenceMembership m = new ConferenceMembership(engine,comm,conf);
m.doConferenceMemberList(); 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; return m;
} // end try } // end try
@ -568,8 +568,8 @@ public class ConfOperations extends VeniceServlet
if (cmd.equals("H")) if (cmd.equals("H"))
{ // "H" = "Add Conference To Hotlist" (requires conference parameter) { // "H" = "Add Conference To Hotlist" (requires conference parameter)
ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); ConferenceContext conf = getConferenceParameter(request,comm,true,on_error);
on_error = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); on_error = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID();
try try
{ // add to the hotlist { // add to the hotlist
@ -590,8 +590,8 @@ public class ConfOperations extends VeniceServlet
if (cmd.equals("DEL")) if (cmd.equals("DEL"))
{ // "DEL" = "Delete Conference (requires conference parameter) { // "DEL" = "Delete Conference (requires conference parameter)
ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); ConferenceContext conf = getConferenceParameter(request,comm,true,on_error);
on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"; on_error = "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=Q";
if (!(conf.canDeleteConference())) if (!(conf.canDeleteConference()))
return new ErrorBox("Access Error","You do not have permission to delete this conference.",on_error); 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 } // end catch
// that's it - trap back to the main conference list // 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 } // end if
else else
@ -624,7 +624,7 @@ public class ConfOperations extends VeniceServlet
String message = "You are about to permanently delete the \"" + conf.getName() + "\" conference! " String message = "You are about to permanently delete the \"" + conf.getName() + "\" conference! "
+ "Are you sure you want to do this?"; + "Are you sure you want to do this?";
return new ConfirmBox(request,DELETE_CONFIRM_ATTR,DELETE_CONFIRM_PARAM,"Delete Conference",message, 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); on_error);
} // end else } // end else
@ -632,11 +632,11 @@ public class ConfOperations extends VeniceServlet
} // end if ("DEL" command) } // end if ("DEL" command)
// Any unrecognized command shows us the conference list. // Any unrecognized command shows us the conference list.
on_error = "sigprofile?sig=" + sig.getSIGID(); on_error = "sigprofile?sig=" + comm.getCommunityID();
try try
{ // make a conference listing { // make a conference listing
setMyLocation(request,"confops?sig=" + sig.getSIGID()); setMyLocation(request,"confops?sig=" + comm.getCommunityID());
return new ConferenceListing(sig); return new ConferenceListing(comm);
} // end try } // end try
catch (DataException de) catch (DataException de)
@ -656,23 +656,23 @@ public class ConfOperations extends VeniceServlet
UserContext user, RenderData rdat) UserContext user, RenderData rdat)
throws ServletException, IOException, VeniceServletResult throws ServletException, IOException, VeniceServletResult
{ {
// get the SIG // get the community
SIGContext sig = getSIGParameter(request,user,true,"top"); CommunityContext comm = getCommunityParameter(request,user,true,"top");
changeMenuSIG(request,sig); changeMenuCommunity(request,comm);
String on_error = "confops?sig=" + sig.getSIGID(); String on_error = "confops?sig=" + comm.getCommunityID();
// get the command we want to use // get the command we want to use
String cmd = getStandardCommandParam(request); String cmd = getStandardCommandParam(request);
if (cmd.equals("C")) if (cmd.equals("C"))
{ // "C" = "Create Conference" { // "C" = "Create Conference"
if (!(sig.canCreateConference())) if (!(comm.canCreateConference()))
return new ErrorBox("Access Error","You are not permitted to create conferences in this SIG.", return new ErrorBox("Access Error","You are not permitted to create conferences in this community.",
on_error); on_error);
// load up the create conference dialog! // load up the create conference dialog!
CreateConferenceDialog dlg = makeCreateConferenceDialog(); CreateConferenceDialog dlg = makeCreateConferenceDialog();
dlg.setupDialog(engine,sig); dlg.setupDialog(engine,comm);
if (dlg.isButtonClicked(request,"cancel")) if (dlg.isButtonClicked(request,"cancel"))
throw new RedirectResult(on_error); // they chickened out - go back to the conference list throw new RedirectResult(on_error); // they chickened out - go back to the conference list
@ -683,10 +683,10 @@ public class ConfOperations extends VeniceServlet
try try
{ // attempt to create the conference! { // attempt to create the conference!
ConferenceContext conf = dlg.doDialog(sig); ConferenceContext conf = dlg.doDialog(comm);
// success! redirect to the conference's topic list // 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 } // end try
catch (ValidationException ve) catch (ValidationException ve)
@ -719,8 +719,8 @@ public class ConfOperations extends VeniceServlet
if (cmd.equals("T")) if (cmd.equals("T"))
{ // "T" command = Create New Topic (requires conference parameter) { // "T" command = Create New Topic (requires conference parameter)
ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); ConferenceContext conf = getConferenceParameter(request,comm,true,on_error);
on_error = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); on_error = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID();
// determine what to do based on the button pressed // determine what to do based on the button pressed
if (isImageButtonClicked(request,"cancel")) if (isImageButtonClicked(request,"cancel"))
@ -728,7 +728,7 @@ public class ConfOperations extends VeniceServlet
if (isImageButtonClicked(request,"preview")) if (isImageButtonClicked(request,"preview"))
{ // generate a preview and redisplay the form { // generate a preview and redisplay the form
NewTopicForm ntf = new NewTopicForm(sig,conf); NewTopicForm ntf = new NewTopicForm(comm,conf);
try try
{ // generate a preview display { // generate a preview display
@ -747,7 +747,7 @@ public class ConfOperations extends VeniceServlet
return null; // no title or text specified - "204 No Content" return null; // no title or text specified - "204 No Content"
-- end removed code */ -- 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; return ntf;
} // end if ("preview" clicked) } // end if ("preview" clicked)
@ -766,7 +766,7 @@ public class ConfOperations extends VeniceServlet
if (yes.equals(request.getParameter("attach"))) if (yes.equals(request.getParameter("attach")))
{ // we need to upload an attachment for this post { // we need to upload an attachment for this post
setMyLocation(request,on_error); 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 } // end if
@ -795,8 +795,8 @@ public class ConfOperations extends VeniceServlet
if (cmd.equals("P")) if (cmd.equals("P"))
{ // "P" = Set default pseud (requires conference parameter) { // "P" = Set default pseud (requires conference parameter)
ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); ConferenceContext conf = getConferenceParameter(request,comm,true,on_error);
on_error = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); on_error = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID();
try try
{ // go set the pseud! { // go set the pseud!
@ -817,8 +817,8 @@ public class ConfOperations extends VeniceServlet
if (cmd.equals("E")) if (cmd.equals("E"))
{ // "E" = "Edit Conference Settings" (requires conference parameter) { // "E" = "Edit Conference Settings" (requires conference parameter)
ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); ConferenceContext conf = getConferenceParameter(request,comm,true,on_error);
on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"; on_error = "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=Q";
if (!(conf.canChangeConference())) if (!(conf.canChangeConference()))
return new ErrorBox("Access Error","You are not permitted to change this conference's settings.", 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 } // end try
catch (ValidationException ve) catch (ValidationException ve)
{ // validation error - throw it back to the user { // 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 } // end catch
catch (AccessError ae) catch (AccessError ae)
@ -859,7 +859,7 @@ public class ConfOperations extends VeniceServlet
} // end catch } // 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 return dlg; // redisplay the dialog
} // end if } // end if
@ -868,8 +868,8 @@ public class ConfOperations extends VeniceServlet
if (cmd.equals("A")) if (cmd.equals("A"))
{ // "A" = "Add Alias" (requires conference parameter) { // "A" = "Add Alias" (requires conference parameter)
ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); ConferenceContext conf = getConferenceParameter(request,comm,true,on_error);
on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"; on_error = "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=Q";
if (!(conf.canChangeConference())) if (!(conf.canChangeConference()))
return new ErrorBox("Access Error","You are not permitted to change this conference's settings.", 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)) if (StringUtil.isStringEmpty(new_alias))
return null; // this is a no-op 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; String error_message = null;
if (IDUtils.isValidVeniceID(new_alias)) if (IDUtils.isValidVeniceID(new_alias))
@ -909,13 +909,13 @@ public class ConfOperations extends VeniceServlet
try try
{ // generate the display box { // generate the display box
setMyLocation(request,on_error); setMyLocation(request,on_error);
return new ManageConferenceAliases(sig,conf); return new ManageConferenceAliases(comm,conf);
} // end try } // end try
catch (DataException de) catch (DataException de)
{ // error generating the display box { // error generating the display box
return new ErrorBox("Database Error","Database error displaying aliases: " + de.getMessage(), 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 } // end catch
@ -923,8 +923,8 @@ public class ConfOperations extends VeniceServlet
if (cmd.equals("M")) if (cmd.equals("M"))
{ // "M" - Manage Conference Membership (requires conference parameter) { // "M" - Manage Conference Membership (requires conference parameter)
ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); ConferenceContext conf = getConferenceParameter(request,comm,true,on_error);
on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=M"; on_error = "confops?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&cmd=M";
if (isImageButtonClicked(request,"update")) if (isImageButtonClicked(request,"update"))
{ // the "update" command that changes all the security levels { // 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") if ( isImageButtonClicked(request,"search") || isImageButtonClicked(request,"previous")
|| isImageButtonClicked(request,"next")) || isImageButtonClicked(request,"next"))
{ // create the new dialog box { // create the new dialog box
ConferenceMembership m = new ConferenceMembership(engine,sig,conf); ConferenceMembership m = new ConferenceMembership(engine,comm,conf);
try try
{ // perform the search! { // perform the search!

View File

@ -126,7 +126,7 @@ public class Find extends VeniceServlet
// figure out the category ID parameter // figure out the category ID parameter
int cat = -1; int cat = -1;
if (disp==FindData.FD_SIGS) if (disp==FindData.FD_COMMUNITIES)
cat = getCategoryParam(engine,request); cat = getCategoryParam(engine,request);
try try

View File

@ -81,17 +81,17 @@ public class PostMessage extends VeniceServlet
UserContext user, RenderData rdat) UserContext user, RenderData rdat)
throws ServletException, IOException, VeniceServletResult throws ServletException, IOException, VeniceServletResult
{ {
// get the SIG // get the community
SIGContext sig = getSIGParameter(request,user,true,"top"); CommunityContext comm = getCommunityParameter(request,user,true,"top");
changeMenuSIG(request,sig); changeMenuCommunity(request,comm);
// get the conference // get the conference
ConferenceContext conf = getConferenceParameter(request,sig,true,"top"); ConferenceContext conf = getConferenceParameter(request,comm,true,"top");
// get the topic // get the topic
TopicContext topic = getTopicParameter(request,conf,true,"top"); 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(); + topic.getTopicNumber();
if (isImageButtonClicked(request,"cancel")) if (isImageButtonClicked(request,"cancel"))
@ -110,7 +110,7 @@ public class PostMessage extends VeniceServlet
final String yes = "Y"; final String yes = "Y";
if (isImageButtonClicked(request,"preview")) // generate a preview 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), request.getParameter("next"),getPostNumber(request,on_error),
yes.equals(request.getParameter("attach")), yes.equals(request.getParameter("attach")),
yes.equals(request.getParameter("slip"))); yes.equals(request.getParameter("slip")));
@ -125,7 +125,7 @@ public class PostMessage extends VeniceServlet
try try
{ // first check for slippage { // first check for slippage
if (pn!=topic.getTotalMessages()) // slippage detected! display the slippage screen 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, request.getParameter("pseud"),raw_postdata,
yes.equals(request.getParameter("attach"))); yes.equals(request.getParameter("attach")));
@ -138,7 +138,7 @@ public class PostMessage extends VeniceServlet
// where do we want to go now? // where do we want to go now?
String target; String target;
if (go_topics) if (go_topics)
target = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); target = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID();
else else
{ // figure out what topic to go to next { // figure out what topic to go to next
short next; short next;
@ -163,13 +163,13 @@ public class PostMessage extends VeniceServlet
} // end catch } // end catch
target = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&top=" target = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID() + "&top="
+ next + "&rnm=1"; + next + "&rnm=1";
} // end else } // end else
if (yes.equals(request.getParameter("attach"))) 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 // no attachment - redirect where we need to go
throw new RedirectResult(target); throw new RedirectResult(target);

View File

@ -61,14 +61,14 @@ public class PostOperations extends VeniceServlet
UserContext user, RenderData rdat) UserContext user, RenderData rdat)
throws ServletException, IOException, VeniceServletResult throws ServletException, IOException, VeniceServletResult
{ {
// get the SIG // get the community
SIGContext sig = getSIGParameter(request,user,true,"top"); CommunityContext comm = getCommunityParameter(request,user,true,"top");
changeMenuSIG(request,sig); changeMenuCommunity(request,comm);
String locator = "sig=" + sig.getSIGID(); String locator = "sig=" + comm.getCommunityID();
String location = "sigprofile?" + locator; String location = "sigprofile?" + locator;
// get the conference // get the conference
ConferenceContext conf = getConferenceParameter(request,sig,true,location); ConferenceContext conf = getConferenceParameter(request,comm,true,location);
locator += "&conf=" + conf.getConfID(); locator += "&conf=" + conf.getConfID();
location = "confdisp?" + locator; location = "confdisp?" + locator;

View File

@ -64,30 +64,30 @@ public class PostShortcut extends VeniceServlet
} // end catch } // 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 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 try
{ // get the SIG represented by that alias { // get the community represented by that alias
sig = user.getSIGContext(decoder.getSIG()); comm = user.getCommunityContext(decoder.getCommunity());
} // end try } // end try
catch (DataException e) catch (DataException e)
{ // can't find the SIG - we're screwed { // can't find the community - we're screwed
return new ErrorBox("Invalid Post Link","Invalid post link \"" + raw_link + "\": cannot find SIG: " return new ErrorBox("Invalid Post Link","Invalid post link \"" + raw_link + "\": cannot find community: "
+ e.getMessage(),null); + e.getMessage(),null);
} // end catch } // end catch
if (decoder.getConference()==null) // it's a SIG link only - redirect to the SIG's default page if (decoder.getConference()==null) // it's a community link only - redirect to the default page
throw new RedirectResult("sig/" + decoder.getSIG()); throw new RedirectResult("sig/" + decoder.getCommunity());
ConferenceContext conf; ConferenceContext conf;
try try
{ // get the conference represented by that alias { // get the conference represented by that alias
conf = sig.getConferenceContext(decoder.getConference()); conf = comm.getConferenceContext(decoder.getConference());
} // end try } // end try
catch (DataException e) catch (DataException e)
@ -103,7 +103,7 @@ public class PostShortcut extends VeniceServlet
} // end catch } // end catch
// compute an elementary "locator" // 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 if (decoder.getTopic()==-1) // just a conference link - go to the top-level display
throw new RedirectResult("confdisp?" + locator); throw new RedirectResult("confdisp?" + locator);

View File

@ -47,10 +47,10 @@ public class Settings extends VeniceServlet
String foo = request.getParameter("sig"); String foo = request.getParameter("sig");
if (foo==null) if (foo==null)
throw new ErrorBox(null,"Parameter not specified!","settings?cmd=H"); throw new ErrorBox(null,"Parameter not specified!","settings?cmd=H");
int sigid; int cid;
try try
{ // this is the SIG id of the hotlist entry { // this is the community id of the hotlist entry
sigid = Integer.parseInt(foo); cid = Integer.parseInt(foo);
} // end try } // end try
catch (NumberFormatException nfe) catch (NumberFormatException nfe)
@ -78,7 +78,7 @@ public class Settings extends VeniceServlet
{ // look at the hotlist entries to find the right index { // look at the hotlist entries to find the right index
ConferenceHotlistEntry hle = (ConferenceHotlistEntry)(hotlist.get(i)); ConferenceHotlistEntry hle = (ConferenceHotlistEntry)(hotlist.get(i));
if ( (hle.getConference().getConfID()==confid) if ( (hle.getConference().getConfID()==confid)
&& (hle.getConference().getEnclosingSIG().getSIGID()==sigid)) && (hle.getConference().getEnclosingCommunity().getCommunityID()==cid))
return i; return i;
} // end for } // end for
@ -220,44 +220,45 @@ public class Settings extends VeniceServlet
} // end if (one of the "H" subcommands) } // end if (one of the "H" subcommands)
if (cmd.equals("S")) if (cmd.equals("S"))
{ // "S" - display the user's SIG list { // "S" - display the user's community list
try try
{ // return the SIG list viewer { // return the community list viewer
setMyLocation(request,"settings?cmd=S"); setMyLocation(request,"settings?cmd=S");
return new UserSIGList(user); return new UserCommunityList(user);
} // end try } // end try
catch (DataException de) catch (DataException de)
{ // oops...can't get it! { // 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 catch
} // end if ("S" command) } // end if ("S" command)
if (cmd.equals("SX")) if (cmd.equals("SX"))
{ // "SX" - unjoin the specified SIG { // "SX" - unjoin the specified community
SIGContext sig = getSIGParameter(request,user,true,"settings?cmd=S"); CommunityContext comm = getCommunityParameter(request,user,true,"settings?cmd=S");
if (!(sig.canUnjoin())) if (!(comm.canUnjoin()))
return new ErrorBox("SIG Error","You cannot unjoin this SIG.","settings?cmd=S"); return new ErrorBox("Community Error","You cannot unjoin this community.","settings?cmd=S");
// OK, let's test for a confirmation... // OK, let's test for a confirmation...
if (ConfirmBox.isConfirmed(request,UNJOIN_CONFIRM_ATTR,UNJOIN_CONFIRM_PARAM)) if (ConfirmBox.isConfirmed(request,UNJOIN_CONFIRM_ATTR,UNJOIN_CONFIRM_PARAM))
{ // OK, if you say so, let's unjoin! { // OK, if you say so, let's unjoin!
try try
{ // do the unjoin now... { // do the unjoin now...
sig.unjoin(); comm.unjoin();
} // end try } // end try
catch (AccessError ae) catch (AccessError ae)
{ // access error { // 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 } // end catch
catch (DataException de) catch (DataException de)
{ // data exception doing something { // 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"); "settings?cmd=S");
} // end catch } // end catch
@ -268,9 +269,9 @@ public class Settings extends VeniceServlet
} // end if } // end if
else else
{ // not a proper confirmation - display the confirm box { // not a proper confirmation - display the confirm box
String message = "Are you sure you want to unjoin the '" + sig.getName() + "' SIG?"; String message = "Are you sure you want to unjoin the '" + comm.getName() + "' community?";
return new ConfirmBox(request,UNJOIN_CONFIRM_ATTR,UNJOIN_CONFIRM_PARAM,"Unjoining SIG", return new ConfirmBox(request,UNJOIN_CONFIRM_ATTR,UNJOIN_CONFIRM_PARAM,"Unjoining Community",
message,"settings?cmd=SX&sig=" + sig.getSIGID(),"settings?cmd=S"); message,"settings?cmd=SX&sig=" + comm.getCommunityID(),"settings?cmd=S");
} // end else } // end else

View File

@ -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 * Internal functions

View File

@ -60,14 +60,14 @@ public class TopicOperations extends VeniceServlet
UserContext user, RenderData rdat) UserContext user, RenderData rdat)
throws ServletException, IOException, VeniceServletResult throws ServletException, IOException, VeniceServletResult
{ {
// get the SIG // get the community
SIGContext sig = getSIGParameter(request,user,true,"top"); CommunityContext comm = getCommunityParameter(request,user,true,"top");
changeMenuSIG(request,sig); changeMenuCommunity(request,comm);
String locator = "sig=" + sig.getSIGID(); String locator = "sig=" + comm.getCommunityID();
String location = "sigprofile?" + locator; String location = "sigprofile?" + locator;
// get the conference // get the conference
ConferenceContext conf = getConferenceParameter(request,sig,true,location); ConferenceContext conf = getConferenceParameter(request,comm,true,location);
locator += "&conf=" + conf.getConfID(); locator += "&conf=" + conf.getConfID();
location = "confdisp?" + locator; location = "confdisp?" + locator;
@ -150,7 +150,7 @@ public class TopicOperations extends VeniceServlet
{ // Delete Topic requires a confirmation! { // Delete Topic requires a confirmation!
if (ConfirmBox.isConfirmed(request,DELETE_CONFIRM_ATTR,DELETE_CONFIRM_PARAM)) if (ConfirmBox.isConfirmed(request,DELETE_CONFIRM_ATTR,DELETE_CONFIRM_PARAM))
{ // OK, go ahead, delete the topic! { // OK, go ahead, delete the topic!
location = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); location = "confdisp?sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID();
try try
{ // delete the bloody topic! { // delete the bloody topic!

View File

@ -255,27 +255,27 @@ public class Variables
} // end setMenuTop } // end setMenuTop
public static void setMenuSIG(HttpSession session, SIGContext sig) public static void setMenuCommunity(HttpSession session, CommunityContext comm)
{ {
Object obj = session.getAttribute(MENU_ATTRIBUTE); Object obj = session.getAttribute(MENU_ATTRIBUTE);
boolean do_change; boolean do_change;
if ((obj==null) || !(obj instanceof MenuSIG)) if ((obj==null) || !(obj instanceof MenuCommunity))
do_change = true; do_change = true;
else else
{ // look at the actual SIGIDs underlying the MenuSIG { // look at the actual community IDs underlying the MenuCommunity
MenuSIG tmp = (MenuSIG)obj; MenuCommunity tmp = (MenuCommunity)obj;
do_change = (tmp.getID()!=sig.getSIGID()); do_change = (tmp.getID()!=comm.getCommunityID());
} // end else } // end else
if (do_change) if (do_change)
{ // switch to the appropriate MenuSIG { // switch to the appropriate MenuCommunity
MenuSIG ms = new MenuSIG(sig); MenuCommunity mc = new MenuCommunity(comm);
session.setAttribute(MENU_ATTRIBUTE,ms); session.setAttribute(MENU_ATTRIBUTE,mc);
} // end if } // end if
} // end setMenuSIG } // end setMenuCommunity
public static void clearMenu(HttpSession session) public static void clearMenu(HttpSession session)
{ {

View File

@ -54,57 +54,58 @@ public abstract class VeniceServlet extends HttpServlet
} // end notSupported } // end notSupported
private static final SIGContext getSIGParameter(String str, UserContext user, boolean required, private static final CommunityContext getCommunityParameter(String str, UserContext user, boolean required,
String on_error) throws ErrorBox String on_error) throws ErrorBox
{ {
if (StringUtil.isStringEmpty(str)) if (StringUtil.isStringEmpty(str))
{ // there's no SIG parameter { // there's no community parameter
if (required) if (required)
{ // no SIG parameter - bail out now! { // no communty parameter - bail out now!
logger.error("SIG parameter not specified!"); logger.error("community parameter not specified!");
throw new ErrorBox(null,"No SIG specified.",on_error); throw new ErrorBox(null,"No community specified.",on_error);
} // end if } // end if
else else
{ // a null SIGContext is permitted { // a null CommunityContext is permitted
logger.debug("no SIG specified"); logger.debug("no community specified");
return null; return null;
} // end else } // end else
} // end if } // end if
SIGContext rc = null; CommunityContext rc = null;
try 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); int tmp_id = Integer.parseInt(str);
rc = user.getSIGContext(tmp_id); rc = user.getCommunityContext(tmp_id);
if (rc==null) if (rc==null)
{ // trap any null results (may not be possible with SIGs, but you never know) { // trap any null results (may not be possible with communities, but you never know)
logger.error("SIG #" + tmp_id + " was not found!"); logger.error("Community #" + tmp_id + " was not found!");
throw new ErrorBox(null,"The specified SIG (#" + tmp_id + ") was not found in the database.",on_error); throw new ErrorBox(null,"The specified community (#" + tmp_id + ") was not found in the database.",
on_error);
} // end if } // end if
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("found SIG #" + rc.getSIGID()); logger.debug("found community #" + rc.getCommunityID());
} // end try } // end try
catch (NumberFormatException nfe) catch (NumberFormatException nfe)
{ // error in Integer.parseInt { // error in Integer.parseInt
logger.error("Cannot convert SIG parameter '" + str + "'!"); logger.error("Cannot convert community parameter '" + str + "'!");
throw new ErrorBox(null,"Invalid SIG parameter.",on_error); throw new ErrorBox(null,"Invalid community parameter.",on_error);
} // end catch } // end catch
catch (DataException de) catch (DataException de)
{ // error looking up the SIG { // error looking up the community
throw new ErrorBox("Database Error","Database error finding SIG: " + de.getMessage(),on_error); throw new ErrorBox("Database Error","Database error finding community: " + de.getMessage(),on_error);
} // end catch } // end catch
return rc; return rc;
} // end getSIGParameter } // end getCommunityParameter
private static TopicContext getTopicParameter(String str, ConferenceContext conf, boolean required, private static TopicContext getTopicParameter(String str, ConferenceContext conf, boolean required,
String on_error) throws ErrorBox String on_error) throws ErrorBox
@ -341,11 +342,11 @@ public abstract class VeniceServlet extends HttpServlet
} // end changeMenuTop } // 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) protected final void clearMenu(HttpServletRequest request)
{ {
@ -369,24 +370,26 @@ public abstract class VeniceServlet extends HttpServlet
} // end setMyLocation } // end setMyLocation
protected final static SIGContext getSIGParameter(ServletRequest request, UserContext user, boolean required, protected final static CommunityContext getCommunityParameter(ServletRequest request, UserContext user,
String on_error) throws ErrorBox 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, protected final static CommunityContext getCommunityParameter(ServletMultipartHandler mphandler,
boolean required, String on_error) throws ErrorBox UserContext user, boolean required,
String on_error) throws ErrorBox
{ {
if (mphandler.isFileParam("sig")) if (mphandler.isFileParam("sig"))
throw new ErrorBox(null,"Internal Error: SIG should be a normal param",on_error); throw new ErrorBox(null,"Internal Error: community should be a normal param",on_error);
return getSIGParameter(mphandler.getValue("sig"),user,required,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, protected static ConferenceContext getConferenceParameter(String str, CommunityContext comm,
String on_error) throws ErrorBox boolean required, String on_error) throws ErrorBox
{ {
if (StringUtil.isStringEmpty(str)) if (StringUtil.isStringEmpty(str))
{ // there's no conference parameter { // there's no conference parameter
@ -409,12 +412,12 @@ public abstract class VeniceServlet extends HttpServlet
try try
{ // turn the string into a ConfID, and thence to a ConferenceContext { // turn the string into a ConfID, and thence to a ConferenceContext
int tmp_id = Integer.parseInt(str); int tmp_id = Integer.parseInt(str);
rc = sig.getConferenceContext(tmp_id); rc = comm.getConferenceContext(tmp_id);
if (rc==null) if (rc==null)
{ // couldn't find the conference { // couldn't find the conference
logger.error("SIG #" + sig.getSIGID() + " does not contain conference #" + tmp_id); 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 '" + sig.getName() throw new ErrorBox(null,"The conference #" + tmp_id + " could not be found in the '" + comm.getName()
+ "' SIG.",on_error); + "' community.",on_error);
} // end if } // end if
@ -443,21 +446,21 @@ public abstract class VeniceServlet extends HttpServlet
} // end getConferenceParameter } // end getConferenceParameter
protected final static ConferenceContext getConferenceParameter(ServletRequest request, SIGContext sig, protected final static ConferenceContext getConferenceParameter(ServletRequest request,
boolean required, String on_error) CommunityContext comm, boolean required,
throws ErrorBox 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 } // end getConferenceParameter
protected final static ConferenceContext getConferenceParameter(ServletMultipartHandler mphandler, protected final static ConferenceContext getConferenceParameter(ServletMultipartHandler mphandler,
SIGContext sig, boolean required, CommunityContext comm, boolean required,
String on_error) throws ErrorBox String on_error) throws ErrorBox
{ {
if (mphandler.isFileParam("conf")) if (mphandler.isFileParam("conf"))
throw new ErrorBox(null,"Internal Error: conference should be a normal param",on_error); 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 } // end getConferenceParameter

View File

@ -39,7 +39,7 @@ public class AttachmentForm implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
private int sigid; private int cid;
private int confid; private int confid;
private long postid; private long postid;
private String target; 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.confid = conf.getConfID();
this.postid = msg.getPostID(); this.postid = msg.getPostID();
this.target = target; 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() public int getConfID()
{ {

View File

@ -118,7 +118,7 @@ public class AuditDataViewer implements ContentRender, ColorSelectors
+ tb_font + "<B>Date/Time</B></FONT></TH>\n<TH ALIGN=LEFT CLASS=\"content\" NOWRAP>" + tb_font + "<B>Date/Time</B></FONT></TH>\n<TH ALIGN=LEFT CLASS=\"content\" NOWRAP>"
+ tb_font + "<B>Description</B></FONT></TH>\n<TH ALIGN=LEFT CLASS=\"content\" NOWRAP>" + tb_font + "<B>Description</B></FONT></TH>\n<TH ALIGN=LEFT CLASS=\"content\" NOWRAP>"
+ tb_font + "<B>User</B></FONT></TH>\n<TH ALIGN=LEFT CLASS=\"content\" NOWRAP>" + tb_font + tb_font + "<B>User</B></FONT></TH>\n<TH ALIGN=LEFT CLASS=\"content\" NOWRAP>" + tb_font
+ "<B>SIG</B></FONT></TH>\n<TH ALIGN=LEFT CLASS=\"content\" NOWRAP>" + tb_font + "<B>Community</B></FONT></TH>\n<TH ALIGN=LEFT CLASS=\"content\" NOWRAP>" + tb_font
+ "<B>IP Address</B></FONT></TH>\n<TH ALIGN=LEFT CLASS=\"content\" COLSPAN=4 NOWRAP>" + "<B>IP Address</B></FONT></TH>\n<TH ALIGN=LEFT CLASS=\"content\" COLSPAN=4 NOWRAP>"
+ tb_font + "<B>Additional Data</B></FONT></TH>\n</TR>\n"); + tb_font + "<B>Additional Data</B></FONT></TH>\n</TR>\n");
Iterator it = audit_list.iterator(); Iterator it = audit_list.iterator();
@ -132,7 +132,7 @@ public class AuditDataViewer implements ContentRender, ColorSelectors
+ "</FONT></TD>\n<TD ALIGN=LEFT CLASS=\"content\" NOWRAP>" + tb_font + "</FONT></TD>\n<TD ALIGN=LEFT CLASS=\"content\" NOWRAP>" + tb_font
+ StringUtil.encodeHTML(dat.getUserName()) + StringUtil.encodeHTML(dat.getUserName())
+ "</FONT></TD>\n<TD ALIGN=LEFT CLASS=\"content\" NOWRAP>" + tb_font + "</FONT></TD>\n<TD ALIGN=LEFT CLASS=\"content\" NOWRAP>" + tb_font
+ StringUtil.encodeHTML(dat.getSIGName()) + StringUtil.encodeHTML(dat.getCommunityName())
+ "</FONT></TD>\n<TD ALIGN=LEFT CLASS=\"content\" NOWRAP>" + tb_font + "</FONT></TD>\n<TD ALIGN=LEFT CLASS=\"content\" NOWRAP>" + tb_font
+ StringUtil.encodeHTML(dat.getIPAddress()) + "</FONT></TD>\n"); + StringUtil.encodeHTML(dat.getIPAddress()) + "</FONT></TD>\n");
for (int i=0; i<AuditData.DATA_COUNT; i++) for (int i=0; i<AuditData.DATA_COUNT; i++)

View File

@ -20,29 +20,29 @@ package com.silverwrist.venice.servlets.format;
import java.util.*; import java.util.*;
import java.io.Writer; import java.io.Writer;
import java.io.IOException; import java.io.IOException;
import com.silverwrist.venice.core.SIGContext; import com.silverwrist.venice.core.CommunityContext;
public class SIGAdminTop extends ContentMenuPanel public class CommunityAdminTop extends ContentMenuPanel
{ {
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Constructors * Constructors
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public SIGAdminTop() public CommunityAdminTop()
{ {
super("SIG Administration:",null); super("Community Administration:",null);
addChoice("SIG Profile","sigadmin?sig=$s&cmd=P"); addChoice("Community Profile","sigadmin?sig=$s&cmd=P");
addChoice("Set SIG Category","sigadmin?sig=$s&cmd=T"); addChoice("Set Community Category","sigadmin?sig=$s&cmd=T");
addChoice("Set SIG Features","sigadmin?sig=$s&cmd=F"); addChoice("Set Community Features","sigadmin?sig=$s&cmd=F");
addChoice("Membership Control","sigadmin?sig=$s&cmd=M"); addChoice("Membership Control","sigadmin?sig=$s&cmd=M");
addChoice("Display Audit Records","sigadmin?sig=$s&cmd=A"); addChoice("Display Audit Records","sigadmin?sig=$s&cmd=A");
// TODO: More options // TODO: More options
addChoice("Delete SIG","sigadmin?sig=$s&cmd=DEL"); addChoice("Delete Community","sigadmin?sig=$s&cmd=DEL");
} // end constructor } // end constructor
protected SIGAdminTop(SIGAdminTop other) protected CommunityAdminTop(CommunityAdminTop other)
{ {
super(other); super(other);
@ -53,17 +53,17 @@ public class SIGAdminTop extends ContentMenuPanel
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public void setSIG(SIGContext sig) public void setCommunity(CommunityContext comm)
{ {
setSubtitle(sig.getName()); setSubtitle(comm.getName());
setParameter("s",String.valueOf(sig.getSIGID())); setParameter("s",String.valueOf(comm.getCommunityID()));
} // end setSIG } // end setCommunity
public Object clone() public Object clone()
{ {
return new SIGAdminTop(this); return new CommunityAdminTop(this);
} // end clone } // end clone
} // end class SIGAdminTop } // end class CommunityAdminTop

View File

@ -21,7 +21,7 @@ import java.util.*;
import javax.servlet.ServletRequest; import javax.servlet.ServletRequest;
import com.silverwrist.venice.core.*; import com.silverwrist.venice.core.*;
public class SIGCategoryBrowseData implements JSPRender public class CommunityCategoryBrowseData implements JSPRender
{ {
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Static data members * Static data members
@ -29,7 +29,7 @@ public class SIGCategoryBrowseData implements JSPRender
*/ */
// Attribute name for request attribute // Attribute name for request attribute
protected static final String ATTR_NAME = "com.silverwrist.venice.content.SIGCategoryBrowseData"; protected static final String ATTR_NAME = "com.silverwrist.venice.content.CommunityCategoryBrowseData";
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Attributes * Attributes
@ -47,11 +47,12 @@ public class SIGCategoryBrowseData implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public SIGCategoryBrowseData(UserContext user, SIGContext sig, int current_id) throws DataException public CommunityCategoryBrowseData(UserContext user, CommunityContext comm, int current_id)
throws DataException
{ {
name = sig.getName(); name = comm.getName();
base_applet = "sigadmin?sig=" + String.valueOf(sig.getSIGID()); base_applet = "sigadmin?sig=" + String.valueOf(comm.getCommunityID());
prev_cat = sig.getCategory(); prev_cat = comm.getCategory();
if (prev_cat.getCategoryID()==current_id) if (prev_cat.getCategoryID()==current_id)
curr_cat = prev_cat; curr_cat = prev_cat;
else else
@ -65,9 +66,9 @@ public class SIGCategoryBrowseData implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public static SIGCategoryBrowseData retrieve(ServletRequest request) public static CommunityCategoryBrowseData retrieve(ServletRequest request)
{ {
return (SIGCategoryBrowseData)(request.getAttribute(ATTR_NAME)); return (CommunityCategoryBrowseData)(request.getAttribute(ATTR_NAME));
} // end retrieve } // end retrieve
@ -78,7 +79,7 @@ public class SIGCategoryBrowseData implements JSPRender
public String getPageTitle(RenderData rdat) public String getPageTitle(RenderData rdat)
{ {
return "Set SIG Category"; return "Set Community Category";
} // end getPageTitle } // end getPageTitle
@ -101,7 +102,7 @@ public class SIGCategoryBrowseData implements JSPRender
public String getTargetJSPName() public String getTargetJSPName()
{ {
return "sigcatbrowser.jsp"; return "commcatbrowser.jsp";
} // end getTargetJSPName } // end getTargetJSPName
@ -110,7 +111,7 @@ public class SIGCategoryBrowseData implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public String getSIGName() public String getCommunityName()
{ {
return name; return name;
@ -158,4 +159,4 @@ public class SIGCategoryBrowseData implements JSPRender
} // end hasSubcategories } // end hasSubcategories
} // end class SIGCategoryBrowseData } // end class CommunityCategoryBrowseData

View File

@ -26,7 +26,7 @@ import com.silverwrist.venice.ValidationException;
import com.silverwrist.venice.security.Role; import com.silverwrist.venice.security.Role;
import com.silverwrist.venice.core.*; import com.silverwrist.venice.core.*;
public class SIGMembership implements JSPRender, SearchMode public class CommunityMembership implements JSPRender, SearchMode
{ {
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Static data members * Static data members
@ -34,7 +34,7 @@ public class SIGMembership implements JSPRender, SearchMode
*/ */
// Attribute name for request attribute // Attribute name for request attribute
protected static final String ATTR_NAME = "com.silverwrist.venice.content.ConferenceMembership"; protected static final String ATTR_NAME = "com.silverwrist.venice.content.CommunityMembership";
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Attributes * Attributes
@ -42,28 +42,28 @@ public class SIGMembership implements JSPRender, SearchMode
*/ */
private VeniceEngine engine; // reference to the engine private VeniceEngine engine; // reference to the engine
private SIGContext sig; // the SIG we're in private CommunityContext comm; // the community we're in
private List display_list = null; // list of members to display private List display_list = null; // list of members to display
private boolean sig_members = false; // is this a list of SIG members? private boolean comm_members = false; // is this a list of community members?
private int field = -1; // search field private int field = -1; // search field
private int mode = -1; // search mode private int mode = -1; // search mode
private String term = null; // search term private String term = null; // search term
private int offset = 0; // search result offset private int offset = 0; // search result offset
private int find_count = -1; // search results count private int find_count = -1; // search results count
private List role_choices; // the list of security roles private List role_choices; // the list of security roles
private Role role_sig_host; // the "SIG Host" security role private Role role_comm_host; // the "Community Host" security role
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Constructors * Constructors
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public SIGMembership(VeniceEngine engine, SIGContext sig) public CommunityMembership(VeniceEngine engine, CommunityContext comm)
{ {
this.engine = engine; this.engine = engine;
this.sig = sig; this.comm = comm;
this.role_choices = Role.getSIGMemberLevelChoices(); this.role_choices = Role.getCommunityMemberLevelChoices();
this.role_sig_host = Role.getSIGHostRole(); this.role_comm_host = Role.getCommunityHostRole();
} // end constructor } // end constructor
@ -103,9 +103,9 @@ public class SIGMembership implements JSPRender, SearchMode
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public static SIGMembership retrieve(ServletRequest request) public static CommunityMembership retrieve(ServletRequest request)
{ {
return (SIGMembership)(request.getAttribute(ATTR_NAME)); return (CommunityMembership)(request.getAttribute(ATTR_NAME));
} // end retrieve } // end retrieve
@ -116,7 +116,7 @@ public class SIGMembership implements JSPRender, SearchMode
public String getPageTitle(RenderData rdat) public String getPageTitle(RenderData rdat)
{ {
return "Membership in SIG " + sig.getName(); return "Membership in Community " + comm.getName();
} // end getPageTitle } // end getPageTitle
@ -139,7 +139,7 @@ public class SIGMembership implements JSPRender, SearchMode
public String getTargetJSPName() public String getTargetJSPName()
{ {
return "sig_member.jsp"; return "comm_member.jsp";
} // end getTargetJSPName } // end getTargetJSPName
@ -148,13 +148,13 @@ public class SIGMembership implements JSPRender, SearchMode
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public void doSIGMemberList() throws DataException public void doCommunityMemberList() throws DataException
{ {
this.display_list = sig.getMemberList(); this.display_list = comm.getMemberList();
this.sig_members = true; this.comm_members = true;
this.term = ""; this.term = "";
} // end doSIGMemberList } // end doCommunityMemberList
public void doSearch(ServletRequest request) throws ValidationException, DataException, AccessError public void doSearch(ServletRequest request) throws ValidationException, DataException, AccessError
{ {
@ -199,13 +199,13 @@ public class SIGMembership implements JSPRender, SearchMode
if (find_count<0) if (find_count<0)
find_count = engine.getSearchUserCount(field,mode,term); find_count = engine.getSearchUserCount(field,mode,term);
// Create the real display list by getting the SIG security levels. // Create the real display list by getting the community security levels.
Iterator it = intermediate.iterator(); Iterator it = intermediate.iterator();
Vector rc = new Vector(count+1); Vector rc = new Vector(count+1);
while (it.hasNext()) while (it.hasNext())
{ // loop around and find the member level of every one { // loop around and find the member level of every one
UserFound uf = (UserFound)(it.next()); UserFound uf = (UserFound)(it.next());
int new_level = sig.getMemberLevel(uf.getUID()); int new_level = comm.getMemberLevel(uf.getUID());
if (new_level==-1) if (new_level==-1)
new_level = 0; new_level = 0;
rc.add(uf.createNewLevel(new_level)); rc.add(uf.createNewLevel(new_level));
@ -216,21 +216,21 @@ public class SIGMembership implements JSPRender, SearchMode
} // end doSearch } // end doSearch
public int getSIGID() public int getCommunityID()
{ {
return sig.getSIGID(); return comm.getCommunityID();
} // end getSIGID } // end getCommunityID
public String getSIGName() public String getCommunityName()
{ {
return sig.getName(); return comm.getName();
} // end getSIGName } // end getCommunityName
public String getLocator() public String getLocator()
{ {
return "sig=" + sig.getSIGID(); return "sig=" + comm.getCommunityID();
} // end getLocator } // end getLocator
@ -238,17 +238,17 @@ public class SIGMembership implements JSPRender, SearchMode
{ {
if ((display_list==null) || (display_list.size()==0)) if ((display_list==null) || (display_list.size()==0))
return false; return false;
if (sig_members && (display_list.size()>engine.getMaxNumSIGMembersDisplay())) if (comm_members && (display_list.size()>engine.getMaxNumCommunityMembersDisplay()))
return false; return false;
return true; return true;
} // end displayList } // end displayList
public boolean isSIGMemberList() public boolean isCommunityMemberList()
{ {
return sig_members; return comm_members;
} // end isSIGMemberList } // end isCommunityMemberList
public int getSearchField() public int getSearchField()
{ {
@ -314,9 +314,9 @@ public class SIGMembership implements JSPRender, SearchMode
{ {
out.write("<INPUT TYPE=HIDDEN NAME=\"zxcur_" + uid + "\" VALUE=\"" + cur_level + "\">\n"); out.write("<INPUT TYPE=HIDDEN NAME=\"zxcur_" + uid + "\" VALUE=\"" + cur_level + "\">\n");
out.write("<SELECT NAME=\"zxnew_" + uid + "\" SIZE=1>\n"); out.write("<SELECT NAME=\"zxnew_" + uid + "\" SIZE=1>\n");
if (cur_level==role_sig_host.getLevel()) // cheat and put in just the host level if (cur_level==role_comm_host.getLevel()) // cheat and put in just the host level
out.write("<OPTION VALUE=\"" + role_sig_host.getLevel() + "\" SELECTED>" out.write("<OPTION VALUE=\"" + role_comm_host.getLevel() + "\" SELECTED>"
+ StringUtil.encodeHTML(role_sig_host.getName()) + "</OPTION>\n"); + StringUtil.encodeHTML(role_comm_host.getName()) + "</OPTION>\n");
else else
{ // display all the level choices properly { // display all the level choices properly
Iterator it = role_choices.iterator(); Iterator it = role_choices.iterator();
@ -336,4 +336,4 @@ public class SIGMembership implements JSPRender, SearchMode
} // end outputDropDown } // end outputDropDown
} // end class SIGMembership } // end class CommunityMembership

View File

@ -21,7 +21,7 @@ import javax.servlet.ServletRequest;
import com.silverwrist.util.StringUtil; import com.silverwrist.util.StringUtil;
import com.silverwrist.venice.core.*; import com.silverwrist.venice.core.*;
public class SIGProfileData implements JSPRender public class CommunityProfileData implements JSPRender
{ {
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Static data members * Static data members
@ -29,7 +29,7 @@ public class SIGProfileData implements JSPRender
*/ */
// Attribute name for request attribute // Attribute name for request attribute
protected static final String ATTR_NAME = "com.silverwrist.venice.content.SIGProfileData"; protected static final String ATTR_NAME = "com.silverwrist.venice.content.CommunityProfileData";
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Attributes * Attributes
@ -38,21 +38,22 @@ public class SIGProfileData implements JSPRender
private VeniceEngine engine; // the Venice engine private VeniceEngine engine; // the Venice engine
private UserContext user; // the current user managing this private UserContext user; // the current user managing this
private SIGContext sig; // the SIG being displayed private CommunityContext comm; // the community being displayed
private ContactInfo ci; // SIG's contact info private ContactInfo ci; // community's contact info
private UserProfile host_prof; // SIG host's user profile private UserProfile host_prof; // community host's user profile
private CategoryDescriptor cat; // SIG's full category descriptor private CategoryDescriptor cat; // community's full category descriptor
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Constructor * Constructor
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public SIGProfileData(VeniceEngine engine, UserContext user, SIGContext ctxt) throws DataException public CommunityProfileData(VeniceEngine engine, UserContext user, CommunityContext ctxt)
throws DataException
{ {
this.engine = engine; this.engine = engine;
this.user = user; this.user = user;
this.sig = ctxt; this.comm = ctxt;
this.ci = ctxt.getContactInfo(); this.ci = ctxt.getContactInfo();
this.host_prof = ctxt.getHostProfile(); this.host_prof = ctxt.getHostProfile();
this.cat = ctxt.getCategory(); this.cat = ctxt.getCategory();
@ -64,9 +65,9 @@ public class SIGProfileData implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public static SIGProfileData retrieve(ServletRequest request) public static CommunityProfileData retrieve(ServletRequest request)
{ {
return (SIGProfileData)(request.getAttribute(ATTR_NAME)); return (CommunityProfileData)(request.getAttribute(ATTR_NAME));
} // end retrieve } // end retrieve
@ -77,13 +78,13 @@ public class SIGProfileData implements JSPRender
public String getPageTitle(RenderData rdat) public String getPageTitle(RenderData rdat)
{ {
return "SIG Profile: " + sig.getName(); return "Community Profile: " + comm.getName();
} // end getPageTitle } // end getPageTitle
public String getPageQID() public String getPageQID()
{ {
return "go/" + sig.getAlias() + "!"; return "go/" + comm.getAlias() + "!";
} // end getPageQID } // end getPageQID
@ -100,7 +101,7 @@ public class SIGProfileData implements JSPRender
public String getTargetJSPName() public String getTargetJSPName()
{ {
return "sigprofile.jsp"; return "commprofile.jsp";
} // end getTargetJSPName } // end getTargetJSPName
@ -109,20 +110,20 @@ public class SIGProfileData implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public SIGContext getSIGContext() public CommunityContext getCommunityContext()
{ {
return sig; return comm;
} // end getSIGContext } // end getCommunityContext
public String getSIGLogoURL(RenderData rdat) public String getCommunityLogoURL(RenderData rdat)
{ {
String tmp = ci.getPhotoURL(); String tmp = ci.getPhotoURL();
if (StringUtil.isStringEmpty(tmp)) if (StringUtil.isStringEmpty(tmp))
tmp = rdat.getFullImagePath("sig_other.jpg"); tmp = rdat.getFullImagePath("sig_other.jpg");
return tmp; return tmp;
} // end getSIGLogoURL } // end getCommunityLogoURL
public boolean isUserLoggedIn() public boolean isUserLoggedIn()
{ {
@ -136,11 +137,11 @@ public class SIGProfileData implements JSPRender
} // end getHostUserName } // end getHostUserName
public ContactInfo getSIGContactInfo() public ContactInfo getCommunityContactInfo()
{ {
return ci; return ci;
} // end getSIGContactInfo } // end getCommunityContactInfo
public String getAddressLastLine() public String getAddressLastLine()
{ {
@ -172,4 +173,4 @@ public class SIGProfileData implements JSPRender
} // end getCategory } // end getCategory
} // end class SIGProfileData } // end class CommunityProfileData

View File

@ -18,9 +18,9 @@
package com.silverwrist.venice.servlets.format; package com.silverwrist.venice.servlets.format;
import javax.servlet.ServletRequest; import javax.servlet.ServletRequest;
import com.silverwrist.venice.core.SIGContext; import com.silverwrist.venice.core.CommunityContext;
public class SIGWelcome implements JSPRender public class CommunityWelcome implements JSPRender
{ {
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Static data members * Static data members
@ -28,7 +28,7 @@ public class SIGWelcome implements JSPRender
*/ */
// Attribute name for request attribute // Attribute name for request attribute
protected static final String ATTR_NAME = "com.silverwrist.venice.content.SIGWelcome"; protected static final String ATTR_NAME = "com.silverwrist.venice.content.CommunityWelcome";
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Attributes * Attributes
@ -43,10 +43,10 @@ public class SIGWelcome implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public SIGWelcome(SIGContext sig) public CommunityWelcome(CommunityContext comm)
{ {
name = sig.getName(); name = comm.getName();
entry_url = "sig/" + sig.getAlias(); entry_url = "sig/" + comm.getAlias();
} // end constructor } // end constructor
@ -55,9 +55,9 @@ public class SIGWelcome implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public static SIGWelcome retrieve(ServletRequest request) public static CommunityWelcome retrieve(ServletRequest request)
{ {
return (SIGWelcome)(request.getAttribute(ATTR_NAME)); return (CommunityWelcome)(request.getAttribute(ATTR_NAME));
} // end retrieve } // end retrieve
@ -91,7 +91,7 @@ public class SIGWelcome implements JSPRender
public String getTargetJSPName() public String getTargetJSPName()
{ {
return "sigwelcome.jsp"; return "commwelcome.jsp";
} // end getTargetJSPName } // end getTargetJSPName
@ -100,11 +100,11 @@ public class SIGWelcome implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public String getSIGName() public String getCommunityName()
{ {
return name; return name;
} // end getSIGName } // end getCommunityName
public String getEntryURL(RenderData rdat) public String getEntryURL(RenderData rdat)
{ {
@ -112,4 +112,4 @@ public class SIGWelcome implements JSPRender
} // end getEntryURL } // end getEntryURL
} // end class SIGWelcome } // end class CommunityWelcome

View File

@ -37,7 +37,7 @@ public class ConferenceActivity implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
private SIGContext sig; // the SIG we're in private CommunityContext comm; // the community we're in
private ConferenceContext conf; // the conference being listed private ConferenceContext conf; // the conference being listed
private TopicContext topic; // the topic being listed private TopicContext topic; // the topic being listed
private boolean posters; // is this a list of posters? private boolean posters; // is this a list of posters?
@ -49,10 +49,10 @@ public class ConferenceActivity implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public ConferenceActivity(SIGContext sig, ConferenceContext conf, TopicContext topic, boolean posters) public ConferenceActivity(CommunityContext comm, ConferenceContext conf, TopicContext topic, boolean posters)
throws DataException, AccessError throws DataException, AccessError
{ {
this.sig = sig; this.comm = comm;
this.conf = conf; this.conf = conf;
this.topic = topic; this.topic = topic;
this.posters = posters; this.posters = posters;
@ -158,7 +158,7 @@ public class ConferenceActivity implements JSPRender
public String getLocator() public String getLocator()
{ {
if (locator==null) if (locator==null)
locator = "sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); locator = "sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID();
return locator; return locator;
} // end getLocator } // end getLocator

View File

@ -36,7 +36,7 @@ public class ConferenceListing implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
private SIGContext sig; private CommunityContext comm;
private List conferences; private List conferences;
private List[] hosts; private List[] hosts;
@ -45,10 +45,10 @@ public class ConferenceListing implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public ConferenceListing(SIGContext sig) throws DataException, AccessError public ConferenceListing(CommunityContext comm) throws DataException, AccessError
{ {
this.sig = sig; this.comm = comm;
this.conferences = sig.getConferences(); this.conferences = comm.getConferences();
this.hosts = new List[this.conferences.size()]; this.hosts = new List[this.conferences.size()];
for (int i=0; i<this.conferences.size(); i++) for (int i=0; i<this.conferences.size(); i++)
this.hosts[i] = ((ConferenceContext)(this.conferences.get(i))).getHosts(); this.hosts[i] = ((ConferenceContext)(this.conferences.get(i))).getHosts();
@ -73,13 +73,13 @@ public class ConferenceListing implements JSPRender
public String getPageTitle(RenderData rdat) public String getPageTitle(RenderData rdat)
{ {
return "Conference Listing: " + sig.getName(); return "Conference Listing: " + comm.getName();
} // end getPageTitle } // end getPageTitle
public String getPageQID() public String getPageQID()
{ {
return "go/" + sig.getAlias() + "!"; return "go/" + comm.getAlias() + "!";
} // end getPageQID } // end getPageQID
@ -105,17 +105,17 @@ public class ConferenceListing implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public int getSIGID() public int getCommunityID()
{ {
return sig.getSIGID(); return comm.getCommunityID();
} // end getSIGID } // end getCommunityID
public String getSIGName() public String getCommunityName()
{ {
return sig.getName(); return comm.getName();
} // end getSIGName } // end getCommunityName
public int getNumConferences() public int getNumConferences()
{ {
@ -167,13 +167,13 @@ public class ConferenceListing implements JSPRender
public boolean canCreateConference() public boolean canCreateConference()
{ {
return sig.canCreateConference(); return comm.canCreateConference();
} // end canCreateConference } // end canCreateConference
public boolean canManageConferences() public boolean canManageConferences()
{ {
return sig.canManageConferences(); return comm.canManageConferences();
} // end canManageConferences } // end canManageConferences

View File

@ -42,7 +42,7 @@ public class ConferenceMembership implements JSPRender, SearchMode
*/ */
private VeniceEngine engine; // reference to the engine private VeniceEngine engine; // reference to the engine
private SIGContext sig; // the SIG we're in private CommunityContext comm; // the community we're in
private ConferenceContext conf; // the conference being listed private ConferenceContext conf; // the conference being listed
private List display_list = null; // list of members to display private List display_list = null; // list of members to display
private boolean conf_members = false; // is this a list of conference members? private boolean conf_members = false; // is this a list of conference members?
@ -58,10 +58,10 @@ public class ConferenceMembership implements JSPRender, SearchMode
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public ConferenceMembership(VeniceEngine engine, SIGContext sig, ConferenceContext conf) public ConferenceMembership(VeniceEngine engine, CommunityContext comm, ConferenceContext conf)
{ {
this.engine = engine; this.engine = engine;
this.sig = sig; this.comm = comm;
this.conf = conf; this.conf = conf;
this.role_choices = Role.getConferenceMemberLevelChoices(); this.role_choices = Role.getConferenceMemberLevelChoices();
@ -195,9 +195,9 @@ public class ConferenceMembership implements JSPRender, SearchMode
throw new ValidationException("Unable to determine what action triggered the form."); throw new ValidationException("Unable to determine what action triggered the form.");
// Perform the search! // Perform the search!
List intermediate = sig.searchForMembers(field,mode,term,offset,count); List intermediate = comm.searchForMembers(field,mode,term,offset,count);
if (find_count<0) if (find_count<0)
find_count = sig.getSearchMemberCount(field,mode,term); find_count = comm.getSearchMemberCount(field,mode,term);
// Create the real display list by getting the conference security levels. // Create the real display list by getting the conference security levels.
Iterator it = intermediate.iterator(); Iterator it = intermediate.iterator();
@ -216,11 +216,11 @@ public class ConferenceMembership implements JSPRender, SearchMode
} // end doSearch } // end doSearch
public int getSIGID() public int getCommunityID()
{ {
return sig.getSIGID(); return comm.getCommunityID();
} // end getSIGID } // end getCommunityID
public int getConfID() public int getConfID()
{ {
@ -228,11 +228,11 @@ public class ConferenceMembership implements JSPRender, SearchMode
} // end getConfID } // end getConfID
public String getSIGName() public String getCommunityName()
{ {
return sig.getName(); return comm.getName();
} // end getSIGName } // end getCommunityName
public String getConfName() public String getConfName()
{ {
@ -242,7 +242,7 @@ public class ConferenceMembership implements JSPRender, SearchMode
public String getLocator() public String getLocator()
{ {
return "sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); return "sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID();
} // end getLocator } // end getLocator

View File

@ -37,7 +37,7 @@ public class ConferenceSequence implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
private SIGContext sig; private CommunityContext comm;
private List conf_list; private List conf_list;
private Hashtable hidden_stat = new Hashtable(); private Hashtable hidden_stat = new Hashtable();
private Hashtable next_id = new Hashtable(); private Hashtable next_id = new Hashtable();
@ -48,10 +48,10 @@ public class ConferenceSequence implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public ConferenceSequence(SIGContext sig) throws DataException, AccessError public ConferenceSequence(CommunityContext comm) throws DataException, AccessError
{ {
this.sig = sig; this.comm = comm;
this.conf_list = sig.getConferences(); this.conf_list = comm.getConferences();
Integer last_id = null; Integer last_id = null;
for (int i=0; i<conf_list.size(); i++) for (int i=0; i<conf_list.size(); i++)
@ -125,11 +125,11 @@ public class ConferenceSequence implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public int getSIGID() public int getCommunityID()
{ {
return sig.getSIGID(); return comm.getCommunityID();
} // end getSIGID } // end getCommunityID
public int getNumConferences() public int getNumConferences()
{ {

View File

@ -22,7 +22,7 @@ import com.silverwrist.util.StringUtil;
import com.silverwrist.venice.ValidationException; import com.silverwrist.venice.ValidationException;
import com.silverwrist.venice.core.*; import com.silverwrist.venice.core.*;
public class CreateSIGDialog extends ContentDialog public class CreateCommunityDialog extends ContentDialog
{ {
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Attributes * Attributes
@ -36,9 +36,9 @@ public class CreateSIGDialog extends ContentDialog
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public CreateSIGDialog(List country_list, List language_list) public CreateCommunityDialog(List country_list, List language_list)
{ {
super("Create New SIG",null,"createsigform","sigops"); super("Create New Community",null,"createcommform","sigops");
setHiddenField("cmd","C"); setHiddenField("cmd","C");
Vector vec_pubpriv = new Vector(2); Vector vec_pubpriv = new Vector(2);
@ -47,14 +47,15 @@ public class CreateSIGDialog extends ContentDialog
vec_pubpriv.trimToSize(); vec_pubpriv.trimToSize();
Vector vec_hidemode = new Vector(3); Vector vec_hidemode = new Vector(3);
vec_hidemode.add(String.valueOf(SIGContext.HIDE_NONE) + "|Show in both directory and search"); vec_hidemode.add(String.valueOf(CommunityContext.HIDE_NONE) + "|Show in both directory and search");
vec_hidemode.add(String.valueOf(SIGContext.HIDE_DIRECTORY) + "|Hide in directory, but not in search"); vec_hidemode.add(String.valueOf(CommunityContext.HIDE_DIRECTORY)
vec_hidemode.add(String.valueOf(SIGContext.HIDE_BOTH) + "|Hide in both directory and search"); + "|Hide in directory, but not in search");
vec_hidemode.add(String.valueOf(CommunityContext.HIDE_BOTH) + "|Hide in both directory and search");
vec_hidemode.trimToSize(); vec_hidemode.trimToSize();
addFormField(new CDFormCategoryHeader("Basic Information")); addFormField(new CDFormCategoryHeader("Basic Information"));
addFormField(new CDTextFormField("name","SIG Name",null,true,32,128)); addFormField(new CDTextFormField("name","Community Name",null,true,32,128));
addFormField(new CDVeniceIDFormField("alias","SIG Alias",null,true,32,32)); addFormField(new CDVeniceIDFormField("alias","Community Alias",null,true,32,32));
addFormField(new CDTextFormField("synopsis","Synopsis",null,false,32,255)); addFormField(new CDTextFormField("synopsis","Synopsis",null,false,32,255));
addFormField(new CDTextFormField("rules","Rules",null,false,32,255)); addFormField(new CDTextFormField("rules","Rules",null,false,32,255));
addFormField(new CDLanguageListFormField("language","Primary language",null,true,language_list)); addFormField(new CDLanguageListFormField("language","Primary language",null,true,language_list));
@ -64,19 +65,19 @@ public class CreateSIGDialog extends ContentDialog
addFormField(new CDTextFormField("pcode","Zip/Postal Code",null,true,32,64)); addFormField(new CDTextFormField("pcode","Zip/Postal Code",null,true,32,64));
addFormField(new CDCountryListFormField("country","Country",null,true,country_list)); addFormField(new CDCountryListFormField("country","Country",null,true,country_list));
addFormField(new CDFormCategoryHeader("Security")); addFormField(new CDFormCategoryHeader("Security"));
addFormField(new CDSimplePickListFormField("comtype","SIG type:",null,true,vec_pubpriv,'|')); addFormField(new CDSimplePickListFormField("comtype","Community type:",null,true,vec_pubpriv,'|'));
addFormField(new CDTextFormField("joinkey","Join key","(for private SIGs)",false,32,64)); addFormField(new CDTextFormField("joinkey","Join key","(for private communities)",false,32,64));
addFormField(new CDSimplePickListFormField("hidemode","SIG visibility:",null,true,vec_hidemode,'|')); addFormField(new CDSimplePickListFormField("hidemode","Community visibility:",null,true,vec_hidemode,'|'));
addCommandButton(new CDImageButton("create","bn_create.gif","Create",80,24)); addCommandButton(new CDImageButton("create","bn_create.gif","Create",80,24));
addCommandButton(new CDImageButton("cancel","bn_cancel.gif","Cancel",80,24)); addCommandButton(new CDImageButton("cancel","bn_cancel.gif","Cancel",80,24));
} // end constructor } // end constructor
protected CreateSIGDialog(CreateSIGDialog other) protected CreateCommunityDialog(CreateCommunityDialog other)
{ {
super(other); super(other);
} // end CreateSIGDialog } // end CreateCommunityDialog
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Overrides from class ContentDialog * Overrides from class ContentDialog
@ -86,12 +87,12 @@ public class CreateSIGDialog extends ContentDialog
protected void validateWholeForm() throws ValidationException protected void validateWholeForm() throws ValidationException
{ {
if (engine.aliasExists(getFieldValue("alias"),-1)) if (engine.aliasExists(getFieldValue("alias"),-1))
throw new ValidationException("That alias is already used by another SIG on the system."); throw new ValidationException("That alias is already used by another community on the system.");
if (getFieldValue("comtype").equals("1")) if (getFieldValue("comtype").equals("1"))
{ // make sure if they flagged it as Private that they specified a join key { // make sure if they flagged it as Private that they specified a join key
if (StringUtil.isStringEmpty(getFieldValue("joinkey"))) if (StringUtil.isStringEmpty(getFieldValue("joinkey")))
throw new ValidationException("Private SIGs must specify a join key value."); throw new ValidationException("Private communities must specify a join key value.");
} // end if } // end if
@ -108,7 +109,7 @@ public class CreateSIGDialog extends ContentDialog
} // end setupDialog } // end setupDialog
public SIGContext doDialog(UserContext user) throws ValidationException, DataException, AccessError public CommunityContext doDialog(UserContext user) throws ValidationException, DataException, AccessError
{ {
validate(); // validate the dialog entries validate(); // validate the dialog entries
@ -132,11 +133,12 @@ public class CreateSIGDialog extends ContentDialog
else else
jkey = null; jkey = null;
// Create the new SIG context. // Create the new community context.
SIGContext rc = user.createSIG(getFieldValue("name"),getFieldValue("alias"),getFieldValue("language"), CommunityContext rc = user.createCommunity(getFieldValue("name"),getFieldValue("alias"),
getFieldValue("synopsis"),getFieldValue("rules"),jkey,hidemode); getFieldValue("language"),getFieldValue("synopsis"),
getFieldValue("rules"),jkey,hidemode);
// Get the new SIG's contact record and fill in the pieces of info we know. // Get the new community's contact record and fill in the pieces of info we know.
ContactInfo ci = rc.getContactInfo(); ContactInfo ci = rc.getContactInfo();
ci.setLocality(getFieldValue("loc")); ci.setLocality(getFieldValue("loc"));
ci.setRegion(getFieldValue("reg")); ci.setRegion(getFieldValue("reg"));
@ -156,8 +158,8 @@ public class CreateSIGDialog extends ContentDialog
public Object clone() public Object clone()
{ {
return new CreateSIGDialog(this); return new CreateCommunityDialog(this);
} // end clone } // end clone
} // end class CreateSIGDialog } // end class CreateCommunityDialog

View File

@ -50,7 +50,8 @@ public class CreateConferenceDialog extends ContentDialog
addFormField(new CDVeniceIDFormField("alias","Conference Alias",null,true,32,64)); addFormField(new CDVeniceIDFormField("alias","Conference Alias",null,true,32,64));
addFormField(new CDTextFormField("descr","Description",null,false,32,255)); addFormField(new CDTextFormField("descr","Description",null,false,32,255));
addFormField(new CDSimplePickListFormField("ctype","Conference type",null,true,vec_pubpriv,'|')); addFormField(new CDSimplePickListFormField("ctype","Conference type",null,true,vec_pubpriv,'|'));
addFormField(new CDCheckBoxFormField("hide","Hide conference in the SIG's conference list",null,"Y")); addFormField(new CDCheckBoxFormField("hide","Hide conference in the community's conference list",
null,"Y"));
addCommandButton(new CDImageButton("create","bn_create.gif","Create",80,24)); addCommandButton(new CDImageButton("create","bn_create.gif","Create",80,24));
addCommandButton(new CDImageButton("cancel","bn_cancel.gif","Cancel",80,24)); addCommandButton(new CDImageButton("cancel","bn_cancel.gif","Cancel",80,24));
@ -79,14 +80,15 @@ public class CreateConferenceDialog extends ContentDialog
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public void setupDialog(VeniceEngine engine, SIGContext sig) public void setupDialog(VeniceEngine engine, CommunityContext comm)
{ {
this.engine = engine; this.engine = engine;
setHiddenField("sig",String.valueOf(sig.getSIGID())); setHiddenField("sig",String.valueOf(comm.getCommunityID()));
} // end setupDialog } // end setupDialog
public ConferenceContext doDialog(SIGContext sig) throws ValidationException, DataException, AccessError public ConferenceContext doDialog(CommunityContext comm)
throws ValidationException, DataException, AccessError
{ {
validate(); // validate the form validate(); // validate the form
@ -96,7 +98,7 @@ public class CreateConferenceDialog extends ContentDialog
boolean hide_list = yes.equals(getFieldValue("hide")); boolean hide_list = yes.equals(getFieldValue("hide"));
// create the conference! // create the conference!
return sig.createConference(getFieldValue("name"),getFieldValue("alias"),getFieldValue("descr"),pvt, return comm.createConference(getFieldValue("name"),getFieldValue("alias"),getFieldValue("descr"),pvt,
hide_list); hide_list);
} // end if } // end if

View File

@ -23,7 +23,7 @@ import com.silverwrist.venice.ValidationException;
import com.silverwrist.venice.security.Role; import com.silverwrist.venice.security.Role;
import com.silverwrist.venice.core.*; import com.silverwrist.venice.core.*;
public class EditSIGProfileDialog extends ContentDialog public class EditCommunityProfileDialog extends ContentDialog
{ {
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Attributes * Attributes
@ -31,16 +31,16 @@ public class EditSIGProfileDialog extends ContentDialog
*/ */
private VeniceEngine engine; private VeniceEngine engine;
private int sigid; private int cid;
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Constructors * Constructors
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public EditSIGProfileDialog(List country_list, List language_list) public EditCommunityProfileDialog(List country_list, List language_list)
{ {
super("Edit SIG Profile:",null,"sigprofform","sigadmin"); super("Edit Community Profile:",null,"commprofform","sigadmin");
setHiddenField("cmd","P"); setHiddenField("cmd","P");
setHiddenField("sig",""); setHiddenField("sig","");
@ -50,14 +50,15 @@ public class EditSIGProfileDialog extends ContentDialog
vec_pubpriv.trimToSize(); vec_pubpriv.trimToSize();
Vector vec_hidemode = new Vector(3); Vector vec_hidemode = new Vector(3);
vec_hidemode.add(String.valueOf(SIGContext.HIDE_NONE) + "|Show in both directory and search"); vec_hidemode.add(String.valueOf(CommunityContext.HIDE_NONE) + "|Show in both directory and search");
vec_hidemode.add(String.valueOf(SIGContext.HIDE_DIRECTORY) + "|Hide in directory, but not in search"); vec_hidemode.add(String.valueOf(CommunityContext.HIDE_DIRECTORY)
vec_hidemode.add(String.valueOf(SIGContext.HIDE_BOTH) + "|Hide in both directory and search"); + "|Hide in directory, but not in search");
vec_hidemode.add(String.valueOf(CommunityContext.HIDE_BOTH) + "|Hide in both directory and search");
vec_hidemode.trimToSize(); vec_hidemode.trimToSize();
addFormField(new CDFormCategoryHeader("Basic Information")); addFormField(new CDFormCategoryHeader("Basic Information"));
addFormField(new CDTextFormField("name","SIG Name",null,true,32,128)); addFormField(new CDTextFormField("name","Community Name",null,true,32,128));
addFormField(new CDVeniceIDFormField("alias","SIG Alias",null,true,32,32)); addFormField(new CDVeniceIDFormField("alias","Community Alias",null,true,32,32));
addFormField(new CDTextFormField("synopsis","Synopsis",null,false,32,255)); addFormField(new CDTextFormField("synopsis","Synopsis",null,false,32,255));
addFormField(new CDTextFormField("rules","Rules",null,false,32,255)); addFormField(new CDTextFormField("rules","Rules",null,false,32,255));
addFormField(new CDLanguageListFormField("language","Primary language",null,true,language_list)); addFormField(new CDLanguageListFormField("language","Primary language",null,true,language_list));
@ -71,27 +72,28 @@ public class EditSIGProfileDialog extends ContentDialog
addFormField(new CDTextFormField("pcode","Zip/Postal Code",null,true,32,64)); addFormField(new CDTextFormField("pcode","Zip/Postal Code",null,true,32,64));
addFormField(new CDCountryListFormField("country","Country",null,true,country_list)); addFormField(new CDCountryListFormField("country","Country",null,true,country_list));
addFormField(new CDFormCategoryHeader("Security")); addFormField(new CDFormCategoryHeader("Security"));
addFormField(new CDSimplePickListFormField("comtype","SIG type",null,true,vec_pubpriv,'|')); addFormField(new CDSimplePickListFormField("comtype","Communty type",null,true,vec_pubpriv,'|'));
addFormField(new CDTextFormField("joinkey","Join key","(for private SIGs)",false,32,64)); addFormField(new CDTextFormField("joinkey","Join key","(for private communities)",false,32,64));
addFormField(new CDCheckBoxFormField("membersonly","Allow only members to access this SIG",null,"Y")); addFormField(new CDCheckBoxFormField("membersonly","Allow only members to access this community",
addFormField(new CDSimplePickListFormField("hidemode","SIG visibility",null,true,vec_hidemode,'|')); null,"Y"));
addFormField(new CDSimplePickListFormField("hidemode","Community visibility",null,true,vec_hidemode,'|'));
addFormField(new CDRoleListFormField("read_lvl","Security level required to read contents",null,true, addFormField(new CDRoleListFormField("read_lvl","Security level required to read contents",null,true,
Role.getSIGReadList())); Role.getCommunityReadList()));
addFormField(new CDRoleListFormField("write_lvl","Security level required to update profile",null,true, addFormField(new CDRoleListFormField("write_lvl","Security level required to update profile",null,true,
Role.getSIGWriteList())); Role.getCommunityWriteList()));
addFormField(new CDRoleListFormField("create_lvl","Security level required to create new subobjects", addFormField(new CDRoleListFormField("create_lvl","Security level required to create new subobjects",
null,true,Role.getSIGCreateList())); null,true,Role.getCommunityCreateList()));
addFormField(new CDRoleListFormField("delete_lvl","Security level required to delete SIG",null,true, addFormField(new CDRoleListFormField("delete_lvl","Security level required to delete community",null,true,
Role.getSIGDeleteList())); Role.getCommunityDeleteList()));
addFormField(new CDRoleListFormField("join_lvl","Security level required to join SIG",null,true, addFormField(new CDRoleListFormField("join_lvl","Security level required to join community",null,true,
Role.getSIGJoinList())); Role.getCommunityJoinList()));
// TODO: add logo selection/uploading method here // TODO: add logo selection/uploading method here
addCommandButton(new CDImageButton("update","bn_update.gif","Update",80,24)); addCommandButton(new CDImageButton("update","bn_update.gif","Update",80,24));
addCommandButton(new CDImageButton("cancel","bn_cancel.gif","Cancel",80,24)); addCommandButton(new CDImageButton("cancel","bn_cancel.gif","Cancel",80,24));
} // end EditSIGProfileDialog } // end EditCommunityProfileDialog
protected EditSIGProfileDialog(EditSIGProfileDialog other) protected EditCommunityProfileDialog(EditCommunityProfileDialog other)
{ {
super(other); super(other);
@ -102,10 +104,10 @@ public class EditSIGProfileDialog extends ContentDialog
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
private void doDisable(SIGContext sig) private void doDisable(CommunityContext comm)
{ {
if (sig.isAdminSIG()) if (comm.isAdminCommunity())
{ // make sure certain fields are disabled for admin SIGs { // make sure certain fields are disabled for admin community
setFieldEnabled("comtype",false); setFieldEnabled("comtype",false);
setFieldEnabled("joinkey",false); setFieldEnabled("joinkey",false);
setFieldEnabled("membersonly",false); setFieldEnabled("membersonly",false);
@ -127,13 +129,13 @@ public class EditSIGProfileDialog extends ContentDialog
protected void validateWholeForm() throws ValidationException protected void validateWholeForm() throws ValidationException
{ {
if (engine.aliasExists(getFieldValue("alias"),sigid)) if (engine.aliasExists(getFieldValue("alias"),cid))
throw new ValidationException("That alias is already used by another SIG on the system."); throw new ValidationException("That alias is already used by another community on the system.");
if (getFieldValue("comtype").equals("1")) if (getFieldValue("comtype").equals("1"))
{ // make sure if they flagged it as Private that they specified a join key { // make sure if they flagged it as Private that they specified a join key
if (StringUtil.isStringEmpty(getFieldValue("joinkey"))) if (StringUtil.isStringEmpty(getFieldValue("joinkey")))
throw new ValidationException("Private SIGs must specify a join key value."); throw new ValidationException("Private communities must specify a join key value.");
} // end if } // end if
@ -144,24 +146,24 @@ public class EditSIGProfileDialog extends ContentDialog
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public void setupDialogBasic(VeniceEngine engine, SIGContext sig) public void setupDialogBasic(VeniceEngine engine, CommunityContext comm)
{ {
this.engine = engine; this.engine = engine;
this.sigid = sig.getSIGID(); this.cid = comm.getCommunityID();
} // end setupDialogBasic } // end setupDialogBasic
public void setupDialog(VeniceEngine engine, SIGContext sig) throws DataException, AccessError public void setupDialog(VeniceEngine engine, CommunityContext comm) throws DataException, AccessError
{ {
setupDialogBasic(engine,sig); setupDialogBasic(engine,comm);
ContactInfo ci = sig.getContactInfo(); ContactInfo ci = comm.getContactInfo();
setHiddenField("sig",String.valueOf(sig.getSIGID())); setHiddenField("sig",String.valueOf(comm.getCommunityID()));
setFieldValue("name",sig.getName()); setFieldValue("name",comm.getName());
setFieldValue("alias",sig.getAlias()); setFieldValue("alias",comm.getAlias());
setFieldValue("synopsis",sig.getSynopsis()); setFieldValue("synopsis",comm.getSynopsis());
setFieldValue("rules",sig.getRules()); setFieldValue("rules",comm.getRules());
setFieldValue("language",sig.getLanguageCode()); setFieldValue("language",comm.getLanguageCode());
setFieldValue("url",ci.getURL()); setFieldValue("url",ci.getURL());
setFieldValue("company",ci.getCompany()); setFieldValue("company",ci.getCompany());
setFieldValue("addr1",ci.getAddressLine1()); setFieldValue("addr1",ci.getAddressLine1());
@ -170,33 +172,33 @@ public class EditSIGProfileDialog extends ContentDialog
setFieldValue("reg",ci.getRegion()); setFieldValue("reg",ci.getRegion());
setFieldValue("pcode",ci.getPostalCode()); setFieldValue("pcode",ci.getPostalCode());
setFieldValue("country",ci.getCountry()); setFieldValue("country",ci.getCountry());
if (sig.isPublicSIG()) if (comm.isPublicCommunity())
{ // public SIG - no join key { // public community - no join key
setFieldValue("comtype","0"); setFieldValue("comtype","0");
setFieldValue("joinkey",""); setFieldValue("joinkey","");
} // end if } // end if
else else
{ // private SIG - display the join key { // private community - display the join key
setFieldValue("comtype","1"); setFieldValue("comtype","1");
setFieldValue("joinkey",sig.getJoinKey()); setFieldValue("joinkey",comm.getJoinKey());
} // end else } // end else
if (sig.getMembersOnly()) if (comm.getMembersOnly())
setFieldValue("membersonly","Y"); setFieldValue("membersonly","Y");
setFieldValue("hidemode",String.valueOf(sig.getHideMode())); setFieldValue("hidemode",String.valueOf(comm.getHideMode()));
setFieldValue("read_lvl",String.valueOf(sig.getReadLevel())); setFieldValue("read_lvl",String.valueOf(comm.getReadLevel()));
setFieldValue("write_lvl",String.valueOf(sig.getWriteLevel())); setFieldValue("write_lvl",String.valueOf(comm.getWriteLevel()));
setFieldValue("create_lvl",String.valueOf(sig.getCreateLevel())); setFieldValue("create_lvl",String.valueOf(comm.getCreateLevel()));
setFieldValue("delete_lvl",String.valueOf(sig.getDeleteLevel())); setFieldValue("delete_lvl",String.valueOf(comm.getDeleteLevel()));
setFieldValue("join_lvl",String.valueOf(sig.getJoinLevel())); setFieldValue("join_lvl",String.valueOf(comm.getJoinLevel()));
doDisable(sig); doDisable(comm);
} // end setupDialog } // end setupDialog
public void doDialog(SIGContext sig) throws ValidationException, DataException, AccessError public void doDialog(CommunityContext comm) throws ValidationException, DataException, AccessError
{ {
final String yes = "Y"; // the "yes" string final String yes = "Y"; // the "yes" string
validate(); // validate the dialog entries validate(); // validate the dialog entries
@ -219,7 +221,7 @@ public class EditSIGProfileDialog extends ContentDialog
} // end catch } // end catch
// save off the ContactInfo-related fields first // save off the ContactInfo-related fields first
ContactInfo ci = sig.getContactInfo(); ContactInfo ci = comm.getContactInfo();
ci.setURL(getFieldValue("url")); ci.setURL(getFieldValue("url"));
ci.setCompany(getFieldValue("company")); ci.setCompany(getFieldValue("company"));
ci.setAddressLine1(getFieldValue("addr1")); ci.setAddressLine1(getFieldValue("addr1"));
@ -228,43 +230,43 @@ public class EditSIGProfileDialog extends ContentDialog
ci.setRegion(getFieldValue("reg")); ci.setRegion(getFieldValue("reg"));
ci.setPostalCode(getFieldValue("pcode")); ci.setPostalCode(getFieldValue("pcode"));
ci.setCountry(getFieldValue("country")); ci.setCountry(getFieldValue("country"));
sig.putContactInfo(ci); comm.putContactInfo(ci);
// now save the big text fields // now save the big text fields
sig.setName(getFieldValue("name")); comm.setName(getFieldValue("name"));
sig.setAlias(getFieldValue("alias")); comm.setAlias(getFieldValue("alias"));
sig.setSynopsis(getFieldValue("synopsis")); comm.setSynopsis(getFieldValue("synopsis"));
sig.setRules(getFieldValue("rules")); comm.setRules(getFieldValue("rules"));
sig.setLanguage(getFieldValue("language")); comm.setLanguage(getFieldValue("language"));
if (!(sig.isAdminSIG())) if (!(comm.isAdminCommunity()))
{ // save off the security information { // save off the security information
String jkey; String jkey;
if (getFieldValue("comtype").equals("1")) if (getFieldValue("comtype").equals("1"))
jkey = getFieldValue("joinkey"); jkey = getFieldValue("joinkey");
else else
jkey = null; jkey = null;
sig.setJoinKey(jkey); comm.setJoinKey(jkey);
sig.setMembersOnly(yes.equals(getFieldValue("membersonly"))); comm.setMembersOnly(yes.equals(getFieldValue("membersonly")));
sig.setHideMode(hidemode); comm.setHideMode(hidemode);
sig.setSecurityLevels(read_lvl,write_lvl,create_lvl,delete_lvl,join_lvl); comm.setSecurityLevels(read_lvl,write_lvl,create_lvl,delete_lvl,join_lvl);
} // end if } // end if
} // end doDialog } // end doDialog
public void resetOnError(SIGContext sig, String message) public void resetOnError(CommunityContext comm, String message)
{ {
setErrorMessage(message); setErrorMessage(message);
doDisable(sig); doDisable(comm);
} // end resetOnError } // end resetOnError
public Object clone() public Object clone()
{ {
return new EditSIGProfileDialog(this); return new EditCommunityProfileDialog(this);
} // end clone } // end clone
} // end class EditSIGProfileDialog } // end class EditCommunityProfileDialog

View File

@ -40,7 +40,8 @@ public class EditConferenceDialog extends ContentDialog
addFormField(new CDFormCategoryHeader("Basic Information")); addFormField(new CDFormCategoryHeader("Basic Information"));
addFormField(new CDTextFormField("name","Conference Name",null,true,32,128)); addFormField(new CDTextFormField("name","Conference Name",null,true,32,128));
addFormField(new CDTextFormField("descr","Description",null,false,32,255)); addFormField(new CDTextFormField("descr","Description",null,false,32,255));
addFormField(new CDCheckBoxFormField("hide","Hide conference in the SIG's conference list",null,"Y")); addFormField(new CDCheckBoxFormField("hide","Hide conference in the community's conference list",
null,"Y"));
addFormField(new CDFormCategoryHeader("Security Information")); addFormField(new CDFormCategoryHeader("Security Information"));
addFormField(new CDRoleListFormField("read_lvl","Security level required to read conference",null,true, addFormField(new CDRoleListFormField("read_lvl","Security level required to read conference",null,true,
Role.getConferenceReadList())); Role.getConferenceReadList()));
@ -79,9 +80,9 @@ public class EditConferenceDialog extends ContentDialog
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public void setupDialog(SIGContext sig, ConferenceContext conf) throws DataException, AccessError public void setupDialog(CommunityContext comm, ConferenceContext conf) throws DataException, AccessError
{ {
setHiddenField("sig",String.valueOf(sig.getSIGID())); setHiddenField("sig",String.valueOf(comm.getCommunityID()));
setHiddenField("conf",String.valueOf(conf.getConfID())); setHiddenField("conf",String.valueOf(conf.getConfID()));
setTitle("Edit Conference: " + conf.getName()); setTitle("Edit Conference: " + conf.getName());
setFieldValue("name",conf.getName()); setFieldValue("name",conf.getName());
@ -131,9 +132,9 @@ public class EditConferenceDialog extends ContentDialog
} // end doDialog } // end doDialog
public void resetOnError(SIGContext sig, ConferenceContext conf, String message) public void resetOnError(CommunityContext comm, ConferenceContext conf, String message)
{ {
setHiddenField("sig",String.valueOf(sig.getSIGID())); setHiddenField("sig",String.valueOf(comm.getCommunityID()));
setHiddenField("conf",String.valueOf(conf.getConfID())); setHiddenField("conf",String.valueOf(conf.getConfID()));
setTitle("Edit Conference: " + conf.getName()); setTitle("Edit Conference: " + conf.getName());
setErrorMessage(message); setErrorMessage(message);

View File

@ -36,7 +36,7 @@ public class FindData implements JSPRender, SearchMode
protected static final String ATTR_NAME = "com.silverwrist.venice.content.FindData"; protected static final String ATTR_NAME = "com.silverwrist.venice.content.FindData";
// The various display categories // The various display categories
public static final int FD_SIGS = 0; public static final int FD_COMMUNITIES = 0;
public static final int FD_USERS = 1; public static final int FD_USERS = 1;
public static final int FD_CATEGORIES = 2; public static final int FD_CATEGORIES = 2;
@ -75,13 +75,13 @@ public class FindData implements JSPRender, SearchMode
if (header_titles==null) if (header_titles==null)
{ // construct the title and URL vectors { // construct the title and URL vectors
header_titles = new Vector(); header_titles = new Vector();
header_titles.add("SIGs"); header_titles.add("Communities");
header_titles.add("Users"); header_titles.add("Users");
header_titles.add("Categories"); header_titles.add("Categories");
header_titles.trimToSize(); header_titles.trimToSize();
header_urls = new Vector(); header_urls = new Vector();
header_urls.add("find?disp=" + String.valueOf(FD_SIGS)); header_urls.add("find?disp=" + String.valueOf(FD_COMMUNITIES));
header_urls.add("find?disp=" + String.valueOf(FD_USERS)); header_urls.add("find?disp=" + String.valueOf(FD_USERS));
header_urls.add("find?disp=" + String.valueOf(FD_CATEGORIES)); header_urls.add("find?disp=" + String.valueOf(FD_CATEGORIES));
header_urls.trimToSize(); header_urls.trimToSize();
@ -257,17 +257,17 @@ public class FindData implements JSPRender, SearchMode
public void loadGet(int catid) throws DataException public void loadGet(int catid) throws DataException
{ {
if (disp==FD_SIGS) if (disp==FD_COMMUNITIES)
{ // fill in the list of subcategories and of SIGs in this category { // fill in the list of subcategories and of communities in this category
cat = user.getCategoryDescriptor(catid); cat = user.getCategoryDescriptor(catid);
subcats = cat.getSubCategories(); subcats = cat.getSubCategories();
if (cat.getCategoryID()>=0) if (cat.getCategoryID()>=0)
{ // fill in the SIGs that are in this category { // fill in the communities that are in this category
results = user.getSIGsInCategory(cat,offset,getNumResultsDisplayed()); results = user.getCommunitiesInCategory(cat,offset,getNumResultsDisplayed());
find_count = user.getNumSIGsInCategory(cat); find_count = user.getNumCommunitiesInCategory(cat);
} // end if } // end if
field = FIELD_SIG_NAME; field = FIELD_COMMUNITY_NAME;
} // end if } // end if
else if (disp==FD_USERS) else if (disp==FD_USERS)
@ -286,12 +286,12 @@ public class FindData implements JSPRender, SearchMode
// category ID (if specified) and the field identifier. // category ID (if specified) and the field identifier.
switch (disp) switch (disp)
{ {
case FD_SIGS: case FD_COMMUNITIES:
catid = getParamInt(request,"cat",-1); catid = getParamInt(request,"cat",-1);
if (!engine.isValidCategoryID(catid)) if (!engine.isValidCategoryID(catid))
throw new ValidationException("The category ID parameter is not valid."); throw new ValidationException("The category ID parameter is not valid.");
field = getParamInt(request,"field",FIELD_SIG_NAME); field = getParamInt(request,"field",FIELD_COMMUNITY_NAME);
if ((field!=FIELD_SIG_NAME) && (field!=FIELD_SIG_SYNOPSIS)) if ((field!=FIELD_COMMUNITY_NAME) && (field!=FIELD_COMMUNITY_SYNOPSIS))
throw new ValidationException("The field search parameter is not valid."); throw new ValidationException("The field search parameter is not valid.");
break; break;
@ -344,25 +344,25 @@ public class FindData implements JSPRender, SearchMode
// Run the actual search. // Run the actual search.
switch (disp) switch (disp)
{ {
case FD_SIGS: case FD_COMMUNITIES:
if (catid>=0) if (catid>=0)
{ // retrieve the category descriptor and the subcategory list { // retrieve the category descriptor and the subcategory list
cat = user.getCategoryDescriptor(catid); cat = user.getCategoryDescriptor(catid);
subcats = cat.getSubCategories(); subcats = cat.getSubCategories();
if (cat.getCategoryID()>=0) if (cat.getCategoryID()>=0)
{ // fill in the SIGs that are in this category { // fill in the communities that are in this category
results = user.getSIGsInCategory(cat,offset,count); results = user.getCommunitiesInCategory(cat,offset,count);
if (find_count<0) if (find_count<0)
find_count = user.getNumSIGsInCategory(cat); find_count = user.getNumCommunitiesInCategory(cat);
} // end if } // end if
} // end if } // end if
else else
{ // retrieve the SIG search data { // retrieve the community search data
results = user.searchForSIGs(field,mode,term,offset,count); results = user.searchForCommunities(field,mode,term,offset,count);
if (find_count<0) if (find_count<0)
find_count = user.getSearchSIGCount(field,mode,term); find_count = user.getSearchCommunityCount(field,mode,term);
} // end else } // end else
break; break;
@ -385,7 +385,7 @@ public class FindData implements JSPRender, SearchMode
public static String getCatJumpLink(RenderData rdat, int catid) public static String getCatJumpLink(RenderData rdat, int catid)
{ {
return rdat.getEncodedServletPath("find?disp=" + String.valueOf(FD_SIGS) + "&cat=" return rdat.getEncodedServletPath("find?disp=" + String.valueOf(FD_COMMUNITIES) + "&cat="
+ String.valueOf(catid)); + String.valueOf(catid));
} // end getCatJumpLink } // end getCatJumpLink

View File

@ -36,16 +36,16 @@ public class Invitation implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
private SIGContext sig; // the SIG context private CommunityContext comm; // the community context
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Constructor * Constructor
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public Invitation(SIGContext sig) public Invitation(CommunityContext comm)
{ {
this.sig = sig; this.comm = comm;
} // end constructor } // end constructor
@ -73,7 +73,7 @@ public class Invitation implements JSPRender
public String getPageQID() public String getPageQID()
{ {
return "sigops?cmd=I&sig=" + sig.getSIGID(); return "sigops?cmd=I&sig=" + comm.getCommunityID();
} // end getPageQID } // end getPageQID
@ -99,16 +99,16 @@ public class Invitation implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public int getSIGID() public int getCommunityID()
{ {
return sig.getSIGID(); return comm.getCommunityID();
} // end getSIGID } // end getCommunityID
public String getSIGName() public String getCommunityName()
{ {
return sig.getName(); return comm.getName();
} // end getSIGName } // end getCommunityName
} // end class Invitation } // end class Invitation

View File

@ -33,8 +33,8 @@ public class JoinKeyDialog extends ContentDialog
super("Join Key Required",null,"joinkeyform","sigops"); super("Join Key Required",null,"joinkeyform","sigops");
setHiddenField("cmd","J"); setHiddenField("cmd","J");
setHiddenField("sig",""); setHiddenField("sig","");
setInstructions("You must specify a join key before you can join this SIG. You might have received " setInstructions("You must specify a join key before you can join this community. You might have received "
+ "the join key from the SIG's host, or via an invitation e-mail message. Please " + "the join key from the community's host, or via an invitation e-mail message. Please "
+ "enter it in the box below."); + "enter it in the box below.");
addFormField(new CDTextFormField("key","Join key",null,false,32,64)); addFormField(new CDTextFormField("key","Join key",null,false,32,64));
addCommandButton(new CDImageButton("join","bn_join_now.gif","Join Now",80,24)); addCommandButton(new CDImageButton("join","bn_join_now.gif","Join Now",80,24));
@ -65,16 +65,16 @@ public class JoinKeyDialog extends ContentDialog
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public void setupDialog(SIGContext sig) public void setupDialog(CommunityContext comm)
{ {
setHiddenField("sig",String.valueOf(sig.getSIGID())); setHiddenField("sig",String.valueOf(comm.getCommunityID()));
} // end setupDialog } // end setupDialog
public void doDialog(SIGContext sig) throws ValidationException, DataException, AccessError public void doDialog(CommunityContext comm) throws ValidationException, DataException, AccessError
{ {
validate(); validate();
sig.join(getFieldValue("key")); comm.join(getFieldValue("key"));
} // end doDialog } // end doDialog

View File

@ -37,7 +37,7 @@ public class ManageConference implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
private SIGContext sig; // the SIG we're in private CommunityContext comm; // the community we're in
private ConferenceContext conf; // the conference being listed private ConferenceContext conf; // the conference being listed
private String locator = null; // the locator we use private String locator = null; // the locator we use
@ -46,9 +46,9 @@ public class ManageConference implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public ManageConference(SIGContext sig, ConferenceContext conf) public ManageConference(CommunityContext comm, ConferenceContext conf)
{ {
this.sig = sig; this.comm = comm;
this.conf = conf; this.conf = conf;
} // end constructor } // end constructor
@ -103,11 +103,11 @@ public class ManageConference implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public int getSIGID() public int getCommunityID()
{ {
return sig.getSIGID(); return comm.getCommunityID();
} // end getSIGID } // end getCommunityID
public int getConfID() public int getConfID()
{ {
@ -124,7 +124,7 @@ public class ManageConference implements JSPRender
public String getLocator() public String getLocator()
{ {
if (locator==null) if (locator==null)
locator = "sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); locator = "sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID();
return locator; return locator;
} // end getLocator } // end getLocator

View File

@ -37,7 +37,7 @@ public class ManageConferenceAliases implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
private SIGContext sig; // the SIG we're in private CommunityContext comm; // the community we're in
private ConferenceContext conf; // the conference being listed private ConferenceContext conf; // the conference being listed
private List aliases; // list of aliases generated private List aliases; // list of aliases generated
private String error_message; // error message to display private String error_message; // error message to display
@ -47,18 +47,19 @@ public class ManageConferenceAliases implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public ManageConferenceAliases(SIGContext sig, ConferenceContext conf) throws DataException public ManageConferenceAliases(CommunityContext comm, ConferenceContext conf) throws DataException
{ {
this.sig = sig; this.comm = comm;
this.conf = conf; this.conf = conf;
this.aliases = conf.getAliases(); this.aliases = conf.getAliases();
this.error_message = null; this.error_message = null;
} // end constructor } // end constructor
public ManageConferenceAliases(SIGContext sig, ConferenceContext conf, String message) throws DataException public ManageConferenceAliases(CommunityContext comm, ConferenceContext conf, String message)
throws DataException
{ {
this.sig = sig; this.comm = comm;
this.conf = conf; this.conf = conf;
this.aliases = conf.getAliases(); this.aliases = conf.getAliases();
this.error_message = message; this.error_message = message;
@ -115,11 +116,11 @@ public class ManageConferenceAliases implements JSPRender
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public int getSIGID() public int getCommunityID()
{ {
return sig.getSIGID(); return comm.getCommunityID();
} // end getSIGID } // end getCommunityID
public int getConfID() public int getConfID()
{ {
@ -135,7 +136,7 @@ public class ManageConferenceAliases implements JSPRender
public String getLocator() public String getLocator()
{ {
return "sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); return "sig=" + comm.getCommunityID() + "&conf=" + conf.getConfID();
} // end getLocator } // end getLocator

View File

@ -23,7 +23,7 @@ import java.util.*;
import com.silverwrist.util.StringUtil; import com.silverwrist.util.StringUtil;
import com.silverwrist.venice.core.*; import com.silverwrist.venice.core.*;
public class MenuSIG implements ComponentRender, ColorSelectors public class MenuCommunity implements ComponentRender, ColorSelectors
{ {
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
* Attributes * Attributes
@ -34,7 +34,7 @@ public class MenuSIG implements ComponentRender, ColorSelectors
private boolean image_url_needs_fixup = false; // do we need to fix image path up? private boolean image_url_needs_fixup = false; // do we need to fix image path up?
private String title; // title for menu private String title; // title for menu
private List items_list; // list of menu items private List items_list; // list of menu items
private int sigid; // SIG ID private int cid; // community ID
private boolean show_unjoin; // show the "Unjoin" menu choice? private boolean show_unjoin; // show the "Unjoin" menu choice?
/*-------------------------------------------------------------------------------- /*--------------------------------------------------------------------------------
@ -42,7 +42,7 @@ public class MenuSIG implements ComponentRender, ColorSelectors
*-------------------------------------------------------------------------------- *--------------------------------------------------------------------------------
*/ */
public MenuSIG(SIGContext ctxt) public MenuCommunity(CommunityContext ctxt)
{ {
try try
{ // retrieve the contact info for this puppy { // retrieve the contact info for this puppy
@ -63,8 +63,8 @@ public class MenuSIG implements ComponentRender, ColorSelectors
} // end catch } // end catch
title = ctxt.getName(); title = ctxt.getName();
items_list = ctxt.getSIGFeaturesList(); items_list = ctxt.getCommunityFeaturesList();
sigid = ctxt.getSIGID(); cid = ctxt.getCommunityID();
show_unjoin = ctxt.canUnjoin(); show_unjoin = ctxt.canUnjoin();
} // end constructor } // end constructor
@ -95,19 +95,19 @@ public class MenuSIG implements ComponentRender, ColorSelectors
// display the menu items // display the menu items
Iterator it = items_list.iterator(); Iterator it = items_list.iterator();
String sigparm = "sig=" + sigid; String cparm = "sig=" + cid;
while (it.hasNext()) while (it.hasNext())
{ // display each menu item in turn { // display each menu item in turn
SIGFeature ftr = (SIGFeature)(it.next()); CommunityFeature ftr = (CommunityFeature)(it.next());
out.write("<BR>\n<A CLASS=\"lbar\" HREF=\"" out.write("<BR>\n<A CLASS=\"lbar\" HREF=\""
+ rdat.getEncodedServletPath(ftr.getApplet() + "?" + sigparm) + "\">" + hilite + rdat.getEncodedServletPath(ftr.getApplet() + "?" + cparm) + "\">" + hilite
+ StringUtil.encodeHTML(ftr.getName()) + "</FONT></A>\n"); + StringUtil.encodeHTML(ftr.getName()) + "</FONT></A>\n");
} // end while } // end while
if (show_unjoin) if (show_unjoin)
out.write("<P>\n<A CLASS=\"lbar\" HREF=\"" out.write("<P>\n<A CLASS=\"lbar\" HREF=\""
+ rdat.getEncodedServletPath("sigops?cmd=U&" + sigparm) + "\">" + rdat.getEncodedServletPath("sigops?cmd=U&" + cparm) + "\">"
+ hilite + "Unjoin</FONT></A>\n"); + hilite + "Unjoin</FONT></A>\n");
out.write("\n"); // all done... out.write("\n"); // all done...
@ -121,8 +121,8 @@ public class MenuSIG implements ComponentRender, ColorSelectors
public int getID() public int getID()
{ {
return sigid; return cid;
} // end getID } // end getID
} // end class MenuTop } // end class MenuCommunity

Some files were not shown because too many files have changed in this diff Show More