public class AuthManager extends AbstractInitializableAttribute
This class requires access to the github repository for Auth.
The primary purpose of this class is to make it easy to download, build and start the Auth on a local machine. This is primarily useful for testing.
See org/terraswarm/accessor/accessors/web/net/authSetup for a shell script that does something similar.
NamedObj.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
FileParameter |
authSourceDirectory
The path to the Auth sources.
|
Parameter |
buildAuth
If true then build the local copy of the Auth.
|
Parameter |
cleanAuth
If true then remove the contents of the authSourceDirectory
at the start of initialization.
|
Parameter |
isLocalAuth
Use a local version of Auth.
|
Parameter |
stopAuthInWrapup
If true, then stop Auth processes in wrapup().
|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
Constructor and Description |
---|
AuthManager(CompositeEntity container,
java.lang.String name)
Construct a AuthManager with a name and a container.
|
Modifier and Type | Method and Description |
---|---|
static void |
downloadAndBuild(FileParameter authSourceDirectoryParameter,
boolean cleanAuth,
boolean buildAuth)
Download and build Auth.
|
void |
initialize()
Initializes the AuthManager attribute.
|
void |
preinitialize()
Preinitialze the AuthManager attribute.
|
void |
wrapup()
Stop Auth processes.
|
_getInitializableContainer, addInitializable, clone, hierarchyChanged, hierarchyWillChange, removeInitializable, setContainer
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
description, getContainer, getDisplayName, getFullName, getName, getName, setName
public Parameter buildAuth
public Parameter cleanAuth
public FileParameter authSourceDirectory
public Parameter isLocalAuth
public Parameter stopAuthInWrapup
public AuthManager(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- Container of this attribute.name
- Name of this attribute.IllegalActionException
- If the container is incompatible
with this actor.NameDuplicationException
- If the name coincides with
an actor already in the container.public static void downloadAndBuild(FileParameter authSourceDirectoryParameter, boolean cleanAuth, boolean buildAuth) throws IllegalActionException, java.io.IOException
authSourceDirectoryParameter
- The path to the Auth sources.cleanAuth
- True if Auth should be cleaned before installingbuildAuth
- True if Auth should be built and installedIllegalActionException
- If there are problems accessing the parameter.java.io.IOException
- If there are problems accessing or build the repositories.public void initialize() throws IllegalActionException
initialize
in interface Initializable
initialize
in class AbstractInitializableAttribute
IllegalActionException
- If thrown by a subclass.public void preinitialize() throws IllegalActionException
preinitialize
in interface Initializable
preinitialize
in class AbstractInitializableAttribute
IllegalActionException
- If there are problems checking
out the repositories while building and initializing Auth.public void wrapup() throws IllegalActionException
wrapup
in interface Initializable
wrapup
in class AbstractInitializableAttribute
IllegalActionException
- If the parent class throws it
of if there are problems terminating the processes