<Generate
generator="/emailThisArticle.template"
destination="${config.storageRoot}/${pathprefix}/${article.date.formatted.yyyy}/${article.date.formatted.MM}/${article.id}.txt"/>
+ <!--
<PDFPreFormat
key="article"
numLinesBetweenImages="3"
<PDFGenerate
generator="${config.storageRoot}/${pathprefix}/${article.date.formatted.yyyy}/${article.date.formatted.MM}/${article.id}.fo"
destination="${config.storageRoot}/${pathprefix}/${article.date.formatted.yyyy}/${article.date.formatted.MM}/${article.id}.pdf"
- stylesheet="${config['Producer.HTML2FOStyleSheet']}" />
+ stylesheet="${config['Producer.HTML2FOStyleSheet']}" /> -->
</Language>
<IndexContent key="article" pathToIndex="${config['IndexPath']}"/>
</then>
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
package mir.entity;
* an entity. Entities are used to represent rows of a database table.<p>
* Interfacing TemplateHashModel and TemplateModelRoot to be freemarker compliant
*
- * @version $Id: Entity.java,v 1.20 2003/04/21 12:42:46 idfx Exp $
+ * @version $Id: Entity.java,v 1.21 2003/05/03 00:21:22 zapata Exp $
* @author rk
*
*/
{
protected static MirPropertiesConfiguration configuration;
- private boolean changed;
protected Map theValuesHash; // tablekey / value
protected StorageObject theStorageObject;
protected List streamedInput = null;
public Entity() {
logger = new LoggerWrapper("Entity");
-
- this.changed = false;
}
/**
}
/**
- * Sets the values of the Entity.
+ * Sets the values of the Entity. (Only to be called by the Storage Object)
* @param theStringValues Map containing the new values of the Entity
*/
}
/**
- * Returns whether the content of the Entity has changed.
- * @return true wenn ja, sonst false
- */
- public boolean changed() {
- return changed;
- }
-
- /**
* Returns the primary key of the Entity.
* @return String Id
*/
}
/**
- * Defines the primary key of the Entity
+ * Defines the primary key of the Entity (only to be set by the StorageObject)
* @param id
*/
public void setId(String id) {
public String insert() throws StorageObjectExc {
logger.debug("Entity: trying to insert ...");
if (theStorageObject != null) {
- return theStorageObject.insert( (Entity)this);
+ return theStorageObject.insert(this);
}
else
throw new StorageObjectExc("theStorageObject == null!");
* @exception StorageObjectException
*/
public void update() throws StorageObjectFailure {
- theStorageObject.update( (Entity)this);
+ theStorageObject.update(this);
}
/**
*/
public void setValueForProperty(String theProp, String theValue) throws
StorageObjectFailure {
- this.changed = true;
if (isField(theProp))
theValuesHash.put(theProp, theValue);
else {
logger.warn("Entity.setValueForProperty: Property not found: " + theProp + " (" + theValue + ")");
}
-
}
/**
return theStorageObject.getLabels();
}
- /**
- * Returns a Map with all values of the Entity.
- * @return Map with field name as key and the corresponding values
- *
- * @deprecated This method is deprecated and will be deleted in the next release.
- * Entity interfaces freemarker.template.TemplateHashModel now and can
- * be used in the same way as SimpleHash.
- */
- public Map getValues() {
- logger.warn("using deprecated Entity.getValues() - a waste of resources");
- return theValuesHash;
- }
/**
* Returns an ArrayList with all database fields that can
return theStorageObject.getFields().contains(fieldName);
}
- protected void throwStorageObjectFailure(Throwable e, String wo) throws
- StorageObjectFailure {
+ protected void throwStorageObjectFailure(Throwable e, String wo) throws StorageObjectFailure {
logger.error(e.toString() + " function: " + wo);
e.printStackTrace(logger.asPrintWriter(LoggerWrapper.DEBUG_MESSAGE));
* Treiber, Host, User und Passwort, ueber den der Zugriff auf die
* Datenbank erfolgt.
*
- * @version $Id: Database.java,v 1.41 2003/05/02 01:02:45 zapata Exp $
+ * @version $Id: Database.java,v 1.42 2003/05/03 00:21:22 zapata Exp $
* @author rk
*
*/
protected ArrayList metadataNotNullFields;
protected int[] metadataTypes;
protected Class theEntityClass;
- protected StorageObject myselfDatabase;
protected SimpleList popupCache = null;
protected boolean hasPopupCache = false;
protected SimpleHash hashCache = null;
if (theEntityClass != null) {
returnEntity = (Entity) theEntityClass.newInstance();
returnEntity.setValues(theResultHash);
- returnEntity.setStorage(myselfDatabase);
+ returnEntity.setStorage(this);
if (returnEntity instanceof StorableObject) {
logger.debug("CACHE: ( in) " + returnEntity.getId() + " :" + theTable);
}
/**
- * insert-Operator: f?gt eine Entity in die Tabelle ein. Eine Spalte WEBDB_CREATE
- * wird automatisch mit dem aktuellen Datum gefuellt.
+ * Inserts an entity into the database.
*
* @param theEntity
* @return der Wert des Primary-keys der eingef?gten Entity
if (aField.equals("webdb_create") ||
aField.equals("webdb_lastchange")) {
aValue = "NOW()";
- } else {
+ }
+ else {
if ((streamedInput != null) && streamedInput.contains(aField)) {
aValue = "?";
} else {
return null;
}
- pstmt =
- con.prepareStatement(theAdaptor.getLastInsertSQL(
- (Database) myselfDatabase));
+ pstmt = con.prepareStatement(theAdaptor.getLastInsertSQL(this));
ResultSet rs = pstmt.executeQuery();
rs.next();
}
/**
- * update-Operator: aktualisiert eine Entity. Eine Spalte WEBDB_LASTCHANGE
- * wird automatisch mit dem aktuellen Datum gefuellt.
+ * Updates an entity in the database
*
* @param theEntity
*/
}
sql.append(" where id=").append(id);
+ logger.debug("UPDATE: " + sql);
- //theLog.printInfo("UPDATE: " + sql);
- // execute sql
try {
con = getPooledCon();
con.setAutoCommit(false);
}
pstmt.executeUpdate();
- } catch (SQLException sqe) {
+ }
+ catch (SQLException sqe) {
throwSQLException(sqe, "update");
- } finally {
+ }
+ finally {
try {
con.setAutoCommit(true);
- } catch (Exception e) {
+ }
+ catch (Exception e) {
;
}
* @param wo Funktonsname, in der die SQLException geworfen wurde
* @exception StorageObjectException
*/
- protected void throwSQLException(SQLException sqe, String aFunction)
- throws StorageObjectFailure {
+ protected void throwSQLException(SQLException sqe, String aFunction) throws StorageObjectFailure {
String state = "";
String message = "";
int vendor = 0;
MirAdminInterfaceLocalizer.MirSimpleEntityOperation operation = MirGlobal.localizer().adminInterface().simpleCommentOperationForName(commentBlockAction);
if (checkCookie(Arrays.asList(cookies)) || checkIpFilter(address) || checkRegExpFilter(aComment)) {
+ logger.debug("performing operation " + operation.getName());
operation.perform(null, MirGlobal.localizer().dataModel().adapterModel().makeEntityAdapter("comment", aComment));
setCookie(aResponse);
}
address = request.getRemoteAddr();
cookies = request.getCookies();
}
+ else
+ logger.debug("no request available! " + aRequest.getClass().getName());
logArticle(address, anArticle.getId(), new Date(), browser);
- MirAdminInterfaceLocalizer.MirSimpleEntityOperation operation = MirGlobal.localizer().adminInterface().simpleCommentOperationForName(commentBlockAction);
+ MirAdminInterfaceLocalizer.MirSimpleEntityOperation operation = MirGlobal.localizer().adminInterface().simpleArticleOperationForName(commentBlockAction);
if (checkCookie(Arrays.asList(cookies)) || checkIpFilter(address) || checkRegExpFilter(anArticle)) {
+ logger.debug("performing operation " + operation.getName());
operation.perform(null, MirGlobal.localizer().dataModel().adapterModel().makeEntityAdapter("content", anArticle));
setCookie(aResponse);
}
public interface MirSimpleEntityOperation {
public String getName();
- public boolean isAvailable(EntityAdapter anEntity);
- public void perform(EntityAdapter aUser, EntityAdapter anEntity);
+ public boolean isAvailable(EntityAdapter anEntity) throws MirLocalizerExc, MirLocalizerFailure;
+ public void perform(EntityAdapter aUser, EntityAdapter anEntity) throws MirLocalizerExc, MirLocalizerFailure;
}
}
\ No newline at end of file
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.List;
-import java.util.Map;
+import java.util.*;
import java.util.Vector;
import mir.entity.Entity;
}
};
- public void perform(EntityAdapter aUser, EntityAdapter anEntity) {
+ public void perform(EntityAdapter aUser, EntityAdapter anEntity) throws MirLocalizerExc, MirLocalizerFailure {
Entity entity = anEntity.getEntity();
try {
performModification(aUser, entity);
entity.update();
}
catch (Throwable t) {
+ throw new MirLocalizerFailure(t);
}
};
protected abstract boolean isAvailable(Entity anEntity) throws StorageObjectFailure ;
- protected abstract void performModification(EntityAdapter aUser, Entity anEntity) throws StorageObjectFailure ;
+ protected abstract void performModification(EntityAdapter aUser, Entity anEntity) throws MirLocalizerExc, MirLocalizerFailure ;
}
public static abstract class CommentModifyingOperation extends EntityModifyingOperation {
protected static class ChangeArticleFieldOperation extends ArticleModifyingOperation {
private String field;
- private String oldValue;
+ private Set oldValues;
private String newValue;
- public ChangeArticleFieldOperation(String aName, String aField, String anOldValue, String aNewValue, boolean aLogOperation) {
+ public ChangeArticleFieldOperation(String aName, String aField, String anOldValues[], String aNewValue, boolean aLogOperation) {
super(aName, aLogOperation);
field = aField;
newValue = aNewValue;
- oldValue = anOldValue;
+ oldValues = new HashSet(Arrays.asList(anOldValues));
+ }
+ public ChangeArticleFieldOperation(String aName, String aField, String anOldValue, String aNewValue, boolean aLogOperation) {
+ this(aName, aField, new String[] {anOldValue}, aNewValue, aLogOperation);
}
protected boolean isAvailable(EntityContent anArticle) {
- return anArticle.getValue(field) != null && anArticle.getValue(field).equals(oldValue);
+ return anArticle.getValue(field) != null && oldValues.contains(anArticle.getValue(field));
}
protected void performModification(EntityAdapter aUser, EntityContent anArticle) throws StorageObjectFailure {
}
public void validate(List aResults, Request aRequest, Session aSession) throws SessionExc, SessionFailure {
+ super.validate(aResults, aRequest, aSession);
+
testFieldEntered(aRequest, "title", "validationerror.missing", aResults);
testFieldEntered(aRequest, "description", "validationerror.missing", aResults);
testFieldEntered(aRequest, "creator", "validationerror.missing", aResults);
}
public void validate(List aResults, Request aRequest, Session aSession) throws SessionExc, SessionFailure {
+ super.validate(aResults, aRequest, aSession);
+
testFieldEntered(aRequest, "title", "validationerror.missing", aResults);
testFieldEntered(aRequest, "description", "validationerror.missing", aResults);
testFieldEntered(aRequest, "creator", "validationerror.missing", aResults);
import java.util.List;
import java.util.Map;
import java.util.Random;
-import java.util.*;
+import java.util.Vector;
import mir.config.MirPropertiesConfiguration;
-import mir.entity.Entity;
import mir.log.LoggerWrapper;
import mir.session.Request;
import mir.session.Response;
import mir.session.UploadedFile;
import mir.storage.StorageObject;
import mir.util.ExceptionFunctions;
-import mircoders.entity.EntityComment;
import mircoders.global.MirGlobal;
-import mircoders.media.MediaUploadProcessor;
-import mircoders.module.ModuleComment;
-import mircoders.storage.DatabaseComment;
-import mircoders.storage.DatabaseCommentToMedia;
-import mircoders.storage.DatabaseContent;
-import mircoders.module.*;
+import mircoders.module.ModuleMediaType;
/**
*
}
public void processRequest(Request aRequest, Session aSession, Response aResponse) throws SessionExc, SessionFailure {
- if (aSession.getAttribute("initialRequest")==null) {
- initialRequest(aRequest, aSession, aResponse);
- aSession.setAttribute("initialRequest", "no");
+ if (MirGlobal.abuse().getOpenPostingDisabled()) {
+ makeOpenPostingDisabledResponse(aRequest, aSession, aResponse);
+ aSession.terminate();
}
else {
- subsequentRequest(aRequest, aSession, aResponse);
+ if (aSession.getAttribute("initialRequest") == null) {
+ initialRequest(aRequest, aSession, aResponse);
+ aSession.setAttribute("initialRequest", "no");
+ }
+ else {
+ subsequentRequest(aRequest, aSession, aResponse);
+ }
}
};
}
};
+ protected void makeOpenPostingDisabledResponse(Request aRequest, Session aSession, Response aResponse) {
+ aResponse.setResponseGenerator(configuration.getString("ServletModule.OpenIndy.PostingDisabledTemplate"));
+ }
+
protected void preProcessRequest(Request aRequest, Session aSession) throws SessionExc, SessionFailure {
};
public void processUploadedFile(Request aRequest, Session aSession, UploadedFile aFile) throws SessionExc, SessionFailure {
}
protected void validate(List aResults, Request aRequest, Session aSession) throws SessionExc, SessionFailure {
+ String password = (String) aSession.getAttribute("password");
+
+ if (password!=null) {
+ String submittedPassword= aRequest.getParameter("password").trim();
+
+ if (!password.equals(submittedPassword)) {
+ aResults.add(new ValidationError("password", "passwordmismatch"));
+ }
+ }
}
/**
ImageLayout layout = new ImageLayout();
nrComponents = tempImage.getColorModel().getNumColorComponents();
-/* System.out.println("blaat sample model = " + tempImage.getSampleModel().toString());
- System.out.println("blaat color model = " + tempImage.getColorModel().toString());
- System.out.println("blaat nr color components = " + tempImage.getColorModel().getNumColorComponents());
- System.out.println("blaat nr components = " + tempImage.getColorModel().getNumComponents());
- */
bands = new int[nrComponents];
for (int i=0; i<nrComponents; i++)
bands[i]=i;
-
-
layout.setColorModel(ColorModel.getRGBdefault());
layout.setSampleModel(
new PixelInterleavedSampleModel(DataBuffer.TYPE_BYTE,
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
package mircoders.module;
operation.perform(aUser, comment);
logger.info("Operation " + anOperation + " successfully performed on comment " + anId);
}
- logger.error("Error while performing " + anOperation + " on comment " + anId + ": comment is null");
+ else {
+ logger.error("Error while performing " + anOperation + " on comment " + anId + ": comment is null");
+ }
}
catch (Throwable e) {
logger.error("Error while performing " + anOperation + " on comment " + anId + ": " + e.getMessage());
operation.perform(aUser, article);
logger.info("Operation " + anOperation + " successfully performed on article " + anId);
}
- logger.error("Error while performing " + anOperation + " on article " + anId + ": article is null");
+ else {
+ logger.error("Error while performing " + anOperation + " on article " + anId + ": article is null");
+ }
}
catch (Throwable e) {
logger.error("Error while performing " + anOperation + " on article " + anId + ": " + e.getMessage());
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
public synchronized static DatabaseArticleType getInstance() throws StorageObjectFailure {
if (instance == null) {
instance = new DatabaseArticleType();
- instance.myselfDatabase = instance;
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
package mircoders.storage;
// the following *has* to be sychronized cause this static method
// could get preemted and we could end up with 2 instances of DatabaseFoo..
// see the "Singletons with needles and thread" article at JavaWorld -mh
- public synchronized static DatabaseAudio getInstance() throws
- StorageObjectFailure {
+ public synchronized static DatabaseAudio getInstance() {
if (instance == null) {
instance = new DatabaseAudio();
- instance.myselfDatabase = instance;
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
// the following *has* to be sychronized cause this static method
// could get preemted and we could end up with 2 instances of DatabaseFoo..
// see the "Singletons with needles and thread" article at JavaWorld -mh
- public synchronized static DatabaseBreaking getInstance()
- throws StorageObjectFailure {
+ public synchronized static DatabaseBreaking getInstance() throws StorageObjectFailure {
if (instance == null) {
instance = new DatabaseBreaking();
- instance.myselfDatabase = instance;
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
private static DatabaseComment instance;
- public static DatabaseComment getInstance() {
+ public synchronized static DatabaseComment getInstance() {
if (instance == null) {
- synchronized (DatabaseComment.class) {
- if (instance == null) {
- instance = new DatabaseComment();
- instance.myselfDatabase = instance;
- }
- }
+ instance = new DatabaseComment();
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
private static DatabaseCommentStatus instance;
- public static DatabaseCommentStatus getInstance() throws StorageObjectFailure {
+ public synchronized static DatabaseCommentStatus getInstance() throws StorageObjectFailure {
if (instance == null) {
- synchronized (DatabaseCommentStatus.class) {
- if (instance == null) {
- instance = new DatabaseCommentStatus();
- instance.myselfDatabase = instance;
- }
- }
+ instance = new DatabaseCommentStatus();
}
return instance;
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
* <b>implements abstract DB connection to the comment_x_media SQL table
*
* @author RK, mir-coders group
- * @version $Id: DatabaseCommentToMedia.java,v 1.2 2003/04/21 12:42:47 idfx Exp $
+ * @version $Id: DatabaseCommentToMedia.java,v 1.3 2003/05/03 00:21:22 zapata Exp $
*
*/
private static DatabaseCommentToMedia instance;
- public static DatabaseCommentToMedia getInstance() {
+ public static synchronized DatabaseCommentToMedia getInstance() {
if (instance == null) {
- synchronized (DatabaseCommentToMedia.class) {
- if (instance == null) {
- instance = new DatabaseCommentToMedia();
- instance.myselfDatabase = instance;
- }
- }
+ instance = new DatabaseCommentToMedia();
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
// the following *has* to be sychronized cause this static method
// could get preemted and we could end up with 2 instances of DatabaseFoo.
// see the "Singletons with needles and thread" article at JavaWorld -mh
- public synchronized static DatabaseContent getInstance()
- throws StorageObjectFailure {
+ public synchronized static DatabaseContent getInstance() {
if (instance == null ) {
instance = new DatabaseContent();
- instance.myselfDatabase = instance;
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
* <b>implements abstract DB connection to the content_x_media SQL table
*
* @author RK, mir-coders group
- * @version $Id: DatabaseContentToMedia.java,v 1.18 2003/04/21 12:42:48 idfx Exp $
+ * @version $Id: DatabaseContentToMedia.java,v 1.19 2003/05/03 00:21:22 zapata Exp $
*
*/
private static DatabaseContentToMedia instance;
- public static DatabaseContentToMedia getInstance() {
+ public synchronized static DatabaseContentToMedia getInstance() {
if (instance == null) {
- synchronized (DatabaseContentToMedia.class) {
- if (instance == null) {
- instance = new DatabaseContentToMedia();
- instance.myselfDatabase = instance;
- }
- }
+ instance = new DatabaseContentToMedia();
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
private static DatabaseContentToTopics instance;
- public static DatabaseContentToTopics getInstance() {
+ public synchronized static DatabaseContentToTopics getInstance() {
if (instance == null) {
- synchronized (DatabaseContentToTopics.class) {
- if (instance == null) {
- instance = new DatabaseContentToTopics();
- instance.myselfDatabase = instance;
- }
- }
+ instance = new DatabaseContentToTopics();
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
public synchronized static DatabaseImageColor getInstance() {
if (instance == null) {
instance = new DatabaseImageColor();
- instance.myselfDatabase = instance;
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
public synchronized static DatabaseImageFormat getInstance() {
if (instance == null) {
instance = new DatabaseImageFormat();
- instance.myselfDatabase = instance;
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
public synchronized static DatabaseImageLayout getInstance() {
if (instance == null) {
instance = new DatabaseImageLayout();
- instance.myselfDatabase = instance;
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
package mircoders.storage;
public synchronized static DatabaseImageType getInstance() {
if (instance == null) {
instance = new DatabaseImageType();
- instance.myselfDatabase = instance;
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
public synchronized static DatabaseImages getInstance() {
if (instance == null) {
instance = new DatabaseImages();
- instance.myselfDatabase = instance;
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
StorageObjectFailure {
if (instance == null) {
instance = new DatabaseLanguage();
- instance.myselfDatabase = instance;
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
public synchronized static DatabaseMedia getInstance() {
if (instance == null) {
instance = new DatabaseMedia();
- instance.myselfDatabase = instance;
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
package mircoders.storage;
public synchronized static DatabaseMediaType getInstance() {
if (instance == null) {
instance = new DatabaseMediaType();
- instance.myselfDatabase = instance;
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
public synchronized static DatabaseMediafolder getInstance() {
if (instance == null) {
instance = new DatabaseMediafolder();
- instance.myselfDatabase = instance;
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
public synchronized static DatabaseMessages getInstance() {
if (instance == null) {
instance = new DatabaseMessages();
- instance.myselfDatabase = instance;
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
package mircoders.storage;
public synchronized static DatabaseOther getInstance() {
if (instance == null) {
instance = new DatabaseOther();
- instance.myselfDatabase = instance;
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
// the following *has* to be sychronized cause this static method
// could get preemted and we could end up with 2 instances of DatabaseFoo..
// see the "Singletons with needles and thread" article at JavaWorld -mh
- public synchronized static DatabaseRights getInstance() throws
- StorageObjectFailure {
+ public synchronized static DatabaseRights getInstance() {
if (instance == null) {
instance = new DatabaseRights();
- instance.myselfDatabase = instance;
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
// the following *has* to be sychronized cause this static method
// could get preemted and we could end up with 2 instances of DatabaseFoo..
// see the "Singletons with needles and thread" article at JavaWorld -mh
- public synchronized static DatabaseTopics getInstance() throws
- StorageObjectFailure {
+ public synchronized static DatabaseTopics getInstance() {
if (instance == null) {
instance = new DatabaseTopics();
- instance.myselfDatabase = instance;
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
private static DatabaseUploadedMedia instance;
private static EntityRelation relationMediaType;
- public static DatabaseUploadedMedia getInstance() {
+ public synchronized static DatabaseUploadedMedia getInstance() {
if (instance == null ) {
- synchronized(DatabaseUploadedMedia.class) {
- if (instance == null ) {
- instance = new DatabaseUploadedMedia();
- instance.myselfDatabase = instance;
- }
- }
+ instance = new DatabaseUploadedMedia();
}
return instance;
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
// the following *has* to be sychronized cause this static method
// could get preemted and we could end up with 2 instances of DatabaseFoo..
// see the "Singletons with needles and thread" article at JavaWorld -mh
- public synchronized static DatabaseUsers getInstance() throws
- StorageObjectFailure {
+ public synchronized static DatabaseUsers getInstance() {
if (instance == null) {
instance = new DatabaseUsers();
- instance.myselfDatabase = instance;
}
return instance;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with any library licensed under the Apache Software License,
- * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
- * (or with modified versions of the above that use the same license as the above),
- * and distribute linked combinations including the two. You must obey the
- * GNU General Public License in all respects for all of the code used other than
- * the above mentioned libraries. If you modify this file, you may extend this
- * exception to your version of the file, but you are not obligated to do so.
+ * the code of this program with any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two. You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries. If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*/
public synchronized static DatabaseVideo getInstance() {
if (instance == null) {
instance = new DatabaseVideo();
- instance.myselfDatabase = instance;
}
return instance;
}