001/** 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018 019package org.apache.oozie.util; 020 021import java.util.ArrayList; 022 023/** 024 * A wrapper over log line to save redundant use of regex 025 */ 026public class LogLine { 027 /** 028 * List to hold parts of log message. 029 */ 030 private ArrayList<String> logParts; 031 private String line; 032 /** 033 * Boolean to indicate if this log line has matched to the given log pattern 034 */ 035 private MATCHED_PATTERN pattern = MATCHED_PATTERN.NONE; 036 037 public ArrayList<String> getLogParts() { 038 return logParts; 039 } 040 041 public void setLogParts(ArrayList<String> logParts) { 042 this.logParts = logParts; 043 } 044 045 public String getLine() { 046 return line; 047 } 048 049 public void setLine(String line) { 050 this.line = line; 051 } 052 053 public MATCHED_PATTERN getMatchedPattern() { 054 return pattern; 055 } 056 057 public void setMatchedPattern(MATCHED_PATTERN pattern) { 058 this.pattern = pattern; 059 } 060 061 enum MATCHED_PATTERN { 062 SPLIT, GENENRIC, NONE; 063 } 064}