Skip to content

Commit

Permalink
Merge pull request gravitee-io#4 from gravitee-io/features/event
Browse files Browse the repository at this point in the history
Features/event : Manually deploy API to the Gateway
  • Loading branch information
brasseld committed Jan 11, 2016
2 parents 2ca3361 + baf7640 commit 1cf64d0
Show file tree
Hide file tree
Showing 3 changed files with 187 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
*
* 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 io.gravitee.repository.management.api;

import io.gravitee.repository.management.model.Event;
import io.gravitee.repository.management.model.EventType;

import java.util.List;
import java.util.Set;

/**
* @author Titouan COMPIEGNE
*/
public interface EventRepository extends CrudRepository<Event, String> {

Set<Event> findByType(List<EventType> eventTypes);

}
128 changes: 128 additions & 0 deletions src/main/java/io/gravitee/repository/management/model/Event.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
/**
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
*
* 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 io.gravitee.repository.management.model;

import java.util.Date;

/**
* @author Titouan COMPIEGNE
*/
public class Event {

/**
* The event ID
*/
private String id;

/**
* The event Type
*/
private EventType type;

/**
* The event payload
*/
private String payload;

/**
* The event parent
*/
private String parentId;

/**
* The event origin
*/
private String origin;

/**
* The event publisher
*/
private String username;

/**
* The event creation date
*/
private Date createdAt;

/**
* The event last updated date
*/
private Date updatedAt;

public String getId() {
return id;
}

public void setId(String id) {
this.id = id;
}

public EventType getType() {
return type;
}

public void setType(EventType type) {
this.type = type;
}

public String getPayload() {
return payload;
}

public void setPayload(String payload) {
this.payload = payload;
}

public String getParentId() {
return parentId;
}

public void setParentId(String parentId) {
this.parentId = parentId;
}

public String getOrigin() {
return origin;
}

public void setOrigin(String origin) {
this.origin = origin;
}

public String getUsername() {
return username;
}

public void setUsername(String username) {
this.username = username;
}

public Date getCreatedAt() {
return createdAt;
}

public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}

public Date getUpdatedAt() {
return updatedAt;
}

public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
*
* 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 io.gravitee.repository.management.model;

/**
* @author Titouan COMPIEGNE
*/
public enum EventType {

PUBLISH_API,
PUBLISH_API_RESULT,
UNPUBLISH_API,
UNPUBLISH_API_RESULT,
SYSTEM_MONITOR
}

0 comments on commit 1cf64d0

Please sign in to comment.