java.util.zip.DeflaterInputStream#org.apache.commons.lang3.BooleanUtils源码实例Demo

下面列出了java.util.zip.DeflaterInputStream#org.apache.commons.lang3.BooleanUtils 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: moneta   文件: MonetaConfiguration.java
protected void gatherTopicAttributes(XMLConfiguration config, Topic topic,
		int i) {
	String readOnlyStr;
	topic.setTopicName(config.getString("Topics.Topic(" + i + ")[@name]"));
	topic.setPluralName(config.getString("Topics.Topic(" + i + ")[@pluralName]"));
	topic.setDataSourceName(config.getString("Topics.Topic(" + i + ")[@dataSource]"));
	topic.setSchemaName(config.getString("Topics.Topic(" + i + ")[@schema]"));
	topic.setCatalogName(config.getString("Topics.Topic(" + i + ")[@catalog]"));
	topic.setTableName(config.getString("Topics.Topic(" + i + ")[@table]"));
	
	readOnlyStr = config.getString("Topics.Topic(" + i + ")[@readOnly]");
	Boolean bValue = BooleanUtils.toBooleanObject(readOnlyStr);
	if (bValue != null)  {
		topic.setReadOnly(bValue);
	}
}
 
源代码2 项目: o2oa   文件: ActionCreateWithWorkPath4.java
ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, String path0, String path1, String path2,
		String path3, String path4, JsonElement jsonElement) throws Exception {
	ActionResult<Wo> result = new ActionResult<>();
	Work work = null;
	try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
		Business business = new Business(emc);
		work = emc.find(id, Work.class);
		if (null == work) {
			throw new ExceptionEntityNotExist(id, Work.class);
		}
		WoControl control = business.getControl(effectivePerson, work, WoControl.class);
		if (BooleanUtils.isNotTrue(control.getAllowSave())) {
			throw new ExceptionWorkAccessDenied(effectivePerson.getDistinguishedName(), work.getTitle(),
					work.getId());
		}
	}
	Wo wo = ThisApplication.context().applications()
			.postQuery(x_processplatform_service_processing.class,
					Applications.joinQueryUri("data", "work", work.getId(), path0, path1, path2, path3, path4),
					jsonElement, work.getJob())
			.getData(Wo.class);
	result.setData(wo);
	return result;
}
 
源代码3 项目: gvnix   文件: QuerydslUtilsBeanImpl.java
/**
 * {@inheritDoc}
 */
@Override
public <T> BooleanExpression createBooleanExpression(
        PathBuilder<T> entityPath, String fieldName, Object searchObj,
        String operator) {
    Boolean value = BooleanUtils.toBooleanObject((String) searchObj);
    if (value != null) {
        if (StringUtils.equalsIgnoreCase(operator, OPERATOR_GOE)) {
            return entityPath.getBoolean(fieldName).goe(value);
        }
        else if (StringUtils.equalsIgnoreCase(operator, "gt")) {
            return entityPath.getBoolean(fieldName).gt(value);
        }
        else if (StringUtils.equalsIgnoreCase(operator, OPERATOR_LOE)) {
            return entityPath.getBoolean(fieldName).loe(value);
        }
        else if (StringUtils.equalsIgnoreCase(operator, "lt")) {
            return entityPath.getBoolean(fieldName).lt(value);
        }
    }
    return entityPath.get(fieldName).eq(searchObj);
}
 
源代码4 项目: o2oa   文件: ActionMode.java
ActionResult<Wo> execute(EffectivePerson effectivePerson) throws Exception {
	ActionResult<Wo> result = new ActionResult<>();
	Wo wo = new Wo();
	if (BooleanUtils.isTrue(Config.person().getCodeLogin())) {
		wo.setCodeLogin(true);
	} else {
		wo.setCodeLogin(false);
	}
	if (BooleanUtils.isTrue(Config.person().getBindLogin())) {
		wo.setBindLogin(true);
	} else {
		wo.setBindLogin(false);
	}
	if (BooleanUtils.isTrue(Config.person().getFaceLogin())) {
		wo.setFaceLogin(true);
	} else {
		wo.setFaceLogin(false);
	}
	if (BooleanUtils.isTrue(Config.person().getCaptchaLogin())) {
		wo.setCaptchaLogin(true);
	} else {
		wo.setCaptchaLogin(false);
	}
	result.setData(wo);
	return result;
}
 
