List of usage examples for java.lang Boolean TRUE
Boolean TRUE
To view the source code for java.lang Boolean TRUE.
Click Source Link
From source file:com.jnj.b2b.cockpits.cmscockpit.session.impl.DefaultCmsCockpitPerspective.java
@Override protected void activateItemInEditorArea(final TypedObject activeItem) { if (!Boolean.TRUE.equals(DefaultCmsCockpitPerspective.activationFallBack.get())) { if (activeItem != null && getTypeService().checkItemAlive(activeItem) && UISessionUtils.getCurrentSession().getTypeService() .getBaseType(Cms2Constants.TC.ABSTRACTPAGE).isAssignableFrom(activeItem.getType())) { if (checkActiveSiteAndCatalog(activeItem)) { closeOtherBrowsers(activeItem); }//from w w w . j a v a 2 s. c o m DefaultCmsPageBrowserModel model = getPageBrowserFor(activeItem); if (model == null) { model = newDefaultCmsPageBrowserModel(); model.setCurrentPageObject(activeItem); model.initialize(); } getBrowserArea().show(model); //we also open editor area if (getActiveItem() != null) { super.activateItemInEditorArea(activeItem); } } else { super.activateItemInEditorArea(activeItem); } } else { super.activateItemInEditorArea(activeItem); } }
From source file:org.bremersee.common.spring.autoconfigure.JaxbAutoConfiguration.java
public static Jaxb2Marshaller createJaxbMarshaller(final Collection<String> packages) { final Set<String> packageSet = createPackageSet(packages); Jaxb2Marshaller m = new Jaxb2Marshaller(); Map<String, Object> marshallerProperties = new HashMap<>(); marshallerProperties.put(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); m.setMarshallerProperties(marshallerProperties); m.setContextPaths(packageSet.toArray(new String[packageSet.size()])); return m;//from w w w . ja v a 2 s.c o m }
From source file:com.healthcit.cacure.web.controller.LoginController.java
@RequestMapping(method = RequestMethod.POST) public String onSubmit(UserCredentials userCredentials, BindingResult result, HttpServletRequest req, HttpServletResponse resp) {// w w w . j a v a2s .com Validator validator = new UserCredentialsValidator(); validator.validate(userCredentials, result); if (result.hasErrors()) { req.setAttribute(ATTR_VALIDATION_ERR, Boolean.TRUE); return "login"; } StringBuilder jSecurityRedirect = new StringBuilder("j_security_check"); jSecurityRedirect.append("?userName=").append(userCredentials.getUserName()); jSecurityRedirect.append("&password=").append(userCredentials.getPassword()); try { resp.sendRedirect(jSecurityRedirect.toString()); } catch (IOException e) { log.error("could not redirect to j_security_check"); } return "login"; }
From source file:io.cloudslang.schema.context.ScoreDatabaseContext.java
@Bean Properties jpaProperties() {//from w ww .j ava2 s. c o m Properties props = new Properties(); props.setProperty("hibernate.format_sql", Boolean.TRUE.toString()); props.setProperty("hibernate.hbm2ddl.auto", System.getProperty("hibernate.hbm2ddl.auto", "validate")); props.setProperty("hibernate.cache.use_query_cache", Boolean.FALSE.toString()); props.setProperty("hibernate.generate_statistics", Boolean.FALSE.toString()); props.setProperty("hibernate.cache.use_second_level_cache", Boolean.FALSE.toString()); props.setProperty("hibernate.order_updates", Boolean.TRUE.toString()); props.setProperty("hibernate.order_inserts", Boolean.TRUE.toString()); props.setProperty("hibernate.dialect_resolvers", "io.cloudslang.engine.dialects.ScoreDialectResolver"); return props; }
From source file:de.hybris.platform.importcockpit.services.impex.generator.operations.impl.DefaultDataGeneratorOperationTest.java
@Before public void setUp() { MockitoAnnotations.initMocks(this); when(Boolean.valueOf(inputDataLine.isEmpty())).thenReturn(Boolean.FALSE); when(Boolean.valueOf(atomicTypeMapping.hasChildren())).thenReturn(Boolean.TRUE); }
From source file:com.alibaba.sample.petstore.web.store.module.action.CartAction.java
public void doAddItem(HttpSession session, @Param("itemId") String itemId, Context context) throws Exception { Cart cart = (Cart) session.getAttribute(PETSTORE_CART_KEY); if (cart == null) { cart = new Cart(); }/* w ww . j a v a 2 s . c o m*/ cart.addCartItem(itemId); session.setAttribute(PETSTORE_CART_KEY, cart); context.put("itemAdded", Boolean.TRUE); }
From source file:com.example.app.note.ui.NotePropertyEditor.java
@Override public void init() { super.init(); Closer closer = this.new Closer(); ReflectiveAction save = CommonActions.SAVE.defaultAction(); save.setActionListener(ev -> {/*ww w .ja va2s .c o m*/ if (persist(input -> { assert input != null; _noteDAO.saveNote(input); fireValueSaved(input); return Boolean.TRUE; })) { closer.actionPerformed(ev); } }); ReflectiveAction cancel = CommonActions.CANCEL.defaultAction(); cancel.setActionListener(closer); setPersistenceActions(save, cancel); }
From source file:org.lightmare.rest.providers.JacksonFXmlFeature.java
@Override public boolean configure(FeatureContext context) { boolean valid = Boolean.TRUE; String runtimeType = context.getConfiguration().getRuntimeType().name().toLowerCase(); String disableMoxy = StringUtils.concat(DISABLE_JSON_KEY, runtimeType); context.property(disableMoxy, valid); Class<?>[] ios = new Class[] { MessageBodyReader.class, MessageBodyWriter.class }; context.register(JacksonJaxbJsonProvider.class, ios); return valid; }
From source file:com.multimedia.service.commonItem.CmsCommonItemServiceImpl.java
@Override public CommonItem getInsertBean(CommonItem obj) { if (obj == null) obj = new CommonItem(); obj.setActive(Boolean.TRUE); obj.setViews(Long.valueOf(0)); return obj;/*from w ww.j av a 2 s . c o m*/ }
From source file:io.github.howiefh.jeews.modules.sys.controller.LoginCotroller.java
@RequestMapping(value = "", method = RequestMethod.POST) public Map<String, Object> login(@RequestBody User u) { String username = u.getUsername(); String password = u.getPassword(); if (username == null) { throw new NullPointerException("????"); }// ww w .ja v a2 s. c o m User user = userService.findByName(username); if (user == null) { throw new UnknownAccountException("??");// ?? } if (Boolean.TRUE.equals(user.getLocked())) { throw new LockedAccountException("???"); // ??? } if (!userService.passwordsMatch(user, password)) { throw new IncorrectCredentialsException("????"); } JWTSigner signer = new JWTSigner(secret); Options options = new Options(); // 7 * 24 * 60 * 60 = 604800 options.setExpirySeconds(604800); Map<String, Object> claims = new HashMap<String, Object>(); RolePermission rolePermission = user.new RolePermission(); claims.put("perms", rolePermission.getPermissionSet()); claims.put("iss", user.getUsername()); String token = signer.sign(claims, options); Map<String, Object> map = new HashMap<String, Object>(); map.put("access_token", token); Map<String, Object> userMap = new HashMap<String, Object>(); userMap.put("id", user.getId()); userMap.put("username", user.getUsername()); userMap.put("perms", rolePermission.getPermissionSet()); userMap.put("roles", rolePermission.getRoleSet()); map.put("user", userMap); return map; }