List of usage examples for java.util Calendar FEBRUARY
int FEBRUARY
To view the source code for java.util Calendar FEBRUARY.
Click Source Link
From source file:com.gemstone.gemfire.rest.internal.web.controllers.RestAPIsWithSSLDUnitTest.java
public void doPutsInClientCache() { ClientCache cache = GemFireCacheImpl.getInstance(); assertNotNull(cache);//from w w w .j a va2s.c om Region<String, Object> region = cache.getRegion(PEOPLE_REGION_NAME); // put person object final Person person1 = new Person(101L, "Mithali", "Dorai", "Raj", DateTimeUtils.createDate(1982, Calendar.DECEMBER, 4), Gender.FEMALE); final Person person2 = new Person(102L, "Sachin", "Ramesh", "Tendulkar", DateTimeUtils.createDate(1975, Calendar.DECEMBER, 14), Gender.MALE); final Person person3 = new Person(103L, "Saurabh", "Baburav", "Ganguly", DateTimeUtils.createDate(1972, Calendar.AUGUST, 29), Gender.MALE); final Person person4 = new Person(104L, "Rahul", "subrymanyam", "Dravid", DateTimeUtils.createDate(1979, Calendar.MARCH, 17), Gender.MALE); final Person person5 = new Person(105L, "Jhulan", "Chidambaram", "Goswami", DateTimeUtils.createDate(1983, Calendar.NOVEMBER, 25), Gender.FEMALE); region.put("1", person1); region.put("2", person2); region.put("3", person3); region.put("4", person4); region.put("5", person5); final Person person6 = new Person(101L, "Rahul", "Rajiv", "Gndhi", DateTimeUtils.createDate(1970, Calendar.MAY, 14), Gender.MALE); final Person person7 = new Person(102L, "Narendra", "Damodar", "Modi", DateTimeUtils.createDate(1945, Calendar.DECEMBER, 24), Gender.MALE); final Person person8 = new Person(103L, "Atal", "Bihari", "Vajpayee", DateTimeUtils.createDate(1920, Calendar.AUGUST, 9), Gender.MALE); final Person person9 = new Person(104L, "Soniya", "Rajiv", "Gandhi", DateTimeUtils.createDate(1929, Calendar.MARCH, 27), Gender.FEMALE); final Person person10 = new Person(104L, "Priyanka", "Robert", "Gandhi", DateTimeUtils.createDate(1973, Calendar.APRIL, 15), Gender.FEMALE); final Person person11 = new Person(104L, "Murali", "Manohar", "Joshi", DateTimeUtils.createDate(1923, Calendar.APRIL, 25), Gender.MALE); final Person person12 = new Person(104L, "Lalkrishna", "Parmhansh", "Advani", DateTimeUtils.createDate(1910, Calendar.JANUARY, 01), Gender.MALE); final Person person13 = new Person(104L, "Shushma", "kumari", "Swaraj", DateTimeUtils.createDate(1943, Calendar.AUGUST, 10), Gender.FEMALE); final Person person14 = new Person(104L, "Arun", "raman", "jetly", DateTimeUtils.createDate(1942, Calendar.OCTOBER, 27), Gender.MALE); final Person person15 = new Person(104L, "Amit", "kumar", "shah", DateTimeUtils.createDate(1958, Calendar.DECEMBER, 21), Gender.MALE); final Person person16 = new Person(104L, "Shila", "kumari", "Dixit", DateTimeUtils.createDate(1927, Calendar.FEBRUARY, 15), Gender.FEMALE); Map<String, Object> userMap = new HashMap<String, Object>(); userMap.put("6", person6); userMap.put("7", person7); userMap.put("8", person8); userMap.put("9", person9); userMap.put("10", person10); userMap.put("11", person11); userMap.put("12", person12); userMap.put("13", person13); userMap.put("14", person14); userMap.put("15", person15); userMap.put("16", person16); region.putAll(userMap); if (cache != null) cache.getLogger().info("Gemfire Cache Client: Puts successfully done"); }
From source file:org.kuali.kfs.module.endow.businessobject.lookup.CalculateProcessDateUsingFrequencyCodeService.java
/** * This method will check the current month and set the calendar to that month * @param month month to set the calendar * @return calendar calendar is set to the month selected *///from w w w .j a v a 2s .c om protected Calendar setCaledarWithMonth(String month, Date currentDate) { Calendar calendar = Calendar.getInstance(); calendar.setTime(currentDate); int calendarMonth = 1; if (EndowConstants.FrequencyMonths.JANUARY.equalsIgnoreCase(month)) { calendarMonth = Calendar.JANUARY; } else if (EndowConstants.FrequencyMonths.FEBRUARY.equalsIgnoreCase(month)) { calendarMonth = Calendar.FEBRUARY; } else if (EndowConstants.FrequencyMonths.MARCH.equalsIgnoreCase(month)) { calendarMonth = Calendar.MARCH; } else if (EndowConstants.FrequencyMonths.APRIL.equalsIgnoreCase(month)) { calendarMonth = Calendar.APRIL; } else if (EndowConstants.FrequencyMonths.MAY.equalsIgnoreCase(month)) { calendarMonth = Calendar.MAY; } else if (EndowConstants.FrequencyMonths.JUNE.equalsIgnoreCase(month)) { calendarMonth = Calendar.JUNE; } else if (EndowConstants.FrequencyMonths.JULY.equalsIgnoreCase(month)) { calendarMonth = Calendar.JULY; } else if (EndowConstants.FrequencyMonths.AUGUST.equalsIgnoreCase(month)) { calendarMonth = Calendar.AUGUST; } else if (EndowConstants.FrequencyMonths.SEPTEMBER.equalsIgnoreCase(month)) { calendarMonth = Calendar.SEPTEMBER; } else if (EndowConstants.FrequencyMonths.OCTOBER.equalsIgnoreCase(month)) { calendarMonth = Calendar.OCTOBER; } else if (EndowConstants.FrequencyMonths.NOVEMBER.equalsIgnoreCase(month)) { calendarMonth = Calendar.NOVEMBER; } else if (EndowConstants.FrequencyMonths.DECEMBER.equalsIgnoreCase(month)) { calendarMonth = Calendar.DECEMBER; } calendar.set(Calendar.MONTH, calendarMonth); return calendar; }
From source file:it.caladyon.akka.molla.topology.help.Test_StrategistListenerActor_with_TimedListening.java
/** * Arrivo di 3 messaggi dei 3 mittenti in 3 minuti differenti. *//*from ww w .ja v a 2s .co m*/ @SuppressWarnings("deprecation") @Test public void test_2() { log.info("---- test 2 -------------------------------"); // questo metodo di creazione delle Props e' ripreso da ActorSystemStarter final SpringExt springExtProvider = SpringExtensionProvider.springExtProvider.get(system); final Props props = springExtProvider.props(LISTENER_BEAN_NAME); final TestActorRef<TestTimedListenerActor> ref = TestActorRef.create(system, props, "test_2"); final TestTimedListenerActor actor = ref.underlyingActor(); try { List<Date> rd = new ArrayList<Date>(); List<MessageWrapper> mv = new ArrayList<MessageWrapper>(); List<Future<Object>> f = new ArrayList<Future<Object>>(); int c = 0; rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, 0, 10)); mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(c), "message-" + c)); f.add(ask(ref, mv.get(c), TIMEOUT)); ++c; rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, 1, 20)); mv.add(new MessageWrapper(SOURCE2_BEAN_NAME, rd.get(c), "message-" + c)); f.add(ask(ref, mv.get(c), TIMEOUT)); ++c; rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, 2, 30)); mv.add(new MessageWrapper(SOURCE3_BEAN_NAME, rd.get(c), "message-" + c)); f.add(ask(ref, mv.get(c), TIMEOUT)); ++c; try { Thread.sleep(WAIT + 100); } catch (InterruptedException e1) { e1.printStackTrace(); } for (int i = 0; i < f.size(); ++i) { assertTrue("future " + i, f.get(i).isCompleted()); } assertTrue("execution count", actor.getExecCount() == 0); int inputsSize = ((TimedListening) actor.getListening()).inputs.size(); assertTrue("input size: " + inputsSize, inputsSize == 1); } finally { ref.stop(); } }
From source file:it.caladyon.akka.molla.topology.Test_TimedListenerActor.java
/** * Arrivo di 3 messaggi dei 3 mittenti in 3 minuti differenti. *///from w w w. j ava2s. com @Ignore @Test public void test_2() { log.info("---- test 2 -------------------------------"); // questo metodo di creazione delle Props e' ripreso da ActorSystemStarter final SpringExt springExtProvider = SpringExtensionProvider.springExtProvider.get(system); final Props props = springExtProvider.props(LISTENER_BEAN_NAME); final TestActorRef<TestTimedListenerActor> ref = TestActorRef.create(system, props, "test_2"); final TestTimedListenerActor actor = ref.underlyingActor(); try { List<Date> rd = new ArrayList<Date>(); List<MessageWrapper> mv = new ArrayList<MessageWrapper>(); List<Future<Object>> f = new ArrayList<Future<Object>>(); int c = 0; rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, 0, 10)); mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(c), "message-" + c)); f.add(ask(ref, mv.get(c), TIMEOUT)); ++c; rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, 1, 20)); mv.add(new MessageWrapper(SOURCE2_BEAN_NAME, rd.get(c), "message-" + c)); f.add(ask(ref, mv.get(c), TIMEOUT)); ++c; rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, 2, 30)); mv.add(new MessageWrapper(SOURCE3_BEAN_NAME, rd.get(c), "message-" + c)); f.add(ask(ref, mv.get(c), TIMEOUT)); ++c; try { Thread.sleep(WAIT + 100); } catch (InterruptedException e1) { e1.printStackTrace(); } for (int i = 0; i < f.size(); ++i) { assertTrue("future " + i, f.get(i).isCompleted()); } assertTrue("execution count", actor.getExecCount() == 0); assertTrue("input size: " + actor.inputsSize(), actor.inputsSize() == 1); } finally { ref.stop(); } }
From source file:it.caladyon.akka.molla.topology.help.Test_StrategistListenerActor_with_TolerantTimedListening_0.java
/** * Arrivo di 3 messaggi dei 3 mittenti in 3 minuti differenti. *//* w w w .j a v a 2 s .co m*/ @SuppressWarnings("deprecation") @Test public void test_2() { log.info("---- test 2 -------------------------------"); // questo metodo di creazione delle Props e' ripreso da ActorSystemStarter final SpringExt springExtProvider = SpringExtensionProvider.springExtProvider.get(system); final Props props = springExtProvider.props(LISTENER_BEAN_NAME); final TestActorRef<TestTolerantListenerActor> ref = TestActorRef.create(system, props, "test_2"); final TestTolerantListenerActor actor = ref.underlyingActor(); try { List<Date> rd = new ArrayList<Date>(); List<MessageWrapper> mv = new ArrayList<MessageWrapper>(); List<Future<Object>> f = new ArrayList<Future<Object>>(); int c = 0; rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, 0, 10)); mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(c), "message-" + c)); f.add(ask(ref, mv.get(c), TIMEOUT)); ++c; rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, 1, 20)); mv.add(new MessageWrapper(SOURCE2_BEAN_NAME, rd.get(c), "message-" + c)); f.add(ask(ref, mv.get(c), TIMEOUT)); ++c; rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, 2, 30)); mv.add(new MessageWrapper(SOURCE3_BEAN_NAME, rd.get(c), "message-" + c)); f.add(ask(ref, mv.get(c), TIMEOUT)); ++c; try { Thread.sleep(WAIT + 100); } catch (InterruptedException e1) { e1.printStackTrace(); } for (int i = 0; i < f.size(); ++i) { assertTrue("future " + i, f.get(i).isCompleted()); } assertTrue("execution count", actor.getExecCount() == 0); int inputsSize = ((TolerantTimedListening) actor.getListening()).inputs.size(); assertTrue("input size: " + inputsSize, inputsSize == 1); } finally { ref.stop(); } }
From source file:it.caladyon.akka.molla.topology.help.Test_StrategistListenerActor_with_TolerantTimedListening_1.java
/** * Arrivo di 3 messaggi dei 3 mittenti in 3 minuti differenti. *//*from ww w.jav a 2 s . c om*/ @SuppressWarnings("deprecation") @Test public void test_2() { log.info("---- test 2 -------------------------------"); // questo metodo di creazione delle Props e' ripreso da ActorSystemStarter final SpringExt springExtProvider = SpringExtensionProvider.springExtProvider.get(system); final Props props = springExtProvider.props(LISTENER_BEAN_NAME); final TestActorRef<TestTolerantListenerActor> ref = TestActorRef.create(system, props, "test_2"); final TestTolerantListenerActor actor = ref.underlyingActor(); try { List<Date> rd = new ArrayList<Date>(); List<MessageWrapper> mv = new ArrayList<MessageWrapper>(); List<Future<Object>> f = new ArrayList<Future<Object>>(); int c = 0; rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, 0, 10)); mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(c), "message-" + c)); f.add(ask(ref, mv.get(c), TIMEOUT)); ++c; rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, 1, 20)); mv.add(new MessageWrapper(SOURCE2_BEAN_NAME, rd.get(c), "message-" + c)); f.add(ask(ref, mv.get(c), TIMEOUT)); ++c; rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, 2, 30)); mv.add(new MessageWrapper(SOURCE3_BEAN_NAME, rd.get(c), "message-" + c)); f.add(ask(ref, mv.get(c), TIMEOUT)); ++c; try { Thread.sleep(WAIT + 100); } catch (InterruptedException e1) { e1.printStackTrace(); } for (int i = 0; i < f.size(); ++i) { assertTrue("future " + i, f.get(i).isCompleted()); } assertTrue("execution count", actor.getExecCount() == 0); int inputsSize = ((TolerantTimedListening) actor.getListening()).inputs.size(); assertTrue("input size: " + inputsSize, inputsSize == 2); } finally { ref.stop(); } }
From source file:it.caladyon.akka.molla.topology.Test_TolerantTimedListenerActor_1.java
/** * Arrivo di 3 messaggi dei 3 mittenti in 3 minuti differenti. *///from w w w . ja v a 2 s .co m @Ignore @Test public void test_2() { log.info("---- test 2 -------------------------------"); // questo metodo di creazione delle Props e' ripreso da ActorSystemStarter final SpringExt springExtProvider = SpringExtensionProvider.springExtProvider.get(system); final Props props = springExtProvider.props(LISTENER_BEAN_NAME); final TestActorRef<TestTimedListenerActor> ref = TestActorRef.create(system, props, "test_2"); final TestTimedListenerActor actor = ref.underlyingActor(); try { List<Date> rd = new ArrayList<Date>(); List<MessageWrapper> mv = new ArrayList<MessageWrapper>(); List<Future<Object>> f = new ArrayList<Future<Object>>(); int c = 0; rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, 0, 10)); mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(c), "message-" + c)); f.add(ask(ref, mv.get(c), TIMEOUT)); ++c; rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, 1, 20)); mv.add(new MessageWrapper(SOURCE2_BEAN_NAME, rd.get(c), "message-" + c)); f.add(ask(ref, mv.get(c), TIMEOUT)); ++c; rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, 2, 30)); mv.add(new MessageWrapper(SOURCE3_BEAN_NAME, rd.get(c), "message-" + c)); f.add(ask(ref, mv.get(c), TIMEOUT)); ++c; try { Thread.sleep(WAIT + 100); } catch (InterruptedException e1) { e1.printStackTrace(); } for (int i = 0; i < f.size(); ++i) { assertTrue("future " + i, f.get(i).isCompleted()); } assertTrue("execution count", actor.getExecCount() == 0); assertTrue("input size: " + actor.inputsSize(), actor.inputsSize() == 2); } finally { ref.stop(); } }
From source file:net.sourceforge.fenixedu.presentationTier.TagLib.sop.examsMapNew.renderers.ExamsMapContentRenderer.java
private String monthToString(int month, Locale locale) { switch (month) { case Calendar.JANUARY: if (locale.getLanguage().equals("pt")) { return "Janeiro"; }/*from w w w . j a v a 2 s .c om*/ return "January"; case Calendar.FEBRUARY: if (locale.getLanguage().equals("pt")) { return "Fevereiro"; } return "February"; case Calendar.MARCH: if (locale.getLanguage().equals("pt")) { return "Maro"; } return "March"; case Calendar.APRIL: if (locale.getLanguage().equals("pt")) { return "Abril"; } return "April"; case Calendar.MAY: if (locale.getLanguage().equals("pt")) { return "Maio"; } return "May"; case Calendar.JUNE: if (locale.getLanguage().equals("pt")) { return "Junho"; } return "June"; case Calendar.JULY: if (locale.getLanguage().equals("pt")) { return "Julho"; } return "July"; case Calendar.AUGUST: if (locale.getLanguage().equals("pt")) { return "Agosto"; } return "August"; case Calendar.SEPTEMBER: if (locale.getLanguage().equals("pt")) { return "Setembro"; } return "September"; case Calendar.OCTOBER: if (locale.getLanguage().equals("pt")) { return "Outubro"; } return "October"; case Calendar.NOVEMBER: if (locale.getLanguage().equals("pt")) { return "Novembro"; } return "November"; case Calendar.DECEMBER: if (locale.getLanguage().equals("pt")) { return "Dezembro"; } return "December"; case Calendar.UNDECIMBER: return "Undecember"; default: return "Error"; } }
From source file:lineage2.gameserver.network.clientpackets.EnterWorld.java
/** * Method runImpl.//w w w .java2 s . c o m */ @Override protected void runImpl() { GameClient client = getClient(); Player activeChar = client.getActiveChar(); if (activeChar == null) { client.closeNow(false); return; } int MyObjectId = activeChar.getObjectId(); Long MyStoreId = activeChar.getStoredId(); for (Castle castle : ResidenceHolder.getInstance().getResidenceList(Castle.class)) { activeChar.sendPacket(new ExCastleState(castle)); } synchronized (_lock) { for (Player cha : GameObjectsStorage.getAllPlayersForIterate()) { if (MyStoreId.equals(cha.getStoredId())) { continue; } try { if (cha.getObjectId() == MyObjectId) { _log.warn("Double EnterWorld for char: " + activeChar.getName()); cha.kick(); } } catch (Exception e) { _log.error("", e); } } } GameStats.incrementPlayerEnterGame(); boolean first = activeChar.entering; if (first) { activeChar.setOnlineStatus(true); if (activeChar.getPlayerAccess().GodMode && !Config.SHOW_GM_LOGIN) { activeChar.setInvisibleType(InvisibleType.NORMAL); } activeChar.setNonAggroTime(Long.MAX_VALUE); activeChar.spawnMe(); if (activeChar.isInStoreMode()) { if (!TradeHelper.checksIfCanOpenStore(activeChar, activeChar.getPrivateStoreType())) { activeChar.setPrivateStoreType(Player.STORE_PRIVATE_NONE); activeChar.standUp(); activeChar.broadcastCharInfo(); } } activeChar.setRunning(); activeChar.standUp(); activeChar.startTimers(); } activeChar.sendPacket(new ExBR_PremiumState(activeChar, activeChar.hasBonus())); activeChar.getMacroses().sendUpdate(0x01, 0, true); activeChar.sendPacket(new SSQInfo(), new HennaInfo(activeChar)); activeChar.sendItemList(false); activeChar.sendPacket(new ShortCutInit(activeChar)); activeChar.sendPacket(new ShortCutInit(activeChar), new SkillList(activeChar), new SkillCoolTime(activeChar)); activeChar.sendPacket(new SkillCoolTime(activeChar)); //activeChar.sendPacket(new ExCastleState(_castle)); activeChar.sendPacket(new ExVitalityEffectInfo(activeChar)); for (Castle castle : ResidenceHolder.getInstance().getResidenceList(Castle.class)) { activeChar.sendPacket(new ExCastleState(castle)); } activeChar.sendPacket(SystemMsg.WELCOME_TO_THE_WORLD_OF_LINEAGE_II); Announcements.getInstance().showAnnouncements(activeChar); if (first) { activeChar.getListeners().onEnter(); } if (first && (activeChar.getCreateTime() > 0)) { Calendar create = Calendar.getInstance(); create.setTimeInMillis(activeChar.getCreateTime()); Calendar now = Calendar.getInstance(); int day = create.get(Calendar.DAY_OF_MONTH); if ((create.get(Calendar.MONTH) == Calendar.FEBRUARY) && (day == 29)) { day = 28; } int myBirthdayReceiveYear = activeChar.getVarInt(Player.MY_BIRTHDAY_RECEIVE_YEAR, 0); if ((create.get(Calendar.MONTH) == now.get(Calendar.MONTH)) && (create.get(Calendar.DAY_OF_MONTH) == day)) { if (((myBirthdayReceiveYear == 0) && (create.get(Calendar.YEAR) != now.get(Calendar.YEAR))) || ((myBirthdayReceiveYear > 0) && (myBirthdayReceiveYear != now.get(Calendar.YEAR)))) { Mail mail = new Mail(); mail.setSenderId(1); mail.setSenderName(StringHolder.getInstance().getNotNull(activeChar, "birthday.npc")); mail.setReceiverId(activeChar.getObjectId()); mail.setReceiverName(activeChar.getName()); mail.setTopic(StringHolder.getInstance().getNotNull(activeChar, "birthday.title")); mail.setBody(StringHolder.getInstance().getNotNull(activeChar, "birthday.text")); ItemInstance item = ItemFunctions.createItem(21169); item.setLocation(ItemInstance.ItemLocation.MAIL); item.setCount(1L); item.save(); mail.addAttachment(item); mail.setUnread(true); mail.setType(Mail.SenderType.BIRTHDAY); mail.setExpireTime((720 * 3600) + (int) (System.currentTimeMillis() / 1000L)); mail.save(); activeChar.setVar(Player.MY_BIRTHDAY_RECEIVE_YEAR, String.valueOf(now.get(Calendar.YEAR)), -1); } } } if (activeChar.getClan() != null) { notifyClanMembers(activeChar); activeChar.sendPacket(activeChar.getClan().listAll()); activeChar.sendPacket(new PledgeShowInfoUpdate(activeChar.getClan()), new PledgeSkillList(activeChar.getClan())); } if (first && Config.ALLOW_WEDDING) { CoupleManager.getInstance().engage(activeChar); CoupleManager.getInstance().notifyPartner(activeChar); } if (first) { activeChar.getFriendList().notifyFriends(true); loadTutorial(activeChar); activeChar.restoreDisableSkills(); activeChar.mentoringLoginConditions(); } sendPacket(new L2FriendList(activeChar), new ExStorageMaxCount(activeChar), new QuestList(activeChar), new ExBasicActionList(activeChar), new EtcStatusUpdate(activeChar)); activeChar.checkHpMessages(activeChar.getMaxHp(), activeChar.getCurrentHp()); activeChar.checkDayNightMessages(); if (Config.PETITIONING_ALLOWED) { PetitionManager.getInstance().checkPetitionMessages(activeChar); } if (!first) { if (activeChar.isCastingNow()) { Creature castingTarget = activeChar.getCastingTarget(); Skill castingSkill = activeChar.getCastingSkill(); long animationEndTime = activeChar.getAnimationEndTime(); if ((castingSkill != null) && (castingTarget != null) && castingTarget.isCreature() && (activeChar.getAnimationEndTime() > 0)) { sendPacket(new MagicSkillUse(activeChar, castingTarget, castingSkill.getId(), castingSkill.getLevel(), (int) (animationEndTime - System.currentTimeMillis()), 0)); } } if (activeChar.isInBoat()) { activeChar.sendPacket(activeChar.getBoat().getOnPacket(activeChar, activeChar.getInBoatPosition())); } if (activeChar.isMoving || activeChar.isFollow) { sendPacket(activeChar.movePacket()); } if (activeChar.getMountNpcId() != 0) { sendPacket(new Ride(activeChar)); } if (activeChar.isFishing()) { activeChar.stopFishing(); } } activeChar.entering = false; activeChar.sendUserInfo(); if (activeChar.isSitting()) { activeChar.sendPacket(new ChangeWaitType(activeChar, ChangeWaitType.WT_SITTING)); } if (activeChar.getPrivateStoreType() != Player.STORE_PRIVATE_NONE) { if (activeChar.getPrivateStoreType() == Player.STORE_PRIVATE_BUY) { sendPacket(new PrivateStoreMsgBuy(activeChar)); } else if ((activeChar.getPrivateStoreType() == Player.STORE_PRIVATE_SELL) || (activeChar.getPrivateStoreType() == Player.STORE_PRIVATE_SELL_PACKAGE)) { sendPacket(new PrivateStoreMsgSell(activeChar)); } else if (activeChar.getPrivateStoreType() == Player.STORE_PRIVATE_MANUFACTURE) { sendPacket(new RecipeShopMsg(activeChar)); } } if (activeChar.isDead()) { sendPacket(new Die(activeChar)); } activeChar.unsetVar("offline"); activeChar.sendActionFailed(); if (first && activeChar.isGM() && Config.SAVE_GM_EFFECTS && activeChar.getPlayerAccess().CanUseGMCommand) { if (activeChar.getVarB("gm_silence")) { activeChar.setMessageRefusal(true); activeChar.sendPacket(SystemMsg.MESSAGE_REFUSAL_MODE); } if (activeChar.getVarB("gm_invul")) { activeChar.setIsInvul(true); activeChar.startAbnormalEffect(AbnormalEffect.S_INVINCIBLE); activeChar.sendMessage(activeChar.getName() + " is now immortal."); } try { int var_gmspeed = Integer.parseInt(activeChar.getVar("gm_gmspeed")); if ((var_gmspeed >= 1) && (var_gmspeed <= 4)) { activeChar.doCast(SkillTable.getInstance().getInfo(7029, var_gmspeed), activeChar, true); } } catch (Exception E) { } } PlayerMessageStack.getInstance().CheckMessages(activeChar); sendPacket(ClientSetTime.STATIC, new ExSetCompassZoneCode(activeChar)); Pair<Integer, OnAnswerListener> entry = activeChar.getAskListener(false); if ((entry != null) && (entry.getValue() instanceof ReviveAnswerListener)) { sendPacket(new ConfirmDlg( SystemMsg.C1_IS_MAKING_AN_ATTEMPT_TO_RESURRECT_YOU_IF_YOU_CHOOSE_THIS_PATH_S2_EXPERIENCE_WILL_BE_RETURNED_FOR_YOU, 0).addString("Other player").addString("some")); } if (activeChar.isCursedWeaponEquipped()) { CursedWeaponsManager.getInstance().showUsageTime(activeChar, activeChar.getCursedWeaponEquippedId()); } if (!first) { if (activeChar.isInObserverMode()) { if (activeChar.getObserverMode() == Player.OBSERVER_LEAVING) { activeChar.returnFromObserverMode(); } else if (activeChar.getOlympiadObserveGame() != null) { activeChar.leaveOlympiadObserverMode(true); } else { activeChar.leaveObserverMode(); } } else if (activeChar.isVisible()) { World.showObjectsToPlayer(activeChar); } for (Summon summon : activeChar.getSummonList()) { sendPacket(new PetInfo(summon)); } if (activeChar.isInParty()) { sendPacket(new PartySmallWindowAll(activeChar.getParty(), activeChar)); for (Player member : activeChar.getParty().getPartyMembers()) { if (member != activeChar) { sendPacket(new PartySpelled(member, true)); for (Summon memberPet : member.getSummonList()) { sendPacket(new PartySpelled(memberPet, true)); } sendPacket(RelationChanged.update(activeChar, member, activeChar)); } } if (activeChar.getParty().isInCommandChannel()) { sendPacket(ExMPCCOpen.STATIC); } } for (int shotId : activeChar.getAutoSoulShot()) { sendPacket(new ExAutoSoulShot(shotId, true)); } for (Effect e : activeChar.getEffectList().getAllFirstEffects()) { if (e.getSkill().isToggle()) { sendPacket(new MagicSkillLaunched(activeChar.getObjectId(), e.getSkill().getId(), e.getSkill().getLevel(), activeChar)); } } activeChar.broadcastCharInfo(); } else { activeChar.sendUserInfo(); } activeChar.updateEffectIcons(); activeChar.setCurrentHpMp(activeChar.getActiveSubClass().getlogOnHp(), activeChar.getActiveSubClass().getlogOnMp()); activeChar.setCurrentCp(activeChar.getActiveSubClass().getlogOnCp()); activeChar.updateStats(); if (Config.ALT_PCBANG_POINTS_ENABLED) { activeChar.sendPacket(new ExPCCafePointInfo(activeChar, 0, 1, 2, 12)); } if (!activeChar.getPremiumItemList().isEmpty()) { activeChar.sendPacket(Config.GOODS_INVENTORY_ENABLED ? ExGoodsInventoryChangedNotify.STATIC : ExNotifyPremiumItem.STATIC); } if (activeChar.getVarB("HeroPeriod") && Config.SERVICES_HERO_SELL_ENABLED) { activeChar.setHero(activeChar); } activeChar.sendVoteSystemInfo(); activeChar.sendPacket(new ExReceiveShowPostFriend(activeChar)); activeChar.sendPacket(new ExSubjobInfo(activeChar.getPlayer(), false)); activeChar.sendPacket(new ExVitalityEffectInfo(activeChar)); activeChar.sendPacket(new ExTutorialList()); activeChar.sendPacket(new ExWaitWaitingSubStituteInfo(true)); for (Effect effect : activeChar.getEffectList().getAllEffects()) { if (effect.isInUse()) { if (effect.getSkill().getId() == 10022) { activeChar.setIsIgnoringDeath(true); } } } if (Config.ALT_GAME_REMOVE_PREVIOUS_CERTIFICATES) { Skill[] allSkill = activeChar.getAllSkillsArray(); int totalCertificates = 0; for (Skill skl : allSkill) { if (skl.getId() >= 1573 && skl.getId() <= 1581) { totalCertificates += skl.getLevel(); activeChar.removeSkill(skl, true); } } if (totalCertificates > 0) { activeChar.getInventory().addItem(10280, totalCertificates); _log.info("EnterWorld: Player - " + activeChar.getName() + " - Has received " + totalCertificates + " by previous skill certificate deletion."); for (SubClass sc : activeChar.getSubClassList().values()) { sc.setCertification(0); activeChar.store(true); } } } activeChar.sendPacket(new ExAcquirableSkillListByClass(activeChar)); activeChar.setPartySearchStatus(true); activeChar.sendPacket(new ExWaitWaitingSubStituteInfo(true)); checkNewMail(activeChar); activeChar.sendPacket(new ExChangeMPCost(1, -3)); activeChar.sendPacket(new ExChangeMPCost(1, -5)); activeChar.sendPacket(new ExChangeMPCost(0, 20)); activeChar.sendPacket(new ExChangeMPCost(1, -10)); activeChar.sendPacket(new ExChangeMPCost(3, -20)); activeChar.sendPacket(new ExChangeMPCost(22, -20)); if (activeChar.getVar("startMovie") == null) { activeChar.setVar("startMovie", "1", -1); activeChar.sendPacket(new ExShowUsmVideo(ExShowUsmVideo.GD1_INTRO)); } if ((activeChar.getLevel() > 84) && !activeChar.isAwaking()) { AwakingManager.getInstance().SendReqToStartQuest(activeChar); } if (activeChar.isAwaking()) //If the characters returns to Main, or dual Subclass and Delete Skills prof are active, do check of Correct skills { if (Config.ALT_CHECK_SKILLS_AWAKENING) { AwakingManager.getInstance().checkAwakenPlayerSkills(activeChar); } } }
From source file:ch.cyberduck.core.ftp.parser.UnixFTPEntryParserTest.java
@Test public void testUpperCaseMonths() { FTPFileEntryParser parser = new FTPParserSelector().getParser("UNIX"); FTPFile parsed;/* w w w . j av a 2s.co m*/ parsed = parser.parseFTPEntry("drwxrwxrwx 41 spinkb spinkb 1394 Feb 21 20:57 Desktop"); assertNotNull(parsed); assertEquals("Desktop", parsed.getName()); assertEquals(FTPFile.DIRECTORY_TYPE, parsed.getType()); assertEquals("spinkb", parsed.getUser()); assertEquals("spinkb", parsed.getGroup()); assertEquals(Calendar.FEBRUARY, parsed.getTimestamp().get(Calendar.MONTH)); assertEquals(21, parsed.getTimestamp().get(Calendar.DAY_OF_MONTH)); }