源代码5 项目: o2oa   文件: ActionComplexAppointFormMobile.java
ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, String formFlag) throws Exception {
	try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
		ActionResult<Wo> result = new ActionResult<>();
		Business business = new Business(emc);
		WorkCompleted workCompleted = emc.find(id, WorkCompleted.class);
		if (null == workCompleted) {
			throw new ExceptionEntityNotExist(id, WorkCompleted.class);
		}
		Wo wo = this.get(business, effectivePerson, workCompleted, Wo.class);
		wo.setForm(this.getForm(business, formFlag));
		WorkCompletedControl control = wo.getControl();
		if (BooleanUtils.isNotTrue(control.getAllowVisit())) {
			throw new ExceptionWorkCompletedAccessDenied(effectivePerson.getDistinguishedName(), id);
		}
		result.setData(wo);
		return result;
	}
}
 
源代码6 项目: examples-javafx-repos1   文件: SettingsDAOImpl.java
@Override
public void load() throws IOException {

    File f = new File(getAbsolutePath());
    if( f.exists() ) {

        if( logger.isDebugEnabled() ) {
            logger.debug("[LOAD] " + f.getName() + " exists; loading");
        }
        FileReader fr = new FileReader(f);
        Properties props = new Properties();
        props.load(fr);
        settings.setRoundUp(BooleanUtils.toBoolean(props.getProperty("oldscores.roundUp")));
        fr.close();
    } else {
        if( logger.isDebugEnabled() ) {
            logger.debug("[LOAD " + f.getName() + " does not exist");
        }
    }

}
 
源代码7 项目: cuba   文件: Scheduling.java
@Override
public String printActiveScheduledTasks() {
    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
    StringBuilder sb = new StringBuilder();
    List<ScheduledTask> tasks = scheduling.getActiveTasks();
    for (ScheduledTask task : tasks) {
        sb.append(task).append(", lastStart=");
        if (task.getLastStartTime() != null) {
            sb.append(dateFormat.format(task.getLastStartTime()));
            if (BooleanUtils.isTrue(task.getSingleton()))
                sb.append(" on ").append(task.getLastStartServer());
        } else {
            sb.append("<never>");
        }
        sb.append("\n");
    }
    return sb.toString();
}
 
源代码8 项目: o2oa   文件: WorkLogTree.java
public WorkLogTree(List<WorkLog> list) throws Exception {

		for (WorkLog o : list) {
			this.nodes().add(new Node(o));
		}

		List<String> froms = ListTools.extractProperty(list, WorkLog.fromActivityToken_FIELDNAME, String.class, true,
				true);
		List<String> arriveds = ListTools.extractProperty(list, WorkLog.arrivedActivityToken_FIELDNAME, String.class,
				true, true);
		List<String> values = ListUtils.subtract(froms, arriveds);
		WorkLog begin = list.stream()
				.filter(o -> BooleanUtils.isTrue(o.getConnected()) && values.contains(o.getFromActivityToken()))
				.findFirst().orElse(null);
		if (null == begin) {
			throw new ExceptionBeginNotFound();
		}
		root = this.find(begin);
//		for (Node o : nodes) {
//			this.associate();
//		}
		this.associate();
	}
 
源代码9 项目: cuba   文件: ListEditorPopupWindow.java
@SuppressWarnings("unchecked")
protected TextField createTextField(Datatype datatype) {
    TextField textField = uiComponents.create(TextField.class);
    textField.setDatatype(datatype);

    if (!BooleanUtils.isFalse(editable)) {
        FilterHelper.ShortcutListener shortcutListener = new FilterHelper.ShortcutListener("add", new KeyCombination(KeyCombination.Key.ENTER)) {
            @Override
            public void handleShortcutPressed() {
                _addValue(textField);
            }
        };
        filterHelper.addShortcutListener(textField, shortcutListener);
    }
    return textField;
}
 
