package net.yosshio0426.kpt.coreimpl.action;

import lombok.RequiredArgsConstructor;
import net.yosshio0426.kpt.core.action.ActionFactory;
import net.yosshio0426.kpt.core.action.Keep;
import net.yosshio0426.kpt.core.action.Try;
import net.yosshio0426.kpt.core.value.Description;
import net.yosshio0426.kpt.core.value.Title;

/**
 * .
 */
@RequiredArgsConstructor
public class ActionFactoryImpl implements ActionFactory {

    private final UniqueActionIdGenerator idGenerator;

    @Override
    public Keep newKeep(Title title, Description description) {
        return new KeepImpl(createInnerAction(title, description));
    }

    @Override
    public Try newTry(Title title, Description description) {
        return new TryImpl(createInnerAction(title, description));
    }

    private InnerAction createInnerAction(Title title, Description description) {
        return new InnerAction(idGenerator.generate(), createActionAttribute(title, description));
    }

    private ActionAttribute createActionAttribute(Title title, Description description) {
        return new ActionAttribute(title, description);
    }
}

@@ -325,16 +325,32 @@
 %0A/**%0A * 
+ActionFactory%E3%81%AE%E5%AE%9F%E8%A3%85
 .%0A */%0A@R
@@ -431,16 +431,48 @@
 tory %7B%0A%0A
+    /**%0A     * ID%E3%82%92%E7%94%9F%E6%88%90%E3%81%99%E3%82%8B.%0A     */%0A
     priv

fix comment