Commit fd37dc10 by Antti Tönkyrä

Merge branch 'devel' into tournament

2 parents c8f22e56 3d23047e
Showing with 2035 additions and 111 deletions
package fi.insomnia.bortal.model;
import java.math.BigDecimal;
import java.util.Calendar;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-27T16:07:46.034+0300")
@StaticMetamodel(AccountEvent.class)
public class AccountEvent_ extends GenericEntity_ {
public static volatile SingularAttribute<AccountEvent, Boolean> cash;
public static volatile SingularAttribute<AccountEvent, BigDecimal> unitPrice;
public static volatile SingularAttribute<AccountEvent, BigDecimal> quantity;
public static volatile SingularAttribute<AccountEvent, Calendar> eventTime;
public static volatile SingularAttribute<AccountEvent, Calendar> delivered;
public static volatile SingularAttribute<AccountEvent, BigDecimal> deliveredCount;
public static volatile SingularAttribute<AccountEvent, FoodWave> foodWave;
public static volatile SingularAttribute<AccountEvent, Product> product;
public static volatile SingularAttribute<AccountEvent, EventUser> user;
public static volatile SingularAttribute<AccountEvent, EventUser> seller;
public static volatile ListAttribute<AccountEvent, DiscountInstance> discountInstances;
public static volatile SingularAttribute<AccountEvent, Bill> bill;
public static volatile SingularAttribute<AccountEvent, String> description;
}
package fi.insomnia.bortal.model;
import fi.insomnia.bortal.enums.ActionLogMessageState;
import java.util.Date;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.826+0300")
@StaticMetamodel(ActionLogMessageResponse.class)
public class ActionLogMessageResponse_ extends GenericEntity_ {
public static volatile SingularAttribute<ActionLogMessageResponse, Date> time;
public static volatile SingularAttribute<ActionLogMessageResponse, EventUser> user;
public static volatile SingularAttribute<ActionLogMessageResponse, String> message;
public static volatile SingularAttribute<ActionLogMessageResponse, ActionLogMessageState> stateChange;
public static volatile SingularAttribute<ActionLogMessageResponse, ActionLogMessage> actionLogMessage;
}
package fi.insomnia.bortal.model;
import fi.insomnia.bortal.enums.ActionLogMessageState;
import java.util.Date;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.819+0300")
@StaticMetamodel(ActionLogMessage.class)
public class ActionLogMessage_ extends GenericEntity_ {
public static volatile SingularAttribute<ActionLogMessage, Date> time;
public static volatile SingularAttribute<ActionLogMessage, User> user;
public static volatile SingularAttribute<ActionLogMessage, Role> crew;
public static volatile SingularAttribute<ActionLogMessage, String> message;
public static volatile ListAttribute<ActionLogMessage, ActionLogMessageResponse> actionLogMessageResponses;
public static volatile SingularAttribute<ActionLogMessage, ActionLogMessageState> state;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.830+0300")
@StaticMetamodel(ApplicationPermission.class)
public class ApplicationPermission_ extends GenericEntity_ {
public static volatile SingularAttribute<ApplicationPermission, String> application;
public static volatile SingularAttribute<ApplicationPermission, Role> role;
public static volatile SingularAttribute<ApplicationPermission, String> permission;
}
package fi.insomnia.bortal.model;
import java.math.BigDecimal;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-26T02:39:28.679+0300")
@StaticMetamodel(BillLine.class)
public class BillLine_ extends GenericEntity_ {
public static volatile SingularAttribute<BillLine, Bill> bill;
public static volatile SingularAttribute<BillLine, String> name;
public static volatile SingularAttribute<BillLine, BigDecimal> quantity;
public static volatile SingularAttribute<BillLine, BigDecimal> unitPrice;
public static volatile SingularAttribute<BillLine, String> unitName;
public static volatile SingularAttribute<BillLine, BigDecimal> vat;
public static volatile SingularAttribute<BillLine, Product> lineProduct;
public static volatile SingularAttribute<BillLine, FoodWave> foodwave;
}
package fi.insomnia.bortal.model;
import java.util.Calendar;
import java.util.Date;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.834+0300")
@StaticMetamodel(Bill.class)
public class Bill_ extends GenericEntity_ {
public static volatile SingularAttribute<Bill, LanEvent> event;
public static volatile SingularAttribute<Bill, Date> paidDate;
public static volatile SingularAttribute<Bill, Integer> billNumber;
public static volatile SingularAttribute<Bill, String> addr1;
public static volatile SingularAttribute<Bill, String> addr2;
public static volatile SingularAttribute<Bill, String> addr3;
public static volatile SingularAttribute<Bill, String> addr4;
public static volatile SingularAttribute<Bill, String> addr5;
public static volatile SingularAttribute<Bill, Calendar> sentDate;
public static volatile SingularAttribute<Bill, Integer> paymentTime;
public static volatile SingularAttribute<Bill, String> noticetime;
public static volatile SingularAttribute<Bill, String> theirReference;
public static volatile SingularAttribute<Bill, String> ourReference;
public static volatile SingularAttribute<Bill, String> deliveryTerms;
public static volatile SingularAttribute<Bill, Integer> delayIntrest;
public static volatile SingularAttribute<Bill, String> notes;
public static volatile ListAttribute<Bill, BillLine> billLines;
public static volatile SingularAttribute<Bill, AccountEvent> accountEvent;
public static volatile SingularAttribute<Bill, EventUser> user;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-11-18T00:45:55.945+0200")
@StaticMetamodel(CardBarcode.class)
public class CardBarcode_ extends GenericEntity_ {
public static volatile SingularAttribute<CardBarcode, PrintedCard> printedCard;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.843+0300")
@StaticMetamodel(CardTemplate.class)
public class CardTemplate_ extends GenericEntity_ {
public static volatile SingularAttribute<CardTemplate, LanEvent> event;
public static volatile SingularAttribute<CardTemplate, byte[]> image;
public static volatile SingularAttribute<CardTemplate, String> name;
public static volatile SingularAttribute<CardTemplate, Integer> power;
public static volatile ListAttribute<CardTemplate, Role> roles;
public static volatile ListAttribute<CardTemplate, PrintedCard> cards;
}
package fi.insomnia.bortal.model;
import java.util.Calendar;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.856+0300")
@StaticMetamodel(CompoEntryFile.class)
public class CompoEntryFile_ extends GenericEntity_ {
public static volatile SingularAttribute<CompoEntryFile, String> mimeType;
public static volatile SingularAttribute<CompoEntryFile, String> fileName;
public static volatile SingularAttribute<CompoEntryFile, String> description;
public static volatile SingularAttribute<CompoEntryFile, String> hash;
public static volatile SingularAttribute<CompoEntryFile, byte[]> fileData;
public static volatile SingularAttribute<CompoEntryFile, Calendar> uploaded;
public static volatile SingularAttribute<CompoEntryFile, CompoEntry> entry;
}
package fi.insomnia.bortal.model;
import java.util.Calendar;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.860+0300")
@StaticMetamodel(CompoEntryParticipant.class)
public class CompoEntryParticipant_ extends GenericEntity_ {
public static volatile SingularAttribute<CompoEntryParticipant, CompoEntry> entry;
public static volatile SingularAttribute<CompoEntryParticipant, String> role;
public static volatile SingularAttribute<CompoEntryParticipant, String> nick;
public static volatile SingularAttribute<CompoEntryParticipant, Calendar> confirmed;
public static volatile SingularAttribute<CompoEntryParticipant, EventUser> user;
}
package fi.insomnia.bortal.model;
import java.util.Calendar;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.852+0300")
@StaticMetamodel(CompoEntry.class)
public class CompoEntry_ extends GenericEntity_ {
public static volatile SingularAttribute<CompoEntry, Compo> compo;
public static volatile SingularAttribute<CompoEntry, Calendar> created;
public static volatile SingularAttribute<CompoEntry, String> title;
public static volatile SingularAttribute<CompoEntry, String> author;
public static volatile SingularAttribute<CompoEntry, String> notes;
public static volatile SingularAttribute<CompoEntry, String> screenMessage;
public static volatile SingularAttribute<CompoEntry, Integer> sort;
public static volatile SingularAttribute<CompoEntry, Integer> finalPosition;
public static volatile SingularAttribute<CompoEntry, CompoEntryFile> currentFile;
public static volatile ListAttribute<CompoEntry, Vote> votes;
public static volatile ListAttribute<CompoEntry, CompoEntryFile> files;
public static volatile ListAttribute<CompoEntry, CompoEntryParticipant> participants;
public static volatile SingularAttribute<CompoEntry, EventUser> creator;
}
package fi.insomnia.bortal.model;
import java.util.Calendar;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.847+0300")
@StaticMetamodel(Compo.class)
public class Compo_ extends GenericEntity_ {
public static volatile SingularAttribute<Compo, String> name;
public static volatile SingularAttribute<Compo, LanEvent> event;
public static volatile SingularAttribute<Compo, Calendar> startTime;
public static volatile SingularAttribute<Compo, Calendar> endTime;
public static volatile SingularAttribute<Compo, Calendar> voteStart;
public static volatile SingularAttribute<Compo, Calendar> voteEnd;
public static volatile SingularAttribute<Compo, Calendar> submitStart;
public static volatile SingularAttribute<Compo, Calendar> submitEnd;
public static volatile SingularAttribute<Compo, String> description;
public static volatile SingularAttribute<Compo, Integer> maxParticipantCount;
public static volatile SingularAttribute<Compo, Boolean> holdVoting;
public static volatile ListAttribute<Compo, CompoEntry> compoEntries;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.868+0300")
@StaticMetamodel(DiscountInstance.class)
public class DiscountInstance_ extends GenericEntity_ {
public static volatile SingularAttribute<DiscountInstance, AccountEvent> accountEvent;
public static volatile SingularAttribute<DiscountInstance, Discount> discount;
}
package fi.insomnia.bortal.model;
import java.math.BigDecimal;
import java.util.Calendar;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.864+0300")
@StaticMetamodel(Discount.class)
public class Discount_ extends GenericEntity_ {
public static volatile SingularAttribute<Discount, LanEvent> event;
public static volatile SingularAttribute<Discount, BigDecimal> percentage;
public static volatile SingularAttribute<Discount, String> code;
public static volatile SingularAttribute<Discount, Calendar> validFrom;
public static volatile SingularAttribute<Discount, Calendar> validTo;
public static volatile SingularAttribute<Discount, String> details;
public static volatile SingularAttribute<Discount, String> shortdesc;
public static volatile SingularAttribute<Discount, BigDecimal> amountMin;
public static volatile SingularAttribute<Discount, BigDecimal> amountMax;
public static volatile SingularAttribute<Discount, Boolean> active;
public static volatile SingularAttribute<Discount, BigDecimal> maxNum;
public static volatile SingularAttribute<Discount, BigDecimal> perUser;
public static volatile SingularAttribute<Discount, BigDecimal> totalCount;
public static volatile ListAttribute<Discount, DiscountInstance> discountInstances;
public static volatile SingularAttribute<Discount, Role> role;
public static volatile ListAttribute<Discount, Product> products;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.872+0300")
@StaticMetamodel(EntityEquals.class)
public class EntityEquals_ {
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.875+0300")
@StaticMetamodel(EventMap.class)
public class EventMap_ extends GenericEntity_ {
public static volatile SingularAttribute<EventMap, LanEvent> event;
public static volatile SingularAttribute<EventMap, byte[]> mapData;
public static volatile SingularAttribute<EventMap, String> name;
public static volatile ListAttribute<EventMap, Place> places;
public static volatile ListAttribute<EventMap, Reader> readers;
public static volatile SingularAttribute<EventMap, Boolean> active;
public static volatile SingularAttribute<EventMap, String> notes;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.880+0300")
@StaticMetamodel(EventOrganiser.class)
public class EventOrganiser_ extends GenericEntity_ {
public static volatile SingularAttribute<EventOrganiser, String> organisation;
public static volatile SingularAttribute<EventOrganiser, String> bundleCountry;
public static volatile ListAttribute<EventOrganiser, LanEvent> events;
public static volatile SingularAttribute<EventOrganiser, String> billAddress1;
public static volatile SingularAttribute<EventOrganiser, String> billAddress2;
public static volatile SingularAttribute<EventOrganiser, String> billAddress3;
public static volatile SingularAttribute<EventOrganiser, String> billAddress4;
public static volatile SingularAttribute<EventOrganiser, String> bankNumber1;
public static volatile SingularAttribute<EventOrganiser, String> bankNumber2;
public static volatile SingularAttribute<EventOrganiser, String> bankName1;
public static volatile SingularAttribute<EventOrganiser, String> bankName2;
}
package fi.insomnia.bortal.model;
import java.util.Date;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.885+0300")
@StaticMetamodel(EventUser.class)
public class EventUser_ extends GenericEntity_ {
public static volatile SingularAttribute<EventUser, User> user;
public static volatile SingularAttribute<EventUser, LanEvent> event;
public static volatile ListAttribute<EventUser, Vote> votes;
public static volatile ListAttribute<EventUser, UserNote> notes;
public static volatile ListAttribute<EventUser, Role> roles;
public static volatile ListAttribute<EventUser, CompoEntryParticipant> compoEntryParticipants;
public static volatile ListAttribute<EventUser, CompoEntry> compoEntries;
public static volatile ListAttribute<EventUser, PlaceGroup> placeGroups;
public static volatile ListAttribute<EventUser, GroupMembership> groupMemberships;
public static volatile ListAttribute<EventUser, Place> currentPlaces;
public static volatile ListAttribute<EventUser, PrintedCard> printedCards;
public static volatile ListAttribute<EventUser, AccountEvent> accountEvents;
public static volatile ListAttribute<EventUser, Bill> bills;
public static volatile ListAttribute<EventUser, AccountEvent> soldItems;
public static volatile ListAttribute<EventUser, PollAnswer> pollAnswers;
public static volatile SingularAttribute<EventUser, EventUser> creator;
public static volatile SingularAttribute<EventUser, Date> eventuserCreated;
}
package fi.insomnia.bortal.model;
import java.util.Calendar;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-11-01T13:46:40.118+0200")
@StaticMetamodel(Feedback.class)
public class Feedback_ extends GenericEntity_ {
public static volatile SingularAttribute<Feedback, EventUser> sender;
public static volatile SingularAttribute<Feedback, LanEvent> event;
public static volatile SingularAttribute<Feedback, Calendar> timestamp;
public static volatile SingularAttribute<Feedback, String> message;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-11-01T13:46:29.082+0200")
@StaticMetamodel(FoodWaveTemplate.class)
public class FoodWaveTemplate_ extends GenericEntity_ {
public static volatile SingularAttribute<FoodWaveTemplate, LanEvent> event;
public static volatile SingularAttribute<FoodWaveTemplate, String> name;
public static volatile SingularAttribute<FoodWaveTemplate, String> description;
public static volatile ListAttribute<FoodWaveTemplate, Product> products;
public static volatile ListAttribute<FoodWaveTemplate, FoodWave> foodwaves;
public static volatile SingularAttribute<FoodWaveTemplate, Integer> maximumFoods;
}
package fi.insomnia.bortal.model;
import java.util.Date;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-11-18T00:45:52.230+0200")
@StaticMetamodel(FoodWave.class)
public class FoodWave_ extends GenericEntity_ {
public static volatile SingularAttribute<FoodWave, String> name;
public static volatile SingularAttribute<FoodWave, String> description;
public static volatile SingularAttribute<FoodWave, Date> time;
public static volatile SingularAttribute<FoodWave, Integer> maximumFoods;
public static volatile SingularAttribute<FoodWave, Boolean> closed;
public static volatile ListAttribute<FoodWave, AccountEvent> accountEvents;
public static volatile ListAttribute<FoodWave, BillLine> billLines;
public static volatile SingularAttribute<FoodWave, FoodWaveTemplate> template;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.897+0300")
@StaticMetamodel(GenericEntity.class)
public class GenericEntity_ extends EntityEquals_ {
public static volatile SingularAttribute<GenericEntity, Integer> id;
}
package fi.insomnia.bortal.model;
import java.util.Calendar;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.901+0300")
@StaticMetamodel(GroupMembership.class)
public class GroupMembership_ extends GenericEntity_ {
public static volatile SingularAttribute<GroupMembership, String> inviteToken;
public static volatile SingularAttribute<GroupMembership, Calendar> inviteAccepted;
public static volatile SingularAttribute<GroupMembership, String> inviteEmail;
public static volatile SingularAttribute<GroupMembership, String> inviteName;
public static volatile SingularAttribute<GroupMembership, PlaceGroup> placeGroup;
public static volatile SingularAttribute<GroupMembership, Place> placeReservation;
public static volatile SingularAttribute<GroupMembership, EventUser> user;
public static volatile SingularAttribute<GroupMembership, Calendar> enteredEvent;
}
package fi.insomnia.bortal.model;
import java.math.BigDecimal;
import java.util.Date;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-11-18T00:45:52.284+0200")
@StaticMetamodel(InventoryEvent.class)
public class InventoryEvent_ extends GenericEntity_ {
public static volatile SingularAttribute<InventoryEvent, Date> created;
public static volatile SingularAttribute<InventoryEvent, User> user;
public static volatile SingularAttribute<InventoryEvent, Product> product;
public static volatile SingularAttribute<InventoryEvent, String> info;
public static volatile SingularAttribute<InventoryEvent, BigDecimal> quantity;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.910+0300")
@StaticMetamodel(LanEventDomain.class)
public class LanEventDomain_ extends GenericEntity_ {
public static volatile SingularAttribute<LanEventDomain, String> domain;
public static volatile SingularAttribute<LanEventDomain, String> description;
public static volatile SingularAttribute<LanEventDomain, LanEvent> event;
public static volatile SingularAttribute<LanEventDomain, Integer> overridePriority;
}
package fi.insomnia.bortal.model;
import java.math.BigDecimal;
import java.util.Date;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.914+0300")
@StaticMetamodel(LanEventPrivateProperty.class)
public class LanEventPrivateProperty_ extends GenericEntity_ {
public static volatile SingularAttribute<LanEventPrivateProperty, EventOrganiser> eventorg;
public static volatile SingularAttribute<LanEventPrivateProperty, LanEvent> event;
public static volatile SingularAttribute<LanEventPrivateProperty, LanEventPrivatePropertyKey> key;
public static volatile SingularAttribute<LanEventPrivateProperty, String> description;
public static volatile SingularAttribute<LanEventPrivateProperty, Boolean> booleanValue;
public static volatile SingularAttribute<LanEventPrivateProperty, String> textvalue;
public static volatile SingularAttribute<LanEventPrivateProperty, BigDecimal> decimalValue;
public static volatile SingularAttribute<LanEventPrivateProperty, Long> longValue;
public static volatile SingularAttribute<LanEventPrivateProperty, String> byteMime;
public static volatile SingularAttribute<LanEventPrivateProperty, byte[]> byteValue;
public static volatile SingularAttribute<LanEventPrivateProperty, Date> dateValue;
}
package fi.insomnia.bortal.model;
import java.math.BigDecimal;
import java.util.Date;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.918+0300")
@StaticMetamodel(LanEventProperty.class)
public class LanEventProperty_ extends GenericEntity_ {
public static volatile SingularAttribute<LanEventProperty, EventOrganiser> eventorg;
public static volatile SingularAttribute<LanEventProperty, LanEvent> event;
public static volatile SingularAttribute<LanEventProperty, LanEventPropertyKey> key;
public static volatile SingularAttribute<LanEventProperty, String> description;
public static volatile SingularAttribute<LanEventProperty, Boolean> booleanValue;
public static volatile SingularAttribute<LanEventProperty, String> textvalue;
public static volatile SingularAttribute<LanEventProperty, BigDecimal> decimalValue;
public static volatile SingularAttribute<LanEventProperty, Long> longValue;
public static volatile SingularAttribute<LanEventProperty, String> byteMime;
public static volatile SingularAttribute<LanEventProperty, byte[]> byteValue;
public static volatile SingularAttribute<LanEventProperty, Date> dateValue;
}
package fi.insomnia.bortal.model;
import fi.insomnia.bortal.enums.EventStatus;
import fi.insomnia.bortal.model.salespoint.Salespoint;
import java.util.Calendar;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.905+0300")
@StaticMetamodel(LanEvent.class)
public class LanEvent_ extends GenericEntity_ {
public static volatile SingularAttribute<LanEvent, Calendar> startTime;
public static volatile SingularAttribute<LanEvent, Calendar> endTime;
public static volatile SingularAttribute<LanEvent, String> name;
public static volatile SingularAttribute<LanEvent, Boolean> eventEnabled;
public static volatile SingularAttribute<LanEvent, Integer> referenceNumberBase;
public static volatile SingularAttribute<LanEvent, Integer> nextBillNumber;
public static volatile SingularAttribute<LanEvent, EventOrganiser> organiser;
public static volatile SingularAttribute<LanEvent, EventStatus> status;
public static volatile ListAttribute<LanEvent, LogEntry> logEntries;
public static volatile SingularAttribute<LanEvent, Role> defaultRole;
public static volatile ListAttribute<LanEvent, Compo> compos;
public static volatile ListAttribute<LanEvent, CardTemplate> cardTemplates;
public static volatile ListAttribute<LanEvent, EventMap> eventMaps;
public static volatile ListAttribute<LanEvent, Role> roles;
public static volatile ListAttribute<LanEvent, Bill> bills;
public static volatile ListAttribute<LanEvent, Reader> readers;
public static volatile ListAttribute<LanEvent, Poll> polls;
public static volatile ListAttribute<LanEvent, Salespoint> salespoints;
public static volatile ListAttribute<LanEvent, LanEventDomain> domains;
public static volatile ListAttribute<LanEvent, LanEventProperty> properties;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.923+0300")
@StaticMetamodel(Location.class)
public class Location_ extends GenericEntity_ {
public static volatile SingularAttribute<Location, LanEvent> event;
public static volatile SingularAttribute<Location, String> name;
public static volatile ListAttribute<Location, Reader> readers;
public static volatile ListAttribute<Location, PrintedCard> printedCardsAtLocation;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.930+0300")
@StaticMetamodel(LogEntryType.class)
public class LogEntryType_ extends GenericEntity_ {
public static volatile SingularAttribute<LogEntryType, String> name;
public static volatile SingularAttribute<LogEntryType, String> description;
public static volatile ListAttribute<LogEntryType, LogEntry> logEntries;
public static volatile SingularAttribute<LogEntryType, Integer> logLevel;
}
package fi.insomnia.bortal.model;
import java.util.Calendar;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.927+0300")
@StaticMetamodel(LogEntry.class)
public class LogEntry_ extends GenericEntity_ {
public static volatile SingularAttribute<LogEntry, LanEvent> parentEvent;
public static volatile SingularAttribute<LogEntry, Calendar> time;
public static volatile SingularAttribute<LogEntry, String> description;
public static volatile SingularAttribute<LogEntry, LogEntryType> type;
public static volatile SingularAttribute<LogEntry, User> user;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-25T01:54:09.095+0300")
@StaticMetamodel(MenuNavigation.class)
public class MenuNavigation_ extends GenericEntity_ {
public static volatile SingularAttribute<MenuNavigation, LanEvent> event;
public static volatile SingularAttribute<MenuNavigation, String> key;
public static volatile SingularAttribute<MenuNavigation, String> header;
public static volatile SingularAttribute<MenuNavigation, String> footer;
public static volatile SingularAttribute<MenuNavigation, Integer> sort;
public static volatile SingularAttribute<MenuNavigation, Boolean> visible;
public static volatile SingularAttribute<MenuNavigation, Menuitem> item;
public static volatile SingularAttribute<MenuNavigation, SitePage> sitepage;
public static volatile SingularAttribute<MenuNavigation, MenuNavigation> parent;
public static volatile ListAttribute<MenuNavigation, MenuNavigation> children;
public static volatile SingularAttribute<MenuNavigation, String> application;
public static volatile SingularAttribute<MenuNavigation, String> permission;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.934+0300")
@StaticMetamodel(Menuitem.class)
public class Menuitem_ extends GenericEntity_ {
public static volatile SingularAttribute<Menuitem, String> url;
public static volatile SingularAttribute<Menuitem, String> description;
public static volatile ListAttribute<Menuitem, MenuNavigation> navigations;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.947+0300")
@StaticMetamodel(NewsGroup.class)
public class NewsGroup_ extends GenericEntity_ {
public static volatile SingularAttribute<NewsGroup, LanEvent> event;
public static volatile SingularAttribute<NewsGroup, String> name;
public static volatile SingularAttribute<NewsGroup, String> description;
public static volatile SingularAttribute<NewsGroup, Integer> priority;
public static volatile SingularAttribute<NewsGroup, Role> writerRole;
public static volatile ListAttribute<NewsGroup, News> news;
public static volatile ListAttribute<NewsGroup, Role> readerRoles;
}
package fi.insomnia.bortal.model;
import java.util.Date;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.943+0300")
@StaticMetamodel(News.class)
public class News_ extends GenericEntity_ {
public static volatile SingularAttribute<News, String> title;
public static volatile SingularAttribute<News, String> body;
public static volatile SingularAttribute<News, String> bodyAbstract;
public static volatile SingularAttribute<News, Date> publish;
public static volatile SingularAttribute<News, Date> expire;
public static volatile SingularAttribute<News, EventUser> creator;
public static volatile SingularAttribute<News, Integer> priority;
public static volatile SingularAttribute<News, NewsGroup> group;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.952+0300")
@StaticMetamodel(OrgRole.class)
public class OrgRole_ extends GenericEntity_ {
public static volatile SingularAttribute<OrgRole, String> name;
public static volatile ListAttribute<OrgRole, User> users;
public static volatile ListAttribute<OrgRole, OrgRole> parents;
public static volatile ListAttribute<OrgRole, OrgRole> children;
public static volatile SingularAttribute<OrgRole, EventOrganiser> eventOrganisation;
public static volatile SingularAttribute<OrgRole, Boolean> manageOrganisation;
public static volatile ListAttribute<OrgRole, Role> eventRoles;
}
package fi.insomnia.bortal.model;
import java.util.Date;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.956+0300")
@StaticMetamodel(PageContent.class)
public class PageContent_ extends GenericEntity_ {
public static volatile SingularAttribute<PageContent, SitePage> sitepage;
public static volatile SingularAttribute<PageContent, Integer> sort;
public static volatile SingularAttribute<PageContent, String> content;
public static volatile SingularAttribute<PageContent, Date> publish;
public static volatile SingularAttribute<PageContent, Date> expire;
}
package fi.insomnia.bortal.model;
import java.util.Calendar;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.964+0300")
@StaticMetamodel(PlaceGroup.class)
public class PlaceGroup_ extends GenericEntity_ {
public static volatile SingularAttribute<PlaceGroup, Calendar> created;
public static volatile SingularAttribute<PlaceGroup, LanEvent> event;
public static volatile SingularAttribute<PlaceGroup, Calendar> edited;
public static volatile SingularAttribute<PlaceGroup, String> code;
public static volatile SingularAttribute<PlaceGroup, String> name;
public static volatile SingularAttribute<PlaceGroup, Boolean> active;
public static volatile SingularAttribute<PlaceGroup, String> details;
public static volatile SingularAttribute<PlaceGroup, EventUser> creator;
public static volatile ListAttribute<PlaceGroup, GroupMembership> members;
public static volatile ListAttribute<PlaceGroup, Place> places;
}
package fi.insomnia.bortal.model;
import java.util.Calendar;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.960+0300")
@StaticMetamodel(Place.class)
public class Place_ extends GenericEntity_ {
public static volatile SingularAttribute<Place, String> description;
public static volatile SingularAttribute<Place, String> name;
public static volatile SingularAttribute<Place, Integer> mapX;
public static volatile SingularAttribute<Place, Integer> mapY;
public static volatile SingularAttribute<Place, Integer> width;
public static volatile SingularAttribute<Place, Integer> height;
public static volatile SingularAttribute<Place, Calendar> releaseTime;
public static volatile SingularAttribute<Place, String> details;
public static volatile SingularAttribute<Place, String> code;
public static volatile SingularAttribute<Place, GroupMembership> placeReserver;
public static volatile SingularAttribute<Place, Boolean> buyable;
public static volatile SingularAttribute<Place, Boolean> disabled;
public static volatile SingularAttribute<Place, PlaceGroup> group;
public static volatile SingularAttribute<Place, Role> providesRole;
public static volatile SingularAttribute<Place, EventMap> map;
public static volatile SingularAttribute<Place, Product> product;
public static volatile SingularAttribute<Place, EventUser> currentUser;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.973+0300")
@StaticMetamodel(PollAnswer.class)
public class PollAnswer_ extends GenericEntity_ {
public static volatile SingularAttribute<PollAnswer, String> answerText;
public static volatile SingularAttribute<PollAnswer, Boolean> answerBoolean;
public static volatile SingularAttribute<PollAnswer, PossibleAnswer> choice;
public static volatile SingularAttribute<PollAnswer, EventUser> user;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.976+0300")
@StaticMetamodel(PollQuestion.class)
public class PollQuestion_ extends GenericEntity_ {
public static volatile SingularAttribute<PollQuestion, Integer> characters;
public static volatile SingularAttribute<PollQuestion, Poll> poll;
public static volatile ListAttribute<PollQuestion, PossibleAnswer> answers;
public static volatile SingularAttribute<PollQuestion, String> question;
public static volatile SingularAttribute<PollQuestion, Integer> choices;
public static volatile SingularAttribute<PollQuestion, Integer> sort;
public static volatile SingularAttribute<PollQuestion, Integer> page;
}
package fi.insomnia.bortal.model;
import java.util.Date;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.968+0300")
@StaticMetamodel(Poll.class)
public class Poll_ extends GenericEntity_ {
public static volatile SingularAttribute<Poll, LanEvent> event;
public static volatile SingularAttribute<Poll, Date> begin;
public static volatile SingularAttribute<Poll, Date> end;
public static volatile SingularAttribute<Poll, String> name;
public static volatile SingularAttribute<Poll, String> description;
public static volatile ListAttribute<Poll, PollQuestion> questions;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.980+0300")
@StaticMetamodel(PossibleAnswer.class)
public class PossibleAnswer_ extends GenericEntity_ {
public static volatile SingularAttribute<PossibleAnswer, String> answer;
public static volatile SingularAttribute<PossibleAnswer, Integer> sort;
public static volatile SingularAttribute<PossibleAnswer, Boolean> textanswer;
public static volatile SingularAttribute<PossibleAnswer, String> description;
public static volatile SingularAttribute<PossibleAnswer, PollQuestion> question;
public static volatile ListAttribute<PossibleAnswer, PollAnswer> answers;
}
package fi.insomnia.bortal.model;
import java.util.Calendar;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.985+0300")
@StaticMetamodel(PrintedCard.class)
public class PrintedCard_ extends GenericEntity_ {
public static volatile SingularAttribute<PrintedCard, LanEvent> event;
public static volatile SingularAttribute<PrintedCard, Calendar> printTime;
public static volatile SingularAttribute<PrintedCard, String> barcode;
public static volatile SingularAttribute<PrintedCard, Boolean> enabled;
public static volatile SingularAttribute<PrintedCard, String> rfidUid;
public static volatile ListAttribute<PrintedCard, ReaderEvent> readerEvents;
public static volatile SingularAttribute<PrintedCard, Integer> printCount;
public static volatile SingularAttribute<PrintedCard, Location> currentLocation;
public static volatile SingularAttribute<PrintedCard, EventUser> user;
public static volatile SingularAttribute<PrintedCard, CardTemplate> template;
}
package fi.insomnia.bortal.model;
import java.math.BigDecimal;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.995+0300")
@StaticMetamodel(ProductLimitation.class)
public class ProductLimitation_ extends GenericEntity_ {
public static volatile SingularAttribute<ProductLimitation, ProductLimitationType> type;
public static volatile SingularAttribute<ProductLimitation, Boolean> last;
public static volatile SingularAttribute<ProductLimitation, String> name;
public static volatile SingularAttribute<ProductLimitation, String> description;
public static volatile SingularAttribute<ProductLimitation, Integer> sort;
public static volatile ListAttribute<ProductLimitation, Product> products;
public static volatile SingularAttribute<ProductLimitation, BigDecimal> upperLimit;
public static volatile SingularAttribute<ProductLimitation, BigDecimal> lowerLimit;
public static volatile ListAttribute<ProductLimitation, Role> matchingRoles;
}
package fi.insomnia.bortal.model;
import java.math.BigDecimal;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SetAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-11-18T00:45:52.346+0200")
@StaticMetamodel(Product.class)
public class Product_ extends GenericEntity_ {
public static volatile SingularAttribute<Product, LanEvent> event;
public static volatile SingularAttribute<Product, String> color;
public static volatile SingularAttribute<Product, String> name;
public static volatile SingularAttribute<Product, String> description;
public static volatile SingularAttribute<Product, BigDecimal> price;
public static volatile SingularAttribute<Product, BigDecimal> buyInPrice;
public static volatile SingularAttribute<Product, Integer> sort;
public static volatile SingularAttribute<Product, String> barcode;
public static volatile SetAttribute<Product, ProductFlag> productFlags;
public static volatile SingularAttribute<Product, Role> provides;
public static volatile ListAttribute<Product, Place> places;
public static volatile ListAttribute<Product, ProductLimitation> productLimits;
public static volatile ListAttribute<Product, AccountEvent> accountEvents;
public static volatile ListAttribute<Product, InventoryEvent> inventoryEvents;
public static volatile ListAttribute<Product, Discount> discounts;
public static volatile SingularAttribute<Product, BigDecimal> vat;
public static volatile SingularAttribute<Product, String> unitName;
public static volatile ListAttribute<Product, FoodWaveTemplate> foodWaveTemplates;
}
package fi.insomnia.bortal.model;
import java.util.Date;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-11-01T13:46:40.201+0200")
@StaticMetamodel(ReaderEvent.class)
public class ReaderEvent_ extends GenericEntity_ {
public static volatile SingularAttribute<ReaderEvent, Date> time;
public static volatile SingularAttribute<ReaderEvent, Date> updatetime;
public static volatile SingularAttribute<ReaderEvent, String> value;
public static volatile SingularAttribute<ReaderEvent, String> notes;
public static volatile SingularAttribute<ReaderEvent, Integer> gamePoint;
public static volatile SingularAttribute<ReaderEvent, PrintedCard> printedCard;
public static volatile SingularAttribute<ReaderEvent, Reader> reader;
}
package fi.insomnia.bortal.model;
import fi.insomnia.bortal.model.salespoint.SalesEntity;
import java.math.BigDecimal;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:46.999+0300")
@StaticMetamodel(Reader.class)
public class Reader_ extends GenericEntity_ {
public static volatile SingularAttribute<Reader, ReaderType> type;
public static volatile SingularAttribute<Reader, LanEvent> event;
public static volatile SingularAttribute<Reader, Integer> gamepoints;
public static volatile SingularAttribute<Reader, Integer> maxEvents;
public static volatile SingularAttribute<Reader, SalesEntity> salesEntity;
public static volatile SingularAttribute<Reader, Product> automaticProduct;
public static volatile SingularAttribute<Reader, BigDecimal> automaticProductCount;
public static volatile SingularAttribute<Reader, String> identification;
public static volatile SingularAttribute<Reader, String> description;
public static volatile SingularAttribute<Reader, Location> location;
public static volatile SingularAttribute<Reader, EventMap> eventMap;
public static volatile SingularAttribute<Reader, Integer> mapX;
public static volatile SingularAttribute<Reader, Integer> mapY;
public static volatile ListAttribute<Reader, ReaderEvent> events;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:47.008+0300")
@StaticMetamodel(Role.class)
public class Role_ extends GenericEntity_ {
public static volatile SingularAttribute<Role, String> name;
public static volatile ListAttribute<Role, EventUser> users;
public static volatile ListAttribute<Role, Role> children;
public static volatile ListAttribute<Role, Product> productsProvide;
public static volatile ListAttribute<Role, Place> placesProvide;
public static volatile ListAttribute<Role, Role> parents;
public static volatile ListAttribute<Role, ApplicationPermission> permissions;
public static volatile SingularAttribute<Role, CardTemplate> cardTemplate;
public static volatile ListAttribute<Role, Discount> discounts;
public static volatile ListAttribute<Role, NewsGroup> writeNews;
public static volatile ListAttribute<Role, NewsGroup> newsGroups;
public static volatile SingularAttribute<Role, LanEvent> event;
public static volatile ListAttribute<Role, OrgRole> orgRoles;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:47.021+0300")
@StaticMetamodel(SitePage.class)
public class SitePage_ extends GenericEntity_ {
public static volatile SingularAttribute<SitePage, LanEvent> event;
public static volatile SingularAttribute<SitePage, String> name;
public static volatile SingularAttribute<SitePage, SitePage> parent;
public static volatile ListAttribute<SitePage, Role> allowedRoles;
public static volatile ListAttribute<SitePage, SitePage> children;
public static volatile ListAttribute<SitePage, PageContent> contents;
}
package fi.insomnia.bortal.model;
import java.util.Calendar;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:47.031+0300")
@StaticMetamodel(UserImage.class)
public class UserImage_ extends GenericEntity_ {
public static volatile SingularAttribute<UserImage, Calendar> uploaded;
public static volatile SingularAttribute<UserImage, String> name;
public static volatile SingularAttribute<UserImage, String> description;
public static volatile SingularAttribute<UserImage, String> mimeType;
public static volatile SingularAttribute<UserImage, byte[]> imageData;
public static volatile SingularAttribute<UserImage, User> user;
public static volatile SingularAttribute<UserImage, User> defaultImage;
}
package fi.insomnia.bortal.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:47.035+0300")
@StaticMetamodel(UserNote.class)
public class UserNote_ extends GenericEntity_ {
public static volatile SingularAttribute<UserNote, EventUser> user;
public static volatile SingularAttribute<UserNote, String> content;
public static volatile SingularAttribute<UserNote, UserNoteType> notetype;
}
package fi.insomnia.bortal.model;
import fi.insomnia.bortal.enums.Gender;
import java.util.Calendar;
import java.util.Date;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:47.025+0300")
@StaticMetamodel(User.class)
public class User_ extends GenericEntity_ {
public static volatile SingularAttribute<User, Calendar> created;
public static volatile SingularAttribute<User, String> login;
public static volatile SingularAttribute<User, Boolean> active;
public static volatile SingularAttribute<User, String> password;
public static volatile SingularAttribute<User, String> lastname;
public static volatile SingularAttribute<User, String> firstnames;
public static volatile SingularAttribute<User, Date> birthday;
public static volatile SingularAttribute<User, String> nick;
public static volatile SingularAttribute<User, String> email;
public static volatile SingularAttribute<User, String> address;
public static volatile SingularAttribute<User, String> zip;
public static volatile SingularAttribute<User, String> postalTown;
public static volatile SingularAttribute<User, String> town;
public static volatile SingularAttribute<User, String> phone;
public static volatile SingularAttribute<User, UserImage> currentImage;
public static volatile SingularAttribute<User, Gender> gender;
public static volatile SingularAttribute<User, String> confirmHash;
public static volatile SingularAttribute<User, Calendar> confirmTime;
public static volatile SingularAttribute<User, Boolean> superadmin;
public static volatile ListAttribute<User, UserImage> userImageList;
}
package fi.insomnia.bortal.model;
import java.util.Calendar;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:47.039+0300")
@StaticMetamodel(Vote.class)
public class Vote_ extends GenericEntity_ {
public static volatile SingularAttribute<Vote, Integer> score;
public static volatile SingularAttribute<Vote, String> message;
public static volatile SingularAttribute<Vote, Calendar> time;
public static volatile SingularAttribute<Vote, CompoEntry> compoEntry;
public static volatile SingularAttribute<Vote, EventUser> voter;
}
package fi.insomnia.bortal.model.salespoint;
import fi.insomnia.bortal.model.GenericEntity_;
import fi.insomnia.bortal.model.Reader;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:47.012+0300")
@StaticMetamodel(SalesEntity.class)
public class SalesEntity_ extends GenericEntity_ {
public static volatile SingularAttribute<SalesEntity, String> certificate;
public static volatile SingularAttribute<SalesEntity, String> name;
public static volatile SingularAttribute<SalesEntity, String> secret;
public static volatile SingularAttribute<SalesEntity, SalesEntityType> type;
public static volatile SingularAttribute<SalesEntity, Reader> reader;
public static volatile SingularAttribute<SalesEntity, Salespoint> point;
}
package fi.insomnia.bortal.model.salespoint;
import fi.insomnia.bortal.model.GenericEntity_;
import fi.insomnia.bortal.model.LanEvent;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2012-10-24T19:52:47.017+0300")
@StaticMetamodel(Salespoint.class)
public class Salespoint_ extends GenericEntity_ {
public static volatile SingularAttribute<Salespoint, LanEvent> event;
public static volatile SingularAttribute<Salespoint, String> name;
public static volatile SingularAttribute<Salespoint, String> description;
public static volatile ListAttribute<Salespoint, SalesEntity> entities;
}
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:users="http://java.sun.com/jsf/composite/cditools/user" xmlns:tools="http://java.sun.com/jsf/composite/cditools" xmlns:p="http://primefaces.org/ui" xmlns:f="http://java.sun.com/jsf/core">
<h:body>
<f:metadata>
<f:event type="preRenderView" listener="#{placeGroupView.}" />
</f:metadata>
Etunimi;Sukunimi;Nick;Osoite;Kaupunki;Email;Puhelin;Konepaikat<br/>
<ui:repeat var="usr" value="#{userSearchView.eventUserResults}">#{usr.firstnames};#{usr.lastname};#{usr.nick};#{usr.address};#{usr.postalTown};#{usr.email};#{usr.phone};<ui:repeat var="places" value="#{usr.currentPlaces}">#{#places.name},</ui:repeat><br/></ui:repeat>
</h:body>
</html>
\ No newline at end of file
Manifest-Version: 1.0 Manifest-Version: 1.0
Class-Path: MoyaBeansClient.jar Class-Path: lib/commons-imaging-1.0-SNAPSHOT.jar
MoyaUtilities.jar lib/MoyaUtilities.jar
lib/MoyaBeansClient.jar
...@@ -51,14 +51,15 @@ public class ActionLogBean implements ActionLogBeanLocal { ...@@ -51,14 +51,15 @@ public class ActionLogBean implements ActionLogBeanLocal {
} }
alm.setTime(new Date()); alm.setTime(new Date());
alm.setMessage(message); alm.setMessage(message);
alm.setUser(permissionBean.getCurrentUser().getUser()); alm.setUser(permissionBean.getCurrentUser());
alm.setLanEvent(permissionBean.getCurrentUser().getEvent());
actionLogFacade.saveToActionLog(alm); actionLogFacade.saveToActionLog(alm);
} }
@RolesAllowed(ContentPermission.S_MANAGE_ACTIONLOG) @RolesAllowed(ContentPermission.S_MANAGE_ACTIONLOG)
public List<ActionLogMessage> getAllActionLogEvents() { public List<ActionLogMessage> getAllActionLogEvents() {
return actionLogFacade.getAllSortedByTimestamp(); return actionLogFacade.getAllSortedByTimestamp(permissionBean.getCurrentUser().getEvent());
} }
@RolesAllowed(ContentPermission.S_MANAGE_ACTIONLOG) @RolesAllowed(ContentPermission.S_MANAGE_ACTIONLOG)
...@@ -68,11 +69,14 @@ public class ActionLogBean implements ActionLogBeanLocal { ...@@ -68,11 +69,14 @@ public class ActionLogBean implements ActionLogBeanLocal {
@RolesAllowed(ContentPermission.S_MANAGE_ACTIONLOG) @RolesAllowed(ContentPermission.S_MANAGE_ACTIONLOG)
public List<ActionLogMessageResponse> getActionLogMessageResponses(ActionLogMessage alm) { public List<ActionLogMessageResponse> getActionLogMessageResponses(ActionLogMessage alm) {
if(!alm.getLanEvent().equals(permissionBean.getCurrentUser().getEvent())) return null;
return actionLogFacade.getActionLogMessageResponses(alm); return actionLogFacade.getActionLogMessageResponses(alm);
} }
@RolesAllowed(ContentPermission.S_MANAGE_ACTIONLOG) @RolesAllowed(ContentPermission.S_MANAGE_ACTIONLOG)
public void addActionLogMessageResponse(ActionLogMessage alm, String message, ActionLogMessageState state) { public void addActionLogMessageResponse(ActionLogMessage alm, String message, ActionLogMessageState state) {
if(!alm.getLanEvent().equals(permissionBean.getCurrentUser().getEvent())) return;
if (alm.getState() != state && state != null) { if (alm.getState() != state && state != null) {
alm = actionLogFacade.merge(alm); alm = actionLogFacade.merge(alm);
alm.setState(state); alm.setState(state);
...@@ -90,7 +94,8 @@ public class ActionLogBean implements ActionLogBeanLocal { ...@@ -90,7 +94,8 @@ public class ActionLogBean implements ActionLogBeanLocal {
@Override @Override
@RolesAllowed(ContentPermission.S_MANAGE_ACTIONLOG) @RolesAllowed(ContentPermission.S_MANAGE_ACTIONLOG)
public ActionLogMessage find(Integer id) { public ActionLogMessage find(Integer id) {
return actionLogFacade.find(id); ActionLogMessage alm = actionLogFacade.find(id);
if(!alm.getLanEvent().equals(permissionBean.getCurrentUser().getEvent())) return null;
else return alm;
} }
} }
...@@ -79,7 +79,7 @@ public class BarcodeBean implements BarcodeBeanLocal { ...@@ -79,7 +79,7 @@ public class BarcodeBean implements BarcodeBeanLocal {
// it's our special front barcode // it's our special front barcode
try { try {
if (barcode.startsWith(PRINTED_CARD_PREFIX)) { if (barcode.startsWith(PRINTED_CARD_PREFIX)) {
int id = Integer.parseInt(barcode.substring(3)); int id = Integer.parseInt(barcode.substring(3, barcode.length()-1));
PrintedCard card = printedCardFacade.find(id); PrintedCard card = printedCardFacade.find(id);
if(card != null) if(card != null)
...@@ -95,10 +95,12 @@ public class BarcodeBean implements BarcodeBeanLocal { ...@@ -95,10 +95,12 @@ public class BarcodeBean implements BarcodeBeanLocal {
if(barcode == null || barcode.isEmpty()) if(barcode == null || barcode.isEmpty())
return null; return null;
// it's our special front barcode
try { try {
// it's our special front barcode
if (barcode.startsWith(EVENTUSER_PREFIX)) { if (barcode.startsWith(EVENTUSER_PREFIX)) {
int id = Integer.parseInt(barcode.substring(3)); int id = Integer.parseInt(barcode.substring(3, barcode.length()-1 ));
logger.debug("finding user with barcode {} and id {}", barcode, id);
EventUser user = userBean.findByEventUserId(id); EventUser user = userBean.findByEventUserId(id);
return user; return user;
......
package fi.codecrew.moya.beans; package fi.codecrew.moya.beans;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator;
import java.util.List; import java.util.List;
import javax.ejb.EJB; import javax.ejb.EJB;
import javax.ejb.LocalBean; import javax.ejb.LocalBean;
import javax.ejb.Stateless; import javax.ejb.Stateless;
import javax.imageio.IIOImage;
import javax.imageio.ImageIO; import javax.imageio.ImageIO;
import javax.imageio.ImageTypeSpecifier;
import javax.imageio.ImageWriteParam;
import javax.imageio.ImageWriter;
import javax.imageio.metadata.IIOInvalidTreeException;
import javax.imageio.metadata.IIOMetadata;
import javax.imageio.metadata.IIOMetadataNode;
import javax.imageio.stream.ImageOutputStream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.pdfjet.CoreFont; import com.pdfjet.CoreFont;
import com.pdfjet.Image; import com.pdfjet.Image;
...@@ -26,6 +40,7 @@ import fi.codecrew.moya.model.CardTemplate; ...@@ -26,6 +40,7 @@ import fi.codecrew.moya.model.CardTemplate;
import fi.codecrew.moya.model.EventUser; import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.PrintedCard; import fi.codecrew.moya.model.PrintedCard;
import fi.codecrew.moya.util.MassPrintResult; import fi.codecrew.moya.util.MassPrintResult;
import fi.codecrew.moya.utilities.BarcodeUtils;
/** /**
* Session Bean implementation class CardPrintBean * Session Bean implementation class CardPrintBean
...@@ -46,6 +61,7 @@ public class CardPrintBean implements CardPrintBeanLocal { ...@@ -46,6 +61,7 @@ public class CardPrintBean implements CardPrintBeanLocal {
private UserFacade userfacade; private UserFacade userfacade;
@EJB @EJB
private BarcodeBean barcodeBean; private BarcodeBean barcodeBean;
private static final Logger logger = LoggerFactory.getLogger(CardPrintBean.class);
/** /**
* Default constructor. * Default constructor.
...@@ -208,6 +224,94 @@ public class CardPrintBean implements CardPrintBeanLocal { ...@@ -208,6 +224,94 @@ public class CardPrintBean implements CardPrintBeanLocal {
return mpr; return mpr;
} }
@Override
public byte[] constructPNG(EventUser user) throws Exception {
PrintedCard card = cardTemplateBean.checkPrintedCard(user);
logger.info("Printing card {}", card);
BufferedImage face = ImageIO.read(new ByteArrayInputStream(user.getUser().getCurrentImage().getImageData()));
BufferedImage base = ImageIO.read(new ByteArrayInputStream(card.getTemplate().getImage()));
BufferedImage outimage = new BufferedImage(base.getWidth(), base.getHeight(), BufferedImage.TYPE_INT_RGB);
Graphics2D g = outimage.createGraphics();
// g.drawImage(org, AffineTransform.getScaleInstance(0.31, 0.31), null);
g.drawImage(base, 0, 0, base.getWidth(), base.getHeight(), null);
// g.drawImage(face, AffineTransform.getScaleInstance(0.31, 0.31),
// null);
g.drawImage(face, 60, 300, 320, 400, null);
g.setFont(new Font("Century gothic", Font.PLAIN, 70));
// g.drawString(nick, 595 -
// g.getFontMetrics().charsWidth(nick.toCharArray(), 0, nick.length()),
// 840);
g.drawString(user.getUser().getNick(), 50, 810);
g.setFont(new Font("Century gothic", Font.BOLD, 45));
StringBuilder wholeName = new StringBuilder();
wholeName.append(user.getUser().getFirstnames()).append(" ").append(user.getUser().getLastname());
// g.setFont(new Font("Arial", Font.BOLD, 35));
// g.drawString(name, 595 -
// g.getFontMetrics().charsWidth(name.toCharArray(), 0, name.length()),
// 890);
//
// g.drawString(owner.getId().toString(), 60, 948);
g.drawString(wholeName.toString(), 60, 865);
g.drawString(card.getTemplate().getName(), 60, 915);
String barcodeString = String.valueOf(user.getUser().getCreated().getTime().getTime());
barcodeString = barcodeString.substring(barcodeString.length() - 12);
BufferedImage image = ImageIO.read(BarcodeUtils.getBarcodeEAN(barcodeString));
g.drawImage(image, 0, base.getHeight() - 120, base.getWidth(), 120, null);
g.dispose();
ByteArrayOutputStream ostr = new ByteArrayOutputStream();
for (Iterator<ImageWriter> pngWriter = ImageIO.getImageWritersByFormatName("png"); pngWriter.hasNext();)
{
ImageWriter writer = pngWriter.next();
logger.info("Trying to write with writer {}", writer);
ImageWriteParam writeParam = writer.getDefaultWriteParam();
ImageTypeSpecifier typeSpecifier = ImageTypeSpecifier.createFromBufferedImageType(BufferedImage.TYPE_INT_RGB);
IIOMetadata metadata = writer.getDefaultImageMetadata(typeSpecifier, writeParam);
if (metadata.isReadOnly() || !metadata.isStandardMetadataFormatSupported()) {
continue;
}
setDPI(metadata);
final ImageOutputStream stream = ImageIO.createImageOutputStream(ostr);
try {
writer.setOutput(stream);
writer.write(metadata, new IIOImage(outimage, null, metadata), writeParam);
} finally {
stream.close();
}
break;
}
// ImageIO.write(outimage, "png", ostr);
byte[] ret = ostr.toByteArray();
logger.info("Returning {} bytes for pngimage", ret.length);
// double meter2inchRatio = 1d / 0.0254d;
// int dpi = 300;
// int dim = (int) (dpi * meter2inchRatio) + 1;
return ret;
}
private ByteArrayInputStream convertBufferedImageToPng(BufferedImage img) private ByteArrayInputStream convertBufferedImageToPng(BufferedImage img)
throws IOException { throws IOException {
ByteArrayOutputStream outStream = new ByteArrayOutputStream(); ByteArrayOutputStream outStream = new ByteArrayOutputStream();
...@@ -216,4 +320,25 @@ public class CardPrintBean implements CardPrintBeanLocal { ...@@ -216,4 +320,25 @@ public class CardPrintBean implements CardPrintBeanLocal {
return new ByteArrayInputStream(outStream.toByteArray()); return new ByteArrayInputStream(outStream.toByteArray());
} }
private static void setDPI(IIOMetadata metadata) throws IIOInvalidTreeException {
// for PMG, it's dots per millimeter
double dotsPerMilli = 1.0 * 300 / 10 / 2.54;
IIOMetadataNode horiz = new IIOMetadataNode("HorizontalPixelSize");
horiz.setAttribute("value", Double.toString(dotsPerMilli));
IIOMetadataNode vert = new IIOMetadataNode("VerticalPixelSize");
vert.setAttribute("value", Double.toString(dotsPerMilli));
IIOMetadataNode dim = new IIOMetadataNode("Dimension");
dim.appendChild(horiz);
dim.appendChild(vert);
IIOMetadataNode root = new IIOMetadataNode("javax_imageio_1.0");
root.appendChild(dim);
metadata.mergeTree("javax_imageio_1.0", root);
}
} }
package fi.codecrew.moya.beans;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import fi.codecrew.moya.facade.NewsGroupFacade;
import fi.codecrew.moya.beans.EventBeanLocal;
import fi.codecrew.moya.beans.GameBeanLocal;
/**
* Session Bean implementation class GameBean
*/
@Stateless
public class GameBean implements GameBeanLocal {
@EJB
private EventBeanLocal eventbean;
@EJB
private NewsGroupFacade ngfacade;
/**
* Default constructor.
*/
public GameBean() {
// TODO Auto-generated constructor stub
}
}
...@@ -120,6 +120,8 @@ public class JaasBean implements MoyaRealmBeanRemote { ...@@ -120,6 +120,8 @@ public class JaasBean implements MoyaRealmBeanRemote {
} }
if (!usr.getUser().isAnonymous()) { if (!usr.getUser().isAnonymous()) {
// all logged in users should be able to logout :)
roleset.add(UserPermission.LOGOUT.name());
roleset.add(SpecialPermission.USER.name()); roleset.add(SpecialPermission.USER.name());
} }
// TODO: EI NÄIN!!!!! Superadmin ei saa kaikkia oikkia!! // TODO: EI NÄIN!!!!! Superadmin ei saa kaikkia oikkia!!
......
package fi.codecrew.moya.beans;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fi.codecrew.moya.facade.LicenseCodeFacade;
import fi.codecrew.moya.facade.LicenseTargetFacade;
import fi.codecrew.moya.facade.UserFacade;
import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.GroupMembership;
import fi.codecrew.moya.model.LanEvent;
import fi.codecrew.moya.model.LicenseCode;
import fi.codecrew.moya.model.LicenseTarget;
import fi.codecrew.moya.model.User;
/**
* Session Bean implementation class GameBean
*/
@Stateless
public class LicenseBean implements LicenseBeanLocal {
@EJB
LicenseCodeFacade licenseCodeFacade;
@EJB
UserFacade userFacade;
@EJB
LicenseTargetFacade licenseTargetFacade;
@EJB
EventBeanLocal eventBean;
@EJB
PlaceBeanLocal placeBean;
private static final Logger logger = LoggerFactory.getLogger(LicenseBean.class);
/**
* Check, and if needed generate code for gamecode.
*
* @param code
*/
private LicenseCode generateCode(LicenseCode code) throws GenerationException {
if (code.getCode() == null || code.getCode().trim().equals("")) {
if (code.getLicenseTarget().getCodeUrl() == null || code.getLicenseTarget().getCodeUrl().trim().equals("")) {
throw new GenerationException("Code generate failed");
}
try {
URL url = new URL(code.getLicenseTarget().getCodeUrl());
URLConnection uc;
uc = url.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream()));
String codeString = "";
String tmpLine;
while ((tmpLine = in.readLine()) != null) {
if (!codeString.equals("")) {
codeString += "\n";
}
codeString += tmpLine;
}
if(codeString.trim().equals("0") || codeString.trim().equals("")) {
throw new GenerationException("Code generate failed");
}
code.setCode(codeString);
code = licenseCodeFacade.merge(code);
return code;
} catch (IOException e) {
logger.warn("Code generate failed", e);
throw new GenerationException("Code generate failed");
}
}
throw new RuntimeException("LOL, what?");
}
public LicenseCode accessCode(LicenseCode code) throws GenerationException {
code = generateCode(code);
if (!code.isAccessed()) {
code.setAccessed(Calendar.getInstance());
code = licenseCodeFacade.merge(code);
}
return code;
}
public List<LicenseTarget> findAll(LanEvent event) {
return event.getGames();
}
public void saveOrCreateLicense(LicenseTarget target) {
if (target.getId() == null) {
target.setEvent(eventBean.getCurrentEvent());
eventBean.getCurrentEvent().getGames().add(target);
licenseTargetFacade.create(target);
target = licenseTargetFacade.merge(target);
}
else {
target = licenseTargetFacade.merge(target);
}
}
/**
* Default constructor.
*/
public LicenseBean() {
// TODO Auto-generated constructor stub
}
@Override
public List<LicenseTarget> findUserGames(EventUser user) {
ArrayList<LicenseTarget> returnLicenses = new ArrayList<LicenseTarget>();
if(user.getGroupMemberships() != null) {
for(GroupMembership memberShip : user.getGroupMemberships()) {
if(memberShip.getPlaceReservation() == null)
continue;
for(LicenseTarget license : memberShip.getPlaceReservation().getProduct().getLicenseTargets()) {
if(license.isActive()) {
returnLicenses.add(license);
}
}
}
}
return returnLicenses;
}
@Override
public List<LicenseTarget> findUnopenedUserGames(EventUser user) {
List<LicenseTarget> returnLicenses = findUserGames(user);
for(LicenseCode code : user.getUser().getLicenseCodes()) {
returnLicenses.remove(code.getLicenseTarget());
}
return returnLicenses;
}
@Override
public LicenseCode createAndAccessCode(LicenseTarget target, User user) throws GenerationException {
user = userFacade.reload(user);
LicenseCode code = new LicenseCode(target);
user.getLicenseCodes().add(code);
code.setUser(user);
licenseCodeFacade.create(code);
code = accessCode(code);
return code;
}
}
...@@ -17,6 +17,7 @@ import fi.codecrew.moya.enums.apps.BillPermission; ...@@ -17,6 +17,7 @@ import fi.codecrew.moya.enums.apps.BillPermission;
import fi.codecrew.moya.enums.apps.CompoPermission; import fi.codecrew.moya.enums.apps.CompoPermission;
import fi.codecrew.moya.enums.apps.ContentPermission; import fi.codecrew.moya.enums.apps.ContentPermission;
import fi.codecrew.moya.enums.apps.EventPermission; import fi.codecrew.moya.enums.apps.EventPermission;
import fi.codecrew.moya.enums.apps.LicensePermission;
import fi.codecrew.moya.enums.apps.IAppPermission; import fi.codecrew.moya.enums.apps.IAppPermission;
import fi.codecrew.moya.enums.apps.MapPermission; import fi.codecrew.moya.enums.apps.MapPermission;
import fi.codecrew.moya.enums.apps.PollPermission; import fi.codecrew.moya.enums.apps.PollPermission;
...@@ -92,6 +93,8 @@ import fi.codecrew.moya.model.User; ...@@ -92,6 +93,8 @@ import fi.codecrew.moya.model.User;
EventPermission.S_MANAGE_PRIVATE_PROPERTIES, EventPermission.S_MANAGE_PRIVATE_PROPERTIES,
EventPermission.S_MANAGE_PROPERTIES, EventPermission.S_MANAGE_PROPERTIES,
LicensePermission.S_MANAGE,
LicensePermission.S_VIEW_OWN_CODES
}) })
@LocalBean @LocalBean
public class PermissionBean implements PermissionBeanLocal { public class PermissionBean implements PermissionBeanLocal {
...@@ -113,11 +116,6 @@ public class PermissionBean implements PermissionBeanLocal { ...@@ -113,11 +116,6 @@ public class PermissionBean implements PermissionBeanLocal {
@EJB @EJB
private EventBeanLocal eventbean; private EventBeanLocal eventbean;
//
// @Override
// public boolean hasPermission(String perm) {
// return context.isCallerInRole(perm);
// }
@Override @Override
public boolean hasPermission(IAppPermission perm) { public boolean hasPermission(IAppPermission perm) {
...@@ -130,36 +128,7 @@ public class PermissionBean implements PermissionBeanLocal { ...@@ -130,36 +128,7 @@ public class PermissionBean implements PermissionBeanLocal {
} }
// @Override
// public boolean fatalPermission(IAppPermission permission, Object...
// failmessage) {
// boolean ret = hasPermission(permission);
// if (!ret) {
// StringBuilder message = new
// StringBuilder().append(" permission: ").append(permission);
// if (failmessage == null || failmessage.length == 0) {
// message.append(" MSG: SessionHandler mbean permission exception: Permission: ")
// .append(permission);
// } else {
// for (Object part : failmessage) {
// message.append(part == null ? "NULL" : part.toString());
// }
// }
// // throw new SecurityException("Foobar");
//
// throw new PermissionDeniedException(loggingbean, getCurrentUser(),
// message.toString());
// }
// return true;
// }
//
// @Override
// public void fatalNotLoggedIn() throws PermissionDeniedException {
// if (!isLoggedIn()) {
// throw new PermissionDeniedException(loggingbean, getCurrentUser(),
// "User is not logged in!");
// }
// }
@Override @Override
public boolean isCurrentUser(User user) { public boolean isCurrentUser(User user) {
...@@ -178,8 +147,6 @@ public class PermissionBean implements PermissionBeanLocal { ...@@ -178,8 +147,6 @@ public class PermissionBean implements PermissionBeanLocal {
// logger.info("Checking principal {} against anon: {}", principal, // logger.info("Checking principal {} against anon: {}", principal,
// ret); // ret);
return ret; return ret;
// return !getAnonEventUser().equals(getCurrentUser()) ||
// getCurrentUser().getUser().isSuperadmin();
} }
@Override @Override
......
...@@ -2,6 +2,7 @@ package fi.codecrew.moya.beans; ...@@ -2,6 +2,7 @@ package fi.codecrew.moya.beans;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
...@@ -19,6 +20,8 @@ import javax.ejb.Stateless; ...@@ -19,6 +20,8 @@ import javax.ejb.Stateless;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import fi.codecrew.moya.bortal.views.BillSummary;
import fi.codecrew.moya.enums.apps.ShopPermission;
import fi.codecrew.moya.facade.AccountEventFacade; import fi.codecrew.moya.facade.AccountEventFacade;
import fi.codecrew.moya.facade.BillLineFacade; import fi.codecrew.moya.facade.BillLineFacade;
import fi.codecrew.moya.facade.DiscountFacade; import fi.codecrew.moya.facade.DiscountFacade;
...@@ -26,13 +29,6 @@ import fi.codecrew.moya.facade.EventUserFacade; ...@@ -26,13 +29,6 @@ import fi.codecrew.moya.facade.EventUserFacade;
import fi.codecrew.moya.facade.InventoryEventFacade; import fi.codecrew.moya.facade.InventoryEventFacade;
import fi.codecrew.moya.facade.ProductFacade; import fi.codecrew.moya.facade.ProductFacade;
import fi.codecrew.moya.facade.UserFacade; import fi.codecrew.moya.facade.UserFacade;
import fi.codecrew.moya.beans.BillBeanLocal;
import fi.codecrew.moya.beans.EventBeanLocal;
import fi.codecrew.moya.beans.PermissionBeanLocal;
import fi.codecrew.moya.beans.ProductBeanLocal;
import fi.codecrew.moya.beans.UserBeanLocal;
import fi.codecrew.moya.bortal.views.BillSummary;
import fi.codecrew.moya.enums.apps.ShopPermission;
import fi.codecrew.moya.model.AccountEvent; import fi.codecrew.moya.model.AccountEvent;
import fi.codecrew.moya.model.Discount; import fi.codecrew.moya.model.Discount;
import fi.codecrew.moya.model.EventUser; import fi.codecrew.moya.model.EventUser;
...@@ -365,4 +361,18 @@ public class ProductBean implements ProductBeanLocal { ...@@ -365,4 +361,18 @@ public class ProductBean implements ProductBeanLocal {
public List<Product> findProductsForEvent() { public List<Product> findProductsForEvent() {
return productFacade.findAll(); return productFacade.findAll();
} }
@Override
public List<Product> findPlaceProducts() {
ArrayList<Product> returnProducts = new ArrayList<Product>();
for(Product product : findProductsForEvent()) {
if(product.getPlaces() != null && product.getPlaces().size() > 0) {
returnProducts.add(product);
}
}
return returnProducts;
}
} }
...@@ -21,6 +21,7 @@ import fi.codecrew.moya.model.EventUser; ...@@ -21,6 +21,7 @@ import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.PrintedCard; import fi.codecrew.moya.model.PrintedCard;
import fi.codecrew.moya.model.Reader; import fi.codecrew.moya.model.Reader;
import fi.codecrew.moya.model.ReaderEvent; import fi.codecrew.moya.model.ReaderEvent;
import fi.codecrew.moya.model.ReaderType;
import fi.codecrew.moya.model.User; import fi.codecrew.moya.model.User;
/** /**
...@@ -51,7 +52,13 @@ public class ReaderBean implements ReaderBeanLocal { ...@@ -51,7 +52,13 @@ public class ReaderBean implements ReaderBeanLocal {
@Override @Override
public ReaderEvent checkTag(String readerIdent, String tag, String hash) { public ReaderEvent checkTag(String readerIdent, String tag, String hash) {
Reader reader = readerfacade.findOrCreateByIdent(readerIdent);
tag = tag.replace("\"\b", ""); tag = tag.replace("\"\b", "");
if(reader.getType() == ReaderType.RFID) {
if (Pattern.matches("^.*000000$", tag)) if (Pattern.matches("^.*000000$", tag))
{ {
tag = tag.replace("000000", ""); tag = tag.replace("000000", "");
...@@ -62,9 +69,10 @@ public class ReaderBean implements ReaderBeanLocal { ...@@ -62,9 +69,10 @@ public class ReaderBean implements ReaderBeanLocal {
sb.insert(0, "0"); sb.insert(0, "0");
} }
tag = sb.toString(); tag = sb.toString();
}
PrintedCard card = cardfacade.findByRfid(tag); PrintedCard card = cardfacade.findByRfid(tag);
Reader reader = readerfacade.findOrCreateByIdent(readerIdent);
logger.info("reader {}, card {}", reader, card); logger.info("reader {}, card {}", reader, card);
// RfidEvent revent = reventcontainer.foundTag(reader, tag); // RfidEvent revent = reventcontainer.foundTag(reader, tag);
......
...@@ -159,14 +159,16 @@ public class UserBean implements UserBeanLocal { ...@@ -159,14 +159,16 @@ public class UserBean implements UserBeanLocal {
// currentEventuser, currentEventuserRoles); // currentEventuser, currentEventuserRoles);
// return currentEventuserRoles; // return currentEventuserRoles;
// } // }
LanEvent event = eventBean.getCurrentEvent();
Set<Role> checkedRoles = new HashSet<Role>(); Set<Role> checkedRoles = new HashSet<Role>();
addRecursive(checkedRoles, event.getDefaultRole());
if (u != null) if (u != null)
{ {
addRecursive(checkedRoles, rolefacade.findForUser(u)); addRecursive(checkedRoles, rolefacade.findForUser(u));
if (permbean.isLoggedIn()) { if (permbean.isLoggedIn()) {
LanEvent event = eventBean.getCurrentEvent();
// add roles from events default role. // add roles from events default role.
addRecursive(checkedRoles, event.getDefaultRole()); addRecursive(checkedRoles, event.getDefaultRole());
...@@ -272,10 +274,10 @@ public class UserBean implements UserBeanLocal { ...@@ -272,10 +274,10 @@ public class UserBean implements UserBeanLocal {
public void createNewUser(EventUser user, String password) { public void createNewUser(EventUser user, String password) {
user.getUser().resetPassword(password); user.getUser().resetPassword(password);
// todo add barcode
user.setEvent(eventBean.getCurrentEvent()); user.setEvent(eventBean.getCurrentEvent());
// Tallennetaan olio kantaan... // Tallennetaan olio kantaan...
eventUserFacade.create(user); eventUserFacade.create(user);
em.flush(); em.flush();
} }
...@@ -522,7 +524,14 @@ public class UserBean implements UserBeanLocal { ...@@ -522,7 +524,14 @@ public class UserBean implements UserBeanLocal {
public EventUser getUserByBarcode(String barcode) { public EventUser getUserByBarcode(String barcode) {
PrintedCard tmpCard = barcodeBean.getPrintedCard(barcode); PrintedCard tmpCard = barcodeBean.getPrintedCard(barcode);
return (tmpCard == null) ? null : tmpCard.getUser(); EventUser user = null;
if(tmpCard == null) {
user = barcodeBean.getUser(barcode);
} else {
user = tmpCard.getUser();
}
return user;
} }
@Override @Override
......
...@@ -12,6 +12,8 @@ import javax.persistence.criteria.Root; ...@@ -12,6 +12,8 @@ import javax.persistence.criteria.Root;
import fi.codecrew.moya.model.ActionLogMessageResponse_; import fi.codecrew.moya.model.ActionLogMessageResponse_;
import fi.codecrew.moya.model.ActionLogMessage; import fi.codecrew.moya.model.ActionLogMessage;
import fi.codecrew.moya.model.ActionLogMessageResponse; import fi.codecrew.moya.model.ActionLogMessageResponse;
import fi.codecrew.moya.model.ActionLogMessage_;
import fi.codecrew.moya.model.LanEvent;
@Stateless @Stateless
@LocalBean @LocalBean
...@@ -22,10 +24,11 @@ public class ActionLogFacade extends IntegerPkGenericFacade<ActionLogMessage> { ...@@ -22,10 +24,11 @@ public class ActionLogFacade extends IntegerPkGenericFacade<ActionLogMessage> {
super(ActionLogMessage.class); super(ActionLogMessage.class);
} }
public List<ActionLogMessage> getAllSortedByTimestamp() { public List<ActionLogMessage> getAllSortedByTimestamp(LanEvent event) {
CriteriaBuilder cb = getEm().getCriteriaBuilder(); CriteriaBuilder cb = getEm().getCriteriaBuilder();
CriteriaQuery<ActionLogMessage> cq = cb.createQuery(ActionLogMessage.class); CriteriaQuery<ActionLogMessage> cq = cb.createQuery(ActionLogMessage.class);
Root<ActionLogMessage> root = cq.from(ActionLogMessage.class); Root<ActionLogMessage> root = cq.from(ActionLogMessage.class);
cq.where(cb.equal(root.get(ActionLogMessage_.lanEvent), event));
cq.orderBy(cb.desc(root.get("time"))); cq.orderBy(cb.desc(root.get("time")));
TypedQuery<ActionLogMessage> tq = getEm().createQuery(cq); TypedQuery<ActionLogMessage> tq = getEm().createQuery(cq);
......
package fi.codecrew.moya.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import fi.codecrew.moya.model.LicenseCode;
@Stateless
@LocalBean
public class LicenseCodeFacade extends IntegerPkGenericFacade<LicenseCode> {
public LicenseCodeFacade() {
super(LicenseCode.class);
}
}
package fi.codecrew.moya.facade;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import fi.codecrew.moya.model.LicenseTarget;
@Stateless
@LocalBean
public class LicenseTargetFacade extends IntegerPkGenericFacade<LicenseTarget> {
public LicenseTargetFacade() {
super(LicenseTarget.class);
}
}
...@@ -80,6 +80,7 @@ public class MenuNavigationFacade extends IntegerPkGenericFacade<MenuNavigation> ...@@ -80,6 +80,7 @@ public class MenuNavigationFacade extends IntegerPkGenericFacade<MenuNavigation>
Query q = getEm().createQuery("delete from MenuNavigation where event = :event"); Query q = getEm().createQuery("delete from MenuNavigation where event = :event");
q.setParameter("event", eventbean.getCurrentEvent()); q.setParameter("event", eventbean.getCurrentEvent());
q.executeUpdate(); q.executeUpdate();
getEm().flush();
} }
} }
...@@ -88,9 +88,9 @@ public class UserFacade extends IntegerPkGenericFacade<User> { ...@@ -88,9 +88,9 @@ public class UserFacade extends IntegerPkGenericFacade<User> {
// } // }
@Override @Override
public void create(User user) { public User create(User user) {
user.setLogin(user.getLogin().toLowerCase().trim()); user.setLogin(user.getLogin().toLowerCase().trim());
super.create(user); return super.create(user);
} }
@Override @Override
......
...@@ -4,11 +4,16 @@ import java.util.List; ...@@ -4,11 +4,16 @@ import java.util.List;
import javax.ejb.Local; import javax.ejb.Local;
import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.util.MassPrintResult; import fi.codecrew.moya.util.MassPrintResult;
@Local @Local
public interface CardPrintBeanLocal { public interface CardPrintBeanLocal {
public MassPrintResult getUserCardsAsPrintablePdf(List<Integer> userIdList) throws Exception; public MassPrintResult getUserCardsAsPrintablePdf(List<Integer> userIdList) throws Exception;
public MassPrintResult getUserCardAsPrintablePdf(Integer userId) throws Exception; public MassPrintResult getUserCardAsPrintablePdf(Integer userId) throws Exception;
public void acceptMassPrintResult(MassPrintResult mpr); public void acceptMassPrintResult(MassPrintResult mpr);
byte[] constructPNG(EventUser user) throws Exception;
} }
package fi.codecrew.moya.beans;
import javax.ejb.Local;
@Local
public interface GameBeanLocal {
}
package fi.codecrew.moya.beans;
import java.util.List;
import javax.ejb.ApplicationException;
import javax.ejb.Local;
import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.LanEvent;
import fi.codecrew.moya.model.LicenseCode;
import fi.codecrew.moya.model.LicenseTarget;
import fi.codecrew.moya.model.User;
@Local
public interface LicenseBeanLocal {
public LicenseCode accessCode(LicenseCode code) throws GenerationException;
public List<LicenseTarget> findAll(LanEvent event);
public void saveOrCreateLicense(LicenseTarget game);
public List<LicenseTarget> findUserGames(EventUser user);
public List<LicenseTarget> findUnopenedUserGames(EventUser user);
public LicenseCode createAndAccessCode(LicenseTarget target, User user) throws GenerationException;
@ApplicationException(rollback=true)
public static class GenerationException extends Exception {
public GenerationException() {
super();
}
public GenerationException(String message) {
super(message);
}
/**
*
*/
private static final long serialVersionUID = 1L;
}
}
\ No newline at end of file
...@@ -19,4 +19,6 @@ public interface MenuBeanLocal { ...@@ -19,4 +19,6 @@ public interface MenuBeanLocal {
void flushOldMenu(); void flushOldMenu();
MenuNavigation findNavigationId(Integer id);
} }
...@@ -56,4 +56,6 @@ public interface ProductBeanLocal { ...@@ -56,4 +56,6 @@ public interface ProductBeanLocal {
List<Product> findProductsForEvent(); List<Product> findProductsForEvent();
List<Product> findPlaceProducts();
} }
...@@ -26,12 +26,14 @@ org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 ...@@ -26,12 +26,14 @@ org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
org.eclipse.jdt.core.formatter.blank_lines_after_package=1 org.eclipse.jdt.core.formatter.blank_lines_after_package=1
org.eclipse.jdt.core.formatter.blank_lines_before_field=0 org.eclipse.jdt.core.formatter.blank_lines_before_field=0
...@@ -69,6 +71,7 @@ org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert ...@@ -69,6 +71,7 @@ org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.line_length=80
org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
org.eclipse.jdt.core.formatter.compact_else_if=true org.eclipse.jdt.core.formatter.compact_else_if=true
org.eclipse.jdt.core.formatter.continuation_indentation=2 org.eclipse.jdt.core.formatter.continuation_indentation=2
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
...@@ -160,12 +163,14 @@ org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invoca ...@@ -160,12 +163,14 @@ org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invoca
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
...@@ -189,6 +194,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invoc ...@@ -189,6 +194,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invoc
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
...@@ -244,6 +250,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invoc ...@@ -244,6 +250,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invoc
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
...@@ -253,6 +260,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=inser ...@@ -253,6 +260,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=inser
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
...@@ -279,4 +287,5 @@ org.eclipse.jdt.core.formatter.tabulation.size=4 ...@@ -279,4 +287,5 @@ org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.use_on_off_tags=false org.eclipse.jdt.core.formatter.use_on_off_tags=false
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
#Sun Mar 07 12:30:58 EET 2010
cleanup_settings_version=2 cleanup_settings_version=2
eclipse.preferences.version=1 eclipse.preferences.version=1
formatter_profile=_InsomniaConventions formatter_profile=_InsomniaConventions
formatter_settings_version=11 formatter_settings_version=12
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jpt.core.discoverAnnotatedClasses=true org.eclipse.jpt.core.discoverAnnotatedClasses=true
org.eclipse.jpt.core.platform=eclipselink2_3 org.eclipse.jpt.core.platform=eclipselink2_3
org.eclipse.jpt.jpa.core.discoverAnnotatedClasses=true
org.eclipse.jpt.jpa.core.metamodelSourceFolderName=src org.eclipse.jpt.jpa.core.metamodelSourceFolderName=src
...@@ -61,7 +61,7 @@ public class AccountEvent extends GenericEntity { ...@@ -61,7 +61,7 @@ public class AccountEvent extends GenericEntity {
private Calendar delivered; private Calendar delivered;
@Column(name = "delivered_count", nullable = false, precision = 24, scale = 4) @Column(name = "delivered_count", nullable = false, precision = 24, scale = 4)
private BigDecimal deliveredCount; private BigDecimal deliveredCount = new BigDecimal(0);
/** /**
* If this AccountEvent is a product in foodwace, this field is a reference * If this AccountEvent is a product in foodwace, this field is a reference
......
...@@ -33,7 +33,10 @@ public class ActionLogMessage extends GenericEntity { ...@@ -33,7 +33,10 @@ public class ActionLogMessage extends GenericEntity {
private Date time = new Date(); private Date time = new Date();
@JoinColumn(name = "user_id") @JoinColumn(name = "user_id")
private User user; private EventUser user;
@JoinColumn(name = "lan_event_id")
private LanEvent lanEvent;
@JoinColumn(name = "crew", nullable = false) @JoinColumn(name = "crew", nullable = false)
private Role crew; private Role crew;
...@@ -50,6 +53,14 @@ public class ActionLogMessage extends GenericEntity { ...@@ -50,6 +53,14 @@ public class ActionLogMessage extends GenericEntity {
@Enumerated(EnumType.STRING) @Enumerated(EnumType.STRING)
private ActionLogMessageState state; private ActionLogMessageState state;
public LanEvent getLanEvent() {
return lanEvent;
}
public void setLanEvent(LanEvent lanEvent) {
this.lanEvent = lanEvent;
}
public Date getTime() { public Date getTime() {
return time; return time;
} }
...@@ -58,11 +69,11 @@ public class ActionLogMessage extends GenericEntity { ...@@ -58,11 +69,11 @@ public class ActionLogMessage extends GenericEntity {
this.time = time; this.time = time;
} }
public User getUser() { public EventUser getUser() {
return user; return user;
} }
public void setUser(User user) { public void setUser(EventUser user) {
this.user = user; this.user = user;
} }
......
...@@ -105,6 +105,9 @@ public class EventUser extends GenericEntity { ...@@ -105,6 +105,9 @@ public class EventUser extends GenericEntity {
@Column(name = "createtime", nullable = false, updatable = false) @Column(name = "createtime", nullable = false, updatable = false)
private Date eventuserCreated; private Date eventuserCreated;
public EventUser getCreator() { public EventUser getCreator() {
return creator; return creator;
} }
...@@ -443,4 +446,5 @@ public class EventUser extends GenericEntity { ...@@ -443,4 +446,5 @@ public class EventUser extends GenericEntity {
} }
} }
...@@ -58,6 +58,7 @@ public class GroupMembership extends GenericEntity { ...@@ -58,6 +58,7 @@ public class GroupMembership extends GenericEntity {
private Place placeReservation; private Place placeReservation;
@JoinColumn(name = EVENTUSER_ID, referencedColumnName = EventUser.ID_COLUMN) @JoinColumn(name = EVENTUSER_ID, referencedColumnName = EventUser.ID_COLUMN)
@ManyToOne @ManyToOne
private EventUser user; private EventUser user;
......
...@@ -74,6 +74,9 @@ public class LanEvent extends GenericEntity { ...@@ -74,6 +74,9 @@ public class LanEvent extends GenericEntity {
@OneToMany(cascade = CascadeType.ALL, mappedBy = "event") @OneToMany(cascade = CascadeType.ALL, mappedBy = "event")
private List<Compo> compos; private List<Compo> compos;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "event")
private List<LicenseTarget> games;
@OneToMany(mappedBy = "event", cascade = CascadeType.ALL) @OneToMany(mappedBy = "event", cascade = CascadeType.ALL)
private List<CardTemplate> cardTemplates; private List<CardTemplate> cardTemplates;
...@@ -281,4 +284,14 @@ public class LanEvent extends GenericEntity { ...@@ -281,4 +284,14 @@ public class LanEvent extends GenericEntity {
this.properties = properties; this.properties = properties;
} }
public List<LicenseTarget> getGames() {
if(games == null)
games = new ArrayList<LicenseTarget>();
return games;
}
public void setGames(List<LicenseTarget> games) {
this.games = games;
}
} }
...@@ -2,16 +2,20 @@ package fi.codecrew.moya.model; ...@@ -2,16 +2,20 @@ package fi.codecrew.moya.model;
public enum LanEventPropertyKey { public enum LanEventPropertyKey {
EVENT_LOGO(Type.DATA, null), EVENT_LOGO(Type.DATA, null),
INVITEMAIL_SUBJECT(Type.TEXT, "Invitation to Stream demoparty"), INVITEMAIL_SUBJECT(Type.TEXT, "Invitation to Moya Online Youth Accumulator"),
INVITEMAIL_CONTENT(Type.TEXT, "You have been invited to Stream demoparty by {1}.\n\nYou can register to stream demparty intranet at: {0}\n\nAfter registering to the intranet you can buy a ticket to Stream demoparty reduced price and invite your friends to join the party with you. More information can be found in the intranet. Remember also to visit our website at http://www.streamparty.org and join us at #streamparty in IRCNet. If you have any questions about this mail, registering to intranet, or anything else regarding Stream demoparty, please send us email to info@streamparty.org\n\n-- \nStream organizing\ninfo@streamparty.org"), INVITEMAIL_CONTENT(Type.TEXT, "You have been invited to an event by {1}.\n\nYou can register to intranet at: {0}\n\nAfter registering to the intranet you can buy a ticket to Stream demoparty reduced price and invite your friends to join the party with you. More information can be found in the intranet. Remember also to visit our website at http://www.streamparty.org and join us at #streamparty in IRCNet. If you have any questions about this mail, registering to intranet, or anything else regarding Stream demoparty, please send us email to info@streamparty.org\n\n-- \nStream organizing\ninfo@streamparty.org"),
PORTAL_EMAIL_ADDRESS(Type.TEXT, "intra@streamparty.org"), PORTAL_EMAIL_ADDRESS(Type.TEXT, "moya@codecrew.fi"),
PORTAL_EMAIL_NAME(Type.TEXT, "Streamparty intranet"), PORTAL_EMAIL_NAME(Type.TEXT, "Moya Online Youth Accumulator"),
ADMIN_MAIL(Type.TEXT, "intra@streamparty.org"), ADMIN_MAIL(Type.TEXT, "moya@codecrew.fi"),
EVENT_LAYOUT(Type.TEXT, "template1"), EVENT_LAYOUT(Type.TEXT, "template1"),
SHOP_DEFAULT_CASH(Type.BOOL, null), SHOP_DEFAULT_CASH(Type.BOOL, null),
PLACECODE_FROM_USER(Type.BOOL, null), PLACECODE_FROM_USER(Type.BOOL, "1"),
PLACECODE_PRINT_ONLY_OWN(Type.BOOL, null), PLACECODE_PRINT_ONLY_OWN(Type.BOOL, null),
CHECK_BILL_STATS_PERMISSION(Type.BOOL, null),
GATHER_OTHER_BILL_INFO(Type.BOOL, null),
ALLOW_BILLING(Type.BOOL, null);
; ;
private enum Type { private enum Type {
TEXT, DATE, DATA, BOOL TEXT, DATE, DATA, BOOL
}; };
......
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.codecrew.moya.model;
import java.util.Calendar;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.eclipse.persistence.annotations.OptimisticLocking;
import org.eclipse.persistence.annotations.OptimisticLockingType;
/**
*
*/
@Entity
@Table(name = "licensecodes")
@OptimisticLocking(type = OptimisticLockingType.CHANGED_COLUMNS)
public class LicenseCode extends GenericEntity {
private static final long serialVersionUID = 1L;
@Column(name = "accessed", nullable = true)
@Temporal(TemporalType.TIMESTAMP)
private Calendar accessed = null;
@Column(name = "code")
private String code;
@JoinColumn(name = "game_id", referencedColumnName = "id")
@ManyToOne
private LicenseTarget licenseTarget;
@JoinColumn(name = "user_id", referencedColumnName = "id")
@ManyToOne
private User user;
public LicenseCode() {
super();
}
public LicenseCode(LicenseTarget target) {
this();
this.licenseTarget = target;
}
public boolean isAccessed() {
return (accessed != null);
}
public Calendar getAccessed() {
return accessed;
}
public void setAccessed(Calendar accessed) {
this.accessed = accessed;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public LicenseTarget getLicenseTarget() {
return licenseTarget;
}
public void setLicenseTarget(LicenseTarget licenseTarget) {
this.licenseTarget = licenseTarget;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fi.codecrew.moya.model;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.Table;
import org.eclipse.persistence.annotations.OptimisticLocking;
import org.eclipse.persistence.annotations.OptimisticLockingType;
/**
*
*/
@Entity
@Table(name = "licenseTargets")
@OptimisticLocking(type = OptimisticLockingType.CHANGED_COLUMNS)
public class LicenseTarget extends GenericEntity {
private static final long serialVersionUID = 1L;
@Column(name = "active")
private boolean active = false;
@Column(name = "name")
private String name;
@Column(name = "service")
private String service;
@Column(name = "description")
private String description;
@Column(name = "code_url")
private String codeUrl;
@JoinColumn(name = "event_id", referencedColumnName = "id")
@ManyToOne
private LanEvent event;
@OneToMany(mappedBy = "licenseTarget", fetch = FetchType.LAZY)
@OrderBy()
private List<LicenseCode> licenseCodes;
@JoinColumn(name = "product_id", referencedColumnName = "id")
@ManyToOne
private Product product;
public LicenseTarget() {
super();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getCodeUrl() {
return codeUrl;
}
public void setCodeUrl(String codeUrl) {
this.codeUrl = codeUrl;
}
public LanEvent getEvent() {
return event;
}
public void setEvent(LanEvent event) {
this.event = event;
}
public String getService() {
return service;
}
public void setService(String service) {
this.service = service;
}
public List<LicenseCode> getGameCodes() {
return licenseCodes;
}
public void setGameCodes(List<LicenseCode> gameCodes) {
this.licenseCodes = gameCodes;
}
public Product getProduct() {
return product;
}
public void setProduct(Product product) {
this.product = product;
}
public boolean isActive() {
return active;
}
public boolean getActive() {
return active;
}
public void setActive(boolean active) {
this.active = active;
}
public List<LicenseCode> getLicenseCodes() {
return licenseCodes;
}
public void setLicenseCodes(List<LicenseCode> licenseCodes) {
this.licenseCodes = licenseCodes;
}
}
package fi.codecrew.moya.model; package fi.codecrew.moya.model;
import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.List;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn; import javax.persistence.JoinColumn;
import javax.persistence.Lob; import javax.persistence.Lob;
import javax.persistence.ManyToOne; import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne; import javax.persistence.OneToOne;
import javax.persistence.OrderBy;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Temporal; import javax.persistence.Temporal;
import javax.persistence.TemporalType; import javax.persistence.TemporalType;
......
...@@ -14,6 +14,8 @@ import javax.faces.model.ListDataModel; ...@@ -14,6 +14,8 @@ import javax.faces.model.ListDataModel;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.JoinColumn; import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne; import javax.persistence.ManyToOne;
import javax.persistence.OneToMany; import javax.persistence.OneToMany;
...@@ -26,6 +28,8 @@ import javax.persistence.UniqueConstraint; ...@@ -26,6 +28,8 @@ import javax.persistence.UniqueConstraint;
import org.eclipse.persistence.annotations.OptimisticLocking; import org.eclipse.persistence.annotations.OptimisticLocking;
import org.eclipse.persistence.annotations.OptimisticLockingType; import org.eclipse.persistence.annotations.OptimisticLockingType;
import fi.codecrew.moya.enums.CardState;
/** /**
* *
*/ */
...@@ -74,6 +78,10 @@ public class PrintedCard extends GenericEntity { ...@@ -74,6 +78,10 @@ public class PrintedCard extends GenericEntity {
@ManyToOne(optional = false) @ManyToOne(optional = false)
private CardTemplate template; private CardTemplate template;
@Column(name="card_state", nullable=false)
@Enumerated(EnumType.STRING)
private CardState cardState = CardState.PENDING_VALIDATION;
public PrintedCard(EventUser usr, CardTemplate templ, Calendar printTime, boolean cardEnabled) { public PrintedCard(EventUser usr, CardTemplate templ, Calendar printTime, boolean cardEnabled) {
super(); super();
this.event = templ.getEvent(); this.event = templ.getEvent();
...@@ -196,6 +204,14 @@ public class PrintedCard extends GenericEntity { ...@@ -196,6 +204,14 @@ public class PrintedCard extends GenericEntity {
return gamepoints; return gamepoints;
} }
public CardState getCardState() {
return cardState;
}
public void setCardState(CardState cardState) {
this.cardState = cardState;
}
@Transient @Transient
private transient ListDataModel<ReaderEvent> revents; private transient ListDataModel<ReaderEvent> revents;
......
...@@ -70,6 +70,11 @@ public class Product extends GenericEntity { ...@@ -70,6 +70,11 @@ public class Product extends GenericEntity {
@Column(name = "barcode") @Column(name = "barcode")
private String barcode; private String barcode;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "product")
private List<LicenseTarget> licenseTargets;
@Enumerated(EnumType.STRING) @Enumerated(EnumType.STRING)
@PrivateOwned @PrivateOwned
@ElementCollection() @ElementCollection()
...@@ -332,4 +337,12 @@ public class Product extends GenericEntity { ...@@ -332,4 +337,12 @@ public class Product extends GenericEntity {
this.inventoryEvents = inventoryEvents; this.inventoryEvents = inventoryEvents;
} }
public List<LicenseTarget> getLicenseTargets() {
return licenseTargets;
}
public void setLicenseTargets(List<LicenseTarget> licenseTargets) {
this.licenseTargets = licenseTargets;
}
} }
package fi.codecrew.moya.model; package fi.codecrew.moya.model;
import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -9,6 +10,7 @@ import javax.persistence.Column; ...@@ -9,6 +10,7 @@ import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.EnumType; import javax.persistence.EnumType;
import javax.persistence.Enumerated; import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn; import javax.persistence.JoinColumn;
import javax.persistence.OneToMany; import javax.persistence.OneToMany;
import javax.persistence.OneToOne; import javax.persistence.OneToOne;
...@@ -109,6 +111,10 @@ public class User extends GenericEntity implements IUser { ...@@ -109,6 +111,10 @@ public class User extends GenericEntity implements IUser {
@PrivateOwned @PrivateOwned
private List<UserImage> userImageList; private List<UserImage> userImageList;
@OneToMany(mappedBy = "user", fetch = FetchType.LAZY)
@OrderBy()
private List<LicenseCode> licenseCodes;
@Transient @Transient
private static final Logger logger = LoggerFactory.getLogger(User.class); private static final Logger logger = LoggerFactory.getLogger(User.class);
...@@ -354,4 +360,16 @@ public class User extends GenericEntity implements IUser { ...@@ -354,4 +360,16 @@ public class User extends GenericEntity implements IUser {
return isAnon; return isAnon;
} }
public List<LicenseCode> getLicenseCodes() {
if(licenseCodes == null)
licenseCodes = new ArrayList<LicenseCode>();
return licenseCodes;
}
public void setLicenseCodes(List<LicenseCode> codes) {
this.licenseCodes = codes;
}
} }
...@@ -2,4 +2,5 @@ Manifest-Version: 1.0 ...@@ -2,4 +2,5 @@ Manifest-Version: 1.0
Class-Path: commons-codec-1.6.jar Class-Path: commons-codec-1.6.jar
barcode4j.jar barcode4j.jar
PDFjet.jar PDFjet.jar
commons-imaging-1.0-SNAPSHOT.jar
...@@ -4,6 +4,7 @@ import fi.codecrew.moya.enums.apps.BillPermission; ...@@ -4,6 +4,7 @@ import fi.codecrew.moya.enums.apps.BillPermission;
import fi.codecrew.moya.enums.apps.CompoPermission; import fi.codecrew.moya.enums.apps.CompoPermission;
import fi.codecrew.moya.enums.apps.ContentPermission; import fi.codecrew.moya.enums.apps.ContentPermission;
import fi.codecrew.moya.enums.apps.EventPermission; import fi.codecrew.moya.enums.apps.EventPermission;
import fi.codecrew.moya.enums.apps.LicensePermission;
import fi.codecrew.moya.enums.apps.IAppPermission; import fi.codecrew.moya.enums.apps.IAppPermission;
import fi.codecrew.moya.enums.apps.MapPermission; import fi.codecrew.moya.enums.apps.MapPermission;
import fi.codecrew.moya.enums.apps.PollPermission; import fi.codecrew.moya.enums.apps.PollPermission;
...@@ -23,6 +24,7 @@ public enum BortalApplication { ...@@ -23,6 +24,7 @@ public enum BortalApplication {
SALESPOINT(SalespointPermission.class), SALESPOINT(SalespointPermission.class),
COMPO(CompoPermission.class), COMPO(CompoPermission.class),
EVENT(EventPermission.class), EVENT(EventPermission.class),
LICENSE(LicensePermission.class),
; ;
......
package fi.codecrew.moya.enums;
public enum CardState {
PENDING_VALIDATION,
REJECTED,
VALIDATED,
PENDING_PRINT,
PRINTING_IN_PROGRESS,
PRINTED;
public String toStringLower() {
return this.toString().toLowerCase();
}
}
package fi.codecrew.moya.enums.apps;
import fi.codecrew.moya.enums.BortalApplication;
public enum LicensePermission implements IAppPermission {
MANAGE,
VIEW_OWN_CODES,
;
public static final String S_MANAGE = "LICENSE/MANAGE";
public static final String S_VIEW_OWN_CODES = "LICENSE/VIEW_OWN_CODES";
private final String fullName;
private final String key;
private static final String I18N_HEADER = "bortalApplication.license.";
private LicensePermission() {
fullName = new StringBuilder().append(getParent().toString()).append(DELIMITER).append(toString()).toString();
key = I18N_HEADER + name();
}
@Override
public BortalApplication getParent() {
return BortalApplication.LICENSE;
}
@Override
public String getFullName() {
return fullName;
}
@Override
public String getI18nKey() {
return key;
}
}
...@@ -17,8 +17,9 @@ public enum UserPermission implements IAppPermission { ...@@ -17,8 +17,9 @@ public enum UserPermission implements IAppPermission {
MANAGE_HTTP_SESSION, // ("Manage http sessions"), MANAGE_HTTP_SESSION, // ("Manage http sessions"),
INVITE_USERS, // ("Invite users"), INVITE_USERS, // ("Invite users"),
READ_ORGROLES, // ("View organization roles"), READ_ORGROLES, // ("View organization roles"),
WRITE_ORGROLES, VITUTTAAKO, // ("Modify organization roles"), WRITE_ORGROLES, // ("Modify organization roles"),
; VITUTTAAKO,
LOGGED_IN_USER;
public static final String S_VIEW_ALL = "USER/VIEW_ALL"; public static final String S_VIEW_ALL = "USER/VIEW_ALL";
public static final String S_MODIFY = "USER/MODIFY"; public static final String S_MODIFY = "USER/MODIFY";
......
No preview for this file type
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!