/**
 * Creates instance of the adaptor.
 * @param def broker definition
 * @throws InvalidDefinitionException if invalid broker definition
 */
public AgsBrokerDefinitionAdaptor(EntityDefinition def) throws InvalidDefinitionException {
  super(def);
  this.credAdaptor =new CredentialsDefinitionAdaptor(def);
  this.botsAdaptor = new BotsBrokerDefinitionAdaptor(def);
  if (StringUtils.trimToEmpty(def.getType()).isEmpty()) {
    def.setType(AgsConnector.TYPE);
  } else if (!AgsConnector.TYPE.equals(def.getType())) {
    throw new InvalidDefinitionException("Broker definition doesn't match");
  } else {
    try {
      hostUrl = new URL(get(P_HOST_URL));
    } catch (MalformedURLException ex) {
      throw new InvalidDefinitionException(String.format("Invalid %s: %s", P_HOST_URL,get(P_HOST_URL)), ex);
    }
    enableLayers = BooleanUtils.toBoolean(get(P_ENABLE_LAYERS));
    emitXml = BooleanUtils.toBooleanDefaultIfNull(BooleanUtils.toBooleanObject(get(P_EMIT_XML)), true);
    emitJson = BooleanUtils.toBooleanDefaultIfNull(BooleanUtils.toBooleanObject(get(P_EMIT_JSON)), false);
  }
}
 
源代码11 项目: o2oa   文件: ActionGetWithWorkCompletedFromData.java
ActionResult<JsonElement> execute(EffectivePerson effectivePerson, String id) throws Exception {
	try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
		ActionResult<JsonElement> result = new ActionResult<>();
		Business business = new Business(emc);
		WorkCompleted workCompleted = emc.find(id, WorkCompleted.class);
		if (null == workCompleted) {
			throw new ExceptionEntityNotExist(id, WorkCompleted.class);
		}
		WoControl control = business.getControl(effectivePerson, workCompleted, WoControl.class);
		if (BooleanUtils.isNotTrue(control.getAllowVisit())) {
			throw new ExceptionWorkCompletedAccessDenied(effectivePerson.getDistinguishedName(),
					workCompleted.getTitle(), workCompleted.getId());
		}
		result.setData(XGsonBuilder.convert(workCompleted.getProperties().getData(), JsonElement.class));
		return result;
	}
}
 
源代码12 项目: sailfish-core   文件: AbstractMessageFactory.java
@Override
public IMessage createMessage(MsgMetaData metaData) {
    if (metaData.getMsgNamespace().equals(namespace)) {
        metaData.setDictionaryURI(dictionaryURI);
        metaData.setProtocol(getProtocol());

        if (dictionary != null) { //FIXME: Remove this check after removing init(String namespace, SailfishURI dictionaryURI) method
            IMessageStructure messageStructure = dictionary.getMessages().get(metaData.getMsgName());
            if (messageStructure != null) {
                Boolean isAdmin = getAttributeValue(messageStructure, ATTRIBUTE_IS_ADMIN);
                metaData.setAdmin(BooleanUtils.toBoolean(isAdmin));
            }
        }
    }
    IMessage message = new MapMessage(metaData);
    createComplexFields(message);
    return message;
}
 
源代码13 项目: o2oa   文件: ActionOauthGet.java
ActionResult<Wo> execute(EffectivePerson effectivePerson, String name) throws Exception {
	ActionResult<Wo> result = new ActionResult<>();
	OauthClient oauthClient = null;
	if (ListTools.isNotEmpty(Config.token().getOauthClients())) {
		for (OauthClient o : Config.token().getOauthClients()) {
			if (BooleanUtils.isTrue(o.getEnable()) && StringUtils.equals(o.getName(), name)) {
				oauthClient = o;
			}
		}
	}
	if (null == oauthClient) {
		throw new ExceptionOauthNotExist(name);
	}
	Wo wo = new Wo();
	wo.setName(oauthClient.getName());
	wo.setRedirectUri(oauthClient.getAuthAddress());
	wo.setAuthAddress(oauthClient.getAuthAddress());
	wo.setAuthMethod(oauthClient.getAuthMethod());
	wo.setIcon(oauthClient.getIcon());
	String authParameter = this.fillAuthParameter(oauthClient.getAuthParameter(), oauthClient);
	logger.debug("auth parameter:{}.", authParameter);
	wo.setAuthParameter(authParameter);
	result.setData(wo);
	return result;
}
 
