restructures the object classes for exporting in package module, now exactly like the ccm_ng classes for core export
git-svn-id: https://svn.libreccm.org/ccm/trunk@4156 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
d5bdd2c7e3
commit
7eb7d12aba
|
|
@ -1,106 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.categories.core.Party;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
import com.arsdigita.portation.Identifiable;
|
||||
import com.arsdigita.portation.categories.core.Utils.CollectionConverter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 01.06.16
|
||||
*/
|
||||
public class Party implements Identifiable {
|
||||
|
||||
private String trunkClass;
|
||||
|
||||
private long id;
|
||||
private String name;
|
||||
private String displayName;
|
||||
private String primaryMailAddress;
|
||||
private List<String> mailAddresses;
|
||||
|
||||
public Party(com.arsdigita.kernel.Party sysParty) {
|
||||
this.trunkClass = sysParty.getClass().getName();
|
||||
|
||||
this.id = sysParty.getID().longValue();
|
||||
this.name = sysParty.getName();
|
||||
this.displayName = sysParty.getDisplayName();
|
||||
if (sysParty.getPrimaryEmail() != null)
|
||||
this.primaryMailAddress = sysParty.getPrimaryEmail().getEmailAddress();
|
||||
this.mailAddresses = CollectionConverter.convertMailAddresses(sysParty.getAlternateEmails());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTrunkClass() {
|
||||
return trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrunkClass(String trunkClass) {
|
||||
this.trunkClass = trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractMarshaller<? extends Identifiable> getMarshaller() {
|
||||
return new PartyMarshaller();
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public void setDisplayName(String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public String getPrimaryMailAddress() {
|
||||
return primaryMailAddress;
|
||||
}
|
||||
|
||||
public void setPrimaryMailAddress(String primaryMailAddress) {
|
||||
this.primaryMailAddress = primaryMailAddress;
|
||||
}
|
||||
|
||||
public List<String> getMailAddresses() {
|
||||
return mailAddresses;
|
||||
}
|
||||
|
||||
public void setMailAddresses(List<String> mailAddresses) {
|
||||
this.mailAddresses = mailAddresses;
|
||||
}
|
||||
}
|
||||
|
|
@ -19,13 +19,13 @@
|
|||
package com.arsdigita.portation.cmd;
|
||||
|
||||
import com.arsdigita.portation.Format;
|
||||
import com.arsdigita.portation.categories.core.Group.Group;
|
||||
import com.arsdigita.portation.categories.core.Group.GroupMarshaller;
|
||||
import com.arsdigita.portation.categories.core.Party.Party;
|
||||
import com.arsdigita.portation.categories.core.Party.PartyMarshaller;
|
||||
import com.arsdigita.portation.categories.core.User.User;
|
||||
import com.arsdigita.portation.categories.core.User.UserMarshaller;
|
||||
import com.arsdigita.portation.categories.core.Utils.CollectionConverter;
|
||||
import com.arsdigita.portation.modules.core.security.Group;
|
||||
import com.arsdigita.portation.modules.core.security.GroupMarshaller;
|
||||
import com.arsdigita.portation.modules.core.security.Party;
|
||||
import com.arsdigita.portation.modules.core.security.PartyMarshaller;
|
||||
import com.arsdigita.portation.modules.core.security.User;
|
||||
import com.arsdigita.portation.modules.core.security.UserMarshaller;
|
||||
import com.arsdigita.portation.modules.core.utils.CollectionConverter;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.categorization;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
import com.arsdigita.portation.Identifiable;
|
||||
import com.arsdigita.portation.modules.core.core.CcmObject;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class Categorization implements Identifiable {
|
||||
|
||||
public String trunkClass;
|
||||
|
||||
private long categorizationId;
|
||||
private Category category;
|
||||
private CcmObject categorizedObject;
|
||||
private boolean index;
|
||||
private long categoryOrder;
|
||||
private long objectOrder;
|
||||
|
||||
|
||||
public Categorization() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTrunkClass() {
|
||||
return this.trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrunkClass(String trunkClass) {
|
||||
this.trunkClass = trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractMarshaller<? extends Identifiable> getMarshaller() {
|
||||
return new CategorizationMarshaller();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.categorization;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class CategorizationMarshaller extends AbstractMarshaller<Categorization> {
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.categorization;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
import com.arsdigita.portation.Identifiable;
|
||||
import com.arsdigita.portation.modules.core.core.CcmObject;
|
||||
import com.arsdigita.portation.modules.core.l10n.LocalizedString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class Category extends CcmObject {
|
||||
|
||||
private String uniqueId;
|
||||
private String name;
|
||||
private LocalizedString title;
|
||||
private LocalizedString description;
|
||||
private boolean enabled;
|
||||
private boolean visible;
|
||||
private boolean abstractCategory;
|
||||
private List<Categorization> objects;
|
||||
private List<Category> subCategories;
|
||||
private Category parentCategory;
|
||||
private long categoryOrder;
|
||||
|
||||
|
||||
public Category() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractMarshaller<? extends Identifiable> getMarshaller() {
|
||||
return new CategoryMarshaller();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.categorization;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class CategoryMarshaller extends AbstractMarshaller<Category> {
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.core;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
import com.arsdigita.portation.Identifiable;
|
||||
import com.arsdigita.portation.modules.core.categorization.Categorization;
|
||||
import com.arsdigita.portation.modules.core.security.Permission;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class CcmObject implements Identifiable {
|
||||
|
||||
public String trunkClass;
|
||||
|
||||
private long objectId;
|
||||
private String uuid;
|
||||
private String displayName;
|
||||
private List<Permission> permissions;
|
||||
private List<Categorization> categories;
|
||||
|
||||
|
||||
public CcmObject() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getTrunkClass() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrunkClass(String trunkClass) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractMarshaller<? extends Identifiable> getMarshaller() {
|
||||
return new CcmObjectMarshaller();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.core;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class CcmObjectMarshaller extends AbstractMarshaller<CcmObject> {
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.core;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
import com.arsdigita.portation.Identifiable;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class EmailAddress implements Identifiable {
|
||||
|
||||
private String trunkClass;
|
||||
|
||||
private String address;
|
||||
private boolean bouncing;
|
||||
private boolean verified;
|
||||
|
||||
|
||||
public EmailAddress() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTrunkClass() {
|
||||
return this.trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrunkClass(String trunkClass) {
|
||||
this.trunkClass = trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractMarshaller<? extends Identifiable> getMarshaller() {
|
||||
return new EmailAddressMarshaller();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.core;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class EmailAddressMarshaller extends AbstractMarshaller<EmailAddress> {
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.l10n;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
import com.arsdigita.portation.Identifiable;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class LocalizedString implements Identifiable {
|
||||
|
||||
private String trunkClass;
|
||||
|
||||
private Map<Locale, String> values;
|
||||
|
||||
|
||||
public LocalizedString() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTrunkClass() {
|
||||
return this.trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrunkClass(String trunkClass) {
|
||||
this.trunkClass = trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractMarshaller<? extends Identifiable> getMarshaller() {
|
||||
return new LocalizedStringMarshaller();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.l10n;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class LocalizedStringMarshaller extends AbstractMarshaller<LocalizedString> {
|
||||
}
|
||||
|
|
@ -16,14 +16,14 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.categories.core.Group;
|
||||
package com.arsdigita.portation.categories.core.security;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
import com.arsdigita.portation.Identifiable;
|
||||
import com.arsdigita.portation.categories.core.Party.Party;
|
||||
import com.arsdigita.portation.categories.core.Utils.CollectionConverter;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
|
|
@ -31,34 +31,15 @@ import java.util.List;
|
|||
*/
|
||||
public class Group extends Party {
|
||||
|
||||
private List<Party> members;
|
||||
private List<Group> subGroups;
|
||||
private Set<GroupMembership> memberships = new HashSet<>();
|
||||
|
||||
public Group(com.arsdigita.kernel.Group sysGroup) {
|
||||
super(sysGroup);
|
||||
|
||||
this.members = CollectionConverter.convertParties(sysGroup.getMembers());
|
||||
this.subGroups = CollectionConverter.convertGroups(sysGroup.getSubgroups());
|
||||
public Group() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractMarshaller<? extends Identifiable> getMarshaller() {
|
||||
return new GroupMarshaller();
|
||||
}
|
||||
|
||||
public List<Party> getMembers() {
|
||||
return members;
|
||||
}
|
||||
|
||||
public void setMembers(List<Party> members) {
|
||||
this.members = members;
|
||||
}
|
||||
|
||||
public List<Group> getSubGroups() {
|
||||
return subGroups;
|
||||
}
|
||||
|
||||
public void setSubGroups(List<Group> subGroups) {
|
||||
this.subGroups = subGroups;
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.categories.core.Group;
|
||||
package com.arsdigita.portation.categories.core.security;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.security;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
import com.arsdigita.portation.Identifiable;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class GroupMembership implements Identifiable {
|
||||
|
||||
private String trunkClass;
|
||||
|
||||
private long membershipId;
|
||||
private Group group;
|
||||
private User member;
|
||||
|
||||
|
||||
public GroupMembership() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTrunkClass() {
|
||||
return this.trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrunkClass(String trunkClass) {
|
||||
this.trunkClass = trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractMarshaller<? extends Identifiable> getMarshaller() {
|
||||
return new GroupMembershipMarshaller();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.security;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class GroupMembershipMarshaller extends AbstractMarshaller<GroupMembership> {
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.categories.core.security;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
import com.arsdigita.portation.Identifiable;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 01.06.16
|
||||
*/
|
||||
public class Party implements Identifiable {
|
||||
|
||||
private String trunkClass;
|
||||
|
||||
private long partyId;
|
||||
private String name;
|
||||
private Set<RoleMembership> roleMemberships = new HashSet<>();
|
||||
|
||||
|
||||
public Party() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTrunkClass() {
|
||||
return trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrunkClass(String trunkClass) {
|
||||
this.trunkClass = trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractMarshaller<? extends Identifiable> getMarshaller() {
|
||||
return new PartyMarshaller();
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.categories.core.Party;
|
||||
package com.arsdigita.portation.categories.core.security;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.security;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
import com.arsdigita.portation.Identifiable;
|
||||
import com.arsdigita.portation.modules.core.core.CcmObject;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class Permission implements Identifiable {
|
||||
|
||||
private String trunkClass;
|
||||
|
||||
private long permissionId;
|
||||
private String grantedPrivilege;
|
||||
private CcmObject object;
|
||||
private Role grantee;
|
||||
private User creationUser;
|
||||
private Date creationDate;
|
||||
private String creationIp;
|
||||
|
||||
|
||||
|
||||
public Permission() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getTrunkClass() {
|
||||
return this.trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrunkClass(String trunkClass) {
|
||||
this.trunkClass = trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractMarshaller<? extends Identifiable> getMarshaller() {
|
||||
return new PermissionMarshaller();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.security;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class PermissionMarshaller extends AbstractMarshaller<Permission> {
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.security;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
import com.arsdigita.portation.Identifiable;
|
||||
import com.arsdigita.portation.modules.core.workflow.TaskAssignment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class Role implements Identifiable {
|
||||
|
||||
private String trunkClass;
|
||||
|
||||
private long roleId;
|
||||
private String name;
|
||||
private Set<RoleMembership> memberships = new HashSet<>();
|
||||
private ArrayList permissions = new ArrayList();
|
||||
private List<TaskAssignment> assignedTasks;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String getTrunkClass() {
|
||||
return this.trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrunkClass(String trunkClass) {
|
||||
this.trunkClass = trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractMarshaller<? extends Identifiable> getMarshaller() {
|
||||
return new RoleMarshaller();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.security;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class RoleMarshaller extends AbstractMarshaller<Role> {
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.security;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
import com.arsdigita.portation.Identifiable;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class RoleMembership implements Identifiable {
|
||||
|
||||
private String trunkClass;
|
||||
|
||||
private long membershipId;
|
||||
private Role role;
|
||||
private Party member;
|
||||
|
||||
public RoleMembership() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getTrunkClass() {
|
||||
return this.trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrunkClass(String trunkClass) {
|
||||
this.trunkClass = trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractMarshaller<? extends Identifiable> getMarshaller() {
|
||||
return new RoleMembershipMarshaller();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.security;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class RoleMembershipMarshaller extends AbstractMarshaller<RoleMembership> {
|
||||
}
|
||||
|
|
@ -16,60 +16,39 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.categories.core.User;
|
||||
package com.arsdigita.portation.categories.core.security;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
import com.arsdigita.portation.Identifiable;
|
||||
import com.arsdigita.portation.categories.core.Group.Group;
|
||||
import com.arsdigita.portation.categories.core.Party.Party;
|
||||
import com.arsdigita.portation.categories.core.Utils.CollectionConverter;
|
||||
import com.arsdigita.portation.categories.core.core.EmailAddress;
|
||||
import com.arsdigita.portation.categories.core.utils.CollectionConverter;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 31.05.16
|
||||
*/
|
||||
public class User extends Party implements Identifiable {
|
||||
public class User extends Party {
|
||||
|
||||
private String personName;
|
||||
private String screenName;
|
||||
private List<Group> groups;
|
||||
private String givenName;
|
||||
private String familyName;
|
||||
private EmailAddress primaryEmailAddress;
|
||||
private List<EmailAddress> emailAddresses;
|
||||
private boolean banned;
|
||||
private String password;
|
||||
private boolean passwordResetRequired;
|
||||
private Set<GroupMembership> groupMemberships = new HashSet<>();
|
||||
|
||||
public User(com.arsdigita.kernel.User sysUser) {
|
||||
super(sysUser);
|
||||
|
||||
this.personName = sysUser.getPersonName().toString(); //family and given name split
|
||||
this.screenName = sysUser.getScreenName();
|
||||
this.groups = CollectionConverter.convertGroups(sysUser.getGroups());
|
||||
public User() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractMarshaller<? extends Identifiable> getMarshaller() {
|
||||
return new UserMarshaller();
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public String getScreenName() {
|
||||
return screenName;
|
||||
}
|
||||
|
||||
public void setScreenName(String screenName) {
|
||||
this.screenName = screenName;
|
||||
}
|
||||
|
||||
public List<Group> getGroups() {
|
||||
return groups;
|
||||
}
|
||||
|
||||
public void setGroups(List<Group> groups) {
|
||||
this.groups = groups;
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.categories.core.User;
|
||||
package com.arsdigita.portation.categories.core.security;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
|
||||
|
|
@ -16,15 +16,15 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.categories.core.Utils;
|
||||
package com.arsdigita.portation.categories.core.utils;
|
||||
|
||||
import com.arsdigita.kernel.EmailAddress;
|
||||
import com.arsdigita.kernel.GroupCollection;
|
||||
import com.arsdigita.kernel.PartyCollection;
|
||||
import com.arsdigita.kernel.UserCollection;
|
||||
import com.arsdigita.portation.categories.core.Group.Group;
|
||||
import com.arsdigita.portation.categories.core.Party.Party;
|
||||
import com.arsdigita.portation.categories.core.User.User;
|
||||
import com.arsdigita.portation.categories.core.security.Group;
|
||||
import com.arsdigita.portation.categories.core.security.Party;
|
||||
import com.arsdigita.portation.categories.core.security.User;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.workflow;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
import com.arsdigita.portation.Identifiable;
|
||||
import com.arsdigita.portation.modules.core.l10n.LocalizedString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class Task implements Identifiable {
|
||||
|
||||
private String trunkClass;
|
||||
|
||||
private long taskId;
|
||||
private LocalizedString label;
|
||||
private LocalizedString description;
|
||||
private boolean active;
|
||||
private String taskState;
|
||||
private Workflow workflow;
|
||||
private List<Task> dependentTasks;
|
||||
private List<Task> dependsOn;
|
||||
private List<String> comments;
|
||||
|
||||
|
||||
public Task() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTrunkClass() {
|
||||
return this.trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrunkClass(String trunkClass) {
|
||||
this.trunkClass = trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractMarshaller<? extends Identifiable> getMarshaller() {
|
||||
return new TaskMarshaller();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.workflow;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
import com.arsdigita.portation.Identifiable;
|
||||
import com.arsdigita.portation.modules.core.security.Role;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class TaskAssignment implements Identifiable {
|
||||
|
||||
private String trunkClass;
|
||||
|
||||
private long taskAssignmentId;
|
||||
private UserTask task;
|
||||
private Role role;
|
||||
|
||||
public TaskAssignment() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getTrunkClass() {
|
||||
return this.trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrunkClass(String trunkClass) {
|
||||
this.trunkClass = trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractMarshaller<? extends Identifiable> getMarshaller() {
|
||||
return new TaskAssignmentMarshaller();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.workflow;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class TaskAssignmentMarshaller extends AbstractMarshaller<TaskAssignment> {
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.workflow;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class TaskMarshaller extends AbstractMarshaller<Task> {
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.workflow;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
import com.arsdigita.portation.Identifiable;
|
||||
import com.arsdigita.portation.modules.core.security.User;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class UserTask extends Task {
|
||||
|
||||
private boolean locked;
|
||||
private User lockingUser;
|
||||
private Date startDate;
|
||||
private Date dueDate;
|
||||
private long durationMinutes;
|
||||
private User notificationSender;
|
||||
private List<TaskAssignment> assignments;
|
||||
|
||||
|
||||
public UserTask() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractMarshaller<? extends Identifiable> getMarshaller() {
|
||||
return new UserTaskMarshaller();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.workflow;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class UserTaskMarshaller extends AbstractMarshaller<UserTask> {
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.workflow;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
import com.arsdigita.portation.Identifiable;
|
||||
import com.arsdigita.portation.modules.core.l10n.LocalizedString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class Workflow implements Identifiable {
|
||||
|
||||
private String trunkClass;
|
||||
|
||||
private long workflowId;
|
||||
private LocalizedString name;
|
||||
private LocalizedString description;
|
||||
private List<Task> tasks;
|
||||
|
||||
|
||||
|
||||
public Workflow() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTrunkClass() {
|
||||
return this.trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrunkClass(String trunkClass) {
|
||||
this.trunkClass = trunkClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractMarshaller<? extends Identifiable> getMarshaller() {
|
||||
return new WorkflowMarshaller();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (C) 2015 LibreCCM Foundation.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.portation.modules.core.workflow;
|
||||
|
||||
import com.arsdigita.portation.AbstractMarshaller;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:tosmers@uni-bremen.de>Tobias Osmers<\a>
|
||||
* @version created the 6/15/16
|
||||
*/
|
||||
public class WorkflowMarshaller extends AbstractMarshaller<Workflow> {
|
||||
}
|
||||
Loading…
Reference in New Issue