-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
49ea6f4
commit b71fd6a
Showing
4 changed files
with
151 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 0 additions & 54 deletions
54
dotCMS/src/main/java/org/apache/felix/framework/OSGIRegistrationAttempt.java
This file was deleted.
Oops, something went wrong.
63 changes: 63 additions & 0 deletions
63
dotCMS/src/main/java/org/apache/felix/framework/OSGIRegistrationCheck.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package org.apache.felix.framework; | ||
|
||
import com.dotmarketing.portlets.workflows.actionlet.WorkFlowActionlet; | ||
import org.osgi.framework.BundleContext; | ||
|
||
import java.util.Collection; | ||
import java.util.Optional; | ||
|
||
public class OSGIRegistrationCheck { | ||
|
||
private final BundleContext context; | ||
private final WorkFlowActionlet actionlet; | ||
private final Collection<WorkFlowActionlet> actionlets; | ||
private int attempts; | ||
private boolean readyToRegister; | ||
|
||
public OSGIRegistrationCheck(final BundleContext context, | ||
final WorkFlowActionlet actionlet, | ||
final Collection<WorkFlowActionlet> actionlets) { | ||
this.context = context; | ||
this.actionlet = actionlet; | ||
this.actionlets = actionlets; | ||
attempts = 0; | ||
readyToRegister = false; | ||
} | ||
|
||
public BundleContext getContext() { | ||
return context; | ||
} | ||
|
||
public WorkFlowActionlet getActionlet() { | ||
return actionlet; | ||
} | ||
|
||
public Collection<WorkFlowActionlet> getActionlets() { | ||
return actionlets; | ||
} | ||
|
||
public int getAttempts() { | ||
return attempts; | ||
} | ||
|
||
public boolean isReadyToRegister() { | ||
return readyToRegister; | ||
} | ||
|
||
public void setReadyToRegister(boolean readyToRegister) { | ||
this.readyToRegister = readyToRegister; | ||
} | ||
|
||
public void incrementAttempts() { | ||
attempts++; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "OSGIRegistrationCheck{" + | ||
"actionlet=" + Optional.ofNullable(actionlet).map(WorkFlowActionlet::getName).orElse(null) + | ||
", attempts=" + attempts + | ||
", readyToRegister=" + readyToRegister + | ||
'}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters