Example usage for org.apache.commons.lang.builder ToStringStyle MULTI_LINE_STYLE

List of usage examples for org.apache.commons.lang.builder ToStringStyle MULTI_LINE_STYLE

Introduction

In this page you can find the example usage for org.apache.commons.lang.builder ToStringStyle MULTI_LINE_STYLE.

Prototype

ToStringStyle MULTI_LINE_STYLE

To view the source code for org.apache.commons.lang.builder ToStringStyle MULTI_LINE_STYLE.

Click Source Link

Document

The multi line toString style.

Usage

From source file:com.vmware.thinapp.workpool.model.OsRegistrationModel.java

@Override
public String toString() {
    return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .setExcludeFieldNames(new String[] { "licenseKey" }).toString();
}

From source file:com.vmware.thinapp.common.workpool.dto.InstanceInfo.java

@Override
public String toString() {
    return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .setExcludeFieldNames(new String[] { "guestPassword" }).toString();
}

From source file:com.gemini.common.repository.impl.BaseRepositoryMongoDBImpl.java

@Override
public void remove(String id) {
    Logger.debug("remove: {}", ToStringBuilder.reflectionToString(id, ToStringStyle.MULTI_LINE_STYLE));
    this.deleteById(id);
}

From source file:com.autonomy.aci.client.transport.AciParameter.java

/**
 * Returns a string representation of the object.
 * @return a string representation of the object
 *//*from w  ww.  j ava  2s. co m*/
@Override
public String toString() {
    return ReflectionToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
}

From source file:com.google.cloud.errorreporting.v1beta1.ReportErrorsServiceSmokeTest.java

public static void executeNoCatch(String projectId) throws Exception {
    try (ReportErrorsServiceClient client = ReportErrorsServiceClient.create()) {
        ProjectName projectName = ProjectName.create(projectId);
        String message = "[MESSAGE]";
        String service = "[SERVICE]";
        ServiceContext serviceContext = ServiceContext.newBuilder().setService(service).build();
        String filePath = "path/to/file.lang";
        int lineNumber = 42;
        String functionName = "meaningOfLife";
        SourceLocation reportLocation = SourceLocation.newBuilder().setFilePath(filePath)
                .setLineNumber(lineNumber).setFunctionName(functionName).build();
        ErrorContext context = ErrorContext.newBuilder().setReportLocation(reportLocation).build();
        ReportedErrorEvent event = ReportedErrorEvent.newBuilder().setMessage(message)
                .setServiceContext(serviceContext).setContext(context).build();

        ReportErrorEventResponse response = client.reportErrorEvent(projectName, event);
        System.out.println(ReflectionToStringBuilder.toString(response, ToStringStyle.MULTI_LINE_STYLE));
    }//from   ww  w. j a  va 2s .  c o  m
}

From source file:com.gemini.domain.model.GeminiNetwork.java

public void addServer(GeminiServer s) {
    if (servers.contains(s)) {
        Logger.info("Did not add server:{} already exists in network start: {} end: {}", s, getStart(),
                getEnd());//w w w . ja va 2s .c  o  m
    } else {
        if (!servers.add(s)) {
            Logger.error("Failed to add server: {}",
                    ToStringBuilder.reflectionToString(s, ToStringStyle.MULTI_LINE_STYLE));
        } else {
            //add a connection between this network and the server
            Logger.debug("Successfully added server: {}",
                    ToStringBuilder.reflectionToString(s, ToStringStyle.MULTI_LINE_STYLE));
            //s.setNetwork(this);
        }
    }
}

From source file:com.jeefuse.system.sequence.model.GsysSequence.java

/** @generated */
@Override// w  w w.j a v  a  2s .  c o m
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId())
            .append("nextId", nextId).toString();
}

From source file:com.gemini.provision.loadbalancer.openstack.LoadBalancerProviderOpenStackImpl.java