源代码14 项目: openemm   文件: ComCompanyServiceImpl.java
private void setupSettings(ComCompany company, CompanySettingsDto settingsDto) {
    company.setSalutationExtended(BooleanUtils.toInteger(settingsDto.isHasExtendedSalutation()));
    company.setStatAdmin(settingsDto.getExecutiveAdministrator());
    company.setContactTech(settingsDto.getTechnicalContacts());

    /* update export notify admin field if HasDataExportNotify checkbox true,
            otherwise set export notify admin value 0 */
    if (settingsDto.isHasDataExportNotify()) {
        company.setExportNotifyAdmin(settingsDto.getExecutiveAdministrator());
    } else {
        company.setExportNotifyAdmin(0);
    }
    company.setSecretKey(RandomStringUtils.randomAscii(32));
    company.setSector(settingsDto.getSector());
    company.setBusiness(settingsDto.getBusiness());
}
 
源代码15 项目: cuba   文件: WebGroupBox.java
@Override
public boolean saveSettings(Element element) {
    if (!isSettingsEnabled()) {
        return false;
    }

    if (!settingsChanged) {
        return false;
    }

    Element groupBoxElement = element.element("groupBox");
    if (groupBoxElement != null) {
        element.remove(groupBoxElement);
    }
    groupBoxElement = element.addElement("groupBox");
    groupBoxElement.addAttribute("expanded", BooleanUtils.toStringTrueFalse(isExpanded()));
    return true;
}
 
源代码16 项目: commons-configuration   文件: PropertyConverter.java
/**
 * Convert the specified object into a Boolean. Internally the
 * {@code org.apache.commons.lang.BooleanUtils} class from the
 * <a href="https://commons.apache.org/lang/">Commons Lang</a>
 * project is used to perform this conversion. This class accepts some more
 * tokens for the boolean value of <b>true</b>, e.g. {@code yes} and
 * {@code on}. Please refer to the documentation of this class for more
 * details.
 *
 * @param value the value to convert
 * @return the converted value
 * @throws ConversionException thrown if the value cannot be converted to a boolean
 */
public static Boolean toBoolean(final Object value) throws ConversionException
{
    if (value instanceof Boolean)
    {
        return (Boolean) value;
    }
    else if (value instanceof String)
    {
        final Boolean b = BooleanUtils.toBooleanObject((String) value);
        if (b == null)
        {
            throw new ConversionException("The value " + value + " can't be converted to a Boolean object");
        }
        return b;
    }
    else
    {
        throw new ConversionException("The value " + value + " can't be converted to a Boolean object");
    }
}
 
源代码17 项目: AnyMock   文件: HttpMockServiceImpl.java
private HttpInterfaceBO loadHttpInterfaceBO(HttpInterfaceKeyBO httpInterfaceKeyBO) {
    logger.info("Loading HTTP interface from redis...");
    HttpInterfaceBO httpInterfaceBO = httpInterfaceCacheManager.get(httpInterfaceKeyBO);
    if (httpInterfaceBO == null) {
        logger.info("Loading HTTP interface from DB...");
        httpInterfaceBO = httpInterfaceDao.queryByKey(httpInterfaceKeyBO);
        if (httpInterfaceBO == null) {
            throw new BizException(ResultCode.NOT_FOUND_HTTP_INTERFACE);
        }
        httpInterfaceCacheManager.set(httpInterfaceBO);
    }

    if (BooleanUtils.isNotTrue(httpInterfaceBO.getStart())) {
        throw new BizException(ResultCode.HTTP_INTERFACE_NOT_OPEN);
    }
    return httpInterfaceBO;
}
 
