Skip to content

Commit

Permalink
Removing ExitPoints as they were deprecated and replaced by Channels
Browse files Browse the repository at this point in the history
  • Loading branch information
etirelli committed Dec 11, 2012
1 parent cd4f0e5 commit f417abf
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 261 deletions.
Expand Up @@ -53,7 +53,6 @@
import org.kie.runtime.Calendars;
import org.kie.runtime.Channel;
import org.kie.runtime.Environment;
import org.kie.runtime.ExitPoint;
import org.kie.runtime.ObjectFilter;
import org.kie.runtime.process.ProcessInstance;
import org.kie.time.SessionClock;
Expand Down Expand Up @@ -462,11 +461,6 @@ public void setKnowledgeRuntime(InternalKnowledgeRuntime kruntime) {

}

public Map<String, ExitPoint> getExitPoints() {
// TODO Auto-generated method stub
return null;
}

public Environment getEnvironment() {
// TODO Auto-generated method stub
return null;
Expand Down
Expand Up @@ -16,6 +16,14 @@

package org.drools.base;

import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.Collections;
import java.util.IdentityHashMap;
import java.util.Map;

import org.drools.FactException;
import org.drools.FactHandle;
import org.drools.WorkingMemory;
Expand Down Expand Up @@ -49,7 +57,6 @@
import org.drools.spi.Tuple;
import org.kie.event.rule.ActivationUnMatchListener;
import org.kie.runtime.Channel;
import org.kie.runtime.ExitPoint;
import org.kie.runtime.KieRuntime;
import org.kie.runtime.KnowledgeRuntime;
import org.kie.runtime.process.NodeInstance;
Expand All @@ -60,14 +67,6 @@
import org.kie.runtime.rule.Match;
import org.kie.runtime.rule.WorkingMemoryEntryPoint;

import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.Collections;
import java.util.IdentityHashMap;
import java.util.Map;

public class DefaultKnowledgeHelper
implements
KnowledgeHelper,
Expand Down Expand Up @@ -425,14 +424,6 @@ public WorkingMemoryEntryPoint getEntryPoint(String id) {
return this.workingMemory.getEntryPoints().get( id );
}

/**
* @deprecated use {@link #getChannel(String)} instead
*/
@Deprecated
public ExitPoint getExitPoint(String id) {
return this.workingMemory.getExitPoints().get( id );
}

public Channel getChannel(String id) {
return this.workingMemory.getChannels().get( id );
}
Expand All @@ -441,14 +432,6 @@ public Map<String, WorkingMemoryEntryPoint> getEntryPoints() {
return Collections.unmodifiableMap( this.workingMemory.getEntryPoints() );
}

/**
* @deprecated use {@link #getChannels()} instead
*/
@Deprecated
public Map<String, ExitPoint> getExitPoints() {
return Collections.unmodifiableMap( this.workingMemory.getExitPoints() );
}

public Map<String, Channel> getChannels() {
return Collections.unmodifiableMap( this.workingMemory.getChannels() );
}
Expand Down
Expand Up @@ -16,6 +16,10 @@

package org.drools.base;

import java.util.Collections;
import java.util.IdentityHashMap;
import java.util.Map;

import org.drools.FactHandle;
import org.drools.WorkingMemory;
import org.drools.common.InternalWorkingMemoryActions;
Expand All @@ -30,16 +34,11 @@
import org.drools.spi.KnowledgeHelper;
import org.drools.spi.Tuple;
import org.kie.runtime.Channel;
import org.kie.runtime.ExitPoint;
import org.kie.runtime.KieRuntime;
import org.kie.runtime.KnowledgeRuntime;
import org.kie.runtime.rule.Match;
import org.kie.runtime.rule.WorkingMemoryEntryPoint;

import java.util.Collections;
import java.util.IdentityHashMap;
import java.util.Map;

public class SequentialKnowledgeHelper
implements
KnowledgeHelper {
Expand Down Expand Up @@ -147,14 +146,6 @@ public WorkingMemoryEntryPoint getEntryPoint(String id) {
return this.workingMemory.getEntryPoints().get( id );
}

/**
* @deprecated use {@link #getChannels()} instead
*/
@Deprecated
public ExitPoint getExitPoint(String id) {
return this.workingMemory.getExitPoints().get( id );
}

public Channel getChannel(String id) {
return this.workingMemory.getChannels().get( id );
}
Expand All @@ -163,14 +154,6 @@ public Map<String, WorkingMemoryEntryPoint> getEntryPoints() {
return Collections.unmodifiableMap( this.workingMemory.getEntryPoints() );
}

/**
* @deprecated use {@link #getChannels()} instead
*/
@Deprecated
public Map<String, ExitPoint> getExitPoints() {
return Collections.unmodifiableMap( this.workingMemory.getExitPoints() );
}

public Map<String, Channel> getChannels() {
return Collections.unmodifiableMap( this.workingMemory.getChannels() );
}
Expand Down
Expand Up @@ -33,11 +33,9 @@
import org.drools.command.runtime.GetIdCommand;
import org.drools.command.runtime.GetKnowledgeBaseCommand;
import org.drools.command.runtime.RegisterChannelCommand;
import org.drools.command.runtime.RegisterExitPointCommand;
import org.drools.command.runtime.RemoveEventListenerCommand;
import org.drools.command.runtime.SetGlobalCommand;
import org.drools.command.runtime.UnregisterChannelCommand;
import org.drools.command.runtime.UnregisterExitPointCommand;
import org.drools.command.runtime.process.AbortProcessInstanceCommand;
import org.drools.command.runtime.process.AbortWorkItemCommand;
import org.drools.command.runtime.process.CompleteWorkItemCommand;
Expand Down Expand Up @@ -81,7 +79,6 @@
import org.kie.runtime.Calendars;
import org.kie.runtime.Channel;
import org.kie.runtime.Environment;
import org.kie.runtime.ExitPoint;
import org.kie.runtime.Globals;
import org.kie.runtime.KnowledgeSessionConfiguration;
import org.kie.runtime.ObjectFilter;
Expand Down Expand Up @@ -266,25 +263,6 @@ public KnowledgeBase getKnowledgeBase() {
return this.commandService.execute( new GetKnowledgeBaseCommand() );
}

/**
* @deprecated Use {@link #registerChannel(String, Channel)} instead
*/
@Deprecated
public void registerExitPoint(String name,
ExitPoint exitPoint) {
this.commandService.execute( new RegisterExitPointCommand( name,
exitPoint ) );
}

/**
* @deprecated Use {@link #unregisterChannel(String)} instead.
*/
@Deprecated
public void unregisterExitPoint(String name) {
this.commandService.execute( new UnregisterExitPointCommand( name ) );

}

public void registerChannel(String name,
Channel channel) {
this.commandService.execute( new RegisterChannelCommand( name,
Expand Down

This file was deleted.

This file was deleted.

Expand Up @@ -83,7 +83,6 @@
import org.kie.runtime.Environment;
import org.kie.runtime.EnvironmentName;
import org.kie.runtime.ExecutionResults;
import org.kie.runtime.ExitPoint;
import org.kie.runtime.Globals;
import org.kie.runtime.process.ProcessInstance;
import org.kie.runtime.process.WorkItemHandler;
Expand Down Expand Up @@ -160,8 +159,6 @@ public abstract class AbstractWorkingMemory

private InternalKnowledgeRuntime kruntime;

private Map<String, ExitPoint> exitPoints;

private Map<String, Channel> channels;

private Environment environment;
Expand Down Expand Up @@ -1187,32 +1184,6 @@ public InternalKnowledgeRuntime getKnowledgeRuntime() {
return this.kruntime;
}

/**
* @deprecated Use {@link #registerChannel(String, Channel)} instead.
*/
@Deprecated
public void registerExitPoint(String name,
ExitPoint exitPoint) {
getExitPoints().put(name, exitPoint);
}

/**
* @deprecated Use {@link #unregisterChannel(String)} instead.
*/
@Deprecated
public void unregisterExitPoint(String name) {
if (exitPoints != null) exitPoints.remove(name);
}

/**
* @deprecated Use {@link #getChannels()} instead.
*/
@Deprecated
public Map<String, ExitPoint> getExitPoints() {
if (exitPoints == null) exitPoints = new ConcurrentHashMap<String, ExitPoint>();
return exitPoints;
}

public void registerChannel(String name,
Channel channel) {
getChannels().put(name, channel);
Expand Down
Expand Up @@ -38,7 +38,6 @@
import org.drools.type.DateFormats;
import org.kie.runtime.Calendars;
import org.kie.runtime.Channel;
import org.kie.runtime.ExitPoint;
import org.kie.runtime.rule.WorkingMemoryEntryPoint;

public interface InternalWorkingMemory
Expand Down Expand Up @@ -120,12 +119,6 @@ void delete(final FactHandle factHandle,

public InternalKnowledgeRuntime getKnowledgeRuntime();

/**
* @deprecated Use {@link #getChannels()} instead.
*/
@Deprecated
public Map<String, ExitPoint> getExitPoints();

/**
* Returns a map of channel Id->Channel of all channels in
* this working memory
Expand Down

0 comments on commit f417abf

Please sign in to comment.