Java tutorial
/** * Copyright (c) 2011 Zauber S.A. <http://www.zaubersoftware.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.zaubersoftware.mule.module.github.schema; import java.util.List; import org.apache.commons.lang.Validate; import com.github.api.v2.schema.User; /** * DTO that encapsulates the push information sent by githubs * * * @author Marcelo Turrin * @since Mar 24, 2011 */ public class Push { private final List<Commit> commits; private final Repository repository; private final User pusher; private final String ref; /** Constructor none of the parameters can be null or empty*/ public Push(final User pusher, final Repository repository, final List<Commit> commits, final String ref) { super(); Validate.notEmpty(commits); Validate.notNull(repository); Validate.notNull(pusher); Validate.notEmpty(ref); this.pusher = pusher; this.commits = commits; this.repository = repository; this.ref = ref; } public List<Commit> getCommits() { return commits; } public Repository getRepository() { return repository; } public User getPusher() { return pusher; } public String getRef() { return ref; } }