源代码18 项目: o2oa   文件: ExternalDataSources.java
public String log(String name) {
	int idx = 0;
	for (ExternalDataSource o : this) {
		idx++;
		if (BooleanUtils.isTrue(o.getEnable())) {
			String n = "s" + ("" + (1000 + idx)).substring(1);
			if (StringUtils.equals(n, name)) {
				String value = o.getLogLevel().toString();
				return "DefaultLevel=WARN, Tool=" + value + ", Enhance=" + value + ", METADATA=" + value
						+ ", Runtime=" + value + ", Query=" + value + ", DataCache=" + value + ", JDBC=" + value
						+ ", SQL=" + value;
			}
		}
	}
	return "DefaultLevel=WARN, Tool=WARN, Enhance=WARN, METADATA=WARN, Runtime=WARN, Query=WARN, DataCache=WARN, JDBC=ERROR, SQL=WARN";
}
 
源代码19 项目: o2oa   文件: HttpToken.java
public EffectivePerson who(HttpServletRequest request, HttpServletResponse response, String key) throws Exception {
	EffectivePerson effectivePerson = this.who(this.getToken(request), key);
	effectivePerson.setRemoteAddress(this.remoteAddress(request));
	effectivePerson.setUserAgent(this.userAgent(request));
	effectivePerson.setUri(request.getRequestURI());
	/* 加入调试标记 */
	Object debugger = request.getHeader(HttpToken.X_Debugger);
	if (null != debugger && BooleanUtils.toBoolean(Objects.toString(debugger))) {
		effectivePerson.setDebugger(true);
	} else {
		effectivePerson.setDebugger(false);
	}
	setAttribute(request, effectivePerson);
	setToken(request, response, effectivePerson);
	return effectivePerson;
}
 
源代码20 项目: uyuni   文件: ChannelSoftwareHandler.java
/**
 * Returns whether the channel may be managed by the given user.
 * @param loggedInUser The current user
 * @param channelLabel The label for the channel in question
 * @param login The login for the user in question
 * @return whether the channel may be managed by the given user.
 * @throws FaultException thrown if
 *   - The loggedInUser doesn't have permission to perform this action
 *   - The login, sessionKey, or channelLabel is invalid
 *
 * @xmlrpc.doc Returns whether the channel may be managed by the given user.
 * @xmlrpc.param #session_key()
 * @xmlrpc.param #param_desc("string", "channelLabel", "label of the channel")
 * @xmlrpc.param #param_desc("string", "login", "login of the target user")
 * @xmlrpc.returntype #param_desc("int", "status", "1 if manageable, 0 if not")
 */
public int isUserManageable(User loggedInUser, String channelLabel,
        String login) throws FaultException {
    User target = XmlRpcUserHelper.getInstance().lookupTargetUser(
            loggedInUser, login);

    Channel channel = lookupChannelByLabel(loggedInUser.getOrg(), channelLabel);
    if (!channel.isCustom()) {
        throw new InvalidChannelException(
                "Manageable flag is relevant for custom channels only.");
    }
    //Verify permissions
    if (!(UserManager.verifyChannelAdmin(loggedInUser, channel) ||
          loggedInUser.hasRole(RoleFactory.CHANNEL_ADMIN))) {
        throw new PermissionCheckFailureException();
    }

    boolean flag = ChannelManager.verifyChannelManage(target, channel.getId());
    return BooleanUtils.toInteger(flag);
}
 
@Override
public void postProcessModelProperty(CodegenModel model, CodegenProperty property) {
    super.postProcessModelProperty(model, property);
    if("null".equals(property.example)) {
        property.example = null;
    }

    //Add imports for Jackson
    if(!BooleanUtils.toBoolean(model.isEnum)) {
        model.imports.add("JsonProperty");

        if(BooleanUtils.toBoolean(model.hasEnums)) {
            model.imports.add("JsonValue");
        }
    }
}
 