@Override
public List<GeminiLoadBalancer> listAllVIPs(GeminiTenant tenant, GeminiEnvironment env) {
    List<GeminiLoadBalancer> vips = Collections.synchronizedList(new ArrayList());

    //authenticate the session with the OpenStack installation
    OSClient os = OSFactory.builder().endpoint(env.getEndPoint())
            .credentials(env.getAdminUserName(), env.getAdminPassword()).tenantName(tenant.getName())
            .authenticate();//from   www . j  av  a 2 s.c o m
    if (os == null) {
        Logger.error("Failed to authenticate Tenant: {}",
                ToStringBuilder.reflectionToString(tenant, ToStringStyle.MULTI_LINE_STYLE));
        return null;
    }

    //try to get the list of VIP's
    List<? extends Vip> osVips;
    try {
        osVips = os.networking().loadbalancers().vip().list();
    } catch (ClientResponseException e) {
        Logger.error("Cloud failure - could not retrieve load balancer Vips. Exception: {}", e);
        return null;
    }

    //copy them to the gemini load balancer objects
    osVips.stream().filter(v -> v != null).forEach(v -> {
        GeminiLoadBalancer newLB = new GeminiLoadBalancer();

        //the simple stuff
        newLB.setCloudID(v.getId());
        newLB.setVirtualPvtIP(InetAddresses.forString(v.getAddress()));

        //Load balancer object references a subnet - this subnet must be 
        //previously created and therefore MSUT BE AVAILABLE in the environment
        //scan the environment networks and find the subnet
        GeminiSubnet subnet = env.getApplications().stream().map(GeminiApplication::getNetworks)
                .flatMap(List::stream).map(GeminiNetwork::getSubnets).flatMap(List::stream)
                .filter(s -> s.getCloudID().equals(v.getId())).findFirst().get();
        if (subnet == null) {
            Logger.info(
                    "Load Balancer cloud ID {} references a subnet not available in environment {}  Subnet ID: {}",
                    v.getId(), env.getName(), v.getSubnetId());
        } else {
            newLB.setVirtualPvtSubnet(subnet);
        }

        //now the pool
        String poolID = v.getPoolId();
        String protocol = v.getProtocol();
        vips.add(newLB);
    });
    return vips;
}

From source file:com.nhncorp.ips.common.bo.ProcessStatusBOImpl.java

@Transactional
@Override//from   w w  w  . ja va  2s. co m
public IpsResponse modifyProcessStatus(WorkRequest workRequest) {
    final List<ReportProduct> productList = workRequest.getProductList();
    IpsResponse response = new IpsResponse();
    logger.debug("modifyProcessStatus : {}", productList);
    if (isRelatedWithPresume(workRequest)) {
        presumeBO.modifyPresume(workRequest);
    }

    if (isRequireInvokePmon(workRequest)) {
        //  ? 
        Set<Long> idList = new HashSet<Long>();
        for (Product reportProduct : productList) {
            idList.add(reportProduct.getProductId());
        }

        response = pmonInvoker.updateStatus(idList, workRequest.getWkResult().getCode(),
                workRequest.getAdmin().getAdminId());
        logger.debug("##   pmonInvoker.updateStatus() 's response = {}",
                ToStringBuilder.reflectionToString(response, ToStringStyle.MULTI_LINE_STYLE));
        workRequest.setProductList(failIdRemover.adjust(productList, response.getFailProductIdList()));
    }

    // REPORT_PROD_MSTR?  ??? ? ?  ? ??.
    logger.debug("## workRequest.getWkResult() : {}", workRequest.getWkResult());
    if (WorkStatus.REPORT_ACCEPTED.getCode().equals(workRequest.getWkResult().getCode())
            || WorkStatus.REPORT_RE_ACCEPTED.getCode().equals(workRequest.getWkResult().getCode())) {
        final int restDateCountToLimitation = 3;
        Date currentDate = new Date();
        String currentDateWithoutHour = DateUtil.dateTOString(currentDate, "yyyy-MM-dd") + " 23:59:59";
        Date today = DateUtil.stringToDate(currentDateWithoutHour, "yyyy-MM-dd HH:mm:ss");
        Date limitDate = workingdayCalculator.calc(today, restDateCountToLimitation);
        workRequest.setLimitDate(limitDate);
    }

    if (workRequest.getProductList().size() == 0) {
        logger.debug("workRequest? productList .");
        return response;
    }

    logger.debug("workRequest = {}",
            ToStringBuilder.reflectionToString(workRequest, ToStringStyle.MULTI_LINE_STYLE));
    Integer result = processStatusDAO.updateProductProcessStatus(workRequest);
    if (result != workRequest.getProductList().size()) {
        throw new NotReportedProductException(workRequest);
    }
    processStatusDAO.insertProcessStatusHistory(workRequest);

    resultSenderBO.send(workRequest);

    return response;
}

From source file:com.jeefuse.system.security.model.GsysRelUserRole.java

/** @generated */
@Override//w ww  .  j  a  v  a2  s .  c  o m
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            // .append("id",id).append("gsysRole",gsysRole).append("gsysUser",gsysUser)
            .toString();
}