text
stringlengths
3
1.18M
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
package com.m4bce.json_rest; import org.json.JSONObject; public interface JsonObject { public JSONObject toJson(); public void parseJSON(JSONObject object); }
package com.m4bce.json_rest; import org.json.JSONArray; import org.json.JSONObject; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.toolbox.JsonObjectRequest; import com.android.volley.toolbox.Volley; import android.content.Context; public class JsonRestService {...
package pl.polidea.sectionedlist; /** * Item definition including the section. */ public class SectionListItem { public Object item; public String section; public SectionListItem(final Object item, final String section) { super(); this.item = item; this.section = section; } ...
/** * Provides simple implementation of section list. */ package pl.polidea.sectionedlist;
package pl.polidea.sectionedlist; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android....
package pl.polidea.sectionedlist; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.view.ViewParent; import android.widget.AbsListView; import android.widget.AbsListView.OnScrollListener; import android.widget.FrameLayout; import android.widget.ListAdapter; impo...
package pl.polidea.sectionedlist; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; import java.util.Map.Entry; import android.database.DataSetObserver; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import ...
/* * Copyright 2013 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
/* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright 2013 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
/** Automatically generated file. DO NOT MODIFY */ package com.google.android.gcm; public final class BuildConfig { public final static boolean DEBUG = true; }
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
package common; import common.dal.Transaction; import common.interfaces.IPersistent; import common.logger.*; import common.logger.Logger.LogLevel; /** * An abstract manager class, mostly to facilitate logging actions * * @author Gal Lalouche */ public abstract class AbstractManager implements IPersis...
package common.servlet; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.util.Scanner; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MultivaluedMa...
package common.servlet; import java.sql.SQLException; import msg.MessageManager; import registration.RegistrationManager; import user.LoginManager; import common.dal.Transaction; /** * A bundle of all the managers, using a single transaction * * @author Gal Lalouche */ public class ManagersBundl...
package common.servlet; import java.util.Collection; import java.util.concurrent.atomic.AtomicLong; import javax.ws.rs.core.*; import javax.ws.rs.core.Response.Status; import msg.*; import msg.visitors.*; import org.json.*; import org.w3c.dom.Node; import user.User; import common.extensions.*; im...
package common.servlet; import java.io.*; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.util.*; import javax.ws.rs.Produces; import javax.ws.rs.core.*; import javax.ws.rs.ext.*; import org.json.JSONArray; /** * A reader and writer from string to {@link JSONArray} ...
package common.servlet; import java.io.*; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.util.*; import javax.ws.rs.Produces; import javax.ws.rs.core.*; import javax.ws.rs.ext.*; import org.json.JSONObject; /** * A reader and writer from string to {@link JSONObject...
package common.servlet; import java.io.*; import java.util.Properties; import javax.servlet.*; import javax.servlet.http.HttpServlet; import common.Configuration; import common.dal.Creator; import common.logger.*; import common.logger.Logger.LogLevel; /** * A servlet class that initializes all server...
package common.extensions; /** * An aggregator function from (S X T) -> S * * @author Gal Lalouche * @param <S> The result type * @param <T> The iterable type */ public interface Aggregator<S, T> { /** * Aggeragates the new value * * @param currentValue The current value * @param nextVal...
package common.extensions; /** * A function from {@code T} -> {@code boolean} * * @author Gal Lalouche * @param <T> The type */ public interface Predicate<T> extends Function<T, Boolean> { // only for inheritance }
package common.extensions; import java.util.*; /** * Proves LINQ like extension methods * * @author Gal Lalouche */ @SuppressWarnings("javadoc") public class Extender { /** * A predicate that always returns true * * @author Gal Lalouche */ public static class Tautology<T> implements Pr...
package common.extensions; /** * A function from I -> O * * @author Gal Lalouche * @param <I> The function's input type * @param <O> The function's output type */ public interface Function<I, O> { /** * @param element * @return f(element) */ O calculate(I element); }
package common.dal; import java.util.EnumSet; import common.Pair; /** * Represents an SQL column * * @author Gal Lalouche */ public class SQLDataColumn { /** * Constraints against the column * * @author Gal Lalouche */ public enum Constraints { /** * Column cannot be null ...
package common.dal; import java.sql.*; import java.util.*; import common.dal.SQLDataColumn.Constraints; import common.exceptions.InvalidKeyException; import common.interfaces.*; /** * An abstract DAL implementation template * * @author Gal Lalouche * @param <Key> The type of the key of the object b...
package common.dal; import java.sql.*; import java.util.*; import java.util.Date; import msg.*; import registration.RegistrationManager; import user.*; import common.Configuration; import common.exceptions.*; import common.logger.*; import common.logger.Logger.LogLevel; /** * A class that instantia...
package common.dal; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.util.Properties; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; import common.logger.CompositeLogger; import common.logger.Logger.LogLevel; ...
package common.dal; /** * A type of SQL column * * @author Gal Lalouche */ public enum SQLDataType { /** * An integer type (4 bytes) */ INTEGER, /** * A varchar type of size 50 */ VARCHAR_50, /** * A long type (8 bytes) */ BIGINT, /** * A variable text type (64k) */ ...
package common.dal; /** * A where clause operator, to be used by {@link WhereEntry} * * @author Gal Lalouche */ public enum WhereOperator { /** * for {@code IS NULL} check */ IS, /** * for {@code IS NOT NULL} check */ IS_NOT, /** * for all equality checks (will be translated to {@c...
package common.dal; import java.sql.*; import java.util.*; import common.Pair; import common.dal.SQLDataColumn.Constraints; import common.extensions.Extender; import common.interfaces.IPersistent; import common.logger.*; import common.logger.Logger.LogLevel; /** * An abstract implementation of {@link I...
package common.dal; import java.sql.*; import java.util.Properties; import common.*; import common.logger.CompositeLogger; import common.logger.Logger.LogLevel; /** * A single transaction, to be send to Databases to facilitate transactional actions.<br> * Each transaction must be committed using {@link ...
package common.dal; import common.Triple; /** * An entry to a where clause lookup * * @author Gal Lalouche */ public class WhereEntry extends Triple<String, WhereOperator, Object> { /** * Creates a new instance of the type {@code columnName op value} * * @param columnName The column name t...
package common.interfaces; import java.sql.SQLException; /** * Presents data being persisted * * @author Gal Lalouche */ public interface IPersistent { /** * Drops all data from the system and drops the table, and closes the connection to the DB. * * @return {@code true} iff the table existe...
package common.interfaces; import java.sql.SQLException; import user.User; import common.exceptions.ExistingEntityException; /** * A class whose role it is to manage the registration and persistence of user and their passwords * * @author Gal Lalouche * */ public interface IUserRegisteryManager...
package common.interfaces; import java.sql.SQLException; import java.util.Collection; import registration.Consensus; import user.User; import common.Pair; import common.exceptions.*; /** * Manages the votes on consensuses * * @author Gal Lalouche */ public interface IVoteManager extends IPersis...
package common.interfaces; import java.sql.SQLException; import java.util.Collection; import common.exceptions.InvalidKeyException; /** * An interface for storing and restoring objects from the DB * * @author Gal Lalouche * @param <T> The type of object saved * @param <Key> The key identifying the ...
package common.interfaces; import java.sql.SQLException; import java.util.Collection; import msg.*; import user.User; import common.exceptions.InvalidUserException; /** * A class whose role it is to manage the persistence of messages and events * * @author Gal Lalouche */ public interface IMessa...
package common.interfaces; import msg.EventMessage; import msg.Message; /** * A message visitor * * @author Gal Lalouche * @param <T> The return type of the visit */ public interface IMessageVisitor<T> { /** * Visit a message * * @param message The message to visit * @return An objec...
package common.interfaces; import java.sql.SQLException; import java.util.Collection; import msg.EventMessage; import registration.Consensus; import common.exceptions.InvalidEventException; /** * Manages the persistent of {@link Consensus} objects * * @author Gal Lalouche */ public interface ICo...
package common.interfaces; /** * An abstract implementation that also overrides hashCode and equals based on the key * * @author Gal Lalouche * * @param <T> */ public abstract class AbstractHasID<T> implements IHasId<T> { /* * (non-Javadoc) * @see java.lang.Object#hashCode() */ @Overrid...
package common.interfaces; import java.sql.SQLException; import java.util.Collection; import msg.EventMessage; import user.User; import common.exceptions.*; /** * A class whose role it is to manage the persistence of event registrations * * @author Gal Lalouche */ public interface IEventRegistra...
package common.interfaces; /** * Represents all objects that have a single identifying fields * * @author Gal Lalouche * * @param <Key> The key's type */ public interface IHasId<Key> { /** * @return the Id */ Key getId(); }
package common; import java.io.File; import java.util.Properties; /** * A class abstraction of the configuration file (used for testing) * * @author Gal Lalouche */ public class Configuration { private static Configuration instance; private Properties props; private String realPath; p...
package common.exceptions; import msg.EventMessage; /** * Thrown when trying to modifty registeration to an event that is already over * * @author Gal Lalouche */ public class EventOverException extends EventException { /** * @param e The event that was over */ public EventOverException(EventM...
package common.exceptions; /** * Thrown when some kind of error occured relating to events * * @author Gal Lalouche */ public class EventException extends Exception { /** * @param string The error message */ public EventException(String string) { super(string); } }
package common.exceptions; import msg.EventMessage; /** * Thrown when an unregistered event is used in an illegal way * * @author Gal Lalouche */ public class InvalidEventException extends InvalidKeyException { /** * @param event The event that was used */ public InvalidEventException(EventMes...
package common.exceptions; /** * Thrown when trying to add an entity to the DB with a key that already exists * * @author Gal Lalouche */ public class ExistingEntityException extends RuntimeException { /** * @param entity The username that already existed */ public ExistingEntityException(Ob...
package common.exceptions; import registration.Consensus; /** * Thrown when an unregistered consensus is used in an illegal way * * @author Gal Lalouche */ public class InvalidConsensusException extends InvalidKeyException { /** * @param consensus The consensus that was used */ public Invali...
package common.exceptions; /** * Thrown when no row with the key is found * * @author Gal Lalouche */ public class InvalidKeyException extends Exception { /** * @param key They key that was invalid */ public InvalidKeyException(Object key) { super(key + " was not found in the system"); if (...
package common.exceptions; /** * Thrown when the wrong password is being used * * @author Gal Lalouche */ public class WrongPasswordException extends Exception { /** * @param username The username used * @param expectedPassword The username's expected password */ public WrongPasswordExcepti...
package common.exceptions; import msg.EventMessage; /** * Thrown when trying to register to an event at full capacity * * @author Gal Lalouche */ public class EventFullException extends EventException { /** * @param e The event that was full */ public EventFullException(EventMessage e) { su...
package common.exceptions; import user.User; /** * Thrown when an unregistered user is used in an illegal way * * @author Gal Lalouche */ public class InvalidUserException extends InvalidKeyException { /** * @param user The user that was used */ public InvalidUserException(User user) { supe...
package common.exceptions; /** * Thrown when the wrong admin password is input * * @author Gal Lalouche */ public class WrongAdminPasswordException extends WrongPasswordException { /** * @param username The username that was used * @param expectedPassword The username's expected password */ ...
package common.logger; import java.io.PrintStream; import java.util.Date; /** * An abstract logger that can log at different levels and and ignore logs below a required threshold * * @author Gal Lalouche */ public abstract class Logger { private LogLevel level; /** * @return The stream to wri...
package common.logger; import java.io.PrintStream; /** * A logger that logs to the console * * @author Gal Lalouche */ public class CompositeLogger extends Logger { private final static CompositeLogger instance = new CompositeLogger(); private CompositeLogger() { setLogLevel(LogLevel.INFO); ...
package common; /** * A {@link Runnable} that can also throw exceptions on run * * @author Gal Lalouche */ public interface IExceptionRunnable { /** * Runs the method * * @throws Exception */ void run() throws Exception; }