源代码22 项目: bird-java   文件: AuthorizePipe.java
@Override
protected Mono<Void> doExecute(ServerWebExchange exchange, PipeChain chain, RouteDefinition routeDefinition) {
    BirdSession session = authorizeManager.parseSession(exchange);

    if(StringUtils.equalsIgnoreCase(routeDefinition.getRpcType(), RpcTypeEnum.DUBBO.getName())){
        if(BooleanUtils.isNotTrue(routeDefinition.getAnonymous())){
            if(session == null){
                return jsonResult(exchange,JsonResult.error(CommonErrorCode.UNAUTHORIZED,"需登录后才能访问"));
            }else {
                String[] permissions = StringUtils.split(routeDefinition.getPermissions(),",");
                if(!authorizeManager.checkPermissions(session,permissions,BooleanUtils.isTrue(routeDefinition.getCheckAll()))){
                    return jsonResult(exchange,JsonResult.error(CommonErrorCode.UNAUTHORIZED,"当前用户权限不足"));
                }
            }
        }
    }

    SessionContext.setSession(session);
    return chain.execute(exchange);
}
 
@Override
public void postProcessModelProperty(CodegenModel model, CodegenProperty property) {
    super.postProcessModelProperty(model, property);
    if("null".equals(property.example)) {
        property.example = null;
    }

    //Add imports for Jackson
    if(!BooleanUtils.toBoolean(model.isEnum)) {
        model.imports.add("JsonProperty");

        if(BooleanUtils.toBoolean(model.hasEnums)) {
            model.imports.add("JsonValue");
        }
    }
}
 
源代码24 项目: cuba   文件: CategoryAttrsFrame.java
protected void initDataTypeColumn() {
    categoryAttrsTable.removeGeneratedColumn("dataType");
    categoryAttrsTable.addGeneratedColumn("dataType", new Table.ColumnGenerator<CategoryAttribute>() {
        @Override
        public Component generateCell(CategoryAttribute attribute) {
            Label dataTypeLabel = factory.createComponent(Label.class);
            String labelContent;
            if (BooleanUtils.isTrue(attribute.getIsEntity())) {
                Class clazz = attribute.getJavaClassForEntity();

                if (clazz != null) {
                    MetaClass metaClass = metadata.getSession().getClass(clazz);
                    labelContent = messageTools.getEntityCaption(metaClass);
                } else {
                    labelContent = "classNotFound";
                }
            } else {
                labelContent = getMessage(attribute.getDataType().name());
            }

            dataTypeLabel.setValue(labelContent);
            return dataTypeLabel;
        }
    });
}
 
源代码25 项目: o2oa   文件: ActionClean.java
private List<String> list(Business business, Boolean cleanWork, Boolean cleanWorkCompleted, Boolean cleanCms)
		throws Exception {
	EntityManager em = business.entityManagerContainer().get(Entry.class);
	CriteriaBuilder cb = em.getCriteriaBuilder();
	CriteriaQuery<String> cq = cb.createQuery(String.class);
	Root<Entry> root = cq.from(Entry.class);
	Predicate p = cb.disjunction();
	if (BooleanUtils.isTrue(cleanWork)) {
		p = cb.or(p, cb.equal(root.get(Entry_.type), Entry.TYPE_WORK));
	}
	if (BooleanUtils.isTrue(cleanWorkCompleted)) {
		p = cb.or(p, cb.equal(root.get(Entry_.type), Entry.TYPE_WORKCOMPLETED));
	}
	if (BooleanUtils.isTrue(cleanCms)) {
		p = cb.or(p, cb.equal(root.get(Entry_.type), Entry.TYPE_CMS));
	}
	cq.select(root.get(Entry_.id)).where(p);
	List<String> os = em.createQuery(cq).setMaxResults(BATCHSIZE).getResultList();
	return os;
}
 
源代码26 项目: apiman   文件: SystemResourceImpl.java
/**
 * @see ISystemResource#exportData(java.lang.String)
 */
@Override
public Response exportData(String download) throws NotAuthorizedException {
    securityContext.checkAdminPermissions();

    if (BooleanUtils.toBoolean(download)) {
        try {
            DownloadBean dbean = downloadManager.createDownload(DownloadType.exportJson, "/system/export"); //$NON-NLS-1$
            return Response.ok(dbean, MediaType.APPLICATION_JSON).build();
        } catch (StorageException e) {
            throw new SystemErrorException(e);
        }
    } else {
        return exportData();
    }
}
 
源代码27 项目: o2oa   文件: V2Base.java
protected <O extends AbstractWo, W extends RelateFilterWi> void relate(Business business, List<O> wos, W wi)
		throws Exception {
	if (!wi.isEmptyRelate()) {
		List<String> jobs = ListTools.extractProperty(wos, TaskCompleted.job_FIELDNAME, String.class, true, true);
		if (BooleanUtils.isTrue(wi.getRelateWork())) {
			this.relateWork(business, wos, jobs);
		}
		if (BooleanUtils.isTrue(wi.getRelateWorkCompleted())) {
			this.relateWorkCompleted(business, wos, jobs);
		}
		if (BooleanUtils.isTrue(wi.getRelateTask())) {
			this.relateTask(business, wos, jobs);
		}
		if (BooleanUtils.isTrue(wi.getRelateRead())) {
			this.relateRead(business, wos, jobs);
		}
		if (BooleanUtils.isTrue(wi.getRelateReadCompleted())) {
			this.relateReadCompleted(business, wos, jobs);
		}
		if (BooleanUtils.isTrue(wi.getRelateReview())) {
			this.relateReview(business, wos, jobs);
		}
	}
}
 
源代码28 项目: o2oa   文件: WebServerTools.java
private static void createIndexPage() throws Exception {
	if (null != Config.nodes().webServers()) {
		StringBuffer buffer = new StringBuffer();
		buffer.append("<!DOCTYPE html>");
		buffer.append("<html>");
		buffer.append("<head>");
		buffer.append("<meta charset=\"UTF-8\">");
		buffer.append("<title>o2 index</title>");
		buffer.append("	</head>");
		buffer.append("<body>");
		for (Entry<String, WebServer> en : Config.nodes().webServers().entrySet()) {
			WebServer o = en.getValue();
			if (BooleanUtils.isTrue(o.getEnable())) {
				String url = BooleanUtils.isTrue(o.getSslEnable()) ? "https://" : "http://";
				url += en.getKey();
				if (BooleanUtils.isTrue(o.getSslEnable())) {
					if (o.getPort() != 443) {
						url += ":" + o.getPort();
					}
				} else {
					if (o.getPort() != 80) {
						url += ":" + o.getPort();
					}
				}
				buffer.append("<a href=\"" + url + "\">" + url + "</a><br/>");
			}

		}
		buffer.append("</body>");
		buffer.append("</html>");
		File file = new File(Config.base(), "index.html");
		FileUtils.write(file, buffer.toString(), DefaultCharset.name);
	}
}
 
源代码29 项目: o2oa   文件: ManualProcessor.java
private List<TaskCompleted> listJoinInquireTaskCompleted(AeiObjects aeiObjects, List<String> identities)
		throws Exception {
	return aeiObjects.getJoinInquireTaskCompleteds().stream().filter(o -> {
		return StringUtils.equals(aeiObjects.getWork().getActivityToken(), o.getActivityToken())
				&& identities.contains(o.getIdentity()) && BooleanUtils.isTrue(o.getJoinInquire());
	}).collect(Collectors.toList());
}
 
源代码30 项目: o2oa   文件: Attachment.java
/** 更新运行方法 */

	@Override
	public String path() throws Exception {
		if (null == this.workCreateTime) {
			throw new Exception("workCreateTime can not be null.");
		}
		if (StringUtils.isEmpty(job)) {
			throw new Exception("job can not be empty.");
		}
		if (StringUtils.isEmpty(id)) {
			throw new Exception("id can not be empty.");
		}
		String str = DateTools.format(workCreateTime, DateTools.formatCompact_yyyyMMdd);
		if (BooleanUtils.isTrue(this.getDeepPath())) {
			str += PATHSEPARATOR;
			str += StringUtils.substring(this.job, 0, 2);
			str += PATHSEPARATOR;
			str += StringUtils.substring(this.job, 2, 4);
		}
		str += PATHSEPARATOR;
		str += this.job;
		str += PATHSEPARATOR;
		str += this.id;
		str += StringUtils.isEmpty(this.extension) ? "" : ("." + this.extension);
		return str